View Full Version : Call a specific custom field?
January 9th, 2006, 06:27 PM
I'm trying to output a specific custom field in another place of the template but the solution(s) I've found for 3.0.x don't work in 3.5.x.
How can I do it now?
Thanks in advance for any info!
January 9th, 2006, 09:32 PM
Ricardo, what method were you using for 3.0.x?
January 10th, 2006, 04:29 AM
One posted by Brian where you search showimage.php for the text in bold and add what's bellow:
$thisfield = 'field' . $field['fieldid'];
if ($field['fieldid'] == 'X')
$myvarname = $field['value'];
With X being the field id number.
I've also tried every variation of the vars like $fieldid, $field[field3], $customfield, and so on because before 3.5 I was using one of them.
I remember Brian helping me out on this but I can't locate the thread now that the forums were moved here.
January 11th, 2006, 08:20 AM
Kevin, any idea?
January 11th, 2006, 10:28 AM
In showimage.php around line 489 is where the section is that builds the customfields. At around line 503 you'll see...$field['value'] = $bbcode_parser->do_parse($image["$thisfield"], $catopts['allow_custom_html'], $catopts['allow_custom_smilies'], $catopts['allow_custom_bbcode'], $catopts['allow_custom_bbimgcode']);Below that line try adding your "$myvarname = $field['value'];" command and let me know if that works.
January 12th, 2006, 02:52 AM
Kevin, your code didn't work but Brian's (post #3) worked on your location!
January 12th, 2006, 10:13 AM
RBL, I should've specified a bit more clearly.... when I said try adding the command I should've said the entire "If..." statement. :) Glad to see you got it working.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.