The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Bear with me, as I sometimes don't make much sense.
I have created a custom field, settable by admin/mod only, and would like to have the Post and Member information show a .gif with the name of the field. I accomplised this by using <img src="{ imagesfolder }/$post[field5].gif"> Now my problem is, if the field is blank, it shows a large red blank image x. Which I must say is quite counterproductive to my needs. So what I need is a way to hide this if the field is blank. but I am not sure how to go about this. I'm guessing I need to edit the showthread.php and member.php files, but I'm not sure where or how. I tried a little tampering but was unsuccessful. |
#2
|
|||
|
|||
Code:
if ($post[field5] != ""): $customfield5 = "<img src='{ imagesfolder }/$post[field5].gif'>"; else: $customfield5 = ""; endif; Code:
if ($post[yahoo]!="") { eval("\$post[yahooicon] = \"".gettemplate("yahoo")."\";"); } else { $post[yahoo]=""; } In member.php, find Code:
if ($userinfo[yahoo]!="") { eval("\$userinfo[yahooicon] = \"".gettemplate("yahoo")."\";"); } else { $userinfo[yahoo]=" "; } HTH Edit: *smacking my head vigorously* I forgot. Add $customfield5 where you want it to appear in the showthread templates (postbit, etc.) and the member profile templates (getinfo, etc.). |
#3
|
|||
|
|||
I get a parse error.. Is VB displaying something different in the code?
|
#4
|
|||
|
|||
I made another boo-boo. I changed the code in the post above - just replace what I had given you before with what's there now. Should work now.
|
#5
|
|||
|
|||
Appreciate the help tubedogg Thanks a bunch
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|