View Full Version : printer friendly version dosn't display custom fields
1kether1
06-26-2011, 12:10 PM
when viewing the printer friendly version of an article, the custom fields are not shown. Only text entered into the message window is shown.
larina
10-29-2011, 04:17 PM
same here, any solution available?
Brian
11-02-2011, 09:55 AM
Thank you for pointing this out. You should be able to correct this issue by looking in your dynamics/misc.php file for this code:
$templater = vB_Template::create(ADV_DYNA_PREFIX . '_showentry_custombits');
$templater->register('bgclass', $bgclass);
$templater->register('field', $field);
$customfieldbits .= $templater->render();
Replace with this:
$customfieldbits[$field['fieldid']] = $field;
Then you will need to edit your 'ADV_DYNA_PRINTER_FRIENDLY' template to look for this code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
{vb:raw customfieldbits}
</table>
And replace it with this:
<div class="blockrow">
<vb:each from="customfieldbits" value="field">
<dl class="stats">
<dt>{vb:raw field.title}</dt>
<dd>{vb:raw field.value}</dd>
</dl>
</vb:each>
</div>
larina
11-02-2011, 03:11 PM
Thank you Brian, it works great. While you have an error in description:
Not this has to be replaced in the template:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
$customfieldbits
</table>
(this code does not exist in the template)
This is the right code which has to be replaced:
<table class="tborder" cellpadding="{vb:stylevar cellpadding}" cellspacing="1" border="0" width="100%" class="blockrow">
{vb:raw customfieldbits}
</table>
larina
Brian
11-04-2011, 11:18 AM
Thanks, I updated my original post to correct that.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.