当前位置: 首页>>代码示例>>PHP>>正文


PHP e107::url方法代码示例

本文整理汇总了PHP中e107::url方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::url方法的具体用法?PHP e107::url怎么用?PHP e107::url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在e107的用法示例。


在下文中一共展示了e107::url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: compile

 function compile($row)
 {
     $tp = e107::getParser();
     $res = array();
     $datestamp = $tp->toDate($row['thread_datestamp'], "long");
     if ($row['thread_parent']) {
         $title = $row['parent_name'];
     } else {
         $title = $row['thread_name'];
     }
     $link_id = $row['thread_id'];
     $uparams = array('id' => $row['user_id'], 'name' => $row['user_name']);
     $link = e107::getUrl()->create('user/profile/view', $uparams);
     $userlink = "<a href='" . $link . "'>" . $row['user_name'] . "</a>";
     $row['thread_sef'] = eHelper::title2sef($row['thread_name'], 'dashl');
     $forumTitle = "<a href='" . e107::url('forum', 'forum', $row) . "'>" . $row['forum_name'] . "</a>";
     $res['link'] = e107::url('forum', 'topic', $row, array('query' => array('f' => 'post', 'id' => $row['post_id'])));
     // e_PLUGIN."forum/forum_viewtopic.php?".$link_id.".post";
     $res['pre_title'] = '';
     // $title ? FOR_SCH_LAN_5.": " : "";
     $res['title'] = $title ? $forumTitle . " | " . $title : LAN_SEARCH_9;
     $res['pre_summary'] = "";
     $res['summary'] = $row['post_entry'];
     $res['detail'] = LAN_SEARCH_7 . $userlink . LAN_SEARCH_8 . $datestamp;
     return $res;
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:26,代码来源:e_search.php

示例2: compile

 function compile($row)
 {
     $res = array();
     $res['link'] = $url = e107::url('faqs', 'category', $row);
     // e_PLUGIN . "faq/faq.php?cat." . $cat_id . "." . $link_id . "";
     $res['pre_title'] = $row['faq_info_title'] ? $row['faq_info_title'] . ' | ' : "";
     $res['title'] = $row['faq_question'];
     $res['summary'] = substr($row['faq_answer'], 0, 100) . "....  ";
     $res['detail'] = e107::getParser()->toDate($row['faq_datestamp'], 'long');
     return $res;
 }
开发者ID:armpit,项目名称:e107,代码行数:11,代码来源:e_search.php

示例3: sc_forumjump

 function sc_forumjump()
 {
     $jumpList = $this->forum->forumGetAllowed('view');
     $text = "<form class='form-inline' method='post' action='" . e_REQUEST_URI . "'><div class='btn-group'><p>" . LAN_FORUM_1017 . ": <select name='forumjump' class='tbox form-control'>";
     foreach ($jumpList as $key => $val) {
         $text .= "\n<option value='" . e107::url('forum', 'forum', $val) . "'>" . $val['forum_name'] . "</option>";
     }
     $text .= "</select><input class='btn btn-default button' type='submit' name='fjsubmit' value='" . LAN_GO . "' /></p></div></form>";
     return $text;
     // return forumjump(); // FIXME - broken in v1 themes
 }
开发者ID:armpit,项目名称:e107,代码行数:11,代码来源:post_shortcodes.php

示例4: faqCategories

 function faqCategories()
 {
     $sql = e107::getDb();
     $tp = e107::getParser();
     $sublinks = array();
     $sql->select("faqs_info", "*", "faq_info_id != '' ORDER BY faq_info_order");
     while ($row = $sql->fetch()) {
         $sublinks[] = array('link_name' => $tp->toHtml($row['faq_info_title'], '', 'TITLE'), 'link_url' => e107::url('faqs', 'category', $row), 'link_description' => $row['faq_info_about'], 'link_button' => $row['faq_info_icon'], 'link_category' => '', 'link_order' => '', 'link_parent' => '', 'link_open' => '', 'link_class' => intval($row['faq_info_class']));
     }
     return $sublinks;
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:11,代码来源:e_sitelink.php

示例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');
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:47,代码来源:newforumposts_menu.php

示例6: sc_xurl_icons

    /**
     * {XURL_ICONS: size=2x}
     */
    function sc_xurl_icons($parm = '')
    {
        $social = array('rss' => array('href' => e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url' => 'news')) : '', 'title' => 'RSS/Atom Feed'), 'facebook' => array('href' => deftrue('XURL_FACEBOOK'), 'title' => 'Facebook'), 'twitter' => array('href' => deftrue('XURL_TWITTER'), 'title' => 'Twitter'), 'google-plus' => array('href' => deftrue('XURL_GOOGLE'), 'title' => 'Google Plus'), 'linkedin' => array('href' => deftrue('XURL_LINKEDIN'), 'title' => 'LinkedIn'), 'github' => array('href' => deftrue('XURL_GITHUB'), 'title' => 'Github'), 'pinterest' => array('href' => deftrue('XURL_PINTEREST'), 'title' => 'Pinterest'), 'flickr' => array('href' => deftrue('XURL_FLICKR'), 'title' => 'Flickr'), 'instagram' => array('href' => deftrue('XURL_INSTAGRAM'), 'title' => 'Instagram'), 'youtube' => array('href' => deftrue('XURL_YOUTUBE'), 'title' => 'YouTube'), 'vimeo' => array('href' => deftrue('XURL_VIMEO'), 'title' => 'Vimeo'));
        $class = vartrue($parm['size']) ? 'fa-' . $parm['size'] : '';
        $text = '';
        foreach ($social as $id => $data) {
            if ($data['href'] != '') {
                $text .= '<a rel="external" href="' . $data['href'] . '" class="e-tip social-icon social-' . $id . '" title="' . $data['title'] . '">
				 	<span class="fa fa-' . $id . ' ' . $class . '"></span>
				 </a>';
                $text .= "\n";
            }
        }
        if ($text != '') {
            return '<p class="xurl-social-icons hidden-print">' . $text . '</p>';
        }
    }
开发者ID:OSUser,项目名称:e107,代码行数:20,代码来源:e_shortcode.php

示例7: config

 function config()
 {
     $frontPage = array();
     $frontPage['title'] = CONT_FP_3;
     if ($maincat = e107::getDb()->retrieve("pcontent", "content_id, content_heading", " WHERE LEFT(content_parent,1)='0'", true)) {
         $i = 0;
         foreach ($maincat as $row) {
             $row['url_content_id'] = $row['content_id'];
             $frontPage['page'][] = array('page' => e107::url("content", "recent", $row, "full"), 'title' => $row['content_heading'] . ' ' . CONT_FP_2);
             if ($subpages = e107::getDb()->retrieve("pcontent", "content_id, content_heading", "content_parent = '" . $row['content_id'] . "' ORDER BY content_heading", TRUE)) {
                 foreach ($subpages as $row2) {
                     $frontPage['page'][] = array('page' => '{e_PLUGIN}content/content.php?content.' . $row2['content_id'], 'title' => $row['content_heading'] . ' - ' . $row2['content_heading']);
                 }
             }
         }
     }
     return $frontPage;
 }
开发者ID:Jimmi08,项目名称:content,代码行数:18,代码来源:e_frontpage.php

示例8: sc_rss_types

 function sc_rss_types()
 {
     global $row, $tp;
     //	$url1 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".1".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
     //	$url2 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
     //	$url3 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".3".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
     //	$url4 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".4".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
     $url2 = e107::url('rss_menu', 'rss', $row);
     $url4 = e107::url('rss_menu', 'atom', $row);
     if (deftrue('BOOTSTRAP') === 3) {
         $text = "\n\t\t\t<div>\n\t\t\t\t<a class='btn btn-sm btn-default'  href='" . e107::url('rss_menu', 'rss', $row) . "' title='RSS 2.0'>" . $tp->toGlyph('fa-rss') . " RSS</a>\n\t\t\t\t<a class='btn btn-sm btn-default'  href='" . e107::url('rss_menu', 'atom', $row) . "' title='ATOM'>" . $tp->toGlyph('fa-rss') . " Atom</a>\n\t\t\t</div>";
         return $text;
     }
     $text = "";
     //	$text .= "<a href='".$url1."' class='rss'><img src='".e_PLUGIN_ABS."rss_menu/images/rss1.png' class='icon' alt='RSS 0.92' /></a>";
     $text .= "<a href='" . $url2 . "' class='rss'><img src='" . e_PLUGIN_ABS . "rss_menu/images/rss2.png' class='icon' alt='RSS 2.0' /></a>";
     //	$text .= "<a href='".$url3."' class='rss'><img src='".e_PLUGIN_ABS."rss_menu/images/rss3.png' class='icon' alt='RDF' /></a>";
     $text .= "<a href='" . $url4 . "' class='rss'><img src='" . e_PLUGIN_ABS . "rss_menu/images/rss4.png' class='icon' alt='ATOM' /></a>";
     return $text;
 }
开发者ID:armpit,项目名称:e107,代码行数:20,代码来源:rss_shortcodes.php

示例9: rss_url

 function rss_url($curVal, $mode)
 {
     switch ($mode) {
         case 'read':
             // List Page
             $type = $this->getController()->getListModel()->get('rss_type');
             $topic = $this->getController()->getListModel()->get('rss_topicid');
             $link = e107::url('rss_menu', 'rss', array('rss_type' => $type, 'rss_url' => $curVal, 'rss_topicid' => $topic));
             return "<a href='" . $link . "'>" . $curVal . "</a>";
             break;
         case 'write':
             // Edit Page
             $link = SITEURL . "feed/";
             // e107::url('rss_menu','index').'/';
             return "<div class='form-inline'>" . $link . e107::getForm()->text('rss_url', $curVal, 255, 'size=small') . "/rss/{Topic id}</div>";
             break;
         case 'filter':
         case 'batch':
             return null;
             break;
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:22,代码来源:admin_prefs.php

示例10: init

 function init()
 {
     global $forum;
     $e107 = e107::getInstance();
     $this->threadId = (int) varset($_GET['id']);
     $this->perPage = varset($_GET['perpage']) ? (int) $_GET['perpage'] : $forum->prefs->get('postspage');
     $this->page = varset($_GET['p']) ? (int) $_GET['p'] : 1;
     if (!$this->threadId && e_QUERY) {
         list($id, $page) = explode(".", e_QUERY);
         $this->threadId = intval($id);
         $this->page = intval($page);
     }
     //If threadId doesn't exist, or not given, redirect to main forum page
     if (!$this->threadId || !($this->threadInfo = $forum->threadGet($this->threadId))) {
         if (E107_DEBUG_LEVEL > 0) {
             e107::getMessage()->addError("Thread not found or query error: " . __METHOD__ . ' Line: ' . __LINE__);
             return;
             //	exit;
         }
         $url = e107::url('forum', 'index', 'full');
         e107::getRedirect()->go($url);
         //	header('Location:' . $e107->url->create('forum/forum/main', array(), 'encode=0&full=1'));
         exit;
     }
     //If not permitted to view forum, redirect to main forum page
     if (!$forum->checkPerm($this->threadInfo['thread_forum_id'], 'view')) {
         if (E107_DEBUG_LEVEL > 0) {
             echo __METHOD__ . ' Line: ' . __LINE__;
             exit;
         }
         $url = e107::url('forum', 'index', 'full');
         e107::getRedirect()->go($url);
         //	header('Location:' . $e107->url->create('forum/forum/main', array(), 'encode=0&full=1'));
         exit;
     }
     $totalPosts = $this->threadInfo['thread_total_replies'];
     //  + 1; // add 1 for the original post . ie. not a reply.
     $this->pages = ceil($totalPosts / $this->perPage);
     $this->noInc = false;
 }
开发者ID:armpit,项目名称:e107,代码行数:40,代码来源:forum_viewtopic.php

示例11: init


//.........这里部分代码省略.........
     			$top_topic_starters = array();
     			foreach($posters as $poster)
     			{
     				$percen = round(($poster['ucount'] / $total_topics) * 100, 2);
     				$top_topic_starters[] = array("user_id" => $poster['user_id'], "user_name" => $poster['user_name'], "user_forums" => $poster['ucount'], "percentage" => $percen);
     			}*/
     /*
     $query = "
     SELECT SUBSTRING_INDEX(thread_user,'.',1) AS t_user, COUNT(SUBSTRING_INDEX(ft.thread_user,'.',1)) AS ucount, u.user_name, u.user_id FROM #forum_t as ft
     LEFT JOIN #user AS u ON SUBSTRING_INDEX(ft.thread_user,'.',1) = u.user_id
     WHERE ft.thread_parent!=0
     GROUP BY t_user
     ORDER BY ucount DESC
     LIMIT 0,10";
     $sql -> db_Select_gen($query);
     $posters = $sql -> db_getList();
     
     $top_repliers = array();
     foreach($posters as $poster)
     {
     	$percen = round(($poster['ucount'] / $total_replies) * 100, 2);
     	$top_repliers[] = array("user_id" => $poster['user_id'], "user_name" => $poster['user_name'], "user_forums" => $poster['ucount'], "percentage" => $percen);
     }
     */
     $text_0 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6001 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$open_date}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6002 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$open_since}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6003 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$total_posts}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_1007 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$total_topics}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6004 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$total_replies}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6005 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$total_views}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6014 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$postsperday}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6006 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$db_size}</td></tr>\n\t\t\t<tr><td style='width: 50%; text-align: right;'><b>" . LAN_FORUM_6007 . ":</b>&nbsp;&nbsp;</td><td style='width: 50%;'>{$avg_row_len}</td></tr>\n\t\t</table>";
     $text_1 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_6008 . "</th>\n\t\t<th style='width: 40%;' class='fcaption'>" . LAN_FORUM_1003 . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_0003 . "</th>\n\t\t<th style='width: 20%; text-align: center;' class='fcaption'>" . LAN_FORUM_6009 . "</th>\n\t\t<th style='width: 20%; text-align: center;' class='fcaption'>" . LAN_DATE . "</th>\n\t\t</tr>\n\t\t</thead>\n\t\t";
     $count = 1;
     foreach ($most_activeArray as $ma) {
         if ($ma['user_name']) {
             //$uinfo = "<a href='".e_HTTP."user.php ?id.{$ma['user_id']}'>{$ma['user_name']}</a>"; //TODO SEf Url .
             $uparams = array('id' => $ma['user_id'], 'name' => $ma['user_name']);
             $link = e107::getUrl()->create('user/profile/view', $uparams);
             $uinfo = "<a href='" . $link . "'>" . $ma['user_name'] . "</a>";
         } else {
             $tmp = explode(chr(1), $ma['thread_anon']);
             $uinfo = $tp->toHTML($tmp[0]);
         }
         $ma['thread_sef'] = eHelper::title2sef($ma['thread_name'], 'dashl');
         $url = e107::url('forum', 'topic', $ma);
         $text_1 .= "\n\t\t\t<tr>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$count}</td>\n\t\t\t<td style='width: 40%;' class='forumheader3'><a href='" . $url . "'>{$ma['thread_name']}</a></td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$ma['thread_total_replies']}</td>\n\t\t\t<td style='width: 20%; text-align: center;' class='forumheader3'>{$uinfo}</td>\n\t\t\t<td style='width: 20%; text-align: center;' class='forumheader3'>" . $gen->convert_date($ma['thread_datestamp'], "forum") . "</td>\n\t\t\t</tr>\n\t\t\t";
         $count++;
     }
     $text_1 .= "</table>";
     $text_2 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_6008 . "</th>\n\t\t<th style='width: 40%;' class='fcaption'>" . LAN_FORUM_1003 . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_1005 . "</th>\n\t\t<th style='width: 20%; text-align: center;' class='fcaption'>" . LAN_FORUM_6009 . "</th>\n\t\t<th style='width: 20%; text-align: center;' class='fcaption'>" . LAN_DATE . "</th>\n\t\t</tr>\n\t\t</thead>\n\t\t";
     $count = 1;
     foreach ($most_viewedArray as $ma) {
         if ($ma['user_name']) {
             //$uinfo = "<a href='".e_HTTP."user.php ?id.{$ma['user_id']}'>".$ma['user_name']."</a>";  //TODO SEf Url .
             $uparams = array('id' => $ma['user_id'], 'name' => $ma['user_name']);
             $link = e107::getUrl()->create('user/profile/view', $uparams);
             $uinfo = "<a href='" . $link . "'>" . $ma['user_name'] . "</a>";
         } else {
             $tmp = explode(chr(1), $ma['thread_anon']);
             $uinfo = $tp->toHTML($tmp[0]);
         }
         $ma['thread_sef'] = eHelper::title2sef($ma['thread_name'], 'dashl');
         $url = e107::url('forum', 'topic', $ma);
         $text_2 .= "\n\t\t\t<tr>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$count}</td>\n\t\t\t<td style='width: 40%;' class='forumheader3'><a href='" . $url . "'>" . $ma['thread_name'] . "</a></td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['thread_views'] . "</td>\n\t\t\t<td style='width: 20%; text-align: center;' class='forumheader3'>" . $uinfo . "</td>\n\t\t\t<td style='width: 20%; text-align: center;' class='forumheader3'>" . $gen->convert_date($ma['thread_datestamp'], "forum") . "</td>\n\t\t\t</tr>\n\t\t\t";
         $count++;
     }
     $text_2 .= "</table>";
     $text_3 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_6008 . "</th>\n\t\t<th style='width: 20%;' class='fcaption'>" . LAN_NAME . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_2032 . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>%</th>\n\t\t<th style='width: 50%; text-align: center;' class='fcaption'>&nbsp;</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t";
     $count = 1;
     foreach ($top_posters as $ma) {
         $text_3 .= "<tr>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$count}</td>\n\t\t\t<td style='width: 20%;' class='forumheader3'><a href='" . e107::getUrl()->create('user/profile/view', $ma) . "'>" . $ma['user_name'] . "</a></td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['user_forums'] . "</td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['percentage'] . "%</td>\n\t\t\t<td style='width: 50%;' class='forumheader3'>" . $this->showBar($ma['percentage']) . "\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t";
         $count++;
     }
     $text_3 .= "</tbody>\n\t\t</table>\n\t\t";
     $text_4 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_6008 . "</th>\n\t\t<th style='width: 20%;' class='fcaption'>" . LAN_NAME . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_2032 . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>%</th>\n\t\t<th style='width: 50%; text-align: center;' class='fcaption'>&nbsp;</th>\n\t\t</tr>\n\t\t</thead>\n\t\t";
     $count = 1;
     foreach ($top_topic_starters as $ma) {
         $text_4 .= "<tr>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$count}</td>\n\t\t\t<td style='width: 20%;' class='forumheader3'><a href='" . e107::getUrl()->create('user/profile/view', $ma) . "'>" . $ma['user_name'] . "</a></td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['user_forums'] . "</td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['percentage'] . "%</td>\n\t\t\t<td style='width: 50%; text-align: center;' class='forumheader3'>" . $this->showBar($ma['percentage']) . "</td>\n\t\t\t</tr>\n\t\t\t";
         $count++;
     }
     $text_4 .= "</table>";
     $text_5 = "\n\t\t<table style='width: 100%;' class='fborder table'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_6008 . "</th>\n\t\t<th style='width: 20%;' class='fcaption'>" . LAN_NAME . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>" . LAN_FORUM_2032 . "</th>\n\t\t<th style='width: 10%; text-align: center;' class='fcaption'>%</th>\n\t\t<th style='width: 50%; text-align: center;' class='fcaption'>&nbsp;</th>\n\t\t</tr>\n\t\t</thead>\n\t\t";
     $count = 1;
     foreach ($top_repliers as $ma) {
         $text_5 .= "\n\t\t\t<tr>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>{$count}</td>\n\t\t\t<td style='width: 20%;' class='forumheader3'><a href='" . e107::getUrl()->create('user/profile/view', $ma) . "'>" . $ma['user_name'] . "</a></td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['user_forums'] . "</td>\n\t\t\t<td style='width: 10%; text-align: center;' class='forumheader3'>" . $ma['percentage'] . "%</td>\n\t\t\t<td style='width: 50%; text-align: center;' class='forumheader3'>" . $this->showBar($ma['percentage']) . "</td>\n\t\t\t</tr>\n\t\t\t";
         $count++;
     }
     $text_5 .= '</table>';
     if (deftrue('BOOTSTRAP')) {
         $tabs = array();
         $tabs[0] = array('caption' => LAN_FORUM_6000, 'text' => $text_0);
         $tabs[1] = array('caption' => LAN_FORUM_0011, 'text' => $text_1);
         $tabs[2] = array('caption' => LAN_FORUM_6010, 'text' => $text_2);
         $tabs[3] = array('caption' => LAN_FORUM_0010, 'text' => $text_3);
         $tabs[4] = array('caption' => LAN_FORUM_6011, 'text' => $text_4);
         $tabs[5] = array('caption' => LAN_FORUM_6012, 'text' => $text_5);
         $frm = e107::getForm();
         $breadarray = array(array('text' => e107::pref('forum', 'title', LAN_PLUGIN_FORUM_NAME), 'url' => e107::url('forum', 'index')), array('text' => LAN_FORUM_6013, 'url' => null));
         $text = $frm->breadcrumb($breadarray);
         $text = "<div id='forum-stats'>" . $text . e107::getForm()->tabs($tabs) . "</div>";
     } else {
         $text = "\n\t\t\t<h3>" . LAN_FORUM_6000 . "</h3>" . $text_0 . "<h3>" . LAN_FORUM_0011 . "</h3>" . $text_1 . "<h3>" . LAN_FORUM_6010 . "</h3>" . $text_2 . "<h3>" . LAN_FORUM_0010 . "</h3>" . $text_3 . "<h3>" . LAN_FORUM_6011 . "</h3>" . $text_4 . "<h3>" . LAN_FORUM_6012 . "</h3>" . $text_5;
     }
     $text .= "<div class='center'>" . e107::getForm()->pagination(e107::url('forum', 'index'), LAN_BACK) . "</div>";
     $ns->tablerender(LAN_FORUM_6013, $text);
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:101,代码来源:forum_stats.php

