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); }
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; }
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(); }
?> " 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
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 }
<?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
</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) {
function is_post() { return trim(article_url()) != ""; }
<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 }
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(); }
<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>
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 }
<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 } ?>
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']; ?> </td></tr> <tr><th>srcid</th><td><?php echo $art['srcid']; ?> </td></tr> <tr><th>total_comments</th><td><?php echo $art['total_comments']; ?> </td></tr> <tr><th>total_bloglinks</th><td><?php echo $art['total_bloglinks']; ?> </td></tr> <tr><th>needs_indexing</th><td><?php echo $art['needs_indexing']; ?> </td></tr> <tr><th>last_similar</th><td><?php echo $art['last_similar']; ?> </td></tr> <tr><th>last_comment_check</th><td><?php echo $art['last_comment_check']; ?> </td></tr> <tr><th>images</th><td> <ul> <?php foreach ($art['images'] as $im) { ?> <li> <a href="<?php echo $im['url']; ?> "><?php echo $im['url']; ?> </a><br/> caption: <?php echo h($im['caption']); ?> <br/> credit: <?php echo h($im['credit']); ?> <br/> <?php } ?> </ul> </td> </table> <h2>content</h2> <?php if (is_null($art['content'])) { ?> <p> -- content not scraped -- </p> <?php } else { ?> <table border=1> <tr><th>displayed</th><th>source HTML</th></tr> <tr> <td width="50%"> <?php echo $art['content']; ?> </td> <td width="50%"> <?php $srchtml = htmlentities($art['content'], ENT_COMPAT, 'UTF-8'); $srchtml = str_replace("\n", "<br>\n", $srchtml); print $srchtml; ?> </td> </tr> </table> <?php } ?> <h2>similar articles</h2> <a href="/adm/article?id=<?php echo $art['id']; ?> &action=update_similar">Run similar-articles tool now</a> (to update the list)<br/> <table> <tr><th>score</th><th>other article</th></tr> <?php foreach ($similar_articles as $sim) { ?> <tr> <td><?php echo $sim['score']; ?> </td> <td> <a href="/adm/article?id=<?php echo $sim['id']; ?> "><?php echo $sim['title']; ?> </a>, <?php echo $sim['srcorgname']; ?> , <?php echo $sim['pubdate']; ?> </td> <?php } ?> </table> <?php }
</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">
echo $art['srcorgname']; ?> ,</span> <abbr class="published" title="<?php echo $art['iso_pubdate']; ?> "><?php echo $art['pretty_pubdate']; ?> </abbr> <br/> <?php if ($art['id']) { ?> <a href="<?php echo article_url($art['id']); ?> ">More about this article</a><br/> <?php } ?> </li> <?php } ?> </ul> <?php if ($arts->multi_page()) { ?> <div class="paginator">page <?php echo $arts->paginator()->render(); ?>
echo article_date(); ?> </time> By <?php echo article_author('real_name'); ?> </h3> <div class="animated bounceInLeft"> <div class="addthis_sharing_toolbox"></div> <?php $pageTitle = article_title() . ' - DownloadMii Blog'; $buffer = ob_get_contents(); ob_end_clean(); $buffer = str_replace("%TITLE%", $pageTitle, $buffer); $buffer = str_replace("%DESCRIPTION%", article_title(), $buffer); $buffer = str_replace("%SOCIAL_TITLE%", $pageTitle, $buffer); $buffer = str_replace("%SOCIAL_URL%", article_url(), $buffer); $buffer = str_replace("%SOCIAL_DESC%", article_description(), $buffer); echo $buffer; if (article_custom_field('appnameField1', 'null') != 'null') { ?> App: <a href="https://www.downloadmii.com/apps/view/<?php echo article_custom_field('appnameField1_GUID'); ?> "><?php echo article_custom_field('appnameField1'); ?> </a> <br /> <?php } ?>
} } $type = 1; $base_url = 'http://www.qvdhd.com'; $count = 1; $countLimit = 30000; $model = new model(); $startIndex = $model->getMaxIndex($type); $sitemap = '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; $tmp = ''; /**/ for ($p = $startIndex;; $p++) { $list = $model->getList($p, $countLimit); $list = $list ? $list : array(); foreach ($list as $val) { $tmp .= '<url><loc>' . $base_url . article_url($val['id']) . '</loc><lastmod>' . date('Y-m-d', $val['utime']) . '</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>'; } if ($tmp) { $tmp = $sitemap . $tmp . '</urlset>'; $index_file = BASEPATH . 'google_sitemap' . $p . '.xml'; file_put_contents($index_file, $tmp); $model->addIndex(array('type' => $type, 'aid' => 0, 'index' => $p, 'update' => $val['utime'])); $tmp = ''; sleep(5); } if (count($list) == $countLimit) { $model->setIndex(array('aid' => 1), array('`index`' => $p, '`type`' => $type)); } if (empty($list)) { break; }
echo article_author('real_name'); ?> . </footer> <hr> </article> </li> <?php $i = 0; while (posts()) { ?> <li> <article class="wrap"> <h2> <a href="<?php echo article_url(); ?> " title="<?php echo article_title(); ?> "><?php echo article_title(); ?> </a> </h2> <footer> Posted <time datetime="<?php echo date(DATE_W3C, article_time()); ?> "><?php
echo date('F jS, Y', article_time()); ?> </time></p> <p class="intro"><?php echo article_description(); ?> </p> </hgroup> </header> <?php echo article_markdown(); ?> <a href="http://twitter.com/share?url=<?php echo full_url() . substr(article_url(), 1); ?> &text=<?php echo article_title(); ?> &via=<?php echo twitter_account(); ?> " class="share">Share</a> </article> </section> </div> </article> <!-- End hacky wrap that changes nav color -->