djmichaelbasic
Forum Replies Created
-
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Weekly Stats ListNevermind I figured it out, I didn’t notice you could do date in the player list details. I found it, and was able to do what I was trying to do.
Actually, I thought I had it but I’m not actually getting the data to save, so I’m clearly doing something wrong.
First, I added:
$spec_labels = sp_get_var_labels( 'sp_spec' ); if ( $spec_labels && is_array( $spec_labels ) && sizeof( $spec_labels ) ) { $this->columns = array_merge( $this->columns, $spec_labels ); }below the $this->columns = array at the top
Next I added
$spec_labels = sp_get_var_labels( 'sp_spec' );below the // Get labels from result and performance post types
I then added
foreach ( $spec_labels as $key => $label ) : // Get spec object. $spec_column = get_page_by_path( $key, OBJECT, 'sp_spec' ); endforeach;below the //get event details section
Doing this got Week # to show up as a column in the import. As Week # is the format I used for the event spec, I know it’s grabbing the correct thing.
Unfortunately, when I import, the data in that cell isn’t saving to the actual event, so I’m missing a step. Remember that I don’t really know what I’m doing here, and while I can usually figure these types of things out, it’s mostly just trail and error.
I’ve added both
// Initialize spec array
$spec = array();if ( isset( $id ) && isset( $spec ) && sizeof( $spec ) > 0 ) : update_post_meta( $id, 'sp_spec', $spec ); endif;but neither of those seem to help.
I’m gonna keep working on it and I’m sure I’ll eventually get it, but if you have any pointers for me, I’m all ears!
Ok, I figured it out!
Actually, after some digging I see its much more complicated than what I was thinking. I’m gonna keep working on it!
Appreciate your response.
I found the appropriate place to edit, and now I’m trying to figure out what to put in there. I understand this is beyond the scope of the support forums, but I’ve backed up the importer.php file so if I break anything I can go back. Any chance you can give me the correct line of code? I’m just fiddling around, and so far I put:
'sp_spec' => esc_attr__( 'Week', 'sportspress' ),Which gave me a Week column but isn’t adding the data to the spec. Obviously this is incorrect.
The event spec Label is Week #, the variable is week, and it is the only event spec I’m using. Any guidance on how to reference this in the code? If you can’t help I totally understand, and I’ll keep fiddling around with it.
or is there any other way to edit event specs other than manually one at a time for each event?
Or is there another way to add in the week number (or other custom field) to an event list?
Yes that’s what I’ve been doing…just thought this was a nice little feature but thought there might be adjustments I could make. Not a huge deal, appreciate the response!
I did some googling and it turns out I needed to have my webhost add ctype to my php. Once that was done, the updates worked properly again.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Problem with events fixturesI wonder if this is related to the same issue I posted about. Might not be but its worth a shot. Go into your sportspress settings, into the events tab, and scroll down to “Full Time.” If the mins box is blank, put a 0 in there, save and try loading your page again with 25+ fixtures.
Well, I figured it out. Turned on debugging and saw a lot of errors referencing lines in class-sp-league-table.php relating to minutes. The errors were that there was a non numeric value at that line. Here’s an example:
$totals[ $team_id ][‘eventminutes’] += $minutes;
Since billiards doesn’t use time, the minutes field in settings has been blank. Filling in 0 fixed the issue. I believe that 14 teams in the table was the break point at which there were too many errors for the page to load.
Perhaps in a future update, if minutes is left blank in the settings:
Sportspress->Settings->Events->Full Time
replace with a 0 to avoid the issue…or make 0 the default until someone fills it in, or whatever.
Hopefully this will help anyone else who has the same issue.
By the way, the site is http://westside8ball.com
http://www.westside8ball.com/tuesday-schedule-and-standings/ is the tuesday standings page that hangs
http://www.westside8ball.com/wednesday-schedule-and-standings/ is the wednesday standings page that works just fine.
I just checked again today and it seems to have resolved itself. Site is once again working as it should. Something must have happened in the background…so thanks!
http://www.westside8ball.com/tuesday-schedule/
If you access this on safari on iphone the date column is just gone. I don’t have an android phone to test, but I’ve tested on chrome mobile, chrome on a mac, and safari on a mac and those all show the date column properly.
Thanks!
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Column order in league tablesYes that’s it…it was being hidden by the equation section.
Thanks!