AntoineH
Forum Replies Created
-
Forum: Plugins
In reply to: [Football Pool] logo for team on the next matchIf you want to change the layout of the plugin, you can do so via css.
If it is not only about changing the layout, but also about adding information, then you can change the template via filters. The latter will allow you to add information that is not yet available in the vanilla plugin.
Forum: Plugins
In reply to: [Football Pool] Adding the score trough api or code?I gave it another thought, and maybe it is better to copy some of the code in the two CLI classes for calculating the score and for importing results. Code can be found in the /cli folder
Calculation CLI uses this construct
$completed = 0;
$error = false;
$calc_args = array(
'force_calculation' => 'no',
'iteration' => 0,
);
while ( $completed !== 1 && $error === false ) {
$calc_args = Football_Pool_Admin_Score_Calculation::process( true, $calc_args );
extract( $calc_args, EXTR_OVERWRITE );
}The results import just uses some SQL queries to update relevant tables.
If you want to automate stuff, you can also consider writing your own CLI function, schedule it via a cron, and kick off my CLI functions once you’re done.
Forum: Plugins
In reply to: [Football Pool] Adding the score trough api or code?You should be able to call the following to start a calculation:
Football_Pool_Admin::update_score_history( 'force' );
Forum: Plugins
In reply to: [Football Pool] More leagues for userNo, this is not supported.
Forum: Plugins
In reply to: [Football Pool] Prediction privat leagueThis is not supported out of the box. An admin has to create the league and add the users.
Forum: Plugins
In reply to: [Football Pool] Filter results pagehi,
If you have any PHP knowledge you could extend the plugin with a filter to add the dropdown on the matches page and to filter the data set based on the chosen option.
If you don’t have a lot of experience in writing PHP, then you can consider using the shortcodes instead of the standard matches page. You can create a page per round (or combine a few) and link to those pages from the menu. E.g. on one page:
[fp-matches matchtype="1"]
And the following on another page:
[fp-matches matchtype="2"]
There is more info on the help page on how to use the shortcodes and available parameters. I’ve also seen users using the shortcodes on one page and then show/hide the individual shortcodes via a ‘tabs’ or ‘accordion’ component.
If you simply want to hide matches, then you can set the visibility of a match type to “hidden”. Maybe that is also a solution for you.
Hope this helps.
Forum: Plugins
In reply to: [Football Pool] Manually create MatchesThe team’s image cannot be shown on the prediction sheet. Only the flag image is available in the template.
The default pages can only be edited if you overwrite the templates via filters. This requires some PHP knowledge. More info and examples on the help page and the first post of this forum.
Forum: Plugins
In reply to: [Football Pool] problem displaying team flagsThe only way to change the layout of the pages, is by adding some custom CSS. If you right-click the element that you want to change, you can choose “Inspect element” in your browser (most browsers have some sort of developer tools) and play around with the CSS styling.
The link in your post is not valid anymore. Therefore, can’t check to see if I can give you a hint to get started.
Forum: Plugins
In reply to: [Football Pool] Points awardedDraws are not excluded from toto scores. Only the goal difference bonus is affected by this setting.
Forum: Plugins
In reply to: [Football Pool] Points awardedCan you share the URL to the stats page of the match?
Forum: Plugins
In reply to: [Football Pool] Background predictionBoth can only be done by adding CSS to overwrite the current styling. Right-click the element that you want to change in the browser and choose “Inspect element” (or similar option that your browser supports). In the developer tools that open, you should be able to play around with the background color until it is the result that you want. Then copy that line to your “Addtional CSS” field under your Appearance options in the WP admin.
Hiding the team name can also be done via this technique. Find the element and add a
display: none;
style to it.Forum: Plugins
In reply to: [Football Pool] Charts have some problemsI’ve never seen anything like this before. The highcharts folder is placed in the plugins folder so it won’t be deleted when the plugin, wordpress or theme is updated. Maybe you should contact your hosting company to see if they can help.
Forum: Plugins
In reply to: [Football Pool] Is there any way to modify the default plugin pages?Yes, that is possible. The plugin uses templates that you can override via filters (this requires some basic understanding of PHP). There are several examples in the first post on this forum.
Forum: Plugins
In reply to: [Football Pool] Manually create MatchesCan you check the settings of the match type for that match? Is it set to “visible”? Although, that shouldn’t affect the admin, it might be the cause of the match not being visible on the prediction sheet.
Please also note that the admin uses pagination. The new match is not on a next page, is it?
Forum: Plugins
In reply to: [Football Pool] Manually create MatchesRight now I don’t really have a clue what is happening. Some things you might want to check:
- Do you get an error message when manually creating the matches? Please also check your error log.
- Are the manually created matches visible in the admin?
- Are the manually created matches in the same group, match type and/or stadium as your imported matches? If not, check to see if there are differences between the newly created ones and the imported ones, or try to create a match with the same linked objects as an imported one.
I hope that this will give some extra information.