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


PHP abs_url函数代码示例

本文整理汇总了PHP中abs_url函数的典型用法代码示例。如果您正苦于以下问题:PHP abs_url函数的具体用法?PHP abs_url怎么用?PHP abs_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: rdf

 /**
  * Return an RDF object based an a $row
  */
 public function rdf($row, $prefix = '')
 {
     $row->type = isset($row->type) ? $row->type : 'version';
     if (isset($row->url)) {
         if (!is_array($row->url)) {
             $row->url = array($row->url);
         }
         foreach ($row->url as $key => $value) {
             if (!isURL($value)) {
                 $row->url[$key] = abs_url($value, $prefix);
             }
         }
     }
     $rdf = parent::rdf($row, $prefix);
     // Blend with RDF from the semantic store
     if (!empty($row->rdf)) {
         foreach ($row->rdf as $p => $values) {
             if (array_key_exists($p, $rdf)) {
                 // TODO: Not sure we should allow a collision between the semantic and relational tables? For now, don't.
             } else {
                 $rdf[$p] = $values;
             }
         }
     }
     return $rdf;
 }
开发者ID:austinvernsonger,项目名称:scalar,代码行数:29,代码来源:version_model.php

示例2: _initSession

}
require_once $basepath . '/include/config/conf.inc.php';
require_once $basepath . '/include/inc_lib/default.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php';
// Get user Agent BOT check
$IS_A_BOT = $phpwcms['USER_AGENT']['bot'];
// start session - neccessary if frontend users are available
// but neccessary also to check if a bot is visiting the site
// -> if so then do not initialize session for larger search engines
if (!$IS_A_BOT && (!empty($phpwcms['SESSION_FEinit']) || isset($_GET['phpwcms-preview']))) {
    _initSession();
}
// some initial actions
cleanupPOSTandGET();
buildGlobalGET();
define('FE_CURRENT_URL', abs_url(array(), array('phpwcms_output_action')));
// init some special rights and also frontend edit
init_frontend_edit();
// buffer everything
ob_start();
$content['page_end'] = '';
require_once PHPWCMS_ROOT . '/include/config/conf.template_default.inc.php';
require_once PHPWCMS_ROOT . '/include/config/conf.indexpage.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/general.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_front/cnt.lang.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/modules.check.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/article.contenttype.inc.php';
require PHPWCMS_ROOT . '/include/inc_lib/imagick.convert.inc.php';
require PHPWCMS_ROOT . '/include/inc_front/front.func.inc.php';
require PHPWCMS_ROOT . '/include/inc_front/ext.func.inc.php';
require PHPWCMS_ROOT . '/include/inc_front/content.func.inc.php';
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:index.php

