View Full Version : Add embed code under Attachment Thumbnails
mindhunter77
09-10-2008, 04:57 PM
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.
nando99
09-10-2008, 05:31 PM
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.
mindhunter77
09-10-2008, 05:33 PM
here is the postbit_attachmentthumbnail, thanks for looking
<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-->
nando99
09-10-2008, 05:43 PM
try this:
<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>
here it is with your table
<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>
mindhunter77
09-10-2008, 05:46 PM
Yep that did it!
Now to study what you did...
Thanks a lot
nando99
09-10-2008, 05:49 PM
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...
mindhunter77
09-10-2008, 05:51 PM
You rock, thanks man
--------------- Added 1221074476 at 1221074476 ---------------
I hate to bother you again but if I now had a postbit_attachmentflv that looked like this,
<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>
How would I add it to that?
nando99
09-10-2008, 06:34 PM
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.
mindhunter77
09-10-2008, 06:35 PM
Yea, that is all of it.
Example: http://www.documentingreality.com/forum/f57/shop-owner-teaches-crackhead-lesson-9606/
--------------- Added 1221075592 at 1221075592 ---------------
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.
nando99
09-10-2008, 06:49 PM
try this - I haven't tested it though bc I dont have the flv attachment.
<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&typ e=flv&overstretch=fit&frontcolor=0x555555&showicon s=true&autostart=false&javascriptid=jsplayer_$atta chmentid&showstop=true&showdigits=true&enablejs=tr ue&image=/forum/thumbnails/$attachmentid.jpg' width='425' height='344'>" size="50" READONLY>
</span></div>
</td>
</tr>
</table>
</center>
</div>
mindhunter77
09-10-2008, 06:56 PM
Yea man that worked. Thanks, your an asset to this place!
nando99
09-10-2008, 07:05 PM
ha.. thanks man.. feels good to help and get that kind of appreciation.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.