Scathefire
06-15-2008, 11:18 PM
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:
<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:
<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]&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]&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:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&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]&stc=1&thumb=1&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>
<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:
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->
<a id="att_1253" rel="http:_slash__slash_www.websiteurl.com_slash_forums _slash_attachment.php?attachmentid=1253&d=12131218 12" class="highslide" onclick="return hs.expand(this, { slideshowGroup: '57562' })" href="attachment.php?attachmentid=1253&d=1213121812" rel="Lightbox" id="attachment1253"><img class="thumbnail" src="attachment.php?attachmentid=1253&stc=1&thumb=1&d=1 213121812" border="0" alt="Click image for larger version
Name: screenshot12.jpg
Views: 33
Size: 238.2 KB
ID: 1253" /></a>
<!-- 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.
This is the suggested structure given by the highslide documentation:
<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:
<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]&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]&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:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&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]&stc=1&thumb=1&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>
<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:
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->
<a id="att_1253" rel="http:_slash__slash_www.websiteurl.com_slash_forums _slash_attachment.php?attachmentid=1253&d=12131218 12" class="highslide" onclick="return hs.expand(this, { slideshowGroup: '57562' })" href="attachment.php?attachmentid=1253&d=1213121812" rel="Lightbox" id="attachment1253"><img class="thumbnail" src="attachment.php?attachmentid=1253&stc=1&thumb=1&d=1 213121812" border="0" alt="Click image for larger version
Name: screenshot12.jpg
Views: 33
Size: 238.2 KB
ID: 1253" /></a>
<!-- 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.