$string = str_replace('<p>', "\n\n", $string); $string = str_replace('<P>', "\n\n", $string); $string = str_replace('<br />', "\n", $string); $string = str_replace('<br>', "\n", $string); $string = str_replace('<BR />', "\n", $string); $string = str_replace('<BR>', "\n", $string); $string = str_replace('<li>', "\n - ", $string); $string = str_replace('<LI>', "\n - ", $string); $string = strip_tags($string); $string = str_replace('{mosimage}', '', $string); $string = str_replace('{mospagebreak}', '', $string); // bbcode $string = preg_replace('/\\[confidential\\](.*?)\\[\\/confidential\\]/s', '', $string); $string = preg_replace('/\\[ebay\\](.*?)\\[\\/ebay\\]/s', '', $string); $string = preg_replace('/\\[map\\](.*?)\\[\\/map\\]/s', '', $string); $string = preg_replace('/\\[video(.*?)\\](.*?)\\[\\/video\\]/s', "", $string); $string = decodeHTML($string); } function decodeHTML($string) { require_once JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php'; $string = KunenaParser::parseBBCode($string); return $string; } function get_php_setting($val) { $r = ini_get($val) == '1' ? 1 : 0; return $r ? 'ON' : 'OFF'; } dofreePDF();
function filterHTML(&$string) { // Ugly but needed to get rid of all the stuff the PDF class cant handle $string = str_replace('<p>', "\n\n", $string); $string = str_replace('<P>', "\n\n", $string); $string = str_replace('<br />', "\n", $string); $string = str_replace('<br>', "\n", $string); $string = str_replace('<BR />', "\n", $string); $string = str_replace('<BR>', "\n", $string); $string = str_replace('<li>', "\n - ", $string); $string = str_replace('<LI>', "\n - ", $string); $string = strip_tags($string); $string = str_replace('{mosimage}', '', $string); $string = str_replace('{mospagebreak}', '', $string); // bbcode $string = preg_replace("/\\[(.*?)\\]/si", "", $string); $string = decodeHTML($string); } function decodeHTML($string) { $string = strtr($string, array_flip(get_html_translation_table(HTML_ENTITIES))); $string = preg_replace("/&#([0-9]+);/me", "chr('\\1')", $string); return $string; } function get_php_setting($val) { $r = ini_get($val) == '1' ? 1 : 0; return $r ? 'ON' : 'OFF'; } dofreePDF($kunena_db);
if ($mosConfig_hideAuthor == "0") { if ($row->author != '' && $mosConfig_hideAuthor == '0') { if ($row->usertype == 'administrator' || $row->usertype == 'superadministrator') { $txt2 .= _WRITTEN_BY . ' ' . ($row->created_by_alias ? $row->created_by_alias : $row->author); } else { $txt2 .= _AUTHOR_BY . ' ' . ($row->created_by_alias ? $row->created_by_alias : $row->author); } } } if ($mosConfig_hideModifyDate == "0") { $txt2 .= ' - ' . _LAST_UPDATED . ' (' . $mod_date . ') '; } $txt2 .= "\n\n"; $pdf->ezText($txt2, 8); $txt3 = $row->introtext . "\n" . $row->fulltext; $pdf->ezText($txt3, 10); $pdf->ezStream(); } function decodeHTML($string) { $string = strtr($string, array_flip(get_html_translation_table(HTML_ENTITIES))); $string = preg_replace("/&#([0-9]+);/me", "chr('\\1')", $string); return $string; } function get_php_setting($val) { $r = ini_get($val) == '1' ? 1 : 0; return $r ? 'ON' : 'OFF'; } dofreePDF($database);