stretchwickster
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Athletics] Results table does not populate in IE9 or IE8Sure, there are a number of results tables on this page…
https://www.churchrunner.co.uk/results/Forum: Plugins
In reply to: [WP Athletics] Particular custom Age Categories missing from table outputs1) Regarding the missing age category…
a) From the plugin’s Manage Results facility, pick a result where the age category is missing and note down all the details connected with that result
b) In thewp_wpa_result
table, find that same result and let me know what theage_category
field is set to.
c) In thewp_options
table, find the row whereoption_name='wp-athletics_age_cats'
and let me know what the option_value field is set to.2) To update the gender of one of your runners…
a) In thewp_users
table, note down the number in theID
field for the user you wish to edit
b) In thewp_usermeta
table, find the row whereuser_id
matches the number you noted in Step 1 ANDmeta_key='wp-athletics_gender'
c) In the row found in Step 2, setmeta_value
toM
orF
as appropriateForum: Plugins
In reply to: [WP Athletics] Results table does not populate in IE9 or IE8Android browser exhibits the same issue.
Forum: Plugins
In reply to: [WP Athletics] Stripping slashes from athlete namesHi Conor,
I believe the storing of a string in an escaped format is not necessary (see https://stackoverflow.com/a/14795856/2047725). Unfortunately, I’m not up to speed in finding my way round the structure of a plugin, but is it possible that backslashes are being passed through to $wpdb->update in the create_user function in wp-athletics-db.php? Interestingly, there’s a comment in the codex that says the $data argument should be raw and not SQL escaped (https://codex.www.ads-software.com/Class_Reference/wpdb#UPDATE_rows). Alternatively, perhaps wp_create_user is adding the backslashes.
If backslashes can’t be kept out of the database, then the best place to remove them would be immediately after querying the database, with a call to stripslashes. I wasn’t certain where to do this, so I opted for the front-end mod instead, as I could clearly see where the data was being displayed.
Hope that helps,
CliveForum: Plugins
In reply to: [WP Athletics] Stripping slashes from athlete namesThe User Profile is also a place where the backslash is displayed so I had to edit the appropriate line of WPA.Ajax.getUserProfile to correct it:
jQuery('#wpa-profile-name').html(WPA.stripSlashes(result.name));
Forum: Plugins
In reply to: [WP Athletics] Particular custom Age Categories missing from table outputsHi Conor,
No problem at all.
The issue was due to the fact that wp_wpa_result.age_category field was defined as a varchar(4) and therefore wasn’t fully storing the age category identifiers which were longer than 4 chars. For example, “C1115” which represents the 11-14 age group was being stored as “C111”. I changed the data type of the aforementioned field to varchar(7) and ran a few SQL UPDATE queries to correct the truncated identifiers. Now everything is working nicely.
In the next release, I’d therefore recommend changing the data type of the wp_wpa_result.age_category field from varchar(4) to varchar(7) to avoid this issue reoccurring.
Hope that’s useful,
CliveForum: Plugins
In reply to: [WP Athletics] Suggestion for additional Terrain itemThanks for the pointer Conor – I’ve added an item to the “default_terrain_categories” array and that works nicely.
Forum: Plugins
In reply to: [WP Athletics] Supporting Multiple ClubsHi Conor,
Once I’ve got some studying out of the way, I’ll have a stab at this and pass it to you for review.
Cheers,
CliveForum: Plugins
In reply to: [WP Athletics] Suggestion for additional Event Age Group Summary tableThanks Conor.