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


PHP article_url函数代码示例

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


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

示例1: fmt

 function fmt($row)
 {
     $url = article_url($row['id']);
     $permalink = $row['permalink'];
     $adm_url = article_adm_url($row['id']);
     return sprintf('<a href="%s">%s</a><small> [<a href="%s">source</a>]</small>', $adm_url, $row['title'], $permalink);
 }
开发者ID:bcampbell,项目名称:journalisted,代码行数:7,代码来源:scrape.php

示例2: getArticleListByCid

 function getArticleListByCid($cid, $order, $page, $limit)
 {
     switch ($order) {
         case 1:
             $order = ' ORDER BY a.hits ASC ';
             break;
         case 2:
             $order = ' ORDER BY a.hits DESC ';
             break;
         default:
             $order = ' ORDER BY a.ptime DESC ';
     }
     $page = intval($page) - 1;
     $page = $page > -1 ? $page : 0;
     $limit = intval($limit);
     $page *= $limit;
     if ($cid) {
         $cids = $this->getAllCateidsByCid($cid);
         $cids = implode(',', $cids);
         $where = ' a.`cid` in (' . $cids . ') AND ';
     }
     $sql = sprintf("SELECT a.`id`, a.`cid`, a.`uid`,c.`name` as cname,c.atotal, a.`name`, a.`ptime`, a.`utime`, a.`cover`, a.`hits` FROM " . $this->db->getTable('emule_article') . " as a LEFT JOIN " . $this->db->getTable('emule_cate') . " as c ON(a.cid=c.id) WHERE %s a.`flag`=1 AND c.flag=1 %s LIMIT %d,{$limit}", $where, $order, $page);
     $list = $this->db->result_array($sql);
     if (!is_array($list)) {
         return array();
     }
     foreach ($list as &$v) {
         $v['url'] = article_url($v['id']);
     }
     return $list;
 }
开发者ID:ron-chen,项目名称:q_v_o_d_p_2_p,代码行数:31,代码来源:setindexdatacache.php

示例3: emit_page_article

function emit_page_article($art)
{
    $pagetitle = $art['title'];
    $params = array('canonical_url' => article_url($art['id']));
    page_header($pagetitle, $params);
    extract($art);
    include "../templates/article.tpl.php";
    page_footer();
}
开发者ID:bcampbell,项目名称:journalisted,代码行数:9,代码来源:article.php

示例4: base_url

    ?>
" class="img-responsive" src="<?php 
    echo base_url();
    ?>
assets/portal/banner/190x75.gif" />
												<!--<img width="120" height="50" alt="<?php 
    echo $data->article_name;
    ?>
" src="#" />-->
											</div>
											<div class="col-lg-8 col-md-8">
												<h3 class="title-list-sidebar-tengah-kanan"><a title='<?php 
    echo $data->article_name;
    ?>
' href="<?php 
    echo article_url($data);
    ?>
"><?php 
    echo $data->article_name;
    ?>
</a></h3> <span class="time-lead-list small"><em><?php 
    echo article_type($data);
    ?>
 - <?php 
    echo article_time_index($data->article_created);
    ?>
 yang lalu</em></span>
											</div>
										</div>
									</div>
								<?php 
开发者ID:prakasa1904,项目名称:SystemTM,代码行数:31,代码来源:home.php

示例5: journo_emitAllArticles

function journo_emitAllArticles(&$journo)
{
    $artificial_limit = 5000;
    // TODO: use paging to remove artificial 5000 limit
    $arts = journo_collectArticles($journo, $artificial_limit, 0);
    ?>
 <h2>Articles by <a href="/<?php 
    echo $journo['ref'];
    ?>
"><?php 
    echo $journo['prettyname'];
    ?>
</a></h2>
  <p><?php 
    echo sizeof($arts);
    ?>
 articles:</p>
  <ul class="art-list">


<?php 
    unset($a);
    foreach ($arts as $art) {
        ?>
    <li class="hentry">
        <h4 class="entry-title"><a class="extlink" href="<?php 
        echo $art['permalink'];
        ?>
"><?php 
        echo $art['title'];
        ?>
</a></h4>
        <span class="publication"><?php 
        echo $art['srcorgname'];
        ?>
,</span>
        <abbr class="published" title="<?php 
        echo $art['iso_pubdate'];
        ?>
"><?php 
        echo $art['pretty_pubdate'];
        ?>
</abbr>
        <?php 
        if ($art['buzz']) {
            ?>
 (<?php 
            echo $art['buzz'];
            ?>
)<?php 
        }
        ?>
<br/>
        <?php 
        if ($art['id']) {
            ?>
 <a href="<?php 
            echo article_url($art['id']);
            ?>
">More about this article</a><br/> <?php 
        }
        ?>
    </li>
<?php 
    }
    ?>

  </ul>

  <p>Article(s) missing? If you notice an article is missing,
  <a href="/missing?j=<?php 
    echo $journo['ref'];
    ?>
">click here</a></p>
<?php 
}
开发者ID:bcampbell,项目名称:journalisted,代码行数:76,代码来源:journo.php

