Example #1
0
            $file['type'] = $fileObj->mimetype();
            $file['datesub'] = $fileObj->getDatesub();
            $file['hits'] = $fileObj->counter();
            $files[] = $file;
        }
    }
}
$item['files'] = $files;
$item['embeded_files'] = $embededFiles;
unset($file, $embededFiles, $filesObj, $fileObj);
// Language constants
$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $GLOBALS['xoopsConfig']['sitename']) . '&body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $GLOBALS['xoopsConfig']['sitename']) . ': ' . $itemObj->getItemUrl());
$xoopsTpl->assign('itemid', $itemObj->itemId());
$xoopsTpl->assign('sectionname', $publisher->getModule()->getVar('name'));
$xoopsTpl->assign('module_dirname', $publisher->getModule()->getVar('dirname'));
$xoopsTpl->assign('module_home', publisherModuleHome($publisher->getConfig('format_linked_path')));
$xoopsTpl->assign('categoryPath', $item['categoryPath'] . ' > ' . $item['title']);
$xoopsTpl->assign('commentatarticlelevel', $publisher->getConfig('perm_com_art_level'));
$xoopsTpl->assign('com_rule', $publisher->getConfig('com_rule'));
$xoopsTpl->assign('other_items', $publisher->getConfig('item_other_items_type'));
$xoopsTpl->assign('itemfooter', $myts->displayTarea($publisher->getConfig('item_footer'), 1));
$xoopsTpl->assign('perm_author_items', $publisher->getConfig('perm_author_items'));
// tags support
if (xoops_isActiveModule('tag')) {
    include_once $GLOBALS['xoops']->path('modules/tag/include/tagbar.php');
    $xoopsTpl->assign('tagbar', tagbar($itemId, $catid = 0));
}
/**
 * Generating meta information for this page
 */
$publisherMetagen = new PublisherMetagen($itemObj->getVar('title'), $itemObj->getVar('meta_keywords', 'n'), $itemObj->getVar('meta_description', 'n'), $itemObj->getCategoryPath());
Example #2
0
         $redirect_msg = _MD_PUBLISHER_ITEMMODIFIED;
         redirect_header($itemObj->getItemUrl(), 2, $redirect_msg);
     }
     redirect_header('index.php', 2, $redirect_msg);
     //        exit();
     break;
 case 'add':
 default:
     $xoopsOption['template_main'] = 'publisher_submit.tpl';
     include_once $GLOBALS['xoops']->path('header.php');
     $GLOBALS['xoTheme']->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
     //        $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery-migrate-1.2.1.js');
     $GLOBALS['xoTheme']->addScript(PUBLISHER_URL . '/assets/js/publisher.js');
     include_once PUBLISHER_ROOT_PATH . '/footer.php';
     //mb        $itemObj->setVarsFromRequest();
     $xoopsTpl->assign('module_home', publisherModuleHome());
     if ('clone' === XoopsRequest::getString('op', '', 'GET')) {
         $xoopsTpl->assign('categoryPath', _CO_PUBLISHER_CLONE);
         $xoopsTpl->assign('langIntroTitle', _CO_PUBLISHER_CLONE);
     } elseif ($itemId) {
         $xoopsTpl->assign('categoryPath', _MD_PUBLISHER_EDIT_ARTICLE);
         $xoopsTpl->assign('langIntroTitle', _MD_PUBLISHER_EDIT_ARTICLE);
         $xoopsTpl->assign('langIntroText', '');
     } else {
         $xoopsTpl->assign('categoryPath', _MD_PUBLISHER_SUB_SNEWNAME);
         $xoopsTpl->assign('langIntroTitle', sprintf(_MD_PUBLISHER_SUB_SNEWNAME, ucwords($publisher->getModule()->name())));
         $xoopsTpl->assign('langIntroText', $publisher->getConfig('submit_intro_msg'));
     }
     $sform = $itemObj->getForm($formtitle, true);
     $sform->assign($xoopsTpl);
     include_once $GLOBALS['xoops']->path('footer.php');