mike.chiv
Forum Replies Created
-
Okay I made a little progress on point 1.
By calling
$events= new WP_Query("post_type=SP_Event");
I can pull up a list of all the existing matches. However I don’t know the names of the custom fields I need to target in order to separate out the matches for each team. The fields would be something like “team 1” and “match date” I assume (unless match date is simply,the_date();
?)Hi,
Is anyone available to respond to my question?
Mike
As far as the layout of the date and time goes, can you just target the offending elements with CSS and apply
display:inline
or similar?I’m not sure about converting uppercase to upper/lower without using javascript. Sorry!
Hi Dave,
I haven’t used the widgets hardly at all, but off the top of my head I seem to remember that you choose the calendar/league/whatever that “feeds” the widget. If this is the case, when you set up the league I’m pretty sure you can use check boxes to choose which columns of the table will be visible.As you can see, this is purely guess work but give it a go as it might be the simple solution you’re looking for.
Good luck with your site!
Mike
Forum: Plugins
In reply to: [Contact Form 7] Responses to contact form marked as junkThanks for that. I think the issue was that I simply wrote the word “test” in the reply, and outlook assumed this was spam. I sent a longer message and it picked it up fine.
I came back to this today after 2 weeks and had some success using the api. Here is what I used for the benefit of anyone else reading the thread (note: whether or not these are the cleanest methods I don’t know, but they work!):
Edit: Probably obvious, but the whole purpose of doing this was to modularise the event content so as to format it exactly how I wished with CSS.
To place the team names in an array for use as required:
$match_title = get_the_title(); $team_names = explode(" vs ",$match_title);
To place the team logos in an array:
$current_id = $post->ID; $teams = sp_get_teams($current_id) ; foreach($teams as $team){ $logos[] = sp_get_logo($team); }
To place the team’s scores in an array:
$scores = sp_get_main_results($current_id);
The only issue I now have is that I cannot separate out the “content” of the event without losing formatting. If I use
the_content()
then I get a load of other stuff with it such as the logos (again), the result table, and so on. If I useget_the_content()
I lose the paragraph formatting.Have I missed something in the api that grabs just the text with formatting? I scanned through all of the available functions and couldn’t see anything that looked right….
Thanks for your continued help Brian. Are the items that can be accessed by the sp_get_teams() loop all listed in the docs somewhere?
Thanks Brian, those functions look like they’ll be really useful. However, I have tried a few of them, and while most work, I am having issues with
sp_get_teams()
andsp_event_logos()
I am implementing them in the same way as you suggested for
sp_the_main_results()
, butsp_get_teams()
just produces nothing, andsp_event_logos()
causes a PHP error, “Warning: array_filter() expects parameter 1 to be array, boolean given in [directory] on line 17”Is there something I am doing wrong? The event I was trying the functions on has both teams set, and both teams have logos in place.
Mike
Forum: Plugins
In reply to: [StageShow] Mobile box officeIt probably is the theme. I’m working on someone else’s site that uses a pre-packaged theme, so I don’t know for sure how the CSS is set up, as I haven’t had to worry about that until now.
Where can I customise the outputs? I would prefer to alter the layout for the mobile version.
Thanks for the quick responses by the way. Very much appreciated!
Forum: Plugins
In reply to: [StageShow] Maintain scroll position on "Add" button clickSweet, worked perfectly. Thanks! One thing to note for anyone else that reads this, you must update to version 4.3 for this to work.
Working shortcode:
[sshow-boxoffice anchor="trolley"]
Here is the output for System Status:
### Environment ### Home URL: https://localhost Site URL: https://localhost SP Version: 1.3.2 WP Version: 4.0.1 WP Multisite Enabled: No Web Server Info: Apache/2.4.9 (Win64) PHP/5.5.12 PHP Version: 5.5.12 WP Memory Limit: 40 MB - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP WP Debug Mode: No WP Language: Default WP Max Upload Size: 3 MB PHP Post Max Size: 3 MB PHP Time Limit: 120 PHP Max Input Vars: 2500 SUHOSIN Installed: No Default Timezone: Default timezone is UTC fsockopen/cURL: Your server has fsockopen and cURL enabled. SOAP Client: Your server has the SOAP Client class enabled. ### Plugins ### Installed Plugins: Spider Event Calendar by https://web-dorado.com/ version 2.3.7 SportsPress by ThemeBoy version 1.3.2 ### SP Configuration ### Sport: soccer Event Outcomes: Win (win) [10] Draw (draw) [20] Loss (loss) [30] Team Results: 1st Half (firsthalf) [10] 2nd Half (secondhalf) [20] PK (pk) [30] Goals (goals) [40] Player Performance: Goals (goals) [10] Assists (assists) [20] Yellow Cards (yellowcards) [30] Red Cards (redcards) [40] Table Columns: P (p = $eventsplayed) [10] W (w = $win) [20] D (d = $draw) [30] L (l = $loss) [40] F (f = $goalsfor) [50] A (a = $goalsagainst) [60] GD (gd = $goalsfor - $goalsagainst) [70] Pts (pts = $win * 3 + $draw) [80] Player Metrics: Height (height) [10] Weight (weight) [20] Player Statistics: Appearances (appearances = $eventsplayed) [10] Win Ratio (winratio = $win / $eventsplayed * 1 0 0) [20] Draw Ratio (drawratio = $draw / $eventsplayed * 1 0 0) [30] Loss Ratio (lossratio = $loss / $eventsplayed * 1 0 0) [40] ### SP Taxonomies ### Leagues: Canterbury & District League (canterbury-and-district-league) Kent County League Division 1 East (kent-county-league-division-1-east) Seasons: 2014-2015 (2014-2015) Venues: Positions: Defender (defender) Goalkeeper (goalkeeper) Midfielder (midfielder) Striker (striker) ### SP Post Types ### Events: 10 publish 2 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit Calendars: 3 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit Teams: 22 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit League Tables: 2 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit Players: 1 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit Player Lists: 1 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit Staff: 0 publish 0 future 0 draft 0 private 0 trash 0 auto-draft 0 inherit ### Theme ### Theme Name: DCSFC Theme Version: Author URL: ### Templates ### Template Overrides: No overrides present in theme.
Regarding the URLs, basically the club has two teams: “first team” and “reserves”. Each has its own section within the site, so “https://localhost/first-team/stuff” and “https://localhost/reserves/stuff”. What I was aiming for with the match URLs was something along the lines of “https://localhost/%5Bteam-name%5D/fixtures/%5Bteam1%5D-vs-%5Bteam2%5D-%5Bmatch-date%5D”. I should mention that “first-team” and “reserves” are already existing pages.
I suppose the “fixtures” part of this URL structure would be achieved by following your instructions in point 1, but are you saying that I cannot make the “[team-name]” part dynamic? Is it maybe possible to set the event page template to be either a child of “first-team” or “reserves”?
Unfortunately the site is only on a local server at the moment. Is there anything you can suggest that I look for myself? Or would it be best to simply upload to a dev server and have you take a look then?
I have one more thing to ask, and I realise that this doesn’t necessarily fall within the parameters of what you might support but I was hoping that you might be able to assist me all the same: at the moment, each “match” appears at the url “https://localhost/match/%5BID%5D”. I would like them to appear at the URL “https://localhost/first-team/%5Bteam1%5D-vs-%5Bteam2%5D”. I don’t have any experience of URL rewrites if this is what is required, so if you wouldn’t mind guiding me then I would be extremely grateful. If you wish me to open this as a new topic, then I am happy to do so.
Please excuse the delay in my reply. I had to work on another site for a while and then my daughter was born, so I had some time off!
I checked the events settings, and the event block limit was changed already to 5. I had more than 5 events, and still no pagination.
There are no errors showing up in the console on the relevant pages.
That filter hook seems to work, so thanks for that ??
Any suggestions re: the pagination issue?
Forum: Plugins
In reply to: [Responsive Lightbox & Gallery] Just getting the loading gifOh I got it. Sorry, I thought the plugin just grabbed the image inside the anchor tags. I’ll add the links and try it out.
Not to worry ??
Does the plugin generate pages for league tables or am I in full control of where I insert items?