rowdogz
Forum Replies Created
-
Forum: Plugins
In reply to: [Football Pool] Filter results pageThank you, I built a new page using PHP to achieve the goal and happy to say it works really well.
Forum: Plugins
In reply to: [Football Pool] CLI CALCThanks for coming back to me, I find when I run the CLI CALC, it does calculate the scores for the users. But I have to go into the UI and press save under matches for it to update to show the users their new scores.
I thought using the CLI CALC function would calculate the scores for users and update them to show the users when the log in?Forum: Plugins
In reply to: [Football Pool] Random computer generated scoresAh that makes sense – I was testing and it kept changing the users awarded points but it must be randomly predicting the missing score each time and thus changing the outcome every time the calc method runs. I think I need to add a method that predicts missing scores for a user and adds it to the DB to make it permanent. I was thinking I could create a method that does this when the match is locked for editing.
Forum: Plugins
In reply to: [Football Pool] Random computer generated scoresThe current ‘fix incomplete’ method – does it update the users prediction in the DB from ‘NULL’ to ‘0’ or is it meant to leave it as ‘NULL’
Forum: Plugins
In reply to: [Football Pool] Random computer generated scoresAntoineH – Thank you. I have added this in but its hard for me to check if its working. It should be checking if a user has entered a home or away score and add a random number between 0-60 on any missing scores:
$user_home_is_valid = is_numeric($user_home); $user_away_is_valid = is_numeric($user_away); // Check if the user has provided predictions for both home and away teams if ($user_home_is_valid && $user_away_is_valid) { $user_home = (int) $user_home; $user_away = (int) $user_away; } else { // User prediction not complete for one or both teams // Set random scores between 0 and 60 for missing predictions if (!$user_home_is_valid) { $user_home = rand(0, 60); } if (!$user_away_is_valid) { $user_away = rand(0, 60); } }Forum: Plugins
In reply to: [Football Pool] Random computer generated scoresAntoineH – I wonder if it is possible for me to use the same mechanism you created to fix the missing predictions to allow me to create the computer generated random scores for users. Can I Ask where about this code is?
Forum: Plugins
In reply to: [Football Pool] Different Leaguesah amazing thank you – that makes sense, I have tested and it shows up on the new page using the shortcode; only thing I need to figure out / update is the size of everything on this new page is way bigger and doesn’t work as well on mobile as my normal prediction page. Maybe some CSS issues I need to tweak.
Forum: Plugins
In reply to: [Football Pool] Login IssueTried the plugins – didn’t help. sometimes it works sometimes it doesn’t. I did find that the page I was using did not have a login / logout button as standard so I added this code directly into the functions file of the theme. Not sure if that causes issues with the users / login process of the prediction plugin?
add_filter(‘wp_nav_menu_items’, ‘crunchify_add_login_logout_menu’, 10, 2);
function crunchify_add_login_logout_menu($items, $args) {
ob_start();
wp_loginout(‘index.php’);
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= ”. $loginoutlink .”;
return $items;
}Forum: Plugins
In reply to: [Football Pool] Login IssueAntoine H – Thank you for the plugin and coming back to me. Its odd the user ( my test user) is still in the pool. What I Found is if I login using the menu bar – it logs me in and I can see all the other pages but the predict (pool) page does not work. If I logout and login directly from the predict / pool page then it works. I must have messed up the login somehow.