Events Made Easy › Forums › Bug fixed or feature request implemented › quotes inside of events_list format attribute
- This topic has 6 replies, 2 voices, and was last updated 10 years, 10 months ago by Franky.
-
AuthorPosts
-
Wed 1 Jan 2014 at 19:55 #44111AnonymousInactive
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?
Wed 1 Jan 2014 at 22:20 #50982FrankyKeymasterThanks 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"]
?
Sun 5 Jan 2014 at 22:12 #50983AnonymousInactiveThat 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).
Sun 5 Jan 2014 at 23:13 #50984FrankyKeymasterThis 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 🙂
Mon 6 Jan 2014 at 00:11 #50985FrankyKeymasterBrrr … overdid myself, but it has been added to the code 🙂
See this change:
http://plugins.trac.wordpress.org/changeset/833576
and
Mon 6 Jan 2014 at 04:54 #50986AnonymousInactiveWow! You’re the best!!
Mon 6 Jan 2014 at 09:40 #50987FrankyKeymasterI’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 🙂
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.