The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add embed code under Attachment Thumbnails
I'm looking to add embed code so people can post my attachment images on their sites but I can't seem to find the correct place to do this. I have the code I want to use I just can't get it placed correctly.
I would like it placed directly under each thumbnail, the problem is when their is more then one attachment it throws my code all the way at the end of the thread. It doesn't place it under each thumbnail. Where can I go so that it will ouput the code directly under each thumbnail? Take a look at the screenshot. |
#2
|
|||
|
|||
are you using thumbnails or full images? If you're using thumbnails please paste your postbit_attachmentthumbnail template code, if you're using a full image, please paste your postbit_attachmentimage template. Paste in code view and I'll have a look at it.
|
#3
|
|||
|
|||
here is the postbit_attachmentthumbnail, thanks for looking
Code:
<center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></center> <!-- Start the embed area --> <tr> <td align="$stylevar[left]"><table width="80%" border="0" class="tborder" align="center" cellpadding="3" cellspacing="0"> <tr> <td class="alt2" nowrap="nowrap"><div class="smallfont normal"> <div align="right"><strong>Embed Code:</strong> </div> </div></td> <td class="alt2"><div align="center"><span class="smallfont normal"> <input name="textfield" class="bginput" type="text" id="textfield" onClick="SelectAll('textfield');" value="<img src='attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]'" size="50" READONLY> </span></div></td> </tr> </table> </td> </tr> <!-- end embed area--> |
#4
|
|||
|
|||
try this:
Code:
<center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></center> <br /> <div align="center"><div class="smallfont normal"><strong>Embed Code:</strong></div> <span class="smallfont normal"> <input name="textfield" class="bginput" type="text" id="textfield" onClick="SelectAll('textfield');" value="<img src='http://www.documentingreality.com/forum/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]'/>" size="50" READONLY> </span></div></div> Code:
<div> <center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></center> <br /> <table border="0" class="tborder" align="center" cellpadding="3" cellspacing="0"> <tr> <td class="alt2" nowrap="nowrap"><div class="smallfont normal"> <div align="right"><strong>Embed Code:</strong> </div> </div></td> <td class="alt2"><div align="center"><span class="smallfont normal"> <input name="textfield" class="bginput" type="text" id="textfield" onClick="SelectAll('textfield');" value="<img src='http://www.documentingreality.com/forum/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]'/>" size="50" READONLY> </span></div> </td> </tr> </table> </div> |
#5
|
|||
|
|||
Yep that did it!
Now to study what you did... Thanks a lot |
#6
|
|||
|
|||
I just edited my post with the code to make it look like you wanted it... You had a floating table row for no reason and I added a div around it so everything can stay together...
|
#7
|
|||
|
|||
You rock, thanks man
--------------- Added [DATE]1221074476[/DATE] at [TIME]1221074476[/TIME] --------------- I hate to bother you again but if I now had a postbit_attachmentflv that looked like this, Code:
<center><div id="player_$attachmentid"><font color="red">You do not have flash player installed...</font></div> <script language="javascript"> var swfobject = new SWFObject("/forum/players/mediaplayer.swf","jsplayer_$attachmentid","425","344","7"); swfobject.addParam("allowfullscreen","true"); swfobject.addVariable("file","/forum/{$flvfilenameandlocation}"); swfobject.addVariable("width","425"); swfobject.addVariable("height","344"); swfobject.addVariable("type","flv"); swfobject.addVariable("overstretch","fit"); swfobject.addVariable('frontcolor','0x555555'); swfobject.addVariable("showicons","true"); swfobject.addVariable("autostart","false"); swfobject.addVariable("javascriptid","jsplayer_$attachmentid"); swfobject.addVariable("showstop","true"); swfobject.addVariable("showdigits","true"); swfobject.addVariable("enablejs","true"); swfobject.addVariable('image','/forum/thumbnails/$attachmentid.jpg'); swfobject.write("player_$attachmentid"); </script> </center> |
#8
|
|||
|
|||
Good question...lol
Link me to an example post with flash. Is that all the code in the postbit_attachmentflv? If not, post all of it. |
#9
|
|||
|
|||
Yea, that is all of it.
Example: http://www.documentingreality.com/fo...d-lesson-9606/ --------------- Added [DATE]1221075592[/DATE] at [TIME]1221075592[/TIME] --------------- I can place the code you gave me before right under it and it displays fine but of course the code to the vid is wrong as it setup for images. |
#10
|
|||
|
|||
try this - I haven't tested it though bc I dont have the flv attachment.
Code:
<div> <center><div id="player_$attachmentid"><font color="red">You do not have flash player installed...</font></div> <script language="javascript"> var swfobject = new SWFObject("/forum/players/mediaplayer.swf","jsplayer_$attachmentid","425","344","7"); swfobject.addParam("allowfullscreen","true"); swfobject.addVariable("file","/forum/{$flvfilenameandlocation}"); swfobject.addVariable("width","425"); swfobject.addVariable("height","344"); swfobject.addVariable("type","flv"); swfobject.addVariable("overstretch","fit"); swfobject.addVariable('frontcolor','0x555555'); swfobject.addVariable("showicons","true"); swfobject.addVariable("autostart","false"); swfobject.addVariable("javascriptid","jsplayer_$attachmentid"); swfobject.addVariable("showstop","true"); swfobject.addVariable("showdigits","true"); swfobject.addVariable("enablejs","true"); swfobject.addVariable('image','/forum/thumbnails/$attachmentid.jpg'); swfobject.write("player_$attachmentid"); </script> <br /> <table border="0" class="tborder" align="center" cellpadding="3" cellspacing="0"> <tr> <td class="alt2" nowrap="nowrap"><div class="smallfont normal"> <div align="right"><strong>Embed Code:</strong> </div> </div></td> <td class="alt2"><div align="center"><span class="smallfont normal"> <input name="textfield" class="bginput" type="text" id="textfield" onClick="SelectAll('textfield');" value="<embed type='application/x-shockwave-flash' src='http://www.documentingreality.com/forum/players/mediaplayer.swf' style='' id='jsplayer_$attachmentid' name='jsplayer_$attachmentid' quality='high' allowfullscreen='true' flashvars='file=http://www.documentingreality.com/forum/{$flvfilenameandlocation}&width=425&height=344&type=flv&overstretch=fit&frontcolor=0x555555&showicons=true&autostart=false&javascriptid=jsplayer_$attachmentid&showstop=true&showdigits=true&enablejs=true&image=/forum/thumbnails/$attachmentid.jpg' width='425' height='344'>" size="50" READONLY> </span></div> </td> </tr> </table> </center> </div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|