Events Made Easy Forums Bug fixed or feature request implemented quotes inside of events_list format attribute

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #44111
    Anonymous
    Inactive

    Hey Franky, Happy New Year!

    I’m working on a way to insert only the next event in a specific spot on my website. My default events list is going to involve table elements, so I have to resort to the [events_list format" "] method to get it to do what I want.

    I’ve found thusfar that I must take care to ensure that all html tags are either all in or all outside of the format quotations. However, the real problem I’m running into is when I try to use my [events_if] functions within the format quotations. Here is my example for the date part:

    [events_list scope=future limit=1 format="#_{M j}[events_if tag="#ESC_{j M Y}" notvalue="#ESC@_{j M Y}"]-[events_if2 tag="#ESC_{M}" notvalue="#ESC@_{M}"]#@_{M }[/events_if2]#@_{j}[/events_if], #o"]

    I’ve tried using single quotes inside of the format””, I’ve tried using escaped characters inside of it, but I can’t seem to get it to work. Any ideas how to bypass this?

    #50982
    Franky
    Keymaster

    Thanks for the kind whishes and a happy New Year to you too!

    Are you saying this doesn’t work:

    [events_list scope=future limit=1 format="#_{M j}[events_if tag='#ESC_{j M Y}' notvalue='#ESC@_{j M Y}']-[events_if2 tag='#ESC_{M}' notvalue='#ESC@_{M}']#@_{M }[/events_if2]#@_{j}[/events_if], #o"]

    ?

    #50983
    Anonymous
    Inactive

    That is correct, that doesn’t work. Here is a screenshot that shows what it actually does (note that the table row is my default events list).

    #50984
    Franky
    Keymaster

    This is a wordpress limitation: square brackets enclosed in shortcodes do not work.

    See http://codex.wordpress.org/Shortcode_API#Square_Brackets

    So sorry, but this will not work (for now).

    I’ll add a feature request to create some kind of “format” templates for events_list to use, to get around this wordpress limitation. Then you would create a template with value

    #_{M j}[events_if tag='#ESC_{j M Y}' notvalue='#ESC@_{j M Y}']-[events_if2 tag='#ESC_{M}' notvalue='#ESC@_{M}']#@_{M }[/events_if2]#@_{j}[/events_if], #o

    and call it like this:

    [events_list scope=future limit=1 format_template=xx]

    (with xx being the ID of the template created). This shouldn’t be that hard to code up, but does take some time: extra db table, settings, permissions, …

    I’ll try to add this to the next version, since it should’ve been done a long time ago 🙂

    #50985
    Franky
    Keymaster

    Brrr … overdid myself, but it has been added to the code 🙂

    See this change:

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

    and

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

    #50986
    Anonymous
    Inactive

    Wow! You’re the best!!

    #50987
    Franky
    Keymaster

    I’ll be adding a “name” field to it as well, and also let the events_locations placeholder make use of this, closing another feature request in the go 🙂

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