ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Best way to approach fancybox popup on pictures in Entry content?

January 09, 2012 6:49am

Subscribe [1]
  • #1 / Jan 09, 2012 6:49am

    dinkodinev

    1 posts

    Hello.

    I’d like to make the pictures which are uploaded thru the File Manager and can be inserted into the TinyMCE editor for an Entry—-> to be able to popup fancybox window when clicked on front-end.

    What would do you suggest be the optimal way to do this? Perhaps use some ready made module?
    Or write my custom. Do I have to upload fancybox script at all? Please guide me, not to perform needless additional coding.

    EE2

  • #2 / Jan 10, 2012 1:49pm

    Dan Decker

    7338 posts

    Hi dinkodinev,

    Fancybox style features are generally driven by Javascript and can be used with ExpressionEngine just like any other Javascript. There isn’t an ExpressionEngine add-on specifically for this. I would wager that most folks use jQuery and one of the many fancybox plugins available. Most scripts act on a specific CSS class or ID assigned to the image, which you should be able to apply via the TinyMCE editor.

    Since this request isn’t directly related to a technical issue you are having with ExpressionEngine, I’m gong to move this into Community Help to get a broader audience in on the discussion.

    Cheers!

  • #3 / Jan 11, 2012 1:12pm

    dinkodinev

    1 posts

    Yes. Thank you! I’ve already did it by uploading a fancybox script.
    I actually did something like a module with php directly in the templates where dumping the {full_text} which now I do automatically replace <img ><img > tags to invoke the fancy.

    It’s kinda tricky when you want to place free text into php variables. Best technique it came into my mind was something like this:
    $full_texta = <<< PENCHO_GAZARA2
    {full_text}
    PENCHO_GAZARA2;

    Anyway…

    Now I have another problem. I am not certain in which forum is suitable. Personally I find it to be a technical question.

    So I am creating a new topic here….

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases