• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getPageContent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getXMLData

function getXMLData($url)
{
    $content = getPageContent($url);
    if (!$content) {
        return null;
    }
    $content = '<?xml version="1.0" encoding="UTF-8"?>' . $content;
    return new Crawler($content);
}
开发者ID:nguyenvanduocit,项目名称:GetMp3ZingSimple,代码行数:9,代码来源:index.php


示例2: getPageField

/**
 * Get Page Field
 *
 * Retrieve and display the requested field from the given page. 
 *
 * @since 3.1
 * @param $page - slug of the page to retrieve content
 * @param $field - the Field to display
 * 
 */
function getPageField($page, $field)
{
    global $pagesArray;
    if ($field == "content") {
        getPageContent($page);
    } else {
        if (array_key_exists($field, $pagesArray[(string) $page])) {
            echo strip_decode($pagesArray[(string) $page][(string) $field]);
        } else {
            getPageContent($page, $field);
        }
    }
}
开发者ID:Emmett-Brown,项目名称:linea,代码行数:23,代码来源:caching_functions.php


示例3: parse

function parse($content, $url, $path, $filename, $parent)
{
    /* $CSV_PARENT - id родителя, куда заливать */
    $CSV_PARENT = $parent;
    /* $CSV_PRICE - цена */
    $start_str = '<span class="value">';
    $stop_str = '</span>';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content, $price);
    $price[1] = str_replace(" руб.", "", $price[1]);
    $price[1] = str_replace("`", "", $price[1]);
    $CSV_PRICE = $price[1];
    /* $CSV_CONTENT1 - краткое описание */
    $start_str = '<ul class="tec-char">';
    $stop_str = '</ul>';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content, $content1);
    $CSV_CONTENT1 = $content1[0];
    // save to csv
    /* $CSV_BRAND - brand */
    $start_str = 'href="http://www.electrovenik.ru/catalog/small/';
    $stop_str = '/a>';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content1[1], $brand);
    $start_str = '">';
    $stop_str = '<';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $brand[1], $brand);
    $CSV_BRAND = $brand[1];
    /* $CSV_IMAGE_SMALL - малое изображение */
    $start_str_image = '<img src="/gallery/';
    $stop_str_image = '"';
    $rule_image = "!" . $start_str_image . "(.*?)" . $stop_str_image . "!si";
    preg_match($rule_image, $content, $image_small);
    $image_small_name = $image_small[1];
    $CSV_IMAGE_SMALL = $path . $image_small_name;
    // save to csv + path
    /* small_image_save_to_folder - сохранить изображение позиции на сервер */
    $path_to_image_small = "http://www.electrovenik.ru/gallery/" . $image_small_name;
    $image = file_get_contents($path_to_image_small);
    file_put_contents("/var/www/serg-smirnoff/data/www/chicgirls.ru/parser/" . $path . $image_small_name, $image);
    /* $CSV_PAGETITLE - заголовок позиции */
    $start_str = '<p class="cat-header">';
    $stop_str = '</p>';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content, $pagetitle);
    $start_str = '>';
    $stop_str = '<';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $pagetitle[1], $title);
    $CSV_PAGETITLE = $title[1];
    /* sub_url - ссылка на страницу подробнее */
    $start_str2 = '<a href="';
    $stop_str2 = '">';
    $rule2 = "!" . $start_str2 . "(.*?)" . $stop_str2 . "!si";
    preg_match($rule2, $pagetitle[1], $sub_url);
    $content_sub = getPageContent($sub_url[1]);
    $start_str = '<img src="/gallery/';
    $stop_str = '"';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content_sub, $image_big);
    $image_big_name = $image_big[1];
    $CSV_IMAGE_BIG = $path . $image_big_name;
    /* small_image_save_to_folder - сохранить изображение позиции на сервер */
    $path_to_image_big = "http://www.electrovenik.ru/gallery/" . $image_big_name;
    $image2 = file_get_contents($path_to_image_big);
    file_put_contents("/var/www/serg-smirnoff/data/www/chicgirls.ru/parser/" . $path . $image_big_name, $image2);
    /* content2 - технические характеристики позиции */
    $start_str = '<table class="item-tec-char" id="tthtable">';
    $stop_str = '</table>';
    $rule = "!" . $start_str . "(.*?)" . $stop_str . "!si";
    preg_match($rule, $content_sub, $content2);
    $CSV_CONTENT2 = $content2[0];
    /*				
    		echo "pagetitle= ".$CSV_PAGETITLE."<br />";
    		echo "price= ".$CSV_PRICE."<br />";
    		echo "content1= ".$CSV_CONTENT1."<br />";
    		echo "content2= ".$CSV_CONTENT2."<br />";
    		echo "image_small= ".$CSV_IMAGE_SMALL."<br />";
    		echo "image_big= ".$CSV_IMAGE_BIG."<br />";
    		echo "brand= ".$CSV_BRAND."<br />";
    */
    /* сохраняем в csv */
    $fp = fopen("/var/www/serg-smirnoff/data/www/chicgirls.ru/parser/export/" . $filename, "a+");
    fwrite($fp, $CSV_PARENT);
    fwrite($fp, ";");
    fwrite($fp, $CSV_PAGETITLE);
    fwrite($fp, ";");
    fwrite($fp, trim(str_replace("\n", "", str_replace("\r", "", $CSV_CONTENT1))));
    fwrite($fp, ";");
    fwrite($fp, trim(str_replace(array("\n", "\r", "&nbsp;", ";"), array("", "", "", ""), $CSV_CONTENT2)));
    fwrite($fp, ";");
    fwrite($fp, $CSV_PRICE);
    fwrite($fp, ";");
    fwrite($fp, $CSV_IMAGE_SMALL);
    fwrite($fp, ";");
    fwrite($fp, $CSV_IMAGE_BIG);
    fwrite($fp, ";");
    fwrite($fp, $CSV_BRAND);
    fwrite($fp, ";");
