if (!$itemObj->accessGranted()) { $xoops->redirect("javascript:history.go(-1)", 1, XoopsLocale::E_NO_ACCESS_PERMISSION); } // Creating the category object that holds the selected ITEM $categoryObj = $itemObj->category(); $xoopsTpl = new XoopsTpl(); $myts = MyTextSanitizer::getInstance(); $item['title'] = $itemObj->title(); $item['body'] = $itemObj->body(); $item['categoryname'] = $myts->displayTarea($categoryObj->getVar('name')); $mainImage = $itemObj->getMainImage(); if ($mainImage['image_path'] != '') { $item['image'] = '<img src="' . $mainImage['image_path'] . '" alt="' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '"/>'; } $xoopsTpl->assign('item', $item); $xoopsTpl->assign('printtitle', $xoops->getConfig('sitename') . " - " . PublisherUtils::html2text($categoryObj->getCategoryPath()) . " > " . $myts->displayTarea($itemObj->title())); $xoopsTpl->assign('printlogourl', $publisher->getConfig('print_logourl')); $xoopsTpl->assign('printheader', $myts->displayTarea($publisher->getConfig('print_header'), 1)); $xoopsTpl->assign('lang_category', _CO_PUBLISHER_CATEGORY); $xoopsTpl->assign('lang_author_date', sprintf(_MD_PUBLISHER_WHO_WHEN, $itemObj->posterName(), $itemObj->datesub())); $doNotStartPrint = false; $noTitle = false; $noCategory = false; $smartPopup = false; $xoopsTpl->assign('doNotStartPrint', $doNotStartPrint); $xoopsTpl->assign('noTitle', $noTitle); $xoopsTpl->assign('smartPopup', $smartPopup); $xoopsTpl->assign('current_language', $xoops->getConfig('language')); if ($publisher->getConfig('print_footer') == 'item footer' || $publisher->getConfig('print_footer') == 'both') { $xoopsTpl->assign('itemfooter', $myts->displayTarea($publisher->getConfig('item_footer'), 1)); }