PDA

View Full Version : Using radio custom field in a template


GrBear
01-08-2005, 06:44 AM
Just bought VbA Links and getting it configured and tweaked but I can't seem to find the designated variable(s) for my custom field(s).

Say I have a radio button custom field with 3 options, only one is selectable. Say this is my second custom field. The options are "Yes" "No" "Unknown", and I want to evaluate it so I can append a icon to the end of a link description in my linkbit.

Would this not be $link[field2] ? With vB, it at least lists what the variable names are for $post, but vBaLinks does not.

Brian
01-08-2005, 11:37 AM
The custom fields aren't pulled in the query on the browselinks page. If you'll look in your browselinks.php file for this code:

$catfields $favfields $subfields $postfields

Right after it add this:
, customfields.*

Then right below that find this:
FROM " . TABLE_PREFIX . "links AS links


And add this right below it:
LEFT JOIN " . TABLE_PREFIX . "links_customfields_entries AS customfields ON (links.linkid = customfields.lid)


Then you should be able to use the custom field values in that template.

Our Sponsors
 

GrBear
01-08-2005, 01:54 PM
Thanks Brian, I'll try it out shortly..

I was staring at the code for about an hour last night wondering the best way to do it, but it was 4am already and my brain wasn't quite awake anymore at that time.

Any chance of this getting rolled into the next release? :) Mabey that and listing the field id's in the ACP? :) :) I had to look at the tables in mysql to double check that I was refering to the right one.