//.........这里部分代码省略.........
开发者ID:serg-smirnoff,项目名称:elektrovenik.parser,代码行数:101,代码来源:parser.php


示例4: while

</small></h5>
					<ul class="searchresults">
						<?php 
        while (next_page()) {
            $c++;
            ?>
							<li<?php 
            printZDToggleClass('pages', $c, $number_to_show);
            ?>
>
								<h6><?php 
            printPageTitlelink();
            ?>
</h6>
								<p class="zenpageexcerpt"><?php 
            echo html_encodeTagged(shortenContent(strip_tags(getPageContent()), 80, getOption("zenpage_textshorten_indicator")));
            ?>
</p>
							</li>
		<?php 
        }
        ?>
					</ul>
					<hr />
	<?php 
    }
    ?>
			</div>
			<div class="eight columns">
				<?php 
    if ($numnews > 0 && $zpskel_usenews) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:search.php


示例5: while

</small></h3>
					<ul class="searchresults">
					<?php 
        while (next_page()) {
            $c++;
            ?>
						<li<?php 
            printZDToggleClass('pages', $c, $number_to_show);
            ?>
>
						<h4><?php 
            printPageTitlelink();
            ?>
</h4>
							<p class="zenpageexcerpt"><?php 
            echo shortenContent(strip_tags(getPageContent()), 80, getOption("zenpage_textshorten_indicator"));
            ?>
</p>
						</li>
						<?php 
        }
        ?>
					</ul>
				<?php 
    }
    if ($numnews > 0) {
        $number_to_show = 3;
        $c = 0;
        $art = 'article';
        if ($numnews > 1) {
            $art .= 's';
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:search.php


示例6: curl_setopt

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
    $data = curl_exec($ch);
    @curl_close($ch);
    return $data;
}
$URL = base64_decode($_GET['github-url']);
if (!strstr($URL, 'github')) {
    echo 'NOT GITHUB URL';
    die;
}
preg_match('/github.com\\/(.*?)\\/(.*?)\\//', $URL, $DOC_INFO);
// URL_IMAGE : img src="/MikeCoder/MyStudy/raw/master/MyBlogs/images/2014-04-14-1.png" alt
// URL_REAL : raw.githububusercontent.com/MikeCoder/MyStudy$url = "http://www.php100.com/logo.gif";
$CONTENT = getPageContent($URL);
preg_match('/<article[\\s|\\S]+?>([\\s|\\S]+)<\\/article>/', $CONTENT, $RES);
if ($RES) {
    $CONTENT = $RES[1];
}
$CONTENT = str_replace('\\n', '', $CONTENT);
$CONTENT = str_replace('\\r\\n', '', $CONTENT);
$ANCHOR_OLD = '/<a id="user-content-.*?"[\\s|\\S]+?class="anchor" href="[\\s|\\S]+?<\\/a>/';
$ANCHOR_NEW = '';
$CONTENT = preg_replace($ANCHOR_OLD, $ANCHOR_NEW, $CONTENT);
$IMAGE_URL_OLD = '/img src=(.*?raw)\\//';
$IMAGE_URL_NEW = 'img src="https://raw.githubusercontent.com/' . $DOC_INFO[1] . '/' . $DOC_INFO[2] . '/';
$CONTENT = preg_replace($IMAGE_URL_OLD, $IMAGE_URL_NEW, $CONTENT);
$LINK_URL_OLD = '/a href=(.*?blob)\\//';
$LINK_URL_NEW = 'a href="https://raw.githubusercontent.com/' . $DOC_INFO[1] . '/' . $DOC_INFO[2] . '/';
$CONTENT = preg_replace($LINK_URL_OLD, $LINK_URL_NEW, $CONTENT);
开发者ID:MikeCoder,项目名称:mblog,代码行数:31,代码来源:githubsync_show.php


示例7: printRSSHeaderLink

     if (function_exists('printCommentForm') && getOption('RSS_comments')) {
         printRSSHeaderLink('Comments-image', getBareImageTitle() . ' - ' . gettext('Latest Comments'), $lang = '') . "\n";
     }
     break;
 case 'archive.php':
     $zpfocus_metatitle = gettext("Archive View") . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
     break;
 case 'search.php':
     $zpfocus_metatitle = gettext('Search') . ' | ' . html_encode(getSearchWords()) . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
     $galleryactive = true;
     break;
 case 'pages.php':
     $zpfocus_metatitle = getBarePageTitle() . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = strip_tags(shortenContent(getPageContent(), 150, '...'));
     break;
 case 'news.php':
     if (is_NewsArticle()) {
         $zpfocus_metatitle = gettext('News') . ' | ' . getBareNewsTitle() . ' | ' . getBareGalleryTitle();
         $zpfocus_metadesc = strip_tags(shortenContent(getNewsContent(), 150, '...'));
     } else {
         if ($_zp_current_category) {
             $zpfocus_metatitle = gettext('News') . ' | ' . $_zp_current_category->getTitle() . ' | ' . getBareGalleryTitle();
             $zpfocus_metadesc = strip_tags(shortenContent(getNewsCategoryDesc(), 150, '...'));
         } else {
             if (getCurrentNewsArchive()) {
                 $zpfocus_metatitle = gettext('News') . ' | ' . getCurrentNewsArchive() . ' | ' . getBareGalleryTitle();
                 $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
             } else {
                 $zpfocus_metatitle = gettext('News') . ' | ' . getBareGalleryTitle();
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:31,代码来源:inc-header.php


示例8: define

define('BASE_PATH', str_replace('jsongenerator', '', dirname(__FILE__)));
require_once BASE_PATH . '/../../libraries/MediaWikiAPI/ApiWrapper.php';
require_once BASE_PATH . '/../../libraries/MediaWikiAPI/Pages.php';
// check for path information
if (count($argv) <= 1) {
    exit("Need output path for XML result\n");
}
$pages = getAllPages();
$pagetitles = array();
$map = array();
echo "Scanning pages...\n";
foreach ($pages as $page) {
    $title = $page['title'];
    array_push($pagetitles, $title);
    if (strstr(getPageContent($title), "<classify/>") !== FALSE) {
        $map[str_replace(" ", "_", $title)] = array("classify" => TRUE);
    }
}
echo "Requesting categories...\n";
$categories = getCategories();
$classifycats = array();
foreach ($categories as $category) {
    if (strstr($category, "<pageheadline/>") !== FALSE) {
        if (!array_key_exists($category, $map)) {
            $map[str_replace(" ", "_", $category)] = array("pageheadline" => TRUE);
        } else {
            $map[str_replace(" ", "_", $category)]["pageheadline"] = TRUE;
        }
    }
}
开发者ID:GitHubTianPeng,项目名称:101worker,代码行数:30,代码来源:rebuild.php


示例9: while

        while (next_page()) {
            ?>
						<div class="one-half column">
							<div class="news-clip">
								<div class="bold-header"><a href="<?php 
            echo html_encode($_zp_current_zenpage_page->getLink());
            ?>
"><?php 
            printPageTitle();
            ?>
</a> <small><em><i title="<?php 
            echo gettext('Page Result');
            ?>
" class="fa fa-copy fa-fw"></i></em></small></div>
								<div class="search-excerpt"><?php 
            echo shortenContent(strip_tags(getPageContent()), 200, getOption('zenpage_textshorten_indicator'));
            ?>
</div>
							</div>
						</div>
					<?php 
            $c++;
            if ($c == 2) {
                echo '</div><div class="row">';
                $c = 0;
            }
        }
    }
    if ($numnews > 0) {
        while (next_news()) {
            ?>
开发者ID:ckfreeman,项目名称:libratus,代码行数:31,代码来源:search.php


示例10: switch

}
switch ($baseResource) {
    case "admin":
        include "admin.php";
        exit;
        break;
    case "blog":
        include 'blog.php';
        $pageContent = getBlogContent($URI);
        break;
    case "projects":
        include 'projects.php';
        $pageContent = getProjectsContent($URI);
        break;
    default:
        $pageContent = getPageContent($baseResource);
        if ($pageContent == null) {
            $pageContent = get404();
        } else {
            $title = getPageTitle($baseResource) . $title;
        }
        break;
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title><?php 
echo $title;
?>
</title>
开发者ID:amdad,项目名称:FisherEvans.com,代码行数:31,代码来源:index.php


示例11: getPageContent

?>
</h3>
                    <p><?php 
getPageContent('presentation-legende-personnelle');
?>
</p>
                </article>
                <article>
                <h3><?php 
getPageField('presentation-coaching-relationnel', 'title');
?>
</h3>
                    <p><?php 
getPageContent('presentation-coaching-relationnel');
?>
</p>
                </article>
                <article>
                <h3><?php 
getPageField('presentation-bilan-competence', 'title');
?>
</h3>
                    <p><?php 
getPageContent('presentation-bilan-competence');
?>
</p>
                </article> 
                </div>
        <!--</section>-->
        </div><!-- .content -->
    </div><!--.main -->
开发者ID:Daminoweb,项目名称:CoachingJauss2,代码行数:31,代码来源:page2.inc.php


示例12: alc_list_posts

function alc_list_posts($atts)
{
    extract(shortcode_atts(array('category' => '', 'type' => '', 'limit' => '5', 'order' => 'DESC', 'orderby' => 'date', 'post_type' => 'post'), $atts));
    $return = '';
    $query = array();
    if ($category != '') {
        $query[] = 'category=' . $category;
    }
    if ($limit) {
        $query[] = 'numberposts=' . $limit;
    }
    if ($order) {
        $query[] = 'order=' . $order;
    }
    if ($orderby) {
        $query[] = 'orderby=' . $orderby;
    }
    if ($post_type) {
        $query[] = 'post_type=' . $post_type;
    }
    $posts_to_show = get_posts(implode('&', $query));
    if ($type == 1) {
        $counter = 1;
        $return .= '
		<h3>' . $title . '</h3>
		<div class="work_slide2">
			<ul id="work_slide2">';
        foreach ($posts_to_show as $ps) {
            $day = get_the_time('d', $ps->ID);
            $month = get_the_time('M', $ps->ID);
            if ($counter == 1) {
                $return .= '<li>';
            }
            $return .= '
						<article class="row collapse"><div class="small-5 columns"><div class="mod_con_img">';
            $thumbnail = get_the_post_thumbnail($ps->ID, 'blog-thumb3');
            $postmeta = get_post_custom($ps->ID);
            if (!empty($thumbnail) && !isset($postmeta['_post_video'])) {
                $return .= '<a href="' . get_permalink($ps->ID) . '" class="post-image">' . $thumbnail . '</a>';
            } elseif (isset($postmeta['_post_video'])) {
                $return .= '<iframe src="http://player.vimeo.com/video/' . $postmeta['_post_video'][0] . '" width="146" height="96" class="post-image"></iframe>';
            } else {
                $return .= '
							<a href="' . get_permalink($ps->ID) . '" class="post-image">
								<img src = "http://placehold.it/155x112" alt="' . __('No image', 'Alcatron') . '" />
							</a>';
            }
            $return .= '<ul class="meta">
								<li>
									<span class="icon-time"></span>
									<time datetime="' . get_the_time('Y-m-d') . '">' . get_the_time('M d, Y') . '</time>
								</li>
							  </ul>
							</div>
						 </div>';
            $return .= '<div class="small-7 columns">
								<div class="mod_con_text">
									<h5>' . $ps->post_title . '</h5>
								<p>' . limit_words(getPageContent($ps->ID), 15) . '</p>
								<a href="' . get_permalink($ps->ID) . '">' . __('Read More', 'Alcatron') . '</a>
							  </div>
						 </div>
					</article>';
        }
        $return .= '</li> </ul>
                        <div class="clearfix"></div>
                        <a class="prev2" id="slide_prev2" href="#"><img src="' . get_template_directory_uri() . '/images/arrow_left.png" alt="' . __('Prev', 'Alcatron') . '"></a>
                        <a class="next2" id="slide_next2" href="#"><img src="' . get_template_directory_uri() . '/images/arrow_right.png" alt="' . __('Next', 'Alcatron') . '"></a>                            
                       </div></div></div>';
        $return .= "<script type=\"text/javascript\">\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tjQuery('#work_slide2').carouFredSel({\n\t\t\t\t\tresponsive: true,\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tauto: false,\n\t\t\t\t\tcircular\t: true,\n\t\t\t\t\tinfinite\t: true,\n                                        scroll: {items:1, pauseOnHover: true},\n\t\t\t\t\tprev : {button: \"#slide_prev2\", key\t: \"left\"},\n\t\t\t\t\tnext : {button\t: \"#slide_next2\", key : \"right\"},\n\t\t\t\t\tswipe: {onMouse: true, onTouch: true},\n\t\t\t\t\titems: {visible: {min: 1,max: 6}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t</script>";
    } elseif ($type == "100") {
        $return = '<ul class="large-block-grid-2">';
        foreach ($posts_to_show as $ps) {
            $thumbnail = get_the_post_thumbnail($ps->ID, 'blog-thumb3');
            $return .= '<li class="abs">			
			<a href="' . get_permalink($ps->ID) . '">' . $thumbnail . '<p class="info-clus-p" ><b>' . $ps->post_title . '</b><p></a>
			</li>';
        }
        $return .= '</ul>';
        $link2 = get_post_type_archive_link('tender');
        $return .= '<a href="' . $link2 . '" target="_blank" class="button small normal" style="float:right;margin-top:9px;"><span class="icon-book"></span>More Tender</a>';
    } else {
        $return = '<ul class="no-bullet recent-posts m0 p0">';
        foreach ($posts_to_show as $ps) {
            $day = get_the_time('d', $ps->ID);
            $month = get_the_time('M', $ps->ID);
            $return .= '
			<li>
				<article class="row collapse">
					<div class="small-5 columns">
						<div class="mod_con_img">';
            $thumbnail = get_the_post_thumbnail($ps->ID, 'blog-thumb3');
            $postmeta = get_post_custom($ps->ID);
            if (!empty($thumbnail) && !isset($postmeta['_post_video'])) {
                $return .= '<a href="' . get_permalink($ps->ID) . '" class="post-image">' . $thumbnail . '</a>';
            } elseif (isset($postmeta['_post_video'])) {
                $return .= '<iframe src="http://player.vimeo.com/video/' . $postmeta['_post_video'][0] . '" width="146" height="96" class="post-image"></iframe>';
            } else {
                $return .= '<a href="' . get_permalink($ps->ID) . '" class="post-image">
									<img src = "http://placehold.it/155x112" alt="' . __('No image', 'Alcatron') . '" />
//.........这里部分代码省略.........
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:101,代码来源:shortcode.php


示例13: get_post_meta

$cats = get_post_meta($post->ID, "_page_portfolio_cat", $single = true);
$MyWalker = new PortfolioWalker2();
$args = array('taxonomy' => 'portfolio_category', 'hide_empty' => '0', 'include' => $cats, 'title_li' => '', 'walker' => $MyWalker, 'show_count' => '1');
$categories = wp_list_categories($args);
?>
				<!-- End Portfolio Navigation -->
			</ul>
		</div>
		
		<div class="large-12 columns">
                    <ul class="portfolio-content <?php 
echo $itemsize;
?>
">
			<?php 
echo getPageContent($pageId);
$counter = 1;
if ($wp_query->have_posts()) {
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        $custom = get_post_custom($post->ID);
        // Get the portfolio item categories
        $cats = wp_get_object_terms($post->ID, 'portfolio_category');
        if ($cats) {
            $cat_slugs = '';
            foreach ($cats as $cat) {
                $cat_slugs .= $cat->slug . " ";
            }
        }
        $link = '';
        $thumbnail = get_the_post_thumbnail($post->ID, $thumbsize);
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:31,代码来源:taxonomy-portfolio_category.php


示例14: __construct

 function __construct($title)
 {
     $this->title = $title;
     $this->namespace = "";
     $this->sections = array();
     $this->rawDump = array();
     $this->content = getPageContent($title);
     if ($this->content == NULL) {
         return false;
     }
     $this->lastrev = getRivison($title, 'older');
     $this->creation = getRivison($title, 'newer');
     $this->getSections();
     $this->bibs = extractBibs($this->content);
     $this->intent = extractIntent($this->content);
     $this->discussion = extractContent($this->content, "==Discussion==");
     $this->description = extractContent($this->content, "==Description==");
     $this->technologies = extractContent($this->content, "==Technologies==");
     $this->objective = extractContent($this->objective, "==Objective==");
 }
开发者ID:GitHubTianPeng,项目名称:101worker,代码行数:20,代码来源:Pages.php


示例15: printPageContent

/**
 * Print page content either of the current page or if requested by titlelink directly. If not both return false
 * Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example
 *
 * @param string $titlelink the titlelink of the page to print the content from
 * @param bool $published If titlelink is set, set this to false if you want to call an un-published page's content. True is default
 * @return mixed
 */
function printPageContent($titlelink = NULL, $published = true)
{
    echo getPageContent($titlelink, $published);
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:12,代码来源:zenpage-template-functions.php


示例16: preg_match

    // Getting date (first <time> datetime attribute)
    preg_match('/<time datetime="([^"]*)">(.*)<\\/time>/', $articleContent, $matches);
    $datetime = isset($matches[1]) ? $matches[1] : '';
    $datetimeFormatted = isset($matches[2]) ? $matches[2] : '';
    $timestamp = empty($datetime) ? 0 : strtotime($datetime);
    $articlesData[] = $articleData = array('datetime' => $datetime, 'datetimeFormatted' => $datetimeFormatted, 'timestamp' => $timestamp, 'title' => $title, 'filename' => $filename, 'content' => $articleContent);
    // Setting article page itself
    $pageContent = getPageContent(array($articleData), 'model.html');
    file_put_contents('../' . $filename, $pageContent);
}
// Sorting articles (last one at first)
usort($articlesData, function ($a, $b) {
    return $b['timestamp'] - $a['timestamp'];
});
// Creating RSS file
$rssContent = getPageContent($articlesData, 'feedModel.xml');
file_put_contents('../feed.xml', $rssContent);
// Creating homepage file
$articlesDataHome = array();
foreach ($articlesData as $i => $articleData) {
    if ($i >= 2) {
        $articleData['content'] = '
			<time datetime="' . $articleData['datetime'] . '">' . $articleData['datetimeFormatted'] . '</time>
			<a href="' . $articleData['filename'] . '"><h1>' . $articleData['title'] . '</h1></a>
		';
    }
    $articlesDataHome[] = $articleData;
}
$homeContent = getPageContent($articlesDataHome, 'model.html');
file_put_contents('../index.html', $homeContent);
echo "DONE\n";
开发者ID:Seb-C,项目名称:seb-c.github.io,代码行数:31,代码来源:build.php


示例17: PageContent

function PageContent()
{
    $page = Page::getInstance();
    $html = "";
    $html .= "<div class='pageWrapper-content'>";
    $html .= "<div id='pageContent' class='pageContent'>";
    $html .= getPageContent();
    $html .= "</div>";
    $html .= "</div>";
    return $html;
}
开发者ID:oliver-eifler,项目名称:olli.php,代码行数:11,代码来源:template.php


示例18: getPageContent

     if (!$page) {
         $page = '';
     }
     $view = 'textPage';
     break;
     //registration
 //registration
 case 'register':
     if (isset($_POST[''])) {
     }
     break;
     //editor
 //editor
 case 'editor':
     $editor = true;
     $page = getPageContent($view);
     if (!$page) {
         $page = '';
     }
     break;
     // uploadImage
 // uploadImage
 case 'uploadImageToEditor':
     if (isset($_POST['uploadImage'])) {
         echo uploadImage();
     } else {
         redirect();
     }
     break;
     //basket
 //basket
开发者ID:MasterRO94,项目名称:vizitki,代码行数:31,代码来源:controller.php


示例19: getHTMLMetaData

 /**
  * Prints html meta data to be used in the <head> section of a page
  *
  */
 static function getHTMLMetaData()
 {
     global $_zp_gallery, $_zp_page, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_current_article, $_zp_current_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites;
     $host = sanitize("http://" . $_SERVER['HTTP_HOST']);
     $url = $host . getRequestURI();
     // Convert locale shorttag to allowed html meta format
     $locale_ = getUserLocale();
     $locale = zpFunctions::getLanguageText($locale_, '-');
     $canonicalurl = '';
     // generate page title, get date
     $pagetitle = "";
     // for gallery index setup below switch
     $date = strftime(DATE_FORMAT);
     // if we don't have a item date use current date
     $desc = getBareGalleryDesc();
     $thumb = '';
     if (getOption('htmlmeta_sitelogo')) {
         $thumb = getOption('htmlmeta_sitelogo');
     }
     if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
         $ogimage_width = getOption('htmlmeta_ogimage_width');
         $ogimage_height = getOption('htmlmeta_ogimage_height');
         if (empty($ogimage_width)) {
             $ogimage_width = 1280;
         }
         if (empty($ogimage_height)) {
             $ogimage_height = 900;
         }
         $twittercard_type = 'summary';
     }
     $type = 'article';
     switch ($_zp_gallery_page) {
         case 'index.php':
             $desc = getBareGalleryDesc();
             $canonicalurl = $host . $_zp_gallery->getLink($_zp_page);
             $type = 'website';
             break;
         case 'album.php':
         case 'favorites.php':
             $pagetitle = getBareAlbumTitle() . " - ";
             $date = getAlbumDate();
             $desc = getBareAlbumDesc();
             $canonicalurl = $host . $_zp_current_album->getLink($_zp_page);
             if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                 $thumbimg = $_zp_current_album->getAlbumThumbImage();
                 getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
                 $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
                 $twittercard_type = 'summary_large_image';
             }
             break;
         case 'image.php':
             $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
             $date = getImageDate();
             $desc = getBareImageDesc();
             $canonicalurl = $host . $_zp_current_image->getLink();
             if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                 $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
                 $twittercard_type = 'summary_large_image';
             }
             break;
         case 'news.php':
             if (function_exists("is_NewsArticle")) {
                 if (is_NewsArticle()) {
                     $pagetitle = getBareNewsTitle() . " - ";
                     $date = getNewsDate();
                     $desc = trim(getBare(getNewsContent()));
                     $canonicalurl = $host . $_zp_current_article->getLink();
                 } else {
                     if (is_NewsCategory()) {
                         $pagetitle = $_zp_current_category->getTitlelink() . " - ";
                         $date = strftime(DATE_FORMAT);
                         $desc = trim(getBare($_zp_current_category->getDesc()));
                         $canonicalurl = $host . $_zp_current_category->getLink($_zp_page);
                         $type = 'category';
                     } else {
                         $pagetitle = gettext('News') . " - ";
                         $desc = '';
                         $canonicalurl = $host . getNewsPathNav($_zp_page);
                         $type = 'website';
                     }
                 }
             }
             break;
         case 'pages.php':
             $pagetitle = getBarePageTitle() . " - ";
             $date = getPageDate();
             $desc = trim(getBare(getPageContent()));
             $canonicalurl = $host . $_zp_current_page->getLink();
             break;
         default:
             // for all other possible static custom pages
             $custompage = stripSuffix($_zp_gallery_page);
             $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
             if (is_object($_myFavorites)) {
                 $standard['favorites'] = gettext('My favorites');
             }
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:html_meta_tags.php


示例20: getPageContent

                <div class="title-main h1">Для детей и их родителей <br>мы предлагаем программыя</div>
                <div class="circles-list cl">
                	<?php 
getPageContent('children');
?>
                </div>
            </div><!-- // wrap-bl : end -->
        </div>
        <!-- children : end -->

        <!-- about-main : start -->
        <div id="reviews" class="about-main">
            <div class="title-main h1">О нас</div>
            <div class="wrap-bl cl">
            	<?php 
getPageContent('reviews');
?>
            </div>
            <a class="more-about btn-submit easing" href="javascript://">Ещё отзывы</a>
        </div>
        <!-- about-main : end -->

        <!-- contacts-main : start -->
        <div id="contacts" class="contacts-main">
            <div class="title-main h1">Контакты</div>
            <div class="map-bl">
                <div class="map-info box-sizing">
                	<?php 
get_custom_field('contact_adress');
?>
                    <a class="сall-back-link btn-submit easing" href="javascript://">Заказать тур</a>
开发者ID:Omletina,项目名称:Red-bor,代码行数:31,代码来源:template.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPageInfo函数代码示例发布时间:2022-05-15
下一篇:
PHP getPage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap