PDA

View Full Version : PDF export 2.3.0 update



Aleksandar Apostolovski
May 22, 2020, 09:59 AM
Hi,
after updating to the newest PDF plugin I need a little help about the printing details.
I want to show only some user fields when printing the PDF instead of all user fields as the plugin does.
What code should I edit? I had this done on my previous version of the plugin but I can't handle it on the new one.
Thanks in advance.

Rudi
May 22, 2020, 10:57 AM
Hello,

You need to modify rlPdfExport.class.php > public function display($listingID)

see this thread: https://forum.flynax.com/showthread.php?5882-Export-PDF-plugin-how-to-add-a-couple-of-listing-fields-only/page2&highlight=export

Aleksandar Apostolovski
May 22, 2020, 11:58 AM
I saw the thread but I see that the code has been slightly changed in the update.
Is there a simple way so it would only show the user info which is only posted as public in the listing related to all different account types?

Aleksandar Apostolovski
May 24, 2020, 07:18 PM
Can I get a help for the code just to exclude some fields?
I was using this before and it was working just fine
foreach ( $additional_fields as $key => $additional_value )
{
if ($key == 'policy') continue;

Rudi
May 25, 2020, 10:34 AM
See the code block:


if ($isVisibleSellerDetails) {
foreach ($seller['Fields'] as $additionalValue) {
if (substr_count($additionalValue['value'], 'http')) {
$additionalValue['value'] = str_replace(RL_URL_HOME, '', $additionalValue['value']);
}

$html .= <<<EOD
<tr>
<td style="color: #676766; height: 20px;">{$additionalValue['name']}:</td>
<td>{$additionalValue['value']}</td>
</tr>
EOD;
}
}


and use like:


if ($additionalValue['Key'] == 'policy') continue;



and it's a good idea to display account details from browse form

I'll create a task on it

Aleksandar Apostolovski
May 25, 2020, 11:24 AM
Thank you Rudi!!!
Just a note: if ($additionalValue['Key'] == 'policy') continue;