Events Made Easy › Forums › Bug fixed or feature request implemented › Feature Request – Multiple Image Sizes
- This topic has 8 replies, 2 voices, and was last updated 11 years, 9 months ago by
Franky.
-
AuthorPosts
-
Mon 9 Dec 2013 at 13:33 #44099
Anonymous
InactiveHi Franky,
Would it be possible to access all image sizes defined in a theme via the add_image_size function?
Something like:
Code in functions.php
add_image_size('Thumb2', 150, 150, TRUE);Placeholder in EME
#_EVENTIMAGE(Event Image)#_EVENTIMAGETHUMB(Event Thumbnail Image)#_EVENTIMAGE['Thumb2'](Event Image [Custom Size])Thanks
Mon 9 Dec 2013 at 22:30 #50918Franky
KeymasterImplemented here:
Tue 10 Dec 2013 at 06:10 #50919Anonymous
InactiveGreat stuff!
If only I could get trunk to work! 😉
(Trying to do a schema comparison now)
Fri 3 Jan 2014 at 13:11 #50920Anonymous
InactiveI’ve tried to use this:
#_EVENTIMAGETHUMB[MyCustomSize] using: #_EVENTIMAGETHUMB[Main Image]
Wordpress allows a space in the name but I think your regex misses this?
I could change it to Main_Image but I’d need to regenerate all the images again and end up with two copies of each image.
Would this be something easy to change in the source?
Thanks
Fri 3 Jan 2014 at 21:10 #50921Franky
KeymasterYou might be right. Can you try if changing the following line in events-manager.php changes this (around line 984).
Old:
preg_match_all("/#(ESC|URL)?@?_?[A-Za-z0-9_[]]+/", $format, $placeholders);New:
preg_match_all("/#(ESC|URL)?@?_?[A-Za-z0-9_]+[.+?]([.+?])?/", $format, $placeholders);Sat 4 Jan 2014 at 08:01 #50922Anonymous
InactiveAfter this change, most of placeholders aren’t getting parsed.
I’m afraid I know nothing about regex so can’t help at all here.
Perhaps even more bizarrely, some of the placeholders do work, eg:
At top of the Single Event Page I get:
#_EVENTNAME at Cavalli Club | #j#S #F
Further down, I use the same placeholders again but get:
#_EVENTNAME
Cavalli Club – Dubai – 08/01/2014 #_24HSTARTTIME-#_24HENDTIME
So the 2nd time it’s getting the date (although in a slightly different format).
Sat 4 Jan 2014 at 08:12 #50923Franky
KeymasterYeah, I forgot that the first brackets are optional too. Try this regex:
preg_match_all("/#(ESC|URL)?@?_?[A-Za-z0-9_]+([.+?])?([.+?])?/", $format, $placeholders);Sat 4 Jan 2014 at 08:45 #50924Anonymous
InactiveSeems ok – I’ll try and make the other changes then and let you know if I have any more problems.
Thanks
Sat 4 Jan 2014 at 10:05 #50925Franky
KeymasterOk, let me know the results so I can add it to the dev version
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.