Support » Plugin: Events Made Easy » Using conditional tag within events_list shortcode?

  • Resolved tracersa

    (@tracersa)


    Hi,

    First of all great plugin, lots of customization and easy to work with.

    secondly, I don’t know what is the deal with the official support forum for this plugin but I have nearly been waiting for a week to get my password but it is never received (and no it is not in spam/junk as well). I tried to resend password but nopes nothing works!!!

    Third, I am stuck. I am trying to show a customized list of upcoming events and for that using events_list shortcode. Originally, my events list format (on the settings page) is using events_if conditional tag to check if rsvp is enabled for the event. if yes it shows registration link otherwise showing “coming soon.”

    Now the problem: using [events_list] shortcode and defining a new format, I can’t seem to be able to workaround the if conditional tag (because [events_if] is also a short code and shortcode within a shortcode just doesn’t work). Any idea how to get this done?? Maybe I am missing out something?? I have been trying for hours now but failed.

    here is the shortcode being used on my page so far:

    [events_list limit=0 scope=future format="<ul><li><h3>#_EVENTNAME</h3><p>#j #M, #Y</p> <p>Registeration Fee: #_CURRENCY #_EVENTPRICE</p><p>#_EVENTDETAILS</p> [events_if tag='#_IS_RSVP_ENABLED' value='1']<a href='#_EVENTPAGEURL'>Register Now</a>[/events_if][events_if tag='#_IS_RSVP_ENABLED' value='0']Opening Soon[/events_if]</p></li></ul>"]

    http://wordpress.org/plugins/events-made-easy/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Franky

    (@liedekef)

    Sorry about your login, it was blocked. I unblocked it now (but you should have received a mail when it was being blocked). So a password reset will work now.
    About the shortcode question: try using the html-equivalent for “[” and “]” (namely & #91; and & #91; ), that moight work.

    Thank you for your reply but as expected it didn’t work because those ASCII codes are for outputting the html equivalent once the site has loaded whereas (I am assuming) the shortcodes are being read during load and executed to display results accordingly.

    Plugin Author Franky

    (@liedekef)

    Well, I was a bit wrong. It shouldn’t be the html equivalent, but the url-encode equivalent. Could you try that?
    %5B for “[“
    %5D for “]”

    Nopes didn’t work.

    I am not a php expert but maybe we can write a quick custom function that returns a form of placeholder
    IF RSVP enabled return <a href="url.com">Register</a> else return "Coming soon"?

    Not sure though 🙂 just an idea

    Plugin Author Franky

    (@liedekef)

    Ok, done some testing. URL encoded strings were not being reverted back to normal … so, try it with this fix:
    http://plugins.trac.wordpress.org/changeset/768617

    Plugin Author Franky

    (@liedekef)

    Btw: only replace the “[” and “]” for the format argument, not the rest.
    For ease of use, use a web based url-encoder for the correct value:
    http://meyerweb.com/eric/tools/dencoder/

    Wonderful!! you are the best and amazingly talented !!! Thanks for resolving this 😀

    o god!! Just as I was trying to update events I received a “Failed to update events” and received this big error at the top

    `

    <blockquote>WordPress database error: [Unknown column ‘event_image_id’ in ‘field list’]
    UPDATE zoa_eme_events SET event_name = ‘Event 1’, event_status = ‘1’, event_start_date = ‘2013-09-18’, event_end_date = ‘2013-09-20’, event_start_time = ’14:44:00′, event_end_time = ’15:44:00′, event_rsvp = ‘1’, rsvp_number_days = ‘1’, rsvp_number_hours = ‘0’, registration_requires_approval = ‘1’, registration_wp_users_only = ‘0’, event_seats = ’10’, use_paypal = ‘1’, use_2co = ‘0’, use_webmoney = ‘0’, use_google = ‘0’, price = ’50’, currency = ‘GBP’, event_contactperson_id = ‘1’, event_notes = ‘This is a test course\r\n’, event_page_title_format = ”, event_single_event_format = ”, event_contactperson_email_body = ”, event_registration_recorded_ok_html = ”, event_respondent_email_body = ”, event_registration_pending_email_body = ”, event_registration_form_format = ”, event_url = ”, event_image_url = ”, event_image_id = ‘0’, event_slug = ‘event-2/’, event_category_ids = ”, event_attributes = ‘a:0:{}’, location_id = ‘1’, recurrence_id = ‘0’, modif_date = ‘2013-09-10 14:52:40’, modif_date_gmt = ‘2013-09-10 14:52:40’ WHERE event_id = ‘5’

    Initially I thought maybe I had done something wrong but couldn’t figure it out so I deleted the plugin, made a fresh install. It started working fine BUT the moment I updated the eme_events.php with the new fix that you had provided, the error came back.

    So the fix that you provided for the conditional tag seems to upset the plugin 🙁 I was suppose to replace the corresponding file right? What did I do wrong??

    Thanks

    Plugin Author Franky

    (@liedekef)

    The fix I provided is a one-line change. You probably downloaded the whole eme_events.php file. Don’t do that, it contains other code and new features that depend on changes in other files as well.
    I’ll try to release the updated version this evening.

    Lolx yes. I assumed I had to replace the whole file that was there in the link. so should I only add that 1 line of code??

    Edit: I added that one line of code only and it is working okay now!

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Using conditional tag within events_list shortcode?’ is closed to new replies.