Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2008, 11:18 PM
Scathefire Scathefire is offline
 
Join Date: Oct 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Modifying the album_picturebit template to create a lightbox effect

I'm wanting to get the highslide javascript image viewer (http://vikjavev.no/highslide/) to work in my vbulletin albums. It currently works for post attachments in threads, but I can't seem to to get this to work. I'm sure its juse because I am failing to structure it properly.

This is the suggested structure given by the highslide documentation:

Code:
<a id="thumb1" href="images/full-image.jpg" class="highslide" onclick="return hs.expand(this)">
	<img src="images/thumbnail.jpg" alt="Highslide JS"
		title="Click to enlarge" height="120" width="107" /></a>
Here is the default code for album_picturebit:

Code:
<table style="width:{$picturebit_width}px; height:{$picturebit_height}px; margin:5px; float:$stylevar[left]" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td class="smallfont" align="center" valign="middle">
    <if condition="$picture['thumburl']">
        <a href="album.php?$session[sessionurl]albumid=$albuminfo[albumid]&amp;pictureid=$picture[pictureid]"><img class="alt2" src="$picture[thumburl]" alt="$picture[caption_preview]" border="0" style="
            padding:$stylevar[cellpadding]px;
            <if condition="!$usercss">border:solid $stylevar[cellspacing]px $stylevar[tborder_bgcolor]</if>
        " $picture[dimensions] /></a>
    <else />
        <a href="album.php?$session[sessionurl]albumid=$albuminfo[albumid]&amp;pictureid=$picture[pictureid]"><if condition="$picture['caption_preview']">$picture[caption_preview]<else />$vbphrase[picture]</if></a>
    </if>
    <if condition="$show['moderation']"><br /><span class="shade">$vbphrase[picture_moderated]</span></if>
    </td>
</tr>
</table>
Since it is already working in post attachments, I looked at the currently modified template, postbit_attachmentthumbnail and see it is structured like this:

Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]" rel="Lightbox" id="attachment$attachment[attachmentid]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1&amp;d=$attachment[thumbnail_dateline]" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[attachmentid]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
&nbsp;<if condition="$show['br']"><br /><br /></if>
What confuses me is there is nothing like "onclick" or anything like that, but on the generated page it spits out:

Code:
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->
<a id="att_1253" rel="http:_slash__slash_www.websiteurl.com_slash_forums_slash_attachment.php?attachmentid=1253&amp;d=1213121812" class="highslide" onclick="return hs.expand(this, { slideshowGroup: '57562' })" href="attachment.php?attachmentid=1253&amp;d=1213121812" rel="Lightbox" id="attachment1253"><img class="thumbnail" src="attachment.php?attachmentid=1253&amp;stc=1&amp;thumb=1&amp;d=1213121812" border="0" alt="Click image for larger version

Name:	screenshot12.jpg
Views:	33
Size:	238.2 KB
ID:	1253" /></a>
&nbsp;
<!-- END TEMPLATE: postbit_attachmentthumbnail -->
Can anyone help me with this? I like highslides ability to open up multiple images at a time, and it seems smoother than the default vbulletin lightbox feature. In general, this is superior than the out of the box option offered.

The post thumbnail highslide feature is done by this now dead mod:

https://vborg.vbsupport.ru/showthread.php?t=139167

Attached is the xml file if anyone wishes to look at it and maybe offer me a suggestion. I would be grateful with any assistance someone can offer with getting this to work.
Attached Files
File Type: xml product-mini2_hs.xml (8.8 KB, 3 views)
Reply With Quote
  #2  
Old 06-20-2008, 05:58 PM
Scathefire Scathefire is offline
 
Join Date: Oct 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for bumping this.

Any suggestions? Or even a new direction I should go in?
Reply With Quote
  #3  
Old 06-20-2008, 06:31 PM
Guest210212002
Guest
 
Posts: n/a
Default

You could probably use Thickbox highslide for this somewhat easily, you'd just need to tinker with the template code to parse/add in the path variables on the fly. An example of thickbox is here, on a site I threw up for a luthier friend of mine:

http://www.sherman-customs.com/

Same as any other HS and a breeze to set up.
Reply With Quote
  #4  
Old 06-28-2008, 02:29 PM
Dr. Bantham's Avatar
Dr. Bantham Dr. Bantham is offline
 
Join Date: Feb 2007
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am also very interested in getting this integrated. Any luck? This would made a great mod!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03714 seconds
  • Memory Usage 2,205KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete