bobjgarrett
Forum Replies Created
-
Thanks for that. I was not aware of do_shortcode and still don’t understand it but here is a simplified version which works to get the value into a php variable for anyone else that needs something similar.
<?php
global $wpdb;
?>
[events_list year=”2017″]
Race No. #_ATT{Race}
#_EVENTDATES
#_EVENTNAME
<?php
echo “Race No. as variable=”;
echo do_shortcode(‘#_ATT{Race}’);
?>
<hr>
[/events_list]No, I am not. Should I?
I am not sure how this might solve the problem though.
All the shortcodes are showing up it is just trying to get a value into PHP that seems to be a problem.- This reply was modified 6 years, 12 months ago by bobjgarrett. Reason: extra info
See below. The critical part is where the variables $filetofind1 etc. need to include the value of #_ATT{Race}
[events_list year=”<?php echo $year; ?>”]
<div style=”float:left; clear:both; min-height:32px; border-top: 1px solid rgb(37, 129, 170); width:100%;”>
<div style=”float:left; width:210px;”>
<div style=”float:left; width:30px; text-align:left; padding-right:10px;”>
#_ATT{Race} </div>
<div style=”float:left; width:170px; clear:none;”>
#_EVENTDATES #_24HSTARTTIME</div>
</div>
<div style=”float:left; clear:none;”>
#_EVENTNAME
{is_future}<i>#_ATTENDEESPENDINGLIST</i>{/is_future}
</div>
<?php
// $filetofind1 = “wp-content/files/event-reports/”. $year . “-“. . “.pdf”;
// $filetofind2 = “wp-content/files/event-results/”. $year . “-“. “.pdf”;
// $filetofind3 = “wp-content/files/event-instructions/”. $year . “-” . “.pdf”;
echo “Race No. as variable” . $EM_Event->output(‘#_ATT{Race}’);
if (file_exists($filetofind1) || file_exists($filetofind2) || file_exists($filetofind3)) {
?>
<div style=”float:right; width:200px;”>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind1)){ ?>” target=”_blank”>
<?php };
?>
</div>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind2)){ ?>” target=”_blank”>
<?php } else {echo ” “;};?>
</div>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind3)){ ?>” target=”_blank”>
<?php } else {echo ” “;};?>
</div>
</div>
<?php }?>
<?php
?>[/events_list]
That seems to break the page as even the fields such as #_EVENTDATES and #_EVENTNAME do not appear but instead the shortcodes are reproduced.
Yes, but to go back to my original question, how do I get that value into a PHP variable?
I am using
[events_list]
…
#_EVENTDATES
#_EVENTNAME
etc
[/events_list]
does this not set up data I can use?Thanks for prompt feedback but this
echo $EM_Event->output(‘#_ATT{Race}’);
seems to break the page.
Is this because I am using the event_list shortcode which is not opening the data as $EM_Event or is the syntax still wrong?Thanks for the feedback.
During a long drive today I thought of a solution for me anyway. I have added a category which I can then filter by on whether to show a link to the actual booking page.
I think this will work for me now but I think the idea of being able to set up events and tickets, and then turning on the ability to book separately would be a good feature.Thanks for the prompt reply.
If all tickets are not available until a future date then when a visitor goes to the particular event page then it says bookings are closed which looks the same as it being too late.
My ideal solution would be to have the ability to populate tickets with pricing etc. but have the registration not enabled.
As I say, I assume this is not possible as yet?
That does not specifically address the question but suggests that what I need is not possible.
So, can you confirm that it is not possible to set up tickets for an event which is not yet open for registrations?Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Event List for YearThanks for your help.
Stupid of me really. Checking the Event List Scope – which was set to “All Events” I noticed that “Event List Limits” was set to 10. There happened to have been 10 events so far this year so future ones were not shown.Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Event List for YearI assume you mean [events_list year=”2017″] which is what I have tried but this does not show future events in the year.
Forum: Themes and Templates
In reply to: [Enigma] Heading Colour Differs Between BrowsersThat fixed it. Thanks.
Forum: Themes and Templates
In reply to: [Enigma] Heading Colour Differs Between BrowsersThe text colour please to be the same as the body.
Forum: Themes and Templates
In reply to: [Enigma] Heading Colour Differs Between BrowsersNow I have been alerted to another problem!
Posts in our forum sometimes have sections which are white text on a white background, in a current example where a member has selected an unnumbered list. I cannot share the actual forum as I’d need to set up a registration for you.
However, I have created a simple page with H1, H2, H3 etc. each assigned as <H1>, <H2> etc. and the same issue arises. This can be seen on the page https://www.dufour.org.uk/_test_h/
Inspecting this shows the text color set to #fff
Maybe we have configured something else to set a background as white?
Thanks for your help.