vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add embed code under Attachment Thumbnails (https://vborg.vbsupport.ru/showthread.php?t=190585)

mindhunter77 09-10-2008 04:57 PM

Add embed code under Attachment Thumbnails
 
1 Attachment(s)
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

Code:

<center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></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:

Code:

<center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></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

Code:

<div>
<center><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 glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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></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 [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>

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/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.

nando99 09-10-2008 06:49 PM

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}&amp;width=425&amp;height=344&amp;type=flv&amp;overstretch=fit&amp;frontcolor=0x555555&amp;showicons=true&amp;autostart=false&amp;javascriptid=jsplayer_$attachmentid&amp;showstop=true&amp;showdigits=true&amp;enablejs=true&amp;image=/forum/thumbnails/$attachmentid.jpg' width='425' height='344'>" size="50" READONLY>
                    </span></div>
                    </td>
                  </tr>
                </table>
                </center>
</div>



All times are GMT. The time now is 10:35 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.01242 seconds
  • Memory Usage 1,788KB
  • 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_code_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