sillery4ever
Forum Replies Created
-
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?where can i insert this code in order that the activation is invisible to the user ?
// get the id of the currently logged in user
$user_id = get_current_user_id();// if there is a user, then execute the query
if ( $user_id > 0 ) {
$wpdb->query( “DELETE FROM pool_wp_league_users WHERE user_id = {$user_id}” );
}Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?here content of the plugin
<?PHP
/*
Plugin Name: ACTIVATION PRONOSTIC PLAYER
Description: Permet de reactiver automatiquement des le login, le compte mis en inactif par admin du site.
Version: 1.0
Author: studiopixl
Author URI: https://www.studiopixl.fr/*/
// display current user (to test)
global $current_user;
if ( isset($current_user) ) {
echo $current_user->user_login;}
// get the id of the currently logged in user
$user_id = get_current_user_id();// if there is a user, then execute the query
if ( $user_id > 0 ) {
$wpdb->query( “DELETE FROM pool_wp_league_users WHERE user_id = {$user_id}” );
}?>
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?TY antoine
i try to write a plugin to automatically re-actived all user who log-in !
but at the activation of the plugin, there is an error :
Fatal error: Call to a member function query() on a non-object on line 24
line 24 is :
$wpdb->query( “DELETE FROM pool_wp_league_users WHERE user_id = {$user_id}” );
could you help me ?
TY
nano
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?Many thanks for your help… i understand how to proceed !
So Now i want to display a button to allow user to “reactive account” only if the current user is inactive… and mask button if current user is actives.
Could you tell me if exist the phpfunction which permit to know if the user is actived or not ? (like is_user_logged_in() to know if user is logged in or not )
what is this function name ?
TY
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?Sorry… ii ave you a bad answer …i don’t use “league options” !
option is not actived in the general options page ! and my league_users table is empty
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?but i dont know how to exclude inactive players from the rankings and calculations with this options
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?I think this option is called “categories” in french.
this option is actived, yes !
But i have only one value for all my players (Default value)
Forum: Plugins
In reply to: [Football Pool] Options to Active/desactive Players ?Which options ??
It is ok with the very latest version (0.5.5)…. clone and installation are OK but the WP is now in English language !!!
I try to reinstall upagre in WP French, i try to change Language in options… but no way to translate in french !
System says that some transaltions are out of date, but impossible to upgrade
some ideas to solve this problems ?
thank you.
Nano
Merci C-TOMOE …. j ‘ai cru devenir fou avec cette etape 2 sans fin ??
Forum: Plugins
In reply to: [Football Pool] How to simply desactive all inactive players ?Do you think is it possible to diplay number of predictions done by each user in this screen ? …wp-admin/admin.php?page=footballpool-users ?
Forum: Plugins
In reply to: [Football Pool] How to simply desactive all inactive players ?user who have no predictions is not present in pool_wp_predictions ? isnt it ?
Forum: Plugins
In reply to: [Football Pool] Home page : very slow loading…ok TY
Forum: Plugins
In reply to: [Football Pool] Cron job for "full calculations" ?Now i have 1000+ user…. smart calculations have a duration of 30min.
I am looking for an idea to run a cron job each night.
My serveur can execute some php file automatically. Could you tell me wich php file can i affect to the cron job to run automatically the smart calculation ?
TY
Forum: Plugins
In reply to: [Football Pool] How Do I Paginate The Rankings?same bug for me…. the page display 10 user but in the slector in bottom of page is displayed : 1 page /0 and can not go to next page !