Support » Plugins » Hack to Adding rel=”lightbox” in 2.5.1

  • Resolved bohoe



    Im looking for a hack to add rel=”lightbox” to the 2.5.1 when adding images or any other media to a post. Any ideas? I think something could be done in media-upload.php but not sure.
    (I tried using ‘Lightbox 2’ and ‘Add lightbox’, but it aint working in 2.5.1)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The nextgen gallery plugin does that for you… I cant seem to get it working on my newest project fully – but I used it last week on a clients site and it worked very nicely.

    Hi Muten

    Thanks, but I dont need a gallery.
    All I want is the lightbox script to work on 2.5.1
    Is there anybody there that has the plugin ‘Lightbox 2’ or ‘Add lightbox’ working on a 2.5.1?

    Can anyone, including the gurus, let me know where to add rel=”lightbox[ID-OF-THE-POST]” in my WP files so I can add the lightbox script outside the plug-ins structure, in the html head, and force the links to use it?

    I would love you forever!

    I found this post in the forums

    I actually had to Google it, as WP forums’ search wasnt really helpful. Will try it and come back here to let everyone know if it works.

    Cross your code!

    Nop, it doesnt work.

    Lightbox and 2.5.1 are no good friends.

    Ok, there was an issue with Ajax Comments posting. Once that plug-in was off, all worked.

    I added

    //mafro lightbox mod
    list($url, $w, $h) = wp_get_attachment_image_src($id, "full", $icon);
    $post_id = get_the_ID();
    return "<a href='$url' title='$post_title' rel='lightbox[$post_id]'>$link_text</a>";

    to my wp-includes/post-template.php

    Bohoe: right, but where did you add this in the post-template.php and what did you replace?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hack to Adding rel=”lightbox” in 2.5.1’ is closed to new replies.