示例6: defined

<?php

defined('IN_CMS') or die('No direct access allowed.');
$home = is_postspage();
$url = isset($url) && !$home ? $url : article_url();
$title = isset($title) && !$home ? $title : article_title();
$time = isset($time) && !$home ? $time : article_time();
$excerpt = isset($excerpt) && !$home ? $excerpt : trim(article_description());
$excerpt = $excerpt == "" ? false : $excerpt;
$content = isset($content) && !$home ? $content : article_html();
$image = isset($image) && !$home ? $image : article_custom_field('img', false);
$isArticle = isset($isArticle) && $isArticle;
$uurl = urlencode(full_url());
$utitle = urlencode($title);
$tags = array("theme_url" => theme_url());
foreach ($tags as $s => $r) {
    $content = str_replace("{" . $s . "}", $r, $content);
}
?>
<li class="<?php 
if (isset($first) && $first) {
    echo "showContent";
}
if (!$time) {
    echo " noFooter";
}
echo is_single() ? " single" : " multiple";
?>
">
	<header tabindex="-1">
		<!--<a href="<?php 
开发者ID:nathggns,项目名称:Light,代码行数:31,代码来源:template.php

示例7: comment_url

			</small>
			<br>
			<small class="info">
				<a href="<?php 
echo comment_url($comment->comment_id);
?>
">#<?php 
echo $comment->comment_id;
?>
</a>
				<?php 
echo $comment->comment_date;
?>
 - 
				Article: <a href="<?php 
echo article_url($comment->article_id, $comment->article_url);
?>
"><?php 
echo $comment->article_title;
?>
</a>
			</small>
			<p><?php 
echo $comment->comment_content;
?>
</p>
		</article>

		<?php 
$i = 0;
foreach ($answers as $answer) {
开发者ID:romrz,项目名称:SimpleBlog,代码行数:31,代码来源:view.php

示例8: is_post

function is_post()
{
    return trim(article_url()) != "";
}
开发者ID:nathggns,项目名称:Light,代码行数:4,代码来源:functions.php

示例9: foreach

<h1>Articulos</h1>

<?php 
foreach ($articles as $article) {
    ?>

<article>
	<h3 class="inline">
		<a href="<?php 
    echo article_url($article->article_url, $article->article_date);
    ?>
"><?php 
    echo $article->article_title;
    ?>
</a>
	</h3>
	<span class="inline">
		<small><a href="<?php 
    echo edit_article_url($article->article_id);
    ?>
">Editar</a></small>
		<small><a href="<?php 
    echo del_article_url($article->article_id);
    ?>
">Eliminar</a></small>
	</span>
</article>

<?php 
}
开发者ID:romrz,项目名称:SimpleBlog,代码行数:30,代码来源:articles.php

示例10: template

function template($vars)
{
    extract($vars);
    admPageHeader();
    if (is_null($art_id)) {
        ?>
<h2>Create Article</h2>
<?php 
    } else {
        ?>
<h2>Edit Article</h2>
go to <a href="<?php 
        echo article_url($art_id);
        ?>
">public page</a>, <a href="<?php 
        echo article_adm_url($art_id);
        ?>
">admin page</a>
<?php 
    }
    ?>
<form action="/adm/editarticle" method="POST">
<table>
<?php 
    echo $form->as_table();
    ?>
</table>
<input type="submit" name="submit" value="Submit" />
</form>
<?php 
    admPageFooter();
}
开发者ID:bcampbell,项目名称:journalisted,代码行数:32,代码来源:editarticle.php

示例11: article_url

<h3>El articulo ha sido guardado correctamente.</h3>
<h5><a href="<?php 
echo article_url($article_id, $article_url);
?>
"><?php 
echo $article_title;
?>
</a></h5>
开发者ID:romrz,项目名称:SimpleBlog,代码行数:8,代码来源:insert_article_success.php

示例12: _emit_finished

    function _emit_finished()
    {
        ?>
    <div class="infomessage">
    <p>Thank you - the article '<a href="<?php 
        echo article_url($this->article['id']);
        ?>
"><?php 
        echo h($this->article['title']);
        ?>
</a>' has been added to your page.
</p>
    </div>
<?php 
    }
开发者ID:bcampbell,项目名称:journalisted,代码行数:15,代码来源:missing.php

示例13: article_url

    <ul>
  </div>
  <div class="foot"></div>
</div>
<?php 
}
?>

