Exemplo n.º 1
0
    $xoopsDB->query($sql) or $eh('0013');
    //All is well.  Calculate Score & Add to Summary (for quick retrieval & sorting) to DB.
    news_updaterating($storyid);
    $ratemessage = _NW_VOTEAPPRE . '<br />' . sprintf(_NW_THANKYOU, $xoopsConfig['sitename']);
    redirect_header(XOOPS_URL . '/modules/news/article.php?storyid=' . $storyid, 4, $ratemessage);
    exit;
} else {
    // Display the form to vote
    $xoopsOption['template_main'] = 'news_ratenews.html';
    include_once XOOPS_ROOT_PATH . '/header.php';
    $news = null;
    $news = new NewsStory($storyid);
    if (is_object($news)) {
        $title = $news->title('Show');
    } else {
        redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _ERRORS);
        exit;
    }
    $xoopsTpl->assign('advertisement', news_getmoduleoption('advertisement'));
    $xoopsTpl->assign('news', array('storyid' => $storyid, 'title' => $title));
    $xoopsTpl->assign('lang_voteonce', _NW_VOTEONCE);
    $xoopsTpl->assign('lang_ratingscale', _NW_RATINGSCALE);
    $xoopsTpl->assign('lang_beobjective', _NW_BEOBJECTIVE);
    $xoopsTpl->assign('lang_donotvote', _NW_DONOTVOTE);
    $xoopsTpl->assign('lang_rateit', _NW_RATEIT);
    $xoopsTpl->assign('lang_cancel', _CANCEL);
    $xoopsTpl->assign('xoops_pagetitle', $title . ' - ' . _NW_RATETHISNEWS . ' - ' . $xoopsModule->name('s'));
    news_CreateMetaDatas();
    include_once XOOPS_ROOT_PATH . '/footer.php';
}
include_once XOOPS_ROOT_PATH . '/footer.php';
Exemplo n.º 2
0
            case 1:
                // Username
                $uname = $one_user->getVar('uname');
                break;
            case 2:
                // Display full name (if it is not empty)
                if (xoops_trim($one_user->getVar('name')) != '') {
                    $uname = $one_user->getVar('name');
                } else {
                    $uname = $one_user->getVar('uname');
                }
                break;
        }
        $xoopsTpl->append('whoswho', array('uid' => $one_user->getVar('uid'), 'name' => $uname, 'user_avatarurl' => XOOPS_URL . '/uploads/' . $one_user->getVar('user_avatar')));
    }
}
$xoopsTpl->assign('advertisement', news_getmoduleoption('advertisement'));
/**
 * Manage all the meta datas
 */
news_CreateMetaDatas($article);
$xoopsTpl->assign('xoops_pagetitle', _AM_NEWS_WHOS_WHO);
$myts =& MyTextSanitizer::getInstance();
$meta_description = _AM_NEWS_WHOS_WHO . ' - ' . $xoopsModule->name('s');
if (isset($xoTheme) && is_object($xoTheme)) {
    $xoTheme->addMeta('meta', 'description', $meta_description);
} else {
    // Compatibility for old Xoops versions
    $xoopsTpl->assign('xoops_meta_description', $meta_description);
}
include_once XOOPS_ROOT_PATH . '/footer.php';