function xnpbookGetPrinterFriendlyDetailBlock($item_id) { // get uid global $xoopsUser; $myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST; // get BasicInformation / RegisteredItem block $basic = xnpGetBasicInformationDetailBlock($item_id); $index = xnpGetIndexPrinterFriendlyBlock($item_id); $attachment = xnpGetAttachmentPrinterFriendlyBlock($item_id, 'book_pdf'); // set to template global $xoopsTpl; $tpl = new XoopsTpl(); // copy variables in $xoopsTpl to $tpl $tpl->assign($xoopsTpl->get_template_vars()); $tpl->assign('basic', $basic); $tpl->assign('index', $index); $tpl->assign('attachment', $attachment); $xnpbook_handler =& xoonips_getormcompohandler('xnpbook', 'item'); $tpl->assign('xoonips_item', $xnpbook_handler->getTemplateVar(XOONIPS_TEMPLATE_TYPE_ITEM_DETAIL, $item_id, $myuid)); // return as HTML return $tpl->fetch('db:xnpbook_detail_block.html'); }
function xnppresentationGetPrinterFriendlyDetailBlock($item_id) { // get uid global $xoopsUser; $myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST; global $xoopsTpl; // get DetailInformation $detail_handler =& xoonips_getormhandler('xnppresentation', 'item_detail'); $detail_orm =& $detail_handler->get($item_id); if (!$detail_orm) { return ''; } // set to template $tpl = new XoopsTpl(); // copy variables in $xoopsTpl to $tpl $tpl->assign($xoopsTpl->get_template_vars()); $tpl->assign('editable', xnp_get_item_permission($_SESSION['XNPSID'], $item_id, OP_MODIFY)); $tpl->assign('basic', xnpGetBasicInformationPrinterFriendlyBlock($item_id)); $tpl->assign('index', xnpGetIndexPrinterFriendlyBlock($item_id)); $tpl->assign('preview', xnpGetPreviewPrinterFriendlyBlock($item_id)); $tpl->assign('presentation_file', xnpGetAttachmentPrinterFriendlyBlock($item_id, 'presentation_file')); $tpl->assign('readme', xnpGetTextFilePrinterFriendlyBlock($item_id, 'readme', $detail_orm->getVar('readme', 'n'))); $tpl->assign('rights', xnpGetRightsPrinterFriendlyBlock($item_id, $detail_orm->getVar('use_cc', 'n'), $detail_orm->getVar('rights', 'n'), $detail_orm->getVar('cc_commercial_use', 'n'), $detail_orm->getVar('cc_modification', 'n'))); $xnppresentation_handler =& xoonips_getormcompohandler('xnppresentation', 'item'); $tpl->assign('xoonips_item', $xnppresentation_handler->getTemplateVar(XOONIPS_TEMPLATE_TYPE_ITEM_DETAIL, $item_id, $myuid)); // return as HTML return $tpl->fetch('db:xnppresentation_detail_block.html'); }
function xnpfilesGetPrinterFriendlyDetailBlock($item_id) { // get uid global $xoopsUser; $myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST; // set to template global $xoopsTpl; $tpl = new XoopsTpl(); $tpl->assign($xoopsTpl->get_template_vars()); // copy variables in $xoopsTpl to $tpl $tpl->assign('editable', xnp_get_item_permission($_SESSION['XNPSID'], $item_id, OP_MODIFY)); $tpl->assign('basic', xnpGetBasicInformationPrinterFriendlyBlock($item_id)); $tpl->assign('index', xnpGetIndexPrinterFriendlyBlock($item_id)); $tpl->assign('files_file', xnpGetAttachmentPrinterFriendlyBlock($item_id, 'files_file')); $xnpfiles_handler =& xoonips_getormcompohandler('xnpfiles', 'item'); $tpl->assign('xoonips_item', $xnpfiles_handler->getTemplateVar(XOONIPS_TEMPLATE_TYPE_ITEM_DETAIL, $item_id, $myuid)); // return as HTML return $tpl->fetch('db:xnpfiles_detail_block.html'); }
function xnpconferenceGetPrinterFriendlyDetailBlock($item_id) { // get uid global $xoopsUser; $myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST; // set to template global $xoopsTpl; $tpl = new XoopsTpl(); $tpl->assign($xoopsTpl->get_template_vars()); // copy variables in $xoopsTpl to $tpl $tpl->assign('editable', false); $tpl->assign('basic', xnpGetBasicInformationPrinterFriendlyBlock($item_id)); $tpl->assign('index', xnpGetIndexPrinterFriendlyBlock($item_id)); $tpl->assign('presentation_file', xnpGetAttachmentPrinterFriendlyBlock($item_id, 'conference_file')); $tpl->assign('conference_paper', xnpGetAttachmentPrinterFriendlyBlock($item_id, 'conference_paper')); $tpl->assign('dl_flag', (int) xnpconferenceGetAttachmentDownloadLimitOption($item_id)); $xnpconference_handler =& xoonips_getormcompohandler('xnpconference', 'item'); $tpl->assign('xoonips_item', $xnpconference_handler->getTemplateVar(XOONIPS_TEMPLATE_TYPE_ITEM_DETAIL, $item_id, $myuid)); // return as HTML return $tpl->fetch('db:xnpconference_detail_block.html'); }
function xnppaperGetPrinterFriendlyDetailBlock($item_id) { // get uid global $xoopsUser; $myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST; global $xoopsTpl; $mhandler =& xoops_gethandler('module'); $chandler =& xoops_gethandler('config'); $module = $mhandler->getByDirname('xnppaper'); $assoc = $chandler->getConfigsByCat(false, $module->mid()); // set to template $tpl = new XoopsTpl(); // copy variables in $xoopsTpl to $tpl $tpl->assign($xoopsTpl->get_template_vars()); $tpl->assign('editable', xnp_get_item_permission($_SESSION['XNPSID'], $item_id, OP_MODIFY)); $tpl->assign('basic', xnpGetBasicInformationPrinterFriendlyBlock($item_id)); $tpl->assign('index', xnpGetIndexPrinterFriendlyBlock($item_id)); $tpl->assign('paper_pdf_reprint', xnpGetAttachmentPrinterFriendlyBlock($item_id, 'paper_pdf_reprint')); // Make sure that this user access to item_id is permitted or not $tpl->assign('show_pdf', $assoc['pdf_access_rights'] <= xnpGetAccessRights($item_id)); $tpl->assign('show_abstract', $assoc['abstract_access_rights'] <= xnpGetAccessRights($item_id)); $xnppaper_handler =& xoonips_getormcompohandler('xnppaper', 'item'); $tpl->assign('xoonips_item', $xnppaper_handler->getTemplateVar(XOONIPS_TEMPLATE_TYPE_ITEM_DETAIL, $item_id, $myuid)); // return as HTML return $tpl->fetch('db:xnppaper_detail_block.html'); }