vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 01-03-2005, 06:50 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Attachment link to thread

Heya,

I would like to point the attachment on the frontpage to the thread it's coming from instead of pointing to the full image...I think I should modify the code below,

PHP Code:
$attachment '<a href="' $vboptions['bburl'] . '/attachment.php?' $session['sessionurl'] . 'attachmentid=' $news['attachmentid'] . '" target="_blank"><img border="0" height = "190" width = "230" src="' $vboptions['bburl'] . '/attachment.php?' $session['sessionurl'] . 'attachmentid=' $news['attachmentid'] . '&amp;stc=1&amp;thumb=1" /></a>'
to something like this??

PHP Code:
$attachment '<a href="' $vboptions['bburl'] . '/showthread.php?' $session['sessionurl'] . '$thread[threadid]' $thread[highlight] . '" target="_blank"><img border="0" height = "190" width = "230" src="' $vboptions['bburl'] . '/attachment.php?' $session['sessionurl'] . 'attachmentid=' $news['attachmentid'] . '&amp;stc=1&amp;thumb=1" /></a>'
Am I thinking the right way??

Greets Nordinho,
  #2  
Old 01-03-2005, 07:05 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Attachment link to thread

PHP Code:
$attachment '<a href="' $vboptions['bburl'] . '/showthread.php?' $session['sessionurl'] . 't=' $news['threadid'] . '" target="_blank"><img border="0" height = "190" width = "230" src="' $vboptions['bburl'] . '/attachment.php?' $session['sessionurl'] . 'attachmentid=' $news['attachmentid'] . '&amp;stc=1&amp;thumb=1" /></a>'
  #3  
Old 01-03-2005, 07:22 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Attachment link to thread

almost ...thanks Brian works flawlessly....
  #4  
Old 08-20-2005, 09:13 AM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Attachment link to thread

Quote:
Originally Posted by Nordinho
almost ...thanks Brian works flawlessly....
Any ideas to get this working on 2.0??
  #5  
Old 08-20-2005, 01:33 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Attachment link to thread

Change "$vboptions['bburl']" to "$vbulletin->options['bburl']" in each place you see it.
  #6  
Old 08-23-2005, 12:35 PM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Attachment link to thread

Oke thanks!!
  #7  
Old 08-26-2005, 10:01 AM
Nordinho Nordinho is offline
Senior Member
 
Join Date: Aug 2004
Posts: 182
Default Re: Attachment link to thread

For those with the same problem, the solution above didn't work. I solved it by adding an if condition to the postbit_attachmentthumbnail template...

PHP Code:
<if condition="THIS_SCRIPT == 'adv_index'"><a href="vbull/showthread.php?$session[sessionurl]t=$news[threadid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>

<else />

<
a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
&
nbsp;<if condition="$show['br']"><br /><br /></if></if> 
  #8  
Old 08-29-2006, 04:14 PM
teezdesigns teezdesigns is offline
Junior Member
 
Join Date: Jul 2006
Posts: 19
Default Re: Attachment link to thread

Quote:
Originally Posted by Nordinho View Post
For those with the same problem, the solution above didn't work. I solved it by adding an if condition to the postbit_attachmentthumbnail template...

PHP Code:
<if condition="THIS_SCRIPT == 'adv_index'"><a href="vbull/showthread.php?$session[sessionurl]t=$news[threadid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>

<else />

<
a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
&
nbsp;<if condition="$show['br']"><br /><br /></if></if> 

this worked great for me, thanx!
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Link to Us? CSS59 Pre-Sale Questions 5 12-12-2004 02:43 AM
Link To Us Roms Modifications 0 11-09-2004 10:21 PM
Link Options, Rate Link is bad link deb0 Troubleshooting & Problems 5 11-04-2004 05:35 PM
Webmaster E-mail Address and Link Poster Shon Feedback & Suggestions 0 09-03-2004 03:21 PM
Link Exchanges Snowy Troubleshooting & Problems 1 06-30-2004 11:26 AM


All times are GMT -4. The time now is 05:26 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.