<?php 
if (!$quick_n_nasty && $most_commented) {
    ?>
<div class="box">
  <div class="head"><h3>Most commented-on</h3></div>
  <div class="body">
    <a href="<?php 
    echo article_url($most_commented['id']);
    ?>
"><?php 
    echo $most_commented['title'];
    ?>
</a>
    (<?php 
    echo $most_commented['total_comments'];
    ?>
 comments)
  </div>
  <div class="foot"></div>
</div>
<?php 
}
?>
开发者ID:bcampbell,项目名称:journalisted,代码行数:31,代码来源:journo.tpl.php

示例14: EmitArticle

function EmitArticle($art)
{
    $orgs = get_org_names();
    $orgname = $orgs[$art['srcorg']];
    $sql = <<<EOT
SELECT a.id, a.title, a.pubdate, a.srcorg, s.score
    FROM (article_similar s INNER JOIN article a ON a.id=s.other_id )
    WHERE s.article_id=?
    ORDER BY s.score DESC
EOT;
    $similar_articles = db_getAll($sql, $art['id']);
    foreach ($similar_articles as &$sim) {
        $sim['srcorgname'] = $orgs[$sim['srcorg']];
    }
    unset($sim);
    $urls = db_getAll("SELECT url FROM article_url WHERE article_id=?", $art['id']);
    ?>
<table border="1">
<tr><th>title</th><td><h2><?php 
    echo $art['title'];
    ?>
</h2><a class="button edit" href="/adm/editarticle?id36=<?php 
    echo article_id_to_id36($art['id']);
    ?>
">edit article</a></td></tr>
<tr><th>status</th><td><?php 
    echo $art['status'];
    ?>
</td></tr>
<tr><th>id</th><td><?php 
    echo $art['id'];
    ?>
 [<a href="<?php 
    echo article_url($art['id']);
    ?>
">go to article page</a>]
<tr><th>srcorg</th><td><?php 
    echo $orgname;
    ?>
 (id <?php 
    echo $art['srcorg'];
    ?>
)</td></tr>
<tr><th>urls</th><td>
    permalink: <a href="<?php 
    echo $art['permalink'];
    ?>
"><?php 
    echo $art['permalink'];
    ?>
</a><br/>
    srcurl: <a href="<?php 
    echo $art['srcurl'];
    ?>
"><?php 
    echo $art['srcurl'];
    ?>
</a><br/>
    all urls <?php 
    echo sizeof($urls);
    ?>
:
    <ul><?php 
    foreach ($urls as $foo) {
        $url = $foo['url'];
        ?>
        <li><a href="<?php 
        echo $url;
        ?>
"><?php 
        echo $url;
        ?>
</a></li>
    <?php 
    }
    ?>
</ul>
</td></tr>
<tr><th>pubdate</th><td><?php 
    echo $art['pubdate'];
    ?>
</td></tr>
<tr><th>lastscraped</th><td><?php 
    echo $art['lastscraped'];
    ?>
</td></tr>
<tr><th>byline</th>
  <td>
  raw byline: "<?php 
    echo $art['byline'];
    ?>
"<br/>
  attributed to:<br/>
  <?php 
    EmitAttribution($art);
    ?>
  </td>
</tr>
<tr><th>description</th><td><?php 
    echo $art['description'];
//.........这里部分代码省略.........
开发者ID:bcampbell,项目名称:journalisted,代码行数:101,代码来源:article.php

示例15: article_url

    </ul>

  </div>
  <div class="pager">
<?php 
if ($sim_showall != 'yes') {
    ?>
    <a href="<?php 
    echo article_url($article_id, $sim_orderby, 'yes');
    ?>
">Show all similar articles</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo article_url($article_id, $sim_orderby, 'no');
    ?>
">Show first 10 only</a>
<?php 
}
?>
  </div>
  <div class="foot"></div>
</div>


</div> <!-- end main -->


<div class="sidebar">
开发者ID:bcampbell,项目名称:journalisted,代码行数:30,代码来源:article.tpl.php


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