示例12: newthreadjump

function newthreadjump($url)
{
    global $forum;
    $jumpList = $forum->forumGetAllowed('view');
    $text = '<div class="btn-group">
    <a href="' . $url . '" class="btn btn-primary">' . LAN_FORUM_1018 . '</a>
    <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    </button>
    <ul class="dropdown-menu pull-right">
    ';
    foreach ($jumpList as $key => $val) {
        $text .= '<li><a href="' . e107::url('forum', 'forum', $val) . '">' . LAN_FORUM_1017 . ': ' . $val['forum_name'] . '</a></li>';
    }
    $text .= '
    </ul>
    </div>';
    return $text;
}
开发者ID:JBeezygit,项目名称:e107,代码行数:19,代码来源:forum_viewforum.php

示例13: showOptionsSelect

 function showOptionsSelect($mode, $searchtypeid = "")
 {
     global $plugindir, $plugintable, $rs, $qs, $content_pref;
     if (!is_object($rs)) {
         require_once e_HANDLER . "form_handler.php";
         $rs = new form();
     }
     if (!isset($searchtypeid)) {
         $searchtypeid = is_numeric($qs[1]) ? $qs[1] : $qs[2];
     }
     $catarray = "";
     $mainparent = $this->getMainParent($searchtypeid);
     $content_pref = $this->getContentPref($mainparent);
     $parent = $this->getCategoryTree("", $mainparent, TRUE);
     $parent = array_merge_recursive($parent);
     for ($a = 0; $a < count($parent); $a++) {
         for ($b = 0; $b < count($parent[$a]); $b++) {
             $newparent[$parent[$a][$b]] = $parent[$a][$b + 1];
             $b++;
         }
     }
     if ($newparent) {
         $emptystring = CONTENT_LAN_14;
         $catarray = $rs->form_option($emptystring, "0", "none");
     }
     foreach ($newparent as $key => $value) {
         $n = "";
         if ($mode == "page" || $mode == "menu" && isset($content_pref["content_menu_cat_number"])) {
             $n = $this->countCatItems($key);
             $n = " (" . $n . " " . ($n == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54) . ")";
         }
         if ($content_pref["content_menu_cat_main"] && $key == $mainparent || $key != $mainparent) {
             $value = strlen($value) > 25 ? substr($value, 0, 25) . "..." : $value;
             $catarray .= $rs->form_option($value . $n, 0, $plugindir . "content.php?cat." . $key);
         }
     }
     if ($mode == "page" || ($mode == "menu" && ($content_pref["content_menu_links"] && $content_pref["content_menu_links_dropdown"]) || $content_pref["content_menu_cat"] && $content_pref["content_menu_cat_dropdown"])) {
         if ($mode == "menu") {
             $style = "style='width:100%;' ";
         } else {
             $style = "";
         }
         $CONTENT_SEARCH_TABLE_SELECT = "\n\t\t\t\t" . $rs->form_open("post", $plugindir . "content.php" . (e_QUERY ? "?" . e_QUERY : ""), "contentredirect" . $mode, "", "enctype='multipart/form-data'") . "\t\t\t\t\n\t\t\t\t<div><select id='{$mode}value' name='{$mode}value' class='tbox' {$style} onchange=\"if(this.options[this.selectedIndex].value != 'none'){ return document.location=this.options[this.selectedIndex].value; }\">";
         if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_links"] && $content_pref["content_menu_links_dropdown"]) {
             $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_56, 1, "none") . $rs->form_option("&nbsp;", "0", "none");
             $row['url_content_id'] = $mainparent;
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewallcat"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_6, 0, e107::url("content", "categories", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewallauthor"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_7, 0, e107::url("content", "authors", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewallitems"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_83, 0, e107::url("content", "archive", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewtoprated"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_8, 0, e107::url("content", "toprated", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewtopscore"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_12, 0, e107::url("content", "topscore", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewrecent"]) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_61, 0, e107::url("content", "recent", $row, "full"));
             }
             if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_viewsubmit"] && $content_pref["content_submit"] && check_class($content_pref["content_submit_class"])) {
                 $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option(CONTENT_LAN_75, 0, $plugindir . "content_submit.php");
             }
             $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_option("&nbsp;", "0", "none");
         }
         if ($mode == "page" || $mode == "menu" && $content_pref["content_menu_cat"] && $content_pref["content_menu_cat_dropdown"]) {
             $CONTENT_SEARCH_TABLE_SELECT .= $catarray;
         }
         $CONTENT_SEARCH_TABLE_SELECT .= $rs->form_select_close() . "</div>" . $rs->form_close();
     }
     return $CONTENT_SEARCH_TABLE_SELECT;
 }
开发者ID:Jimmi08,项目名称:content,代码行数:76,代码来源:content_class.php

示例14: sc_faq_search

  function sc_faq_search($parm = '')
  {
      $frm = e107::getForm();
      $tp = e107::getParser();
      $target = e107::url('faqs', 'search');
      $text = $frm->open('faq-search-form', 'get', $target);
      $text .= '<span class="input-group e-search">';
      $text .= $frm->text('srch', $_GET['srch'], 20, 'class=search-query&placeholder=' . LAN_SEARCH) . '
 			 <span class="input-group-btn"><button class="btn btn-primary"  type="submit">' . $tp->toGlyph('fa-search') . '</button>';
      $text .= '</span></span>';
      $text .= $frm->close();
      return $text;
  }
开发者ID:KonzolozZ,项目名称:e107,代码行数:13,代码来源:faqs_shortcodes.php

示例15: sc_recent_topic_name

 /**
  * Render title (as link) for topic used in the recent forum posts menu.
  *
  * @return string
  */
 function sc_recent_topic_name()
 {
     $post = $this->var['post'];
     $thread = $this->var['thread'];
     $toPost = e107::url('forum', 'topic', $thread, array('query' => array('p' => $this->var['topicPage']), 'fragment' => 'post-' . $post['post_id']));
     return '<a href="' . $toPost . '">' . $this->var['thread']['thread_name'] . '</a>';
 }
开发者ID:lonalore,项目名称:nodejs_forum,代码行数:12,代码来源:nodejs_forum_shortcodes.php


注:本文中的e107::url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。