vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How-to Use vB Lightbox for Pictures on Custom Pages (https://vborg.vbsupport.ru/showthread.php?t=166082)

Abe1 12-24-2007 10:00 PM

How-to Use vB Lightbox for Pictures on Custom Pages
 
This 'how-to' will explain how to utilize the vB 3.7 feature of a lightbox for images on your custom vB pages.

First, at the bottom of the page you are working on, right above where you would put the $footer variable, add the following:

HTML Code:

<!-- lightbox scripts -->
    <script type="text/javascript" src="clientscript/vbulletin_lightbox.js?v=$vboptions[simpleversion]"></script>
    <script type="text/javascript">
    <!--
    vBulletin.register_control("vB_Lightbox_Container", "zzzzz", $vboptions[lightboxenabled]);
    //-->

    </script>
<!-- / lightbox scripts -->

After, you must wrap the entire area where the image links will be located with one 'DIV' tag.
Here is an example:

HTML Code:

<div id="zzzzz">
<!-- Your code here. -->
</div>

Last but not least, whether you want a text or image as the link that triggers the lightbox, you have to wrap it around with 'a' tags that include the following:
href - place the URL of the image that you want to show up in the lightbox
rel - that is set to "'Lightbox'
Here is an example:

HTML Code:

<a href="http://www.vbulletin.com/forum/images/misc/vbulletin3_logo_white.gif" rel="Lightbox">
    <!-- Your text or image here. -->
</a>

Your all set now.

Note: You may change the 'zzzzz' to anything, just make sure BOTH places say the same and that there are no conflicts with other IDs.

RS_Jelle 07-07-2008 09:55 AM

Hmm, this isn't working for me on vB 3.7.2. I compared it with the vB Lightbox for attachments, ... but I don't see any differences or changes.

The included JavaScript is blocking the href="" link from working (so it is doing something), but there's no Lightbox opening.

Q-v-n-s-Q 07-08-2008 11:29 AM

hmm thank you, but it doesnt work

Abe1 07-13-2008 06:23 AM

works for me using 3.7.2

entertain 12-03-2008 03:13 PM

1 Attachment(s)
also not working for me...

Firebug shows the following error:

ragtek 01-26-2009 07:36 AM

h?

for me its also not working
this is my code:
HTML Code:

<div class="alt1 block_row" id="flickrfotos">
        <ul class="list_no_decoration">
                <!-- BEGIN TEMPLATE: flickr_fotobit -->

<a href="http://farm4.static.flickr.com/3133/3228243890_3cc6c267dc.jpg" rel="Lightbox">
        <img border="0" alt="Naschmarkt" src="http://farm4.static.flickr.com/3133/3228243890_3cc6c267dc_m.jpg" />
</a>

<!-- END TEMPLATE: flickr_fotobit --><!-- BEGIN TEMPLATE: flickr_fotobit -->
<a href="http://farm4.static.flickr.com/3372/3227390009_cc260b6805.jpg" rel="Lightbox">
        <img border="0" alt="Naschmarktkunst" src="http://farm4.static.flickr.com/3372/3227390009_cc260b6805_m.jpg" />
</a>

<!-- END TEMPLATE: flickr_fotobit -->

At end i add
HTML Code:

    <script type="text/javascript" src="clientscript/vbulletin_lightbox.js?v=380"></script>
    <script type="text/javascript">
    <!--
    vBulletin.register_control("vB_Lightbox_Container", "flickrfotos", 1);
    //-->

    </script>

When i click on the photo, it seems to be working (it's getting dark) but then the browser redirects to http://farm4.static.flickr.com/3133/...3cc6c267dc.jpg

ragtek 02-07-2009 01:33 PM

nobody have a idee why it's not working?

ceho 02-20-2009 09:27 AM

May there be anything that needs to be changed on VB 3.8.1?

Can anybody help? Thanks a lot.

Barabaika 03-08-2009 02:05 AM

* The 'rel' attribute is rel="Lightbox_11111111" now - Lightbox_ + unique ID for all images in the set.
* <a href should be a script that returns an XML page that has html (with link inside), date, time, etc tags. You can look for an example in attachment.php, in the section devoted to the AJAX processing.

Excalibur82 06-02-2009 02:49 AM

I am currently working on the issue with lightbox within vB. So far just getting a black box so trying to figure out how vB can use a php file to do it instead of an html or xml file.

--------------- Added [DATE]1243920951[/DATE] at [TIME]1243920951[/TIME] ---------------

Apparently there is no current way to implement vB's lightbox with custom pages. It was included only for use with attachments especially in 3.8.x


All times are GMT. The time now is 04:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01205 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete