• Hi macguru2000,

    Is there a way to enable lightbox for some selected categories but not others?

    I have a few fixed posts in my home page and for those I created separate catablog categories. For these categories in the fixed posts and I would like NOT to have lightbox and have the click direct the visitor to the catablog item link.

    For internal posts (all non-fixed) I would like the click to open lightbox for thoses images.

    I was trying to manually delete the following line on my home page but couldn’t do it from the admin editor.

    <script type=’text/javascript’>jQuery(document).ready(function(){ jQuery(‘.catablog-image’).catablogLightbox(); });</script>

    Any other way to do it?

    Thank you in advance!

    Marcelo

Viewing 1 replies (of 1 total)
  • Plugin Author macguru2000

    (@macguru2000)

    HI Marcelo,

    I am so sorry for the super long delayed response. I appreciate your patience and hope that one of the solutions below work for you.

    Right now there is no built in way to turn off or disable the LightBox javascript code, except to turn the LightBox feature itself off. You may turn the LightBox on and off in the CataBlog Options panel under the LightBox tab. If you wanted to toggle the LightBox feature before and after making new catalog items, then you would effectively be removing the code at the bottom of the page. This works by turning on LightBox before adding any new items to your catalog, then turning LightBox off afterwards, which will stop the script from being rendered at the bottom of your page. You are now free to create your own JavaScript call to catablogLightbox()

    The other option would involve hacking the plugin, I will document it here but do not suggest anyone hack the plugin directly. On line 111 of the CataBlog.class.php file in the lib directory is a line of code that should be removed or commented out. Simple add two forward slashes at the beginning of the line of code and the script will no longer be rendered at the footer.

    // add_action('wp_print_footer_scripts', array(&$this, 'frontend_footer'));

    I will have to add a way to let people edit this script in the LightBox options, perhaps in the upcoming release.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: CataBlog] Enable Lightbox in some (but not all) categories’ is closed to new replies.