af3
Forum Replies Created
-
Forum: Plugins
In reply to: [Football Pool] Log every user predictionYeah, some users will blame anything 🙂 The timestamp is just a way like what you said, an audit trail — this will help the users to understand what happened even if not 100%.
Forum: Plugins
In reply to: [Football Pool] Log every user prediction@antoineh is it possible to add time of entry in pool_wprw_predictions db table so this can be shown on the prediction page i.e. the time when user made the predictions. I had similar issues when user that didnt make any prediction (nothing saved in db) contesting that he did made a prediction and blaming the system instead for not saving.
Forum: Plugins
In reply to: [Football Pool] Issue with prediction score “0”Thanks!
Forum: Plugins
In reply to: [Football Pool] Next Match widget time is offAntoine
I added this js in header.php of my theme:<script type="text/javascript"> <!-- Get the user timezone --> var timezone_offset_minutes = new Date().getTimezoneOffset(); timezone_offset_minutes = timezone_offset_minutes == 0 ? 0 : -timezone_offset_minutes; <!-- Timezone difference in minutes such as 330 or -360 or 0 --> console.log(timezone_offset_minutes); </script>And made this function inside class-football-pool-utils.php like this:
public static function date_from_gmt( $date_string, $date_format = 'Y-m-d H:i' ) { $timezone_offset_minutes = $_GET['timezone_offset_minutes']; // Convert minutes to seconds $timezone_name = timezone_name_from_abbr("", $timezone_offset_minutes*60, false); date_default_timezone_set($timezone_name); if ( strlen( $date_string ) === strlen( '0000-00-00 00:00' ) ) $date_string .= ':00'; return $date_string !== '' ? get_date_from_gmt( $date_string, $date_format ) : ''; }Not sure if this is the best but seems like the countdown changes based on my pc’s timezone.
Forum: Plugins
In reply to: [Football Pool] Issue with prediction score “0”Nice!
How abt only making 0 when saving instead of adding during recalc? So only those input being saved are checked if NULL and changed to 0. Just a thought.Forum: Plugins
In reply to: [Football Pool] Next Match widget time is offThanks Antoine. Maybe can use javascript to populate a session that has the user timezone and call in php that session data to calculate the countdown? Anyway i dont know hpw to do this ;(
Forum: Plugins
In reply to: [Football Pool] Issue with prediction score “0”Maybe there is a way to put empty to default to zero?
Forum: Plugins
In reply to: [Football Pool] show user predictions for open matchesThe “show user predictions” is already showing all users predictions in addition to the current user. No ?
The url https://your.domain.com/statistics/?view=matchpredictions&match=xxx shows a table with all users predictions?
Forum: Plugins
In reply to: [Football Pool] Allow admin to view user predictionYes. I wanted Site Admin to be able to view predictions of users, ranking etc — but I guess, in this case it wont work. I’ll have to login as the pool user. Thanks
Forum: Plugins
In reply to: [Football Pool] Allow admin to use shoutboxHey — this works! It now shows Site Admin instead of unknown user. Thanks.
Forum: Plugins
In reply to: [Football Pool] Add Group name in [fp-group id=x]Got it. Thx
DOne. thx
I think event manager is not using any local language.. it uses wordpress translation.
I had the same problem and use this hack to force EM to use local translation using loco.I added this in functions.php and it now loads the loco translation file. But seems like not all strings are translatable… for example, if you are using buddypress, the “xx added the event xxx” is not translated.
1. Added to your theme’s functions.php
function my_custom_em_plugin_translations() { $text = 'events-manager'; $locale = apply_filters( 'plugin_locale', function_exists( 'determine_locale' ) ? determine_locale() : get_locale(), $text ); $mofile = WP_CONTENT_DIR . '/languages/plugins/'. $text . '-' . $locale . '.mo'; $loaded = load_textdomain( $text, $mofile ); if( !$loaded ) { $loaded = load_plugin_textdomain( $text, false, '/languages/' ); } if( !$loaded ) { $loaded = load_muplugin_textdomain( $text, '/languages/' ); } } add_action('init', 'my_custom_em_plugin_translations');2. You must save your loco translated mo file (under setup) to the same dir as you set above
Maybe related to this too… my experice with the latest update so far..
the calendar flatpickr doesnt change the month everytime we click on the left/right arrow. The month stays unchanged.
ughhh..
Forum: Themes and Templates
In reply to: [Kadence] Translate “LISTEN TO THE MESSAGE”Duh.. its in Customize archive layout!! lol..