本文整理汇总了PHP中e107::getRender方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getRender方法的具体用法?PHP e107::getRender怎么用?PHP e107::getRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::getRender方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showForm
public function showForm($mes)
{
$ns = e107::getRender();
$frm = new form();
$text = $frm->form_open('post', e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>" . LAN_RADIUS_01 . "</td><td>";
$text .= $frm->form_text('radius_server', 35, vartrue($this->radius['radius_server']), 120);
$text .= "</td></tr>\n";
$text .= "<tr><td>" . LAN_RADIUS_02 . "</td><td>";
$text .= $frm->form_text('radius_secret', 35, vartrue($this->radius['radius_secret']), 200);
$text .= "</td></tr>\n";
$tmp = $this->alt_auth_get_field_list('radius', $frm, $this->radius, FALSE);
if ($tmp) {
$text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>\n" . $tmp;
unset($tmp);
}
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
// $text .= $frm -> form_button("submit", "update", LAN_ALT_2);
$text .= e107::getForm()->admin_button('update', LAN_UPDATE, 'update');
$text .= "</td></tr>\n";
$text .= "</table>\n";
$text .= $frm->form_close();
$ns->tablerender(LAN_RADIUS_06, $mes->render() . $text);
$ns->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('radius', $frm));
}
示例2: renderMenu
/**
* Render menu.
*/
function renderMenu()
{
$tpl = e107::getTemplate('nodejs_comment');
$sc = e107::getScBatch('nodejs_comment', true);
$tp = e107::getParser();
$cm = e107::getComment();
$amount = (int) vartrue($this->plugPrefs['comment_display'], 10);
/**
* getCommentData() returns with array, which contains:
* - comment_datestamp
* - comment_author_id
* - comment_author
* - comment_comment
* - comment_subject
* - comment_type
* - comment_title
* - comment_url
*/
$items = $cm->getCommentData($amount);
$text = $tp->parseTemplate($tpl['MENU']['LATEST']['HEADER'], true, $sc);
foreach ($items as $item) {
$sc->setVars($item);
$text .= $tp->parseTemplate($tpl['MENU']['LATEST']['ITEM'], true, $sc);
}
if (empty($items)) {
$text .= '<a href="#" class="list-group-item no-posts text-center">' . LAN_PLUGIN_NODEJS_COMMENT_FRONT_05 . '</a>';
}
$text .= $tp->parseTemplate($tpl['MENU']['LATEST']['FOOTER'], true, $sc);
e107::getRender()->tablerender(LAN_PLUGIN_NODEJS_COMMENT_FRONT_04, $text);
unset($text);
}
示例3: setstyle_shortcode
function setstyle_shortcode($parm)
{
global $style;
// BC
$style = $parm;
// BC
e107::getRender()->setStyle($parm);
}
示例4: sc_featurebox
/**
* Available parameters (GET string format)
* - cols (integer): number of items per column, default 1
* - no_fill_empty (boolean): don't fill last column with empty items (if required), default 0
* - tablestyle (string): mode to be used with <code>tablerender()</code>, default 'featurebox'
* - notablestyle (null): if isset - disable <code>tablerender()</code>
* - force (boolean): force category model load , default false
* - ids (string): comma separated id list - load specific featurebox items, default empty
*
* @param string $parm parameters
* @param string $mod category template
* @example {FEATUREBOX=cols=2|tabs}
*/
function sc_featurebox($parm = null, $mod = '')
{
if ($parm == null && $mod == '') {
$type = vartrue(e107::getPlugPref('featurebox', 'menu_category'), 'bootstrap_carousel');
$text = e107::getParser()->parseTemplate("{FEATUREBOX|" . $type . "}");
return $text;
}
// TODO cache
if (!e107::isInstalled('featurebox')) {
return '';
}
if (!$mod) {
$ctemplate = 'default';
} else {
$ctemplate = $mod;
}
parse_str($parm, $parm);
$category = $this->getCategoryModel($ctemplate, vartrue($parm['force']) ? true : false);
$defopt = array('force' => 0, 'no_fill_empty' => 0, 'tablestyle' => 'featurebox', 'cols' => 1, 'ids' => '', 'notablestyle' => null);
// reset to default, update current
$category->setParams($defopt)->updateParams($parm);
if (!$category->hasData()) {
return '';
}
$tmpl = $this->getFboxTemplate($ctemplate);
$type = vartrue($tmpl['js_type'], '');
// Legacy support (prototype.js)
if (vartrue($tmpl['js'])) {
$tmp = explode(',', $tmpl['js']);
foreach ($tmp as $file) {
e107::js('footer', $file, $type);
}
}
$tp = e107::getParser();
if (vartrue($tmpl['js_inline'])) {
$data = $tp->toText($category->getData('fb_category_parms'));
$jsInline = str_replace("{FEATUREBOX_PARMS}", "{" . trim($data) . "}", $tmpl['js_inline']);
e107::js('footer-inline', $jsInline, $type, 3);
}
// Fix - don't use tablerender if no result (category could contain hidden items)
$ret = $this->render($category, $ctemplate, $parm);
if (empty($ret)) {
e107::getMessage()->addDebug('Featurebox returned nothing.')->addDebug('Category: ' . print_a($category, true))->addDebug('Template: ' . $ctemplate)->addDebug('Param: ' . print_a($parm, true));
return '';
}
$ret = $tp->parseTemplate($tmpl['list_start'], true, $category) . $ret . $tp->parseTemplate($tmpl['list_end'], true, $category);
if (isset($parm['notablestyle'])) {
return $ret;
}
return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);
}
示例5: render
function render()
{
$tp = e107::getParser();
$sql = e107::getDb('nfp');
$pref = e107::getPref();
$qry = $this->getQuery();
if ($results = $sql->gen($qry)) {
$text = "<ul>";
while ($row = $sql->fetch()) {
$datestamp = $tp->toDate($row['post_datestamp'], 'relative');
$id = $row['thread_id'];
$topic = $row['thread_datestamp'] == $row['post_datestamp'] ? '' : 'Re:';
$topic .= strip_tags($tp->toHTML($row['thread_name'], true, 'emotes_off, no_make_clickable, parse_bb', '', $pref['menu_wordwrap']));
$row['thread_sef'] = $this->forumObj->getThreadSef($row);
if ($row['post_user_anon']) {
$poster = $row['post_user_anon'];
} else {
if ($row['user_name']) {
$poster = "<a href='" . e107::getUrl()->create('user/profile/view', array('name' => $row['user_name'], 'id' => $row['post_user'])) . "'>{$row['user_name']}</a>";
} else {
$poster = '[deleted]';
}
}
$post = strip_tags($tp->toHTML($row['post_entry'], true, 'emotes_off, no_make_clickable', '', $pref['menu_wordwrap']));
$post = $tp->text_truncate($post, $this->menuPref['characters'], $this->menuPref['postfix']);
// Count previous posts for calculating proper (topic) page number for the current post.
// $postNum = $sql2->count('forum_post', '(*)', "WHERE post_id <= " . $row['post_id'] . " AND post_thread = " . $row['thread_id'] . " ORDER BY post_id ASC");
// $postPage = ceil($postNum / vartrue($this->plugPref['postspage'], 10)); // Calculate (topic) page number for the current post.
// $thread = $sql->retrieve('forum_thread', '*', 'thread_id = ' . $row['thread_id']); // Load thread for passing it to e107::url().
// Create URL for post.
// like: e107_plugins/forum/forum_viewtopic.php?f=post&id=1
$url = e107::url('forum', 'topic', $row, array('query' => array('f' => 'post', 'id' => intval($row['post_id']))));
$text .= "<li>";
if ($this->menuPref['title']) {
$text .= "<a href='{$url}'>{$topic}</a><br />{$post}<br /><small class='text-muted muted'>" . LAN_FORUM_MENU_001 . " {$poster} {$datestamp}</small>";
} else {
$text .= "<a href='{$url}'>" . LAN_FORUM_MENU_001 . "</a> {$poster} <small class='text-muted muted'>{$datestamp}</small><br />{$post}<br />";
}
$text .= "</li>";
}
$text .= "</ul>";
} else {
$text = LAN_FORUM_MENU_002;
}
$caption = varset($this->menuPref['caption'][e_LANGUAGE], $this->menuPref['caption']);
e107::getRender()->tablerender($caption, $text, 'nfp_menu');
}
示例6: renderMenu
/**
* Render menu contents.
*/
function renderMenu()
{
$template = e107::getTemplate('nodejs_online');
$sc = e107::getScBatch('nodejs_online', true);
$tp = e107::getParser();
e107_require_once(e_PLUGIN . 'nodejs_online/includes/nodejs_online.php');
$users = nodejs_online_get_online_users();
$sc->setVars(array('count' => count($users)));
$text = $tp->parseTemplate($template['MENU']['HEADER'], true, $sc);
foreach ($users as $uid => $user) {
$sc->setVars(array('user' => $user));
$text .= $tp->parseTemplate($template['MENU']['ITEM'], true, $sc);
}
$text .= $tp->parseTemplate($template['MENU']['FOOTER'], true);
e107::getRender()->tablerender(LAN_NODEJS_ONLINE_MENU_01, $text);
unset($text);
}
示例7: show_importdb_form
function show_importdb_form()
{
$ns = e107::getRender();
$parm = altAuthGetParams('importdb');
$frm = new form();
$text = $frm->form_open('post', e_SELF);
$text .= "<table class='table adminform'>\r\n\t<colgroup span='2'>\r\n\t\t<col class='col-label' />\r\n\t\t<col class='col-control' />\r\n\t</colgroup>";
$text .= "<tr><td colspan='2'>" . IMPORTDB_LAN_11 . "</td></tr>";
$text .= "<tr><td>" . IMPORTDB_LAN_9 . "</td><td>";
$text .= altAuthGetPasswordSelector('importdb_password_method', $frm, $parm['importdb_password_method'], TRUE);
$text .= "</td></tr>";
$text .= "</table><div class='buttons-bar center'>";
$text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
$text .= "</div>";
$text .= $frm->form_close();
$ns->tablerender(IMPORTDB_LAN_10, $text);
$ns->tablerender(LAN_ALT_40 . LAN_ALT_41, alt_auth_test_form('importdb', $frm));
}
示例8: renderMenu
/**
* Render menu contents.
*/
function renderMenu()
{
$template = e107::getTemplate('paypal_donation');
$sc = e107::getScBatch('paypal_donation', true);
$tp = e107::getParser();
$db = e107::getDb();
$db->select('paypal_donation', '*', 'pd_status = 1 ORDER BY pd_weight ASC');
$text = '';
while ($row = $db->fetch()) {
if (check_class($row['pd_visibility']) === true) {
$item = array('menu_item' => $row, 'amounts' => $this->getAmounts($row['pd_id']), 'raised' => $this->getRaised($row['pd_id']));
$sc->setVars($item);
$text .= $tp->parseTemplate($template['MENU'], true, $sc);
}
}
e107::getRender()->tablerender(LAN_PAYPAL_DONATION_FRONT_01, $text);
unset($text);
}
示例9: init
function init()
{
$ns = e107::getRender();
if (e_QUERY == 'bbcode') {
echo $this->bbcodeForm();
return;
}
$text = "<div class='alert alert-warning'>Warning: These will only work if you have a bootstrap-based theme installed</div>";
$text .= '
<ul class="nav nav-tabs">';
$text .= '<li class="active" ><a href="#mbuttons" data-toggle="tab">Buttons</a></li>';
$text .= '<li><a href="#badges" data-toggle="tab">Labels & Badges</a></li>';
$text .= '<li><a href="#glyphs" data-toggle="tab">Glyphicons</a></li>';
$text .= '</ul>';
$text .= '<div class="tab-content">';
$text .= '<div class="tab-pane active left" id="mbuttons">' . $this->buttonForm() . '</div>';
$text .= '<div class="tab-pane left" id="badges">' . $this->badgeForm() . '</div>';
$text .= '<div class="tab-pane left" id="glyphs">' . $this->glyphicons() . '</div>';
$text .= '</div>';
echo $text;
}
示例10: show_admins
function show_admins()
{
$sql = e107::getDb();
$frm = e107::getForm();
$ns = e107::getRender();
$mes = e107::getMessage();
$tp = e107::getParser();
$prm = e107::getUserPerms();
$sql->db_Select("user", "*", "user_admin='1'");
$text = "\n\t<form action='" . e_SELF . "' method='post' id='del_administrator'>\n\t\t<fieldset id='core-administrator-list'>\n\t\t\t<legend class='e-hideme'>" . ADMSLAN_13 . "</legend>\n\t\t\t<table class='table adminlist'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width: 5%' />\n\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t\t<col style='width: 65%' />\n\t\t\t\t\t<col style='width: 10%' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>ID</th>\n\t\t\t\t\t\t<th>" . ADMSLAN_56 . "</th>\n\t\t\t\t\t\t<th>" . ADMSLAN_18 . "</th>\n\t\t\t\t\t\t<th class='center last'>" . LAN_OPTIONS . "</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\n\t";
while ($row = $sql->db_Fetch()) {
//$permtxt = "";
$text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $row['user_id'] . "</td>\n\t\t\t\t\t\t<td><a href='" . e107::getUrl()->create('user/profile/view', array('id' => $row['user_id'], 'name' => $row['user_name'])) . "'>" . $row['user_name'] . "</a></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $prm->renderperms($row['user_perms'], $row['user_id'], "words") . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='center'>\n\t\t";
if ($row['user_id'] != "1") {
$text .= "\n\t\t\t\t\t\t\t" . $frm->submit_image("edit_admin[{$row['user_id']}]", 'edit', 'edit', LAN_EDIT) . "\n\t\t\t\t\t\t\t" . $frm->submit_image("del_admin[{$row['user_id']}]", 'del', 'delete', $tp->toJS(ADMSLAN_59 . "? [" . $row['user_name'] . "]")) . "\n\n\t\t\t";
}
$text .= "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t";
}
$text .= "\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t" . $frm->hidden('del_administrator_confirm', '1') . "\n\t\t</fieldset>\n\t</form>\n\n\t";
$ns->tablerender(ADMSLAN_13, $mes->render() . $text);
}
示例11: render
function render()
{
$ns = e107::getRender();
$mes = e107::getMessage();
$admin_cat = e107::getNav()->adminCats();
$text = "<div>";
$text .= "<ul class='nav nav-tabs'>";
foreach ($admin_cat['id'] as $cat_key => $cat_id) {
$cls = $cat_key == 1 ? "class='active'" : "";
$text .= "<li {$cls} ><a data-toggle='tab' href='#core-main-" . $cat_key . "'>" . $admin_cat['title'][$cat_key] . "</a></li>";
}
$text .= "</ul>";
// print_a($this->links);
$text .= "<div class='tab-content adminform'>";
foreach ($admin_cat['id'] as $id => $cat_id) {
$cls = $id == 1 ? "active" : "";
$text .= "<div class='tab-pane {$cls} adminform' style='width:95%' id='core-main-{$id}'>" . $this->renderCat($id) . "</div>";
}
$text .= "</div>";
$text .= "</div>";
$ns->tablerender(ADLAN_47 . " " . ADMINNAME, $mes->render() . $text);
}
示例12: renderMenu
/**
* Render menu.
*/
function renderMenu()
{
$tpl = e107::getTemplate('nodejs_forum');
$sc = e107::getScBatch('nodejs_forum', true);
$tp = e107::getParser();
$items = $this->getLatestForumPosts();
$text = $tp->parseTemplate($tpl['MENU']['RECENT']['HEADER'], true, $sc);
foreach ($items as $item) {
// Get topic page number.
$postNum = $this->getPostNum($item['thread']['thread_id'], $item['post']['post_id']);
$postPage = ceil($postNum / vartrue($this->plugForumPrefs['postspage'], 10));
$item['topicPage'] = $postPage;
$sc->setVars($item);
$text .= $tp->parseTemplate($tpl['MENU']['RECENT']['ITEM'], true, $sc);
}
if (empty($items)) {
$text .= '<div class="no-posts text-center">' . LAN_PLUGIN_NODEJS_FORUM_FRONT_05 . '</div>';
}
$text .= $tp->parseTemplate($tpl['MENU']['RECENT']['FOOTER'], true, $sc);
e107::getRender()->tablerender(LAN_PLUGIN_NODEJS_FORUM_FRONT_04, $text);
unset($text);
}
示例13: showImages
function showImages($cat)
{
$mes = e107::getMessage();
$tp = e107::getParser();
$template = e107::getTemplate('gallery');
$sc = e107::getScBatch('gallery', TRUE);
$sc->total = e107::getMedia()->countImages($cat);
$sc->amount = 12;
// TODO Add Pref. amount per page.
$sc->curCat = $cat;
$sc->from = $_GET['frm'] ? intval($_GET['frm']) : 0;
$list = e107::getMedia()->getImages($cat, $sc->from, $sc->amount);
$catname = $tp->toHtml($this->catList[$cat]['media_cat_title'], false, 'defs');
$inner = "";
foreach ($list as $row) {
$sc->setVars($row);
$inner .= $tp->parseTemplate($template['LIST_ITEM'], TRUE);
}
$text = $tp->parseTemplate($template['LIST_START'], TRUE);
$text .= $inner;
$text .= $tp->parseTemplate($template['LIST_END'], TRUE);
e107::getRender()->tablerender("Gallery :: " . $catname, $mes->render() . $text);
}
示例14: showForm
public function showForm()
{
$ns = e107::getRender();
$parm = $this->altAuthGetParams('e107db');
$frm = new form();
$text = $frm->form_open('post', e_SELF);
$text .= "<table class='table adminform'>\r\n\t\t<colgroup span='2'>\r\n\t\t\t<col class='col-label' />\r\n\t\t\t<col class='col-control' />\r\n\t\t</colgroup>";
$text .= "<tr><td>" . LAN_ALT_26 . "</td><td>";
$text .= E107DB_LAN_1;
$text .= "</td></tr>";
$text .= $this->alt_auth_get_db_fields('e107db', $frm, $parm, 'server|uname|pwd|db|prefix|classfilt');
$text .= "<tr><td>" . E107DB_LAN_9 . "</td><td>";
$text .= $this->altAuthGetPasswordSelector('e107db_password_method', $frm, $parm['e107db_password_method'], FALSE);
$text .= "</td></tr>";
$text .= "<tr><td colspan='2'><br />" . E107DB_LAN_11 . "</td></tr>";
$text .= $this->alt_auth_get_field_list('e107db', $frm, $parm, TRUE);
$text .= "</table><div class='buttons-bar center'>";
$text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
// $text .= $frm -> form_button("submit", "update", LAN_ALT_UPDATESET);
$text .= '</div>';
$text .= $frm->form_close();
$ns->tablerender(E107DB_LAN_10, $text);
$ns->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('e107db', $frm));
}
示例15: show_otherdb_form
function show_otherdb_form()
{
$ns = e107::getRender();
$parm = altAuthGetParams('otherdb');
$frm = new form();
$text = $frm->form_open("post", e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>" . LAN_ALT_26 . "</td><td>";
$text .= OTHERDB_LAN_15;
$text .= "</td></tr>";
$text .= alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt');
$text .= "<tr><td>" . OTHERDB_LAN_9 . "</td><td>";
$text .= altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE);
$text .= "</td></tr>";
$text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>";
$text .= alt_auth_get_field_list('otherdb', $frm, $parm, FALSE);
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
$text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
$text .= '</td></tr>';
$text .= '</table>';
$text .= $frm->form_close();
$ns->tablerender(OTHERDB_LAN_10, $text);
$ns->tablerender(LAN_ALT_40 . LAN_ALT_41, alt_auth_test_form('otherdb', $frm));
}