View Full Version : I'd like to add a banner image to each link
Cebby
10-23-2006, 08:16 AM
How can I do this? I looked at the custom fields, but nothing that showed an option for something like this.
Any ideas?
Shelby
01-01-2007, 09:28 PM
I just got the product and I'm wanting to do the same thing.
Brian
01-02-2007, 12:03 PM
Add a new custom field for the banner, then edit your 'adv_links_showlink_custombits' template and change the code to something like this:
<tr class="$bgclass">
<td>$field[title]:</td>
<td><if condition="$thisfield == 'fieldX'"><img src="$field[value]" /><else />$field[value]</if></td>
</tr>
Be sure to change 'fieldx' marked in bold to match the fieldid for the new custom field you've added.
Shelby
01-03-2007, 06:57 AM
Is it possible to display that banner on the "adv_links_linkbit"?
I've tried adding it in, however it doesn't display. See this other thread.
http://www.vbadvanced.com/forum/showthread.php?t=19562
icebullet
01-07-2007, 05:12 PM
i would like it displayed in the browselinks.php area..... is this possible???
Brian
01-08-2007, 12:33 PM
That's what's discussed in the thread Shelby linked to right above your post. ;)
aacircle
01-16-2007, 08:09 AM
That didn't work.
So I would need to replace 'fieldX' with 1 if this would be my custom field ID? All I see is the url display to the image after submitting a link but no banner in this field.
Brian
01-16-2007, 12:40 PM
You would replace 'fieldX' with 'field1'.
aacircle
01-17-2007, 07:31 AM
Unfortunately it's still not showing the banner. Only the image link.
I also note that the above code is wrong too. Shouldn't it have a $ sign before the f in 'fieldX'? That is, it should be '$fieldX'.
In the source code it is parsing as href= rather than img src=.
Brian
01-17-2007, 01:51 PM
No, 'fieldX' is not supposed to be a variable.
In the source code it is parsing as href= rather than img src=.
I'm sorry, but I'm not sure what you mean by that.
aacircle
01-17-2007, 09:20 PM
Apologies... it's working now. Sorry to waste your time Brian.
aacircle
01-18-2007, 01:47 AM
Ok, this image thing sometimes works and sometimes doesn't.
Correct at: http://www.animeonline.net/links/showlink.php?do=showdetails&l=5
Incorrect at: http://www.animeonline.net/links/showlink.php?do=showdetails&l=2
The incorrect link is always adding [url] as a tag.
Confused.
aacircle
01-19-2007, 05:56 AM
Well, I have fixed it but the only way is to manually edit the tables direct from the database to remove the [url] image tags inserted.
Brian
01-19-2007, 11:14 AM
Admin CP => vBa Links Directory => Manage Categories => Custom Fields => Automatically Parse Links in Text
Sounds like you have that option enabled. Try turning it off for each category and that should take care of the problem with it adding [url] tags.
aacircle
01-19-2007, 11:45 AM
Excellent. Thank you Brian. Finally it's working.
Cheers.
alstoryal
01-25-2007, 01:35 PM
brian i cant figer out hwo to find fieldid
Brian
01-26-2007, 11:51 AM
Admin CP => vBa Links Directory => Custom Fields
Go there, hold your mouse over the "[Edit]" link for that custom field, and in your taskbar you should see a URL that looks like this:
http://yoursite.com/admincp/vba_links_admin.php?do=editcustomfield&fieldid=X
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.