Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #52767
    Anonymous
    Inactive

    All my other conditional statements are working, but #_EVENTDETAILS ( / #_NOTES). Am I coding my sub-conditions wrong?

    Here is my code for “Default single event format”:

    [eme_if tag="#_EVENTCATEGORIES" notvalue=Work]
    <section class=”column column-1 grid-left-0 grid-width-12″>
    <div class=”single-event-text-wrapper”>
    <h1>#_EVENTNAME</h1>
    <h2 id=”date”>#_{F jS}
    [eme_if2 tag="#_{F j Y}" notvalue="#@_{F j Y}"]
    [eme_if3 tag="#Y" notvalue="#@Y"], #Y[/eme_if3] –
    [eme_if4 tag="#F" notvalue="#@F"]#@_{F }[/eme_if4]
    #@_{jS}[/eme_if2], #@_{Y}</h2>
    #_{l}

    [eme_if2 tag="#_{F j Y}" notvalue="#@_{F j Y}"] – #@_{l}[/eme_if2]
    [eme_if3 tag="#_{F j Y}" value="#@_{F j Y}"] only[/eme_if3]
    [eme_if2 tag="#ESC_ATT{Leader}" is_empty=0]<h2>Leader</h2>#_ATT{Leader}[/eme_if2]
    [eme_if2 tag="#ESC_TOWN" is_empty=0]<h2>Location</h2>#_ADDRESS<br>#_TOWN[/eme_if2]
    [eme_if2 tag="#_EVENTDETAILS" is_empty=0]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if2]
    </div>
    </section>

    <section class=”column column-2 grid-left-0 grid-width-12″><div class=”single-event-map-wrapper”>#_MAP</div><div class=”event-return-button”>View Full Itinerary</div></section>
    [/eme_if]

    [eme_if tag="#_EVENTCATEGORIES" value=Work]
    [eme_if2 tag="#_AVAILABLESPACES" ge=1]
    <div class=”eventpage-work-day”>#l</div>
    <div class=”eventpage-work-date”>#_{F jS}</div>
    [eme_if3 tag="#_AVAILABLESPACES" ge=1]<div class=”eventpage-work-available”>Available</div>[/eme_if3]
    [eme_if4 tag="#_AVAILABLESPACES" value=0]<div class=”eventpage-work-booked”>Booked</div>[/eme_if4]
    <div class=”eventpage-work-text”>Please enter your information below to submit your reservation.</div>
    <div class=”eventpage-work-form-wrapper”>#_ADDBOOKINGFORM</div>
    [/eme_if2]
    [/eme_if]

    #52768
    Anonymous
    Inactive

    I’ve cleaned up the above code and I still cannot get the [eme_if2 tag="#_EVENTDETAILS" is_empty=0]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if2] line to work.

    It there a bug?

    I cannot be sure of this, but I know that I was using #_NOTES in a similar conditional statement under previous versions.

    #52769
    Franky
    Keymaster

    As the doc says: “You can use all placeholders in the if-part, just by prepending them with “ESC”, e.g you could use this for single event formatting:”
    In your case: change e.g. [eme_if2 tag="#_EVENTDETAILS" is_empty=0] to [eme_if2 tag="#ESC_EVENTDETAILS" is_empty=0]

    I’ll explain in the doc what ESC does here

    #52900
    Anonymous
    Inactive

    I still don’t have this working…

    I am using:
    [eme_if3 tag="#ESC_EVENTDETAILS"]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if3]

    I want it to display the EVENTDETAILS only if there is text in the event’s Details section.

    According the the documentation, this should work. Also, it works for my other event information, but not eventdetails / notes.

    Is there something deeper here?

    #52902
    Franky
    Keymaster

    Just tried (copy/paste) your code: works just fine here.

    Edit: although there’s not much meaning in testing if it is empty: if it really is empty, the replacement will be an empty string … But probably you want the “additional information” header too (although that too can be in the event details section)

    #52906
    Anonymous
    Inactive

    Ok, thank you for clarifying for me. I’ll check things on my end again.

    #52972
    Anonymous
    Inactive

    I don’t understand what is going on here… will not work on my end.

    Tested several things:
    Attempt 1
    Placed only this code is my “Default Single Event Format”: [eme_if tag="#ESC_EVENTDETAILS"]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if]
    Verified that text was truly in the event’s “Details” section.
    Did not work

    Attempt 2
    Placed only this code is my “Default Single Event Format”: #_EVENTDETAILS
    Worked

    Attempt 3
    Placed only this code is my “Default Single Event Format”: [eme_if tag="#ESC_TOWN"]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if]
    Worked

    Attempt 4
    Switched “TOWN” back to “EVENTDETAILS”: [eme_if tag="#ESC_EVENTDETAILS"]<h2>Additional Information</h2>#_EVENTDETAILS[/eme_if]
    *Refreshed browser* Worked – but then stopped working (Browser cache?)

    As it stands, I can place other placeholders in the conditional statement and it will work, but if I use “#ESC_EVENTDETAILS”, none of the #_EVENTDETAILS will be shown.

    I don’t know what else I could try here. Any thought?

    #52973
    Franky
    Keymaster

    hmmm … maybe your event details contain characters that I didn’t try …
    Could you mail me in private the event details as a text-attachment, so I can test that too?

    #52974
    Anonymous
    Inactive

    Yes, just confirmed that.

    It has something to do with the event details for that one event.

    A simple “test” in the event details worked fine.

    Email with the text attachment is coming your way…

    #52976
    Anonymous
    Inactive

    Seems that it doesn’t like <strong>‘s or <a>‘s in the event details.

    Adding either will stop the conditional code from working.

    #52987
    Franky
    Keymaster

    It’s in fact a little bit of everything … wordpress shortcodes don’t seem to like html tags in them, so I now escape those too:

    http://plugins.trac.wordpress.org/changeset/1001522

    #52990
    Anonymous
    Inactive

    It works!

    Thanks for adding this!

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top