Events Made Easy Forums Bug fixed or feature request implemented Feature Request – Multiple Image Sizes

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #44099
    Anonymous
    Inactive

    Hi 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

    #50918
    Franky
    Keymaster
    #50919
    Anonymous
    Inactive

    Great stuff!

    If only I could get trunk to work! 😉

    (Trying to do a schema comparison now)

    #50920
    Anonymous
    Inactive

    I’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

    #50921
    Franky
    Keymaster

    You 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);

    #50922
    Anonymous
    Inactive

    After 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).

    #50923
    Franky
    Keymaster

    Yeah, I forgot that the first brackets are optional too. Try this regex:

    preg_match_all("/#(ESC|URL)?@?_?[A-Za-z0-9_]+([.+?])?([.+?])?/", $format, $placeholders);

    #50924
    Anonymous
    Inactive

    Seems ok – I’ll try and make the other changes then and let you know if I have any more problems.

    Thanks

    #50925
    Franky
    Keymaster

    Ok, let me know the results so I can add it to the dev version

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