Hi,
1. No, there is no admin screen for that. You would have to query the database for it. Example below is for one user. The query selects users based on their login name.
SELECT u.display_name AS user_name, m.id AS match_nr, t1.name AS home, t2.name AS away
FROM pool_wp_predictions p
INNER JOIN wp_users u ON ( u.ID = p.user_id )
INNER JOIN pool_wp_matches m ON ( m.id = p.match_id )
INNER JOIN pool_wp_teams t1 ON ( t1.id = m.home_team_id )
INNER JOIN pool_wp_teams t2 ON ( t2.id = m.away_team_id )
WHERE u.user_login = 'AntoineH'
If you want to see results for all users, you can leave out the last line of the query.
2. Unfortunately WordPress doesn’t support multiple roles for one user. Maybe there is a plugin that overcomes this lack in the security model. If there is no plugin, then the only option is to give the person two logins.
3. No,there is no such shortcode. But it should be fairly easy to write one, so I’ll see if I can add it to the next version (and post the code here).
Hi,
Thanks so much for the quick response. Sorry for the question but how do I implement the query code from point 1?
Thanks again
You don’t implement the SQL query, you run it in a tool like phpMyAdmin.
If you want to run it, you need some code that uses the WordPress database class (wpdb) and output the results.
I’ve written something like it before so I went ahead and implemented the above SQL in it and changed it a bit. You can download the file here and if you add it to your wp-content/plugins
folder and activate the plugin you will get an extra menu option for the Football Pool.
Antoine,
Seriously impressed. Thank you so much. One of the best supports for a plugin on WordPress.
Thanks again, it’s just what I need.