本文整理汇总了PHP中find_url函数的典型用法代码示例。如果您正苦于以下问题:PHP find_url函数的具体用法?PHP find_url怎么用?PHP find_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了find_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: displayRSSLink
public static function displayRSSLink($params)
{
global $url, $parent, $SITEURL;
if (!@$params['name']) {
return;
}
$href = function_exists('find_i18n_url') ? find_i18n_url($url, $parent) : find_url($url, $parent);
$href .= (strpos($url, '?') === false ? '?' : '&') . $params['name'];
echo '<a href="' . htmlspecialchars($href) . '"><img src="' . $SITEURL . 'plugins/i18n_search/images/rss.gif" alt="rss" width="12" height="12"/> ' . htmlspecialchars(@$params['title']) . '</a>';
}
开发者ID:sevenns,项目名称:alpremstroy,代码行数:10,代码来源:viewer.class.php
示例2: Innovation_Parent_Link
/**
* Innovation Parent Link
*
* This creates a link for a parent for the breadcrumb feature of this theme
*
* @param string $name - This is the slug of the link you want to create
* @return string
*/
function Innovation_Parent_Link($name)
{
$file = GSDATAPAGESPATH . $name . '.xml';
if (file_exists($file)) {
$p = getXML($file);
$title = $p->title;
$parent = $p->parent;
$slug = $p->slug;
echo '<a href="' . find_url($name, '') . '">' . $title . '</a> • ';
}
}
开发者ID:hatasu,项目名称:appdroid,代码行数:19,代码来源:functions.php
示例3: bm_get_url
function bm_get_url($query = false)
{
global $SITEURL, $PRETTYURLS, $BMPAGEURL, $BMPRETTYURLS;
$data = getXML(GSDATAPAGESPATH . $BMPAGEURL . '.xml');
$url = find_url($BMPAGEURL, $data->parent);
if ($query) {
if ($PRETTYURLS == 1 && $BMPRETTYURLS == 'Y') {
$url .= $query . '/';
} elseif ($BMPAGEURL == 'index') {
$url = $SITEURL . "index.php?{$query}=";
} else {
$url = $SITEURL . "index.php?id={$BMPAGEURL}&{$query}=";
}
}
return $url;
}
开发者ID:abdelaithadji,项目名称:books_manager,代码行数:16,代码来源:functions.php
示例4: outputLink
public static function outputLink($gallery)
{
include_once GSPLUGINPATH . 'i18n_gallery/helper.php';
$url = @$gallery['url'] ? $gallery['url'] : 'index';
$parent = @$gallery['parent'] ? $gallery['parent'] : null;
$tags = @$gallery['tags'] ? $gallery['tags'] : null;
$thumb = i18n_gallery_thumb($gallery);
$title = $gallery['title'];
if (function_exists('return_i18n_languages')) {
$languages = return_i18n_languages();
$deflang = return_i18n_default_language();
foreach ($languages as $language) {
$fullkey = 'title' . ($language == $deflang ? '' : '_' . $language);
if (isset($gallery[$fullkey])) {
$title = $gallery[$fullkey];
break;
}
}
}
$link = function_exists('find_i18n_url') ? find_i18n_url($url, $parent) : find_url($url, $parent);
if ($tags) {
$link .= (strpos($link, '?') !== false ? '&' : '?') . 'imagetags=' . urlencode($tags);
}
if (isset($thumb)) {
$item = @$gallery['items'][$thumb];
if (!$item) {
$item = $gallery['items'][0];
}
echo '<div class="gallery-link">';
echo '<a href="' . htmlspecialchars($link) . '" class="gallery-thumb-link">';
echo '<img src="';
i18n_gallery_thumb_link($gallery, $item);
echo '" alt="' . htmlspecialchars($title) . '" title="' . htmlspecialchars($title) . '"/>';
echo '</a>';
echo '<span class="gallery-title">' . htmlspecialchars($title) . '</span>';
echo '</div>';
} else {
echo '<a href="' . htmlspecialchars($link) . '" class="gallery-title-link">';
echo htmlspecialchars($title);
echo '</a>';
}
}
开发者ID:Vin985,项目名称:clqweb,代码行数:42,代码来源:frontend.class.php
示例5: get
protected function get($name)
{
if (!$this->data) {
$this->data = getXML(GSDATAPAGESPATH . $this->fullId . '.xml');
if (!$this->data) {
return null;
}
}
switch ($name) {
case 'tags':
if ($this->tags == null) {
$metak = html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($this->data->meta))), ENT_QUOTES, 'UTF-8');
$this->tags = preg_split("/\\s*,\\s*/", trim($metak), -1, PREG_SPLIT_NO_EMPTY);
}
return $this->tags;
case 'title':
if ($this->title == null) {
$this->title = stripslashes(html_entity_decode($this->data->title, ENT_QUOTES, 'UTF-8'));
}
return $this->title;
case 'content':
if ($this->content == null) {
$this->content = stripslashes(htmlspecialchars_decode($this->data->content, ENT_QUOTES));
}
return $this->content;
case 'contenttext':
if ($this->content == null) {
$this->content = stripslashes(htmlspecialchars_decode($this->data->content, ENT_QUOTES));
}
return trim(strip_tags($this->content));
case 'url':
return $this->id;
case 'slug':
return $this->fullId;
case 'parent':
return (string) $this->data->parent;
case 'link':
if (function_exists('find_i18n_url')) {
return find_i18n_url($this->id, $this->parent, $this->language);
} else {
return find_url($this->fullId, $this->parent);
}
case 'simplelink':
return find_url($this->fullId, $this->parent);
case 'menuOrder':
if ($this->id != $this->fullId) {
return $this->getDefaultDataProp($name);
}
return (int) $this->data->{$name};
case 'parent':
case 'menuStatus':
case 'private':
if ($this->id != $this->fullId) {
return $this->getDefaultDataProp($name);
}
default:
return (string) $this->data->{$name};
}
}
开发者ID:sevenns,项目名称:alpremstroy,代码行数:59,代码来源:searcher.class.php
示例6: get_navigation
/**
* Get Main Navigation
*
* This will return unordered list of main navigation
* This function uses the menu opitions listed within the 'Edit Page' control panel screen
*
* @since 1.0
* @uses GSDATAOTHERPATH
* @uses getXML
* @uses subval_sort
* @uses find_url
* @uses strip_quotes
* @uses exec_filter
*
* @param string $currentpage This is the ID of the current page the visitor is on
* @return string
*/
function get_navigation($currentpage)
{
$menu = '';
global $pagesArray;
$pagesSorted = subval_sort($pagesArray, 'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = '';
$classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
if ("{$currentpage}" == "{$url_nav}") {
$classes = "current active " . $page['parent'] . " " . $url_nav;
} else {
$classes = trim($page['parent'] . " " . $url_nav);
}
if ($page['menu'] == '') {
$page['menu'] = $page['title'];
}
if ($page['title'] == '') {
$page['title'] = $page['menu'];
}
$menu .= '<li class="' . $classes . '"><a href="' . find_url($page['url'], $page['parent']) . '" title="' . encode_quotes(cl($page['title'])) . '">' . strip_decode($page['menu']) . '</a></li>' . "\n";
}
}
}
echo exec_filter('menuitems', $menu);
}
开发者ID:Foltys,项目名称:Masopust,代码行数:45,代码来源:theme_functions.php
示例7: box_img
function box_img($val = '', $img_name = '', $img_x = '.png')
{
return '<div class="img-box">
<div class="box-img">
<img src="' . find_url('images', 'entry/' . $img_name . $img_x) . '" class="img-inside" alt="Image">
</div>
<div class="box-text">' . find_style($val) . '</div>
</div>';
}
开发者ID:abdulmanan7,项目名称:stms,代码行数:9,代码来源:MY_form_helper.php
示例8: get_pages_menu
/**
* Recursive list of pages
*
* Returns a recursive list of items for the main page
*
* @author Mike
*
* @since 3.0
* @uses $pagesSorted
*
* @param string $parent
* @param string $menu
* @param int $level
*
* @returns string
*/
function get_pages_menu($parent, $menu, $level)
{
global $pagesSorted;
$items = array();
foreach ($pagesSorted as $page) {
if ($page['parent'] == $parent) {
$items[(string) $page['url']] = $page;
}
}
if (count($items) > 0) {
foreach ($items as $page) {
$dash = "";
if ($page['parent'] != '') {
$page['parent'] = $page['parent'] . "/";
}
for ($i = 0; $i <= $level - 1; $i++) {
if ($i != $level - 1) {
$dash .= '<span> </span>';
} else {
$dash .= '<span> – </span>';
}
}
$menu .= '<tr id="tr-' . $page['url'] . '" >';
if ($page['title'] == '') {
$page['title'] = '[No Title] » <em>' . $page['url'] . '</em>';
}
if ($page['menuStatus'] != '') {
$page['menuStatus'] = ' <sup>[' . i18n_r('MENUITEM_SUBTITLE') . ']</sup>';
} else {
$page['menuStatus'] = '';
}
if ($page['private'] != '') {
$page['private'] = ' <sup>[' . i18n_r('PRIVATE_SUBTITLE') . ']</sup>';
} else {
$page['private'] = '';
}
if ($page['url'] == 'index') {
$homepage = ' <sup>[' . i18n_r('HOMEPAGE_SUBTITLE') . ']</sup>';
} else {
$homepage = '';
}
$menu .= '<td class="pagetitle">' . $dash . '<a title="' . i18n_r('EDITPAGE_TITLE') . ': ' . cl($page['title']) . '" href="edit.php?id=' . $page['url'] . '" >' . cl($page['title']) . '</a><span class="showstatus toggle" >' . $homepage . $page['menuStatus'] . $page['private'] . '</span></td>';
$menu .= '<td style="width:80px;text-align:right;" ><span>' . shtDate($page['date']) . '</span></td>';
$menu .= '<td class="secondarylink" >';
$menu .= '<a title="' . i18n_r('VIEWPAGE_TITLE') . ': ' . cl($page['title']) . '" target="_blank" href="' . find_url($page['url'], $page['parent']) . '">#</a>';
$menu .= '</td>';
if ($page['url'] != 'index') {
$menu .= '<td class="delete" ><a class="delconfirm" href="deletefile.php?id=' . $page['url'] . '&nonce=' . get_nonce("delete", "deletefile.php") . '" title="' . i18n_r('DELETEPAGE_TITLE') . ': ' . cl($page['title']) . '" >X</a></td>';
} else {
$menu .= '<td class="delete" ></td>';
}
$menu .= '</tr>';
$menu = get_pages_menu((string) $page['url'], $menu, $level + 1);
}
}
return $menu;
}
开发者ID:kazu2012,项目名称:get-simple-ja,代码行数:73,代码来源:template_functions.php
示例9: getURL
public static function getURL($slug, $slugparent, $language = null, $type = 'full')
{
global $url, $parent, $PERMALINK, $PERMALINK_ORIG;
if (!isset($PERMALINK_ORIG)) {
$PERMALINK_ORIG = $PERMALINK;
}
if (!$slug) {
$slug = @$url;
$slugparent = @$parent;
}
if (@strpos(@$PERMALINK_ORIG, '%language%') !== false || @strpos(@$PERMALINK_ORIG, '%nondefaultlanguage%') !== false) {
if (substr($language, 0, 1) == '(') {
$language = substr($language, 1, 2);
}
$u = self::getFancyLanguageUrl($slug, $slugparent, $language, $type);
} else {
if (substr($language, 0, 1) == '(') {
$language = null;
}
if (@strpos(@$PERMALINK_ORIG, '%parents%') !== false) {
$u = self::getFancyLanguageUrl($slug, $slugparent, null, $type);
} else {
$u = find_url($slug, $slugparent, $type);
}
if ($language && (!defined('I18N_SINGLE_LANGUAGE') || !I18N_SINGLE_LANGUAGE)) {
if (defined('I18N_SEPARATOR') && $slug == 'index') {
$u .= I18N_SEPARATOR . $language;
} else {
if (defined('I18N_SEPARATOR')) {
preg_match('/^([^\\?]*[^\\?\\/])(\\/?(\\?.*)?)$/', $u, $match);
$u = $match[1] . I18N_SEPARATOR . $language . @$match[2];
} else {
$u .= (strpos($u, '?') !== false ? '&' : '?') . I18N_LANGUAGE_PARAM . '=' . $language;
}
}
}
}
return $u;
}
开发者ID:Vin985,项目名称:clqweb,代码行数:39,代码来源:frontend.class.php
示例10: i18n
<div class="main">
<h3 class="floated"><?php
if (isset($data_edit)) {
i18n('PAGE_EDIT_MODE');
} else {
i18n('CREATE_NEW_PAGE');
}
?>
</h3>
<!-- pill edit navigation -->
<div class="edit-nav" >
<?php
if (isset($id)) {
echo '<a href="', find_url($url, $parent), '" target="_blank" accesskey="', find_accesskey(i18n_r('VIEW')), '" >', i18n_r('VIEW'), ' </a>';
}
?>
<a href="#" id="metadata_toggle" accesskey="<?php
echo find_accesskey(i18n_r('PAGE_OPTIONS'));
?>
" ><?php
i18n('PAGE_OPTIONS');
?>
</a>
<div class="clear" ></div>
</div>
<form class="largeform" id="editform" action="changedata.php" method="post" accept-charset="utf-8" >
<input id="nonce" name="nonce" type="hidden" value="<?php
echo get_nonce("edit", "edit.php");
开发者ID:hatasu,项目名称:appdroid,代码行数:31,代码来源:edit.php
示例11: __get
public function __get($name)
{
switch ($name) {
case 'id':
case 'url':
case 'slug':
return $this->item['url'];
case 'parent':
return $this->item['parent'];
case 'classes':
return $this->classes;
case 'text':
return $this->text;
case 'title':
return $this->title;
case 'current':
case 'iscurrent':
case 'isCurrent':
return $this->item['current'];
case 'currentpath':
case 'currentPath':
case 'iscurrentpath':
case 'isCurrentPath':
return $this->item['currentpath'];
case 'haschildren':
case 'hasChildren':
return $this->item['haschildren'];
case 'open':
case 'isOpen':
return isset($this->item['children']) && count($this->item['children']) > 0;
case 'closed':
case 'isClosed':
return $this->item['haschildren'] && (!isset($this->item['children']) || count($this->item['children']) <= 0);
case 'titles':
case 'showtitles':
case 'showTitles':
return $this->showTitles;
case 'link':
if (@$this->item['link']) {
return $this->item['link'];
} else {
if (function_exists('find_i18n_url')) {
return find_i18n_url($this->item['url'], $this->item['parent']);
} else {
return find_url($this->item['url'], $this->item['parent']);
}
}
case 'simplelink':
case 'simpleLink':
if (@$this->item['link']) {
return $this->item['link'];
} else {
return find_url($this->item['url'], $this->item['parent']);
}
case 'content':
return html_entity_decode(stripslashes((string) $this->getProp('content')), ENT_QUOTES, 'UTF-8');
case 'tags':
return preg_split('/\\s*,\\s*/', trim(html_entity_decode(stripslashes((string) $this->getProp('meta')), ENT_QUOTES, 'UTF-8')));
default:
return (string) $this->getProp($name);
}
}
开发者ID:sevenns,项目名称:alpremstroy,代码行数:62,代码来源:frontend.class.php
示例12: get_cat_list
function get_cat_list($cat, $page)
{
$cfile = array();
$cfile = get_filecat($cat);
$numitems = 7;
//determine offset
$page_ = $page - 1;
$total = count($cfile);
$offset = $page_ * $numitems;
$total_pages = ceil($total / $numitems);
for ($i = $offset; $i < $offset + $numitems and $i < $total; $i++) {
$file = CONTENTPATH . $cfile[$i] . '.xml';
$data = getXML($file);
$title = stripslashes(htmlspecialchars_decode($data->title, ENT_QUOTES));
$intro = stripslashes(htmlspecialchars_decode($data->intro, ENT_QUOTES));
$parent = stripslashes(htmlspecialchars_decode($data->parent, ENT_QUOTES));
$author_edit = stripslashes(htmlspecialchars_decode($data->author_edit, ENT_QUOTES));
$date = stripslashes(htmlspecialchars_decode($data->pubDate, ENT_QUOTES));
$url = stripslashes(htmlspecialchars_decode($data->url, ENT_QUOTES));
$metad = stripslashes(htmlspecialchars_decode($data->metad, ENT_QUOTES));
$imgb = imagenesHTML(html_entity_decode(strip_decode($intro)));
?>
<span class="blog_title"><a href="<?php
echo find_url($data->url, $data->parent);
?>
"><?php
echo $title;
?>
</a></span>
<br /><span><i><?php
echo lngDate($date);
?>
</i> | <?php
echo $parent;
?>
</span>
<div class="blog_item">
<img src="<?php
echo $imgb[0];
?>
">
<?php
$patron = "<img[^<>]*/>";
echo eregi_replace($patron, "", $intro);
?>
<div class="clear"></div>
</div>
<?php
}
echo '<div class="pagination-links">';
if ($page_ > 0) {
echo '<a href="?page=' . $page_ . '"> Anterior</a> ';
}
for ($i = 1; $i <= $total_pages; $i++) {
if ($page == $i) {
echo '<span class="current">Pagina ' . $page . '</span> ';
} else {
echo ' <a href="?page=' . $i . '">' . $i . '</a>';
}
}
$page++;
if (++$page_ < $total_pages) {
echo ' <a href="?page=' . $page . '"> Siguiente </a>';
}
echo "</div>";
}
开发者ID:Emmett-Brown,项目名称:linea,代码行数:73,代码来源:get_category.php
示例13: return_i18n_gallery
$gallery = return_i18n_gallery(@$_POST['post-name']);
// reread
$name = @$_POST['post-name'];
} else {
$msg = i18n_r('i18n_gallery/SAVE_FAILURE');
}
}
} else {
$gallery = return_i18n_gallery(@$_GET['name']);
}
}
}
$settings = i18n_gallery_settings();
$w = intval(@$settings['adminthumbwidth']) > 0 ? intval($settings['adminthumbwidth']) : I18N_GALLERY_DEFAULT_THUMB_WIDTH;
$h = intval(@$settings['adminthumbheight']) > 0 ? intval($settings['adminthumbheight']) : I18N_GALLERY_DEFAULT_THUMB_HEIGHT;
$viewlink = function_exists('find_i18n_url') ? find_i18n_url('index', null) : find_url('index', null);
$viewlink .= (strpos($viewlink, '?') === false ? '?' : '&') . 'name=' . $name . '&preview-gallery';
$plugins = i18n_gallery_plugins();
$plugins = subval_sort($plugins, 'name');
// default gallery type
if (!@$gallery['type']) {
$gallery['type'] = @$settings['type'] ? $settings['type'] : I18N_GALLERY_DEFAULT_TYPE;
}
?>
<h3 class="floated" style="float:left"><?php
$name ? i18n('i18n_gallery/EDIT_HEADER') : i18n('i18n_gallery/CREATE_HEADER');
?>
</h3>
<div class="edit-nav" >
<p>
开发者ID:elephantcode,项目名称:elephantcode,代码行数:31,代码来源:edit.php
示例14: array_key_exists
<?php
global $SITEURL;
require_once GSPLUGINPATH . 'i18n_search/viewer.class.php';
$i18n =& $params;
// alias for i18n parsing
$slug = array_key_exists('slug', $params) ? $params['slug'] : return_page_slug();
$showTags = array_key_exists('showTags', $params) ? $params['showTags'] : true;
$minTagSizePercent = array_key_exists('minTagSize', $params) ? (int) $params['minTagSize'] : 100;
$maxTagSizePercent = array_key_exists('maxTagSize', $params) ? (int) $params['maxTagSize'] : 250;
$addTags = array_key_exists('addTags', $params) ? $params['addTags'] : '';
$goText = @$i18n['GO'];
$is_ajax = !isset($params['ajax']) || $params['ajax'];
$live = $is_ajax && isset($params['live']) && $params['live'];
$url = function_exists('find_i18n_url') ? find_i18n_url($slug, null) : find_url($slug, null);
$method = strpos($url, '?') !== false ? 'POST' : 'GET';
// with GET the parameters are not submitted!
$language = isset($params['lang']) ? $params['lang'] : null;
$placeholderText = @$params['PLACEHOLDER'];
// languages
$reqlangs = null;
if (function_exists('return_i18n_languages')) {
$deflang = return_i18n_default_language();
$languages = $language ? array($language) : return_i18n_languages();
foreach ($languages as $lang) {
if ($lang == $deflang) {
$lang = '';
}
$reqlangs = $reqlangs === null ? $lang : $reqlangs . ',' . $lang;
}
}
开发者ID:sevenns,项目名称:alpremstroy,代码行数:31,代码来源:searchform.php
示例15: i18n
<div class="main">
<h3 class="floated"><?php
if (isset($data_edit)) {
i18n('PAGE_EDIT_MODE');
} else {
i18n('CREATE_NEW_PAGE');
}
?>
</h3>
<!-- pill edit navigation -->
<div class="edit-nav" >
<?php
if (isset($id)) {
echo '<a href="' . find_url($url, $parent) . '" target="_blank" accesskey="' . find_accesskey(i18n_r('VIEW')) . '" >' . i18n_r('VIEW') . '</a>';
if ($url != '') {
echo '<a href="pages.php?id=' . $url . '&action=clone&nonce=' . get_nonce("clone", "pages.php") . '" >' . i18n_r('CLONE') . '</a>';
}
echo '<span class="save-close"><a href="javascript:void(0)" >' . i18n_r('SAVE_AND_CLOSE') . '</a></span>';
}
?>
<!-- @todo: fix accesskey for options -->
<!-- <a href="javascript:void(0)" id="metadata_toggle" accesskey="<?php
echo find_accesskey(i18n_r('PAGE_OPTIONS'));
?>
" ><?php
i18n('PAGE_OPTIONS');
?>
</a> -->
<div class="clear" ></div>
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:31,代码来源:edit.php
示例16: get_navigation
/**
* Get Main Navigation
*
* This will return unordered list of main navigation
* This function uses the menu opitions listed within the 'Edit Page' control panel screen
*
* @since 1.0
* @uses GSDATAOTHERPATH
* @uses getXML
* @uses subval_sort
* @uses find_url
* @uses strip_quotes
* @uses exec_filter
*
* @param string $currentpage This is the ID of the current page the visitor is on
* @return string
*/
function get_navigation($currentpage)
{
$menu = '';
$path = GSDATAPAGESPATH;
$dir_handle = opendir($path) or die("Unable to open {$path}");
$filenames = array();
while ($filename = readdir($dir_handle)) {
$filenames[] = $filename;
}
$count = "0";
$pagesArray = array();
if (count($filenames) != 0) {
foreach ($filenames as $file) {
if ($file == "." || $file == ".." || is_dir($path . $file) || $file == ".htaccess") {
// not a page data file
} else {
$data = getXML($path . $file);
if ($data->private != 'Y') {
$pagesArray[$count]['menuStatus'] = $data->menuStatus;
$pagesArray[$count]['menuOrder'] = $data->menuOrder;
$pagesArray[$count]['menu'] = strip_decode($data->menu);
$pagesArray[$count]['url'] = $data->url;
$pagesArray[$count]['title'] = strip_decode($data->title);
$pagesArray[$count]['parent'] = $data->parent;
$count++;
}
}
}
}
$pagesSorted = subval_sort($pagesArray, 'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = '';
$classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
if ("{$currentpage}" == "{$url_nav}") {
$classes = "current " . $page['parent'] . " " . $url_nav;
} else {
$classes = trim($page['parent'] . " " . $url_nav);
}
if ($page['menu'] == '') {
$page['menu'] = $page['title'];
}
if ($page['title'] == '') {
$page['title'] = $page['menu'];
}
$menu .= '<li class="' . $classes . '"><a href="' . find_url($page['url'], $page['parent']) . '" title="' . strip_quotes($page['title']) . '">' . $page['menu'] . '</a></li>' . "\n";
}
}
}
closedir($dir_handle);
echo exec_filter('menuitems', $menu);
}
开发者ID:kazu2012,项目名称:get-simple-ja,代码行数:71,代码来源:theme_functions.php
示例17: get_navigation
/**
* Get Main Navigation
*
* This will return unordered list of main navigation
* This function uses the menu opitions listed within the 'Edit Page' control panel screen
*
* @since 1.0
* @uses GSDATAOTHERPATH
* @uses getXML
* @uses subval_sort
* @uses find_url
* @uses strip_quotes
* @uses exec_filter
*
* @param string $currentpage This is the ID of the current page the visitor is on
* @param string $classPrefix Prefix that gets added to the parent and slug classnames
* @return string
*/
function get_navigation($currentpage = "", $classPrefix = "")
{
$menu = '';
global $pagesArray;
$pagesSorted = subval_sort($pagesArray, 'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = $classes = '';
$url_nav = (string) $page['url'];
if ($page['menuStatus'] == 'Y') {
$parentClass = !empty($page['parent']) ? $classPrefix . $page['parent'] . " " : "";
$classes = trim($parentClass . $classPrefix . $url_nav);
if ((string) $currentpage == $url_nav) {
$classes .= " current active";
}
if ($page['menu'] == '') {
$page['menu'] = $page['title'];
}
if ($page['title'] == '') {
$page['title'] = $page['menu'];
}
$menu .= '<li class="' . $classes . '"><a href="' . find_url($page['url'], $page['parent']) . '" title="' . encode_quotes(cl($page['title'])) . '">' . strip_decode($page['menu']) . '</a></li>' . "\n";
}
}
}
echo exec_filter('menuitems', $menu);
// @filter menuitems (str) menu items html in get_navigation
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:46,代码来源:theme_functions.php
示例18: nm_get_url
function nm_get_url($query = false)
{
global $PRETTYURLS, $NMPAGEURL, $NMPRETTYURLS;
$str = '';
$url = find_url($NMPAGEURL, nm_get_parent());
if ($query) {
switch ($query) {
case 'post':
$query = NMPARAMPOST;
break;
case 'page':
$query = NMPARAMPAGE;
break;
case 'tag':
$query = NMPARAMTAG;
break;
case 'archive':
$query = NMPARAMARCHIVE;
break;
}
if ($PRETTYURLS == 1 && $NMPRETTYURLS == 'Y') {
if ($query == NMPARAMPOST && defined('NMNOPARAMPOST') && NMNOPARAMPOST) {
$str = '';
} else {
$str = $query . '/';
}
if (substr($url, -1) != '/') {
$str = '/' . $str;
}
} else {
$str = strpos($url, '?') === false ? '?' : '&';
$str .= $query . '=';
}
}
return $url . $str;
}
开发者ID:Vin985,项目名称:clqweb,代码行数:36,代码来源:functions.php
示例19: find_url
'>currency</a>
</li>
<li>
<a href='#'>Setting 4</a>
</li>
</ul>
</li>
<li class='dropdown user'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>
<i class='icon-user'></i>
<strong><?php
echo $user_name;
?>
</strong>
<img class="img-rounded" src="<?php
echo find_url('images', 'logo.png');
?>
" />
<b class='caret'></b>
</a>
<ul class='dropdown-menu'>
<li>
<a href="<?php
echo base_url('auth/edit_user/' . $user_id);
?>
">Edit Profile</a>
</li>
<li class='divider'></li>
<li>
<a href="<?php
echo base_url('auth/logout');
开发者ID:abdulmanan7,项目名称:stms,代码行数:31,代码来源:header.php
示例20: find_url
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<title>Registration</title>
<meta content='lab2023' name='author'>
<meta content='' name='description'>
<meta content='' name='keywords'>
<link href='<?php
echo find_url("css", "application-a07755f5.css");
?>
' rel="stylesheet" type="text/css" />
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href='<?php
echo find_url("images", "favicon.ico");
?>
' rel="icon" type="image/ico" />
<link href='<?php
echo find_url("css", "custom.css");
?>
' rel="stylesheet" type="text/css" />
</head>
<body class='login'>
<!-- <div class='wrapper'> -->
<div class="container-fluid">
<div class='row'>
<div class='col-lg-12'>
<div class='brand text-center'>
<h1>
<div class='logo-icon'>
<img src="<?php
echo base_url('assets/images/logo.png');
?>
" alt="smart tailor logo" class="logo-img"/>
开发者ID:abdulmanan7,项目名称:stms,代码行数:31,代码来源:registration.php
注:本文中的find_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论