View Full Version : What is the Variable name for custom field?
ataraxia
10-22-2004, 10:32 AM
Newbie question:
What is the variable name the data in a custom field for the link currently being displayed?
I want to reference the data in a template.
Thanks
Brian
10-22-2004, 07:19 PM
I assume this is related to your usergroup question? If not I'll need to know which page you're trying to access the custom field on.
ataraxia
10-22-2004, 08:52 PM
I assume this is related to your usergroup question? If not I'll need to know which page you're trying to access the custom field on.Indirectly, I suppose it is related.
The "hidden" custom field may contain the URL of a Forum or Thread in my main vB message base where the website in the link is being discussed. (I will manually add this URL only if a sufficiently active, corresponding discussion area exists. In most cases there will probably not be one.)
What I am trying to do is: IF EXIST a url in the custom field, DISPLAY it as a "Discuss this site here" hyperllink for all users to see. (But only Admins will actually see the field itself.)
By having the flexibility to have this custom field link to either an individual thread OR entire forums, I can include multiple polls, link to a Table of Contents of large discussion having several threads, etc.
It would really kool to set it up so that IF customfield = NULL THEN (publicly) display a link to "create new thread" (within a designated forum ID) ELSE display field as a link.
I would probably "disconnect" the vbAdvanced Links message base entirely.
The whole idea here is to provide a way to completely integrate the vB message base with the vbAdvanced Links system rather than have a body of "separate island" postings soley within vbAdvanced Links.
ataraxia
10-23-2004, 09:30 AM
What would the custom field variable name be for the ADV_LINKS_SHOWLINK template? Thanks.
Brian
10-23-2004, 10:12 AM
$field['fieldid'] ;)
Brian, is this also valid for showimage template in Gallery?
I'm trying $field[1] ( it's the only custom field I have but is doesn't display anything)
Brian
01-15-2005, 11:37 AM
It would be $image[fieldid] in your showimage.php file.
Thanks again Brian! =)
Just in case somebody needs this later, let me clarify that it's $image[fieldx] (where x is the id number of the field) and not $image[x].
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.