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


PHP e107::getUrl方法代码示例

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


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

示例1: getListData

 function getListData()
 {
     $sql = e107::getDb();
     $list_caption = $this->parent->settings['caption'];
     $list_display = $this->parent->settings['open'] ? "" : "none";
     $qry = '';
     if ($this->parent->mode == "new_page" || $this->parent->mode == "new_menu") {
         $qry = "user_join>" . $this->parent->getlvisit() . " AND ";
     }
     $qry .= " user_ban=0 ORDER BY user_join DESC LIMIT 0," . intval($this->parent->settings['amount']);
     $bullet = $this->parent->getBullet($this->parent->settings['icon']);
     if (!$this->parent->e107->sql->gen("SELECT user_id,user_name,user_join FROM #user WHERE " . $qry)) {
         $list_data = LIST_MEMBER_2;
     } else {
         while ($row = $this->parent->e107->sql->fetch()) {
             $record = array();
             $rowheading = $this->parent->parse_heading($row['user_name']);
             //<a href='".e_BASE."user.php?id.".$row['user_id']."'>".$rowheading."</a>
             $uparams = array('id' => $row['user_id'], 'name' => $rowheading);
             $link = e107::getUrl()->create('user/profile/view', $uparams);
             $userlink = "<a href='" . $link . "'>" . $rowheading . "</a>";
             $record['icon'] = $bullet;
             $record['heading'] = USER ? $userlink : $rowheading;
             $record['category'] = '';
             $record['author'] = '';
             $record['date'] = vartrue($this->parent->settings['date']) ? $this->parent->getListDate($row['user_join']) : "";
             $record['info'] = '';
             $list_data[] = $record;
         }
     }
     //return array with 'records', (global)'caption', 'display'
     return array('records' => $list_data, 'caption' => $list_caption, 'display' => $list_display);
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:33,代码来源:list_members.php

示例2: data

 /**
  * Generate the Feed Data
  * @param string $parms
  * @return array
  */
 function data($parms = '')
 {
     $pref = e107::getConfig()->getPref();
     $tp = e107::getParser();
     $this->showImages = vartrue($pref['rss_shownewsimage'], false);
     $this->summaryDescription = vartrue($pref['rss_summarydiz'], false);
     $render = $pref['rss_othernews'] != 1 ? "AND (FIND_IN_SET('0', n.news_render_type) OR FIND_IN_SET(1, n.news_render_type))" : "";
     $nobody_regexp = "'(^|,)(" . str_replace(",", "|", e_UC_NOBODY) . ")(,|\$)'";
     $topic = !empty($parms['id']) && is_numeric($parms['id']) ? " AND news_category = " . intval($parms['id']) : '';
     $limit = vartrue($parms['limit'], 10);
     $rssQuery = "SELECT n.*, u.user_id, u.user_name, u.user_email, u.user_customtitle, nc.category_name, nc.category_icon FROM #news AS n\n\t\t\t\tLEFT JOIN #user AS u ON n.news_author = u.user_id\n\t\t\t\tLEFT JOIN #news_category AS nc ON n.news_category = nc.category_id\n\t\t\t\tWHERE n.news_class IN (" . USERCLASS_LIST . ") AND NOT (n.news_class REGEXP " . $nobody_regexp . ") AND n.news_start < " . time() . " AND (n.news_end=0 || n.news_end>" . time() . ") {$render} {$topic} ORDER BY n.news_datestamp DESC LIMIT 0," . $limit;
     $sql = e107::getDb();
     $sql->gen($rssQuery);
     $tmp = $sql->db_getList();
     $rss = array();
     $i = 0;
     foreach ($tmp as $value) {
         $rss[$i]['title'] = $value['news_title'];
         $rss[$i]['link'] = e107::getUrl()->create('news/view/item', $value, 'full=1');
         $rss[$i]['author'] = $value['user_name'];
         $rss[$i]['author_email'] = $value['user_email'];
         $rss[$i]['category_name'] = $tp->toHTML($value['category_name'], TRUE, 'defs');
         $rss[$i]['category_link'] = SITEURL . "news.php?cat." . $value['news_category'];
         //TODO SEFURL.
         $rss[$i]['datestamp'] = $value['news_datestamp'];
         $rss[$i]['description'] = $this->getDescription($value);
         if ($value['news_allow_comments'] && $pref['comments_disabled'] != 1) {
             $rss[$i]['comment'] = "http://" . $_SERVER['HTTP_HOST'] . e_HTTP . "comment.php?comment.news." . $value['news_id'];
         }
         $rss[$i]['media'] = $this->getMedia($value);
         $i++;
     }
     return $rss;
 }
开发者ID:gitye,项目名称:e107,代码行数:39,代码来源:e_rss.php

示例3: compile

 function compile($row)
 {
     $tp = e107::getParser();
     $book = $this->getParent($row['page_chapter']);
     $row['chapter_sef'] = $this->getSef($row['page_chapter']);
     $row['book_sef'] = $this->getSef($book);
     if (empty($row['page_sef'])) {
         $row['page_sef'] = '--sef-not-assigned--';
     }
     if ($row['page_chapter'] == 0) {
         $route = 'page/view/other';
         $pre = '';
     } else {
         $route = 'page/view/index';
         $pre = $tp->toHtml($this->getName($book), false, 'TITLE') . ' &raquo; ' . $tp->toHtml($this->getName($row['page_chapter']), false, 'TITLE') . " | ";
     }
     $res = array();
     $res['link'] = e107::getUrl()->create($route, $row, array('allow' => 'page_sef,page_title,page_id,chapter_sef,book_sef'));
     $res['pre_title'] = $pre;
     $res['title'] = $tp->toHtml($row['page_title'], false, 'TITLE');
     $res['summary'] = !empty($row['page_metadscr']) ? $row['page_metadscr'] : $row['page_text'];
     $res['detail'] = LAN_SEARCH_3 . $tp->toDate($row['page_datestamp'], "long");
     $res['image'] = $row['menu_image'];
     return $res;
 }
开发者ID:armpit,项目名称:e107,代码行数:25,代码来源:e_search.php

示例4: 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

示例5: sc_lastseen_userlink

 function sc_lastseen_userlink()
 {
     $uparams = array('id' => $this->currentUser['user_id'], 'name' => $this->currentUser['user_name']);
     $link = e107::getUrl()->create('user/profile/view', $uparams);
     return "<a href='" . $link . "'>" . $this->currentUser['user_name'] . "</a>";
     // $uparams = array('id' => $this->currentUser['user_id'], 'name' => $this->currentUser['user_name']);
     //	return "<a href='".e_BASE."user.php?id.".$this->currentUser['user_id']."'>".$this->currentUser['user_name']."</a>";
 }
开发者ID:Serios,项目名称:e107,代码行数:8,代码来源:online_shortcodes.php

示例6: getLink

 function getLink($id)
 {
     if (empty($this->row)) {
         $this->row = $this->getRecord($id);
     }
     //$url = e_BASE."news.php?item.".$this->row['news_id'];
     $url = e107::getUrl()->create('news/view/item', $this->row);
     return "<a href='" . $url . "'>" . e107::getParser()->toHTML($this->row['news_title'], TRUE, '') . "</a>";
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:e_tagwords_news.php

示例7: getLink

 function getLink($id)
 {
     if ($this->row == '') {
         $this->row = $this->getRecord($id);
     }
     $url = e_BASE . "page.php?" . $this->row['page_id'];
     $url = e107::getUrl()->create('page/view', $this->row, 'allow=page_id,page_title,page_sef');
     return "<a href='" . $url . "'>" . e107::getParser()->toHTML($this->row['page_title'], TRUE, '') . "</a>";
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:e_tagwords_page.php

示例8: actionNotfound

 public function actionNotfound()
 {
     $this->getResponse()->setRenderMod('error404')->addHeader('HTTP/1.0 404 Not Found');
     $this->addTitle(LAN_ERROR_7);
     $template = e107::getCoreTemplate('error', 404);
     $vars = new e_vars(array('siteUrl' => SITEURL, 'searchUrl' => e107::getUrl()->create('search')));
     $body = e107::getParser()->parseTemplate($template['start'] . $template['body'] . $template['end'], true, null, $vars);
     $this->addBody($body);
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:error.php

示例9: search_user

function search_user($row)
{
    global $con;
    $res['link'] = e107::getUrl()->create('user/profile/view', array('id' => $row['user_id'], 'name' => $row['user_name']));
    //"user.php?id.".$row['user_id'];
    $res['pre_title'] = $row['user_id'] . " | ";
    $res['title'] = $row['user_name'];
    $res['summary'] = $row['user_signature'] ? LAN_SEARCH_72 . ": " . $row['user_signature'] : LAN_SEARCH_73;
    $res['detail'] = LAN_SEARCH_74 . ": " . $con->convert_date($row['user_join'], "long");
    return $res;
}
开发者ID:armpit,项目名称:e107,代码行数:11,代码来源:search_user.php

示例10: search_news

function search_news($row)
{
    global $con;
    $res['link'] = e107::getUrl()->create('news/view/item', $row);
    //$row['news_allow_comments'] ? "news.php?item.".$row['news_id'] : "comment.php?comment.news.".$row['news_id'];
    $res['pre_title'] = $row['category_name'] . " | ";
    $res['title'] = $row['news_title'];
    $res['summary'] = $row['news_body'] . ' ' . $row['news_extended'];
    $res['detail'] = LAN_SEARCH_3 . $con->convert_date($row['news_datestamp'], "long");
    return $res;
}
开发者ID:notzen,项目名称:e107,代码行数:11,代码来源:search_news.php

示例11: 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::getUrl()->sc('faqs/list/all', array('category' => $row['faq_info_id'])), '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:armpit,项目名称:e107,代码行数:11,代码来源:e_sitelink.php

示例12: search_pages

function search_pages($row)
{
    global $con;
    $res['link'] = e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id'));
    //"page.php?".$row['page_id'];
    $res['pre_title'] = "";
    $res['title'] = $row['page_title'];
    $res['summary'] = $row['page_text'];
    $res['detail'] = LAN_SEARCH_3 . $con->convert_date($row['page_datestamp'], "long");
    return $res;
}
开发者ID:notzen,项目名称:e107,代码行数:11,代码来源:search_pages.php

示例13: sc_online_user

 /**
  * Render username as a link.
  *
  * @return string
  */
 function sc_online_user()
 {
     $tp = e107::getParser();
     $tp->thumbWidth = 20;
     $tp->thumbHeight = 20;
     $avatar = $tp->toAvatar($this->var['user']);
     $uparams = array('id' => $this->var['user']['user_id'], 'name' => $this->var['user']['user_name']);
     $markup = '<a href="' . e107::getUrl()->create('user/profile/view', $uparams) . '">';
     $markup .= $avatar . ' ' . $uparams['name'];
     $markup .= '</a>';
     return $markup;
 }
开发者ID:lonalore,项目名称:nodejs_online,代码行数:17,代码来源:nodejs_online_shortcodes.php

示例14: sc_username

 function sc_username($parm = '')
 {
     global $USERNAME;
     if (isset($this->var['user_id']) && $this->var['user_id']) {
         $USERNAME = $parm == 'raw' ? $this->var['user_name'] : "<a href='" . e107::getUrl()->create('user/profile/view', array('id' => $this->var['user_id'], 'name' => $this->var['user_name'])) . "'>" . $this->var['user_name'] . "</a>\n";
     } else {
         $this->var['user_id'] = 0;
         $USERNAME = preg_replace("/[0-9]+\\./", '', vartrue($this->var['comment_author_name']));
         $USERNAME = str_replace("Anonymous", LAN_ANONYMOUS, $USERNAME);
     }
     return $USERNAME;
 }
开发者ID:notzen,项目名称:e107,代码行数:12,代码来源:comment_shortcodes.php

示例15: checkForumJump

 function checkForumJump()
 {
     if (isset($_POST['fjsubmit'])) {
         $this->redirect(e107::getUrl()->create('forum/forum/view', array('id' => (int) $_POST['forumjump']), '', 'full=1&encode=0'));
         exit;
     }
     if (!e_QUERY || empty($_GET['id'])) {
         $url = e107::url('forum', 'index', null, 'full');
         $this->redirect($url);
         //	header('Location:'.e107::getUrl()->create('forum/forum/main', array(), 'full=1&encode=0'));
         exit;
     }
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:13,代码来源:forum_post.php


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