示例3: trim

         $row['meta_description'] = trim(strip_tags(strip_bbcode($row['meta_description'])));
         $row['meta_description'] = getCleanSubString($row['meta_description'], 75, '', 'word');
         $row['meta_description_rendered'] = true;
     } else {
         $row['meta_description_rendered'] = false;
     }
     if (!empty($row['shopprod_overwrite_meta'])) {
         $content["pagetitle"] = setPageTitle($content["pagetitle"], $article['cat'], $shop_pagetitle);
         if ($row['meta_description_rendered']) {
             set_meta('description', $row['meta_description']);
         }
     }
     if ($row['shopprod_opengraph']) {
         $content['opengraph']['type'] = 'og:product';
         $content['opengraph']['title'] = $shop_pagetitle;
         $content['opengraph']['url'] = abs_url(array('shop_detail' => $shop_detail_id), array('shop_cat', 'shop_cart', 'phpwcms_output_action', 'print', 'phpwcms-preview', 'unsubscribe', 'subscribe'));
         if ($row['meta_description_rendered']) {
             $content['opengraph']['description'] = $row['meta_description'];
         }
     } else {
         $content['opengraph']['support'] = false;
     }
     // Update product view count
     // ToDo: Maybe use cookie or session to avoid tracking in case showed once
     $sql = 'UPDATE LOW_PRIORITY ' . DB_PREPEND . 'phpwcms_shop_products SET shopprod_track_view=shopprod_track_view+1 WHERE shopprod_id=' . $shop_detail_id;
     _dbQuery($sql, 'UPDATE');
 } else {
     $_tmpl['config']['mode'] = 'list';
     $_tmpl['config']['lightbox_id'] = '';
     if (count($row['shopprod_var']['images'])) {
         $_prod_list_img = shop_image_tag($row['shopprod_var']['images'][0], 0, $row['shopprod_name1']);
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:frontend.render.php

示例4: get_link_anchor

function get_link_anchor($matches)
{
    $anchor = trim($matches[1]);
    $anchor = explode('#', $anchor);
    if (!empty($anchor[1])) {
        if ($anchor[0] === '') {
            return '<a id="' . $anchor[1] . '"' . (empty($GLOBALS['template_default']['classes']['link-anchor']) ? '' : ' class="' . $GLOBALS['template_default']['classes']['link-anchor'] . '"') . '></a>';
        }
        $anchor[0] = strtoupper($anchor[0]);
        if ($anchor[0] === 'REL') {
            return rel_url() . '#' . $anchor[1];
        } elseif ($anchor[0] === 'ABS') {
            return abs_url() . '#' . $anchor[1];
        }
    }
    return $matches[0];
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:17,代码来源:front.func.inc.php

示例5: foreach

if ($mode || !isset($page->versions[0]->annotation_of) || empty($page->versions[0]->annotation_of)) {
    return;
}
$annotation_of = $page->versions[0]->annotation_of;
$type = 'composite' == $page->type ? 'page' : 'media';
?>
<!-- Annotation of list -->
<div id="annotation_of_list">
<span class="inline_icon_link annotation">This <?php 
echo $type;
?>
 annotates:</span>
<?php 
foreach ($annotation_of as $row) {
    $file_page_url = $base_uri . $row->slug;
    $file_url = abs_url($row->versions[0]->url, $base_uri);
    $title = $row->versions[0]->title;
    if (empty($title)) {
        $title = '(No title)';
    }
    $anno_str = '';
    // Temporal
    if (!empty($row->versions[0]->start_seconds) || !empty($row->versions[0]->end_seconds)) {
        $anno_str = round($row->versions[0]->start_seconds);
        if (isset($row->versions[0]->end_seconds)) {
            $anno_str .= ' - ' . round($row->versions[0]->end_seconds);
        }
        $anno_str .= ' seconds';
        // Textual
    } elseif (!empty($row->versions[0]->start_line_num) || !empty($row->versions[0]->end_line_num)) {
        $anno_str = 'line ' . $row->versions[0]->start_line_num;
开发者ID:austinvernsonger,项目名称:scalar,代码行数:31,代码来源:annotation_of_list.php

示例6: implode

                    $g['wrap'][] = '</div>';
                }
                $content['cptab'][$CNT_TAB] = implode(LF, $g['wrap']);
            }
            unset($g);
        }
    }
}
if (empty($template_default["article"]["div_spacer"])) {
    $content["main"] = str_replace("</table>\n<br />", "</table>\n", $content["main"]);
    $content["main"] = str_replace("</table><br />", "</table>", $content["main"]);
    $content["main"] = str_replace("</div><br />", "</div>", $content["main"]);
}
if (!defined('PHPWCMS_ALIAS') && $content['article_alias']) {
    define('PHPWCMS_ALIAS', $content['article_alias']);
}
// set canonical <link> in page <head> section to avoid lower SEO ranking
// see: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
if ($content['overwrite_canonical']) {
    $content['set_canonical'] = false;
} elseif (empty($phpwcms['canonical_off'])) {
    $_tempAlias = PHPWCMS_ALIAS ? PHPWCMS_ALIAS : 'aid=' . $content['article_id'];
    if ($content['set_canonical'] && empty($phpwcms['force301_2struct'])) {
        // check against page or set canonical only for single article in this category
        $content['set_canonical'] = $content['aId_CpPage'] ? 'aid=' . $content['article_id'] . '-' . $content['aId_CpPage'] : get_structurelevel_single_article_alias($content['cat_id']);
        $content['set_canonical'] = abs_url(array(), true, $content['set_canonical'] ? $content['set_canonical'] : $_tempAlias, 'rawurlencode');
    } else {
        $content['set_canonical'] = abs_url(array(), true, $_tempAlias, 'rawurlencode');
    }
    $block['custom_htmlhead']['canonical'] = '  <link rel="canonical" href="' . $content['set_canonical'] . '"' . HTML_TAG_CLOSE;
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:content.article.inc.php

示例7: preg_quote

         $content["search_word"][$key] = preg_quote($value);
         $content["search_word"][$key] = str_replace("\\?", '.?', $content["search_word"][$key]);
         $content["search_word"][$key] = str_replace("\\*", '.*', $content["search_word"][$key]);
         $content['highlight'][] = $value;
     }
 }
 if (count($content['highlight'])) {
     if (strpos($crow['template']['item'], '{IMAGE') !== false) {
         $crow['template']['image_render'] = true;
     }
     $s_result_highlight = implode(' ', $content['highlight']);
     if (!empty($_POST["search_input_field"])) {
         // make a redirection to avoid message when using browser back
         $GLOBALS['_getVar']['searchstart'] = 1;
         $GLOBALS['_getVar']['searchwords'] = $s_result_highlight;
         headerRedirect(abs_url(array(), array(), '', 'rawurlencode'));
     }
     $s_result_highlight = rawurlencode($s_result_highlight);
     $sql = "SELECT article_id, article_cid, article_title, article_username, article_subtitle, ";
     $sql .= "article_summary, article_keyword, UNIX_TIMESTAMP(article_tstamp) AS article_date, ";
     $sql .= "article_image, article_alias, article_aliasid, article_headerdata ";
     $sql .= "FROM " . DB_PREPEND . "phpwcms_article ar ";
     $sql .= "LEFT JOIN " . DB_PREPEND . "phpwcms_articlecat ac ON ";
     $sql .= "(ar.article_cid = ac.acat_id OR ar.article_cid = 0)";
     $sql .= " WHERE ";
     // limit to special structure IDs if not all
     if (count($content["search"]["start_at"])) {
         $sql .= 'ar.article_cid IN (' . implode(',', $content["search"]["start_at"]) . ')';
     } else {
         $sql .= "IF(ar.article_cid = 0, " . (empty($GLOBALS['indexpage']['acat_nosearch']) ? 1 : 0) . ", 1)";
     }
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt13.article.inc.php

示例8: str_replace

         $cnt_form["onsuccess"] = str_replace('{' . $POST_key . '}', rawurlencode($POST_keyval), $cnt_form["onsuccess"]);
     } else {
         $cnt_form["onsuccess"] = str_replace('{' . $POST_key . '}', !$cnt_form['is_html_entity'] && $cnt_form["onsuccess_redirect"] === 2 ? html_specialchars($POST_keyval) : $POST_keyval, $cnt_form["onsuccess"]);
     }
 }
 $phpwcms['callback'] = now();
 $cnt_form["onsuccess"] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form["onsuccess"]);
 if (strpos($cnt_form["onsuccess"], 'EMAIL_COPY') !== false) {
     if ($cnt_form["onsuccess_redirect"] === 1) {
         $cnt_form["onsuccess"] = render_cnt_template($cnt_form["onsuccess"], 'EMAIL_COPY', empty($cnt_form['sendcopy']) || $cnt_form['option_email_copy'] === false ? '' : rawurlencode($cnt_form["copyto"]));
     } else {
         $cnt_form["onsuccess"] = render_cnt_template($cnt_form["onsuccess"], 'EMAIL_COPY', empty($cnt_form['sendcopy']) || $cnt_form['option_email_copy'] === false ? '' : html_specialchars($cnt_form["copyto"]));
     }
 }
 $cnt_form['onsuccess'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['onsuccess']);
 $cnt_form['fe_current_url'] = abs_url(array(), array(), '', 'rawurlencode');
 $cnt_form['template'] = str_replace('{FORM_URL}', $cnt_form['fe_current_url'], $cnt_form['template']);
 $cnt_form['template'] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form['template']);
 $cnt_form['template'] = preg_replace_callback('/\\{DATE:(.*?)\\}/', 'date_callback', $cnt_form['template']);
 if (!$cnt_form['template_equal']) {
     $cnt_form['template_copy'] = str_replace('{FORM_URL}', $cnt_form['fe_current_url'], $cnt_form['template_copy']);
     $cnt_form['template_copy'] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form['template_copy']);
     $cnt_form['template_copy'] = preg_replace_callback('/\\{DATE:(.*?)\\}/', 'date_callback', $cnt_form['template_copy']);
     $cnt_form['template_copy'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['template_copy']);
 }
 $cnt_form['template'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['template']);
 // check if "copy to" email template is equal recipient
 // email template and set it the same
 if ($cnt_form['template_equal'] == 1) {
     $cnt_form['template_format_copy'] = $cnt_form['template_format'];
     $cnt_form['template_copy'] = $cnt_form['template'];
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt23.article.inc.php

示例9: parse

 /**
  * search string for calendar tag and parse
  */
 function parse(&$string)
 {
     if (isset($_GET['pcal_reset']) || isset($_POST['pcal_reset'])) {
         unset($_SESSION['pcal']);
         headerRedirect(abs_url(array(), array('pcal_reset', 'pcal_start', 'pcal_end', 'pcal_place', 'pcal_limit'), '', 'rawurlencode'));
     }
     if (preg_match_all('/\\{CALENDAR:(.*?)\\}/s', $string, $matches)) {
         if (isset($matches[1])) {
             foreach ($matches[1] as $key => $value) {
                 $this->parse_match($value);
                 $result = $this->render();
                 // replace calendar by result
                 $string = str_replace($matches[0][$key], $result, $string);
             }
             $string = html_parser($string);
         }
     }
 }
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:21,代码来源:calendar.class.php

示例10: Copyright

    $_TrackingCode .= '<!-- End of StatCounter Code -->';
    $content['all'] .= $_TrackingCode;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
/// eTracker /////////////////////////////////////////////////////////////////////////////////////
if ($_Tracking_eTracker) {
    $_TrackingCode = '<!-- Copyright (c) 2000-2009 etracker GmbH. All rights reserved. -->
<!-- This material may not be reproduced, displayed, modified or distributed -->
<!-- without the express prior written permission of the copyright holder. -->
<!-- BEGIN etracker Tracklet 3.0 -->
<script type="text/javascript">document.write(String.fromCharCode(60)+"script type=\\"text/javascript\\" src=\\"http"+("https:"==document.location.protocol?"s":"")+"://code.etracker.com/t.js?et=' . $_Tracking_eTrackerCode . '\\">"+String.fromCharCode(60)+"/script>");</script>
<!-- etracker PARAMETER 3.0 -->
<script type="text/javascript">
var et_pagename     = "' . rawurlencode($content["pagetitle"]) . '";
var et_areas		= "' . str_replace('"', '\\"', implode('', $_TrackingCategory)) . '";
var et_url          = "' . abs_url(array(), array('phpwcmscategory'), $_TrackingAlias, 'rawurlencode') . '";
</script>
<!-- etracker PARAMETER END -->
<script type="text/javascript">_etc();</script>
<noscript><div style="overflow:hidden;width:0;height:0;"><img src="https://www.etracker.com/nscnt.php?et=' . $_Tracking_eTrackerCode . '" border="0" alt="" /></div></noscript>
<!-- etracker CODE END -->';
    $content['all'] .= $_TrackingCode;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
/// Yahoo Aanalytics /////////////////////////////////////////////////////////////////////////////
if ($_Tracking_YahooAnalytics) {
    $_TrackingCode = '<!-- Yahoo! Web Analytics - All rights reserved -->
<script type="text/javascript" src="http://d.yimg.com/mi/eu/ywa.js"></script>
<script type="text/javascript">
// globals YWA
var YWATracker = YWA.getTracker("' . $_Tracking_YahooAnalyticsCode . '");
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:pixelTracking.php

示例11: foreach

						<select id="choose_banner" name="scalar:banner" class="form-control"><option value="">Choose an image</option><?php 
$matched = false;
foreach ($book_images as $book_image_row) {
    if (@$page->banner == $book_image_row->versions[$book_image_row->version_index]->url) {
        $matched = true;
    }
    $slug_version = get_slug_version($book_image_row->slug);
    echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$page->banner == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>';
}
if (@(!empty($page->banner)) && !$matched) {
    echo '<option value="' . @$page->banner . '" selected>' . @$page->banner . '</option>';
}
?>
</select></div>
					<?php 
echo @(!empty($page->banner)) ? '<div class="well"><img src="' . abs_url($page->banner, confirm_slash(base_url()) . confirm_slash($book->slug)) . '" class="thumb_preview" /></div>' : '';
?>
				</div>
			</div>
		</div>

		<div id="custom-css-pane" role="tabpanel" class="tab-pane">
			<div class="row p">
				<div class="col-md-12">
					<p>Enter custom CSS to be applied to this page and its path or tag children:</p>
					<small>e.g., .navbar {background-color:red;}, no &lt;style&gt; tags required</small>
					<textarea class="form-control monospace_font" rows="10" name="scalar:custom_style"><?php 
echo !empty($page->custom_style) ? $page->custom_style : '';
?>
</textarea>
				</div>
开发者ID:plusperturbatio,项目名称:scalar,代码行数:31,代码来源:edit.php

示例12: abs_url

 // Template/stylesheet
 echo '<tr>';
 echo '<td><p>Interface</p></td>' . "\n";
 echo '<td>';
 echo '<p id="interface">';
 echo '</p>';
 echo "</td>\n";
 echo '<td>';
 echo "</td>\n";
 echo "</tr>\n";
 // Background
 echo '<tr typeof="books">';
 echo '<td><p>Background image</p></td>' . "\n";
 echo '<td style="vertical-align:middle;">';
 if (!empty($row->background)) {
     echo '<img src="' . abs_url($row->background, confirm_slash(base_url()) . $row->slug) . '?t=' . time() . '" style="vertical-align:middle;margin-right:10px;height:75px;border:solid 1px #aaaaaa;" /> ' . "\n";
 }
 echo '<p>Select image: <select name="background" style="max-width:400px;"><option value="">Choose an imported image</option>';
 $matched = false;
 foreach ($current_book_images as $book_image_row) {
     if (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url) {
         $matched = true;
     }
     $slug_version = get_slug_version($book_image_row->slug);
     echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>';
 }
 if (@(!empty($row->background)) && !$matched) {
     echo '<option value="' . @$row->background . '" selected>' . @$row->background . '</option>';
 }
 echo '</select></p>';
 if (!empty($row->background)) {
开发者ID:austinvernsonger,项目名称:scalar,代码行数:31,代码来源:book_style.php

示例13: abs_url

<?php

$url = abs_url($page->version->url, confirm_slash(base_url()) . $book->slug);
$title = @$page->version->title;
if (!empty($title)) {
    ?>
<h4 class="content_title">
<?php 
    if (!empty($title)) {
        if (!empty($view_icon)) {
            echo '<img src="' . $view_icon . '" class="title_icon" />' . "\n";
        }
        echo $title . "<br />\n";
        echo '<span class="contains">Manage Annotations</span>';
    }
    ?>
 	
</h4>
<?php 
}
?>

<div class="horiz_slots"></div>

<div id="content"><a class="hide_icon" typeof="scalar:File" href="<?php 
echo $url;
?>
" class="file" rel="meta" resource="<?php 
echo $uri;
?>
"></a></div>
开发者ID:austinvernsonger,项目名称:scalar,代码行数:31,代码来源:manage_annotations.php

示例14: str_replace

    echo $_scripts;
}
if (!$mode && !empty($style)) {
    echo '<style>' . "\n";
    echo $style . "\n";
    echo '</style>' . "\n";
}
if (!$mode && !empty($js)) {
    echo '<script>' . "\n";
    echo $js . "\n";
    echo '</script>' . "\n";
}
?>
</head>
<body<?php 
echo !empty($background) ? ' style="background-image:url(' . str_replace(' ', '%20', abs_url($background, $base_uri)) . ');"' : '';
?>
>
<div class="left">
<?php 
$this->load->view('melons/honeydew/nav');
?>
</div>

<div class="middle cover">
<?php 
$this->load->view('modules/cover/login');
$this->load->view('modules/cover/title');
?>
</div>
开发者ID:austinvernsonger,项目名称:scalar,代码行数:30,代码来源:wrapper.php

示例15: create_excerpt

            }
            echo $version->fullname;
            if (isset($version->homepage)) {
                echo '</a>';
            }
        }
        ?>
		on 
		<?php 
        echo $date;
        ?>
		<?php 
        echo !empty($version->content) ? '<br />' . create_excerpt($content, 14) . ' <span style="color:#777777;">' . strlen($content) . ' chars</span>' : '';
        ?>
		<?php 
        echo !empty($version->url) ? '<br />URL: <a href="' . abs_url($version->url, $base_uri) . '">' . $version->url . '</a>' : '';
        ?>
		</li>
	<?php 
    }
    echo '</ol>' . "\n";
}
if ($login_is_super || in_array($book->book_id, $login_book_ids)) {
    ?>
		<input type="submit" value="Delete selected versions" class="generic_button" />&nbsp; &nbsp; <a href="javascript:" onclick="reorderVersionNums()">Re-order version numbers</a>
<?php 
}
?>
 
</form>
开发者ID:paulshannon,项目名称:scalar,代码行数:30,代码来源:versions.php


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