本文整理汇总了PHP中tags函数的典型用法代码示例。如果您正苦于以下问题:PHP tags函数的具体用法?PHP tags怎么用?PHP tags使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tags函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: update
/**
* (non-PHPdoc)
* 修改方法
* @see CommonAction::update()
*/
public function update()
{
unset($_POST['__hash__']);
if (tags($_POST) > 0) {
$this->success(L('_SUCCESS_'));
} else {
$this->error(L('_ERROR_'));
}
}
开发者ID:tmlsoft,项目名称:main,代码行数:14,代码来源:TagsAction.class.php
示例2: round
$file['size'] = round($size / 1048576) . ' MB';
} else {
$file['size'] = round($size / 1024) . ' KB';
}
}
} else {
$file['size'] = 'File not found';
$file['url'] = '#';
}
#Mark
if (isset($cfg['frate']) && $file['opt'] & 4) {
$view->css(SKIN_DIR . 'rate.css');
$rate = 'vote.php?type=2&id=' . $id;
} else {
$rate = 0;
}
#Date, author
$file['date'] = genDate($file['date'], true);
$file['author'] = autor($file['author']);
#Template
$view->add('file', array('file' => &$file, 'path' => catPath($file['cat']), 'rates' => $rate, 'edit' => admit($file['cat'], 'CAT') ? url('edit/2/' . $id, 'ref') : false, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['files'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/files')));
#Tags
if (isset($cfg['tags'])) {
include './lib/tags.php';
tags($id, 2);
}
#Comments
if (isset($cfg['fcomm']) && $file['opt'] & 2) {
require './lib/comm.php';
comments($id, 2);
}
开发者ID:BGCX067,项目名称:f3site-svn-to-git,代码行数:31,代码来源:file.php
示例3: array
" class="post">
<?php
echo $this->template->render('blog/_author', array('post' => $post));
?>
<h1><?php
echo $post['title'];
?>
<?php
echo post_control($post);
?>
</h1>
<?php
echo $post['full'];
?>
<div class="tags"><span class="icon icon-tags"></span>Тэги: <?php
echo tags($post);
?>
</div>
</div>
<hr/>
<div class="share">
<noindex>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_vk"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_livejournal"></a>
<a class="addthis_button_google_plusone_share"></a>
<a class="addthis_button_blogger"></a>
<a class="addthis_button_evernote"></a>
开发者ID:ak826843,项目名称:bmf,代码行数:31,代码来源:show.php
示例4: tags_link
" height="<?php
echo $height;
?>
"/>
</a>
<?if($mater[$n]['PROPERTY'][0]['metka']['~VALUE']!=''):?>
<div class="tag row">
<?
$link_tag = tags_link($mater[$n]['PROPERTY'][0]['metka']['~VALUE']);
?>
<a href="<?php
echo $link_tag;
?>
" class="link_tag">
<div class="name-tag"><?php
echo tags($mater[$n]['PROPERTY'][0]['metka']['~VALUE']);
?>
</div>
<div class="trigon"></div>
</a>
</div>
<?endif;?>
<div class="pad_10_15 name-item">
<h3>
<a href="/<?php
echo $mater[$n]['PROPERTY'][0]['type']['VALUE_XML_ID'];
?>
/<?php
echo $mater[$n]['CODE'];
?>
/"><?php
开发者ID:CheBurashka334,项目名称:crado,代码行数:31,代码来源:nextpage_outcity.php
示例5: cbdate
echo $firstrating;
} else {
echo $vrating . '.0';
}
?>
</video:rating>
<video:view_count><?php
echo $video['views'];
?>
</video:view_count>
<video:publication_date><?php
echo cbdate("Y-m-d H:i:s", strtotime($video['date_added']));
?>
</video:publication_date>
<?php
$vtags = strip_tags(tags($video['tags'], 'video'));
$vtableau = explode(",", $vtags);
for ($i = 0; $i < sizeof($vtableau); $i++) {
echo '<video:tag><![CDATA[' . trim($vtableau[$i]) . ']]></video:tag>';
}
?>
<video:category><?php
echo strip_tags(categories($video['category'], 'video'));
?>
</video:category>
<video:family_friendly>yes</video:family_friendly>
<video:duration><?php
$defaultime = $video['duration'];
$dotfixed = explode(".", $defaultime);
echo $dotfixed[0] . $dotfixed[1];
?>
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:sitemap.php
示例6: tags
<?php
function tags($a, $b)
{
return "<i>{$a}</i><i>{$b}</i>";
}
print tags('i', 'Yay');
print tags('i', 'Hello');
print tags('cite', 'Yay');
?>
开发者ID:dasasathyan,项目名称:backupat050216,代码行数:10,代码来源:tag.php
示例7: fbrogmt
function fbrogmt()
{
if (is_plugin_active('shopp/Shopp.php')) {
if (shopp('catalog', 'is-product')) {
$meta[] = __(trim(shopp('product', 'name', 'return=1'))) . ' - ' . shopp('product', 'price', 'return=1');
$meta[] = shopp('product', 'link', 'return=1');
$meta[] = get_option('blogname');
//Site name
//get summary, or use description if no summary is set.
$description = trim(strip_tags(shopp('product', 'summary', 'return=1')));
$long_description = trim(strip_tags(shopp('product', 'description', 'return=1')));
if ('' == $description) {
$description = $long_description;
}
//truncate description to 300
if (strlen($description) > 300) {
$description = substr($description, 0, 297) . '...';
}
$meta[] = $description;
$meta[] = 'product';
foreach (all_images_shopp() as $img_meta) {
// The loop to dish out all the images meta tags explained lower
echo $img_meta;
}
} else {
if (is_single()) {
// Post
if (have_posts()) {
while (have_posts()) {
the_post();
$meta[] = get_the_title($post->post_title);
// Gets the title
$meta[] = get_permalink();
// gets the url of the post
$meta[] = get_option('blogname');
//Site name
$meta[] = the_excerpt_max_charlength(300) . '...';
//Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
$meta[] = 'article';
// $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now
foreach (all_images() as $img_meta) {
// The loop to dish out all the images meta tags explained lower
echo $img_meta;
}
}
}
} elseif (is_page()) {
// Page
if (have_posts()) {
while (have_posts()) {
the_post();
$meta[] = get_the_title($post->post_title);
// Gets the title
$meta[] = get_permalink();
// gets the url of the post
$meta[] = get_option('blogname');
//Site name
$meta[] = the_excerpt_max_charlength(300) . '...';
//Description comes from the excerpt, because by using the_content, it will dish out the [caption id...]
$meta[] = 'article';
// $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now
foreach (all_images() as $img_meta) {
// The loop to dish out all the images meta tags explained lower
echo $img_meta;
}
}
}
} elseif (is_category()) {
global $post, $wp_query;
$category_id = get_cat_ID(single_cat_title('', false));
// Get the URL of this category
$category_link = get_category_link($category_id);
$term = $wp_query->get_queried_object();
if (is_plugin_active('wordpress-seo/wp-seo.php')) {
//checks for yoast seo plugin for description of category
$metadesc = wpseo_get_term_meta($term, $term->taxonomy, 'desc');
} else {
$metadesc = category_description($category_id);
}
$meta[] = wp_title('', false);
//Title
$meta[] = $category_link;
//URL
$meta[] = get_option('blogname');
//Site name
$meta[] = $metadesc;
//Description
$meta[] = 'website';
foreach (all_images() as $img_meta) {
// The loop to dish out all the images meta tags explained lower
echo $img_meta;
}
} elseif (is_home() || is_front_page()) {
$meta[] = get_option('blogname');
//Title
$meta[] = get_option('siteurl');
//URL
$meta[] = get_option('blogname');
//Site name
$meta[] = get_option('blogdescription');
//.........这里部分代码省略.........
开发者ID:fwelections,项目名称:fwelections,代码行数:101,代码来源:index.php
示例8: tags_link
{
$arFields = $ob->GetFields();
$active = $arFields['ACTIVE'];
}
if($active=='Y'):
?>
<div class="tag row left">
<?
$link_tag = tags_link($id_metka);
?>
<a href="<?php
echo $link_tag;
?>
" class="link_tag">
<div class="name-tag"><?php
echo tags($id_metka);
?>
</div>
<div class="trigon"></div>
</a>
</div>
<?endif?>
<?endforeach;?>
</div>
<?endif;?>
<div class="social">
<?$APPLICATION->IncludeComponent("bitrix:asd.favorite.button", "crado", Array(
"FAV_TYPE" => "content", // Тип избранного
"BUTTON_TYPE" => "fav", // Тип кнопки
开发者ID:CheBurashka334,项目名称:crado,代码行数:31,代码来源:template.php
示例9: res_NubeTextoPeriodo
function res_NubeTextoPeriodo($idPregunta, $idPeriodo)
{
$base = new PDOConfig();
$idPregunta = $base->filtrar($idPregunta);
$palabras = array();
$lista = array();
$texto = "";
$sqlResp = "SELECT RespuestaTexto from respuestaspreguntas R INNER JOIN respuestas E ON R.idRespuesta = E.idRespuesta\r\n WHERE E.idPeriodo = {$idPeriodo} AND R.idPregunta = {$idPregunta}";
$resOps = $base->query($sqlResp);
if ($resOps) {
$resultado = $resOps->fetchAll(PDO::FETCH_ASSOC);
foreach ($resultado as $row) {
$texto .= " " . $row["RespuestaTexto"];
}
//echo $texto;exit();
$palabras = tags(quitarAcentos($texto));
$lista = repeatedElements($palabras, true);
//print_r($lista);exit();
return json_encode($lista);
} else {
return "0";
}
}
开发者ID:uncsurveysCF,项目名称:2015,代码行数:23,代码来源:modeloPreguntas.php
示例10: tr_date
</div>
<div class="post post-info">
<span class="date">
<?php
echo tr_date('d F Y', $created_at->sec);
?>
</span>
<span class="category">
<?php
echo categories($categories);
?>
</span>
<span class="tags">
<?php
echo tags($tags);
?>
</span>
<span class="read">
<?php
echo $counter;
?>
kez okundu.
</span>
</div>
<div class="row post-share">
<div class="span5">
<?php
echo anchor('http://feeds.feedburner.com/' . get_option('feedburner_username'), 'Yazılarımızı RSS ile takip edebilirsiniz.');
?>
开发者ID:navruzm,项目名称:navruz.net,代码行数:31,代码来源:index.php
示例11: register_shutdown_function
if (isset($cfg['arate']) && $art['catOpt'] & 4) {
$view->css(SKIN_DIR . 'rate.css');
$rates = 'vote.php?type=1&id=' . $id;
} else {
$rates = 0;
}
#Count popularity
if (isset($cfg['adisp'])) {
register_shutdown_function(array($db, 'exec'), 'UPDATE ' . PRE . 'arts SET views=views+1 WHERE ID=' . $id);
++$art['views'];
} else {
$art['ent'] = 0;
}
#Pages
if ($art['pages'] > 1) {
$pages = pages($page, $art['pages'], 1, url('art/' . $id), 0, '/');
} else {
$pages = false;
}
#Template
$view->add('art', array('art' => &$art, 'pages' => &$pages, 'path' => catPath($art['cat']), 'edit' => admit($art['cat'], 'CAT') ? url('edit/1/' . $id, 'ref=' . $page) : false, 'color' => $art['opt'] & 4, 'rates' => $rates, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['arts'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/articles'), 'lightbox' => isset($cfg['lightbox'])));
#Tags
if (isset($cfg['tags'])) {
include './lib/tags.php';
tags($id, 1);
}
#Comments
if (isset($cfg['acomm']) && $art['catOpt'] & 2) {
require './lib/comm.php';
comments($id, 1);
}
开发者ID:BGCX067,项目名称:f3site-svn-to-git,代码行数:31,代码来源:art.php
示例12: foreach
if (count($files) == 0) {
echo '<div class="alert alert-info"><strong>Oups!</strong> Aucune actualitée pour le moment...</div>';
} else {
foreach ($files as $file) {
$user = User::getUserById($file->id_user);
$list_avatars = Avatar::getAvatarsByUserId($file->id_user);
echo '<hr/>';
echo '<div class="post">
<a href="' . url('profil/view/' . $file->id_user) . '"><img src="' . $list_avatars[0]->getMiniatureLink() . '" class="img-polaroid avatar-little" alt="Voir le profil de ' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . '" title="Voir le profil de ' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . '" /></a>
<h4>' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . ' a partagé : <small>(le ' . $file->date . ')</small> <span class="label label-important">' . $file->type . '</span></h4>
<div class="well">
<blockquote>
<p>' . $file->desc . '</p>
</blockquote>
' . $file->getHTML() . '
<p class="tags"><i class="icon-tags"></i> Tags: ' . tags($file->keywords) . '</p>
</div>
</div>';
}
}
?>
</div>
<div class="span4">
<h3>Actions:</h3>
<div class="dropdown">
<button class="dropdown-toggle btn" data-toggle="dropdown" >Dérouler <span class="caret"></span></button>
<a href="" class="btn btn-info"><i class="icon-refresh icon-white"></i></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li><a tabindex="-1" href="<?php
echo url('flux/share');
?>
开发者ID:googlecode-mirror,项目名称:bdm-wavebook-2012,代码行数:31,代码来源:flux_index.php
示例13: trim
{
$string = trim(strip_tags(html_entity_decode(urldecode($string))));
if (empty($string)) {
return false;
}
$extras = array('p' => array('ante', 'bajo', 'con', 'contra', 'desde', 'durante', 'entre', 'hacia', 'hasta', 'mediante', 'para', 'por', 'pro', 'segun', 'sin', 'sobre', 'tras', 'via'), 'a' => array('los', 'las', 'una', 'unos', 'unas', 'este', 'estos', 'ese', 'esos', 'aquel', 'aquellos', 'esta', 'estas', 'esa', 'esas', 'aquella', 'aquellas', 'usted', 'nosotros', 'vosotros', 'ustedes', 'nos', 'les', 'nuestro', 'nuestra', 'vuestro', 'vuestra', 'mis', 'tus', 'sus', 'nuestros', 'nuestras', 'vuestros', 'vuestras', 'tengo'), 'o' => array('esto', 'que'));
$string = strtr(mb_strtolower((string) $string, $encoding), 'âàåáäèéêëïîìíôöòóúûüùñ', 'aaaaaeeeeiiiioooouuuun');
if (preg_match_all('/\\pL{3,}/s', $string, $m)) {
$m = array_diff(array_unique($m[0]), $extras['p'], $extras['a'], $extras['o']);
}
return $m;
}
//print_r(tags($busqueda));
include_once 'conexion.php';
$contador2 = 0;
foreach (tags($busqueda) as $valor) {
$contador = 0;
$consulta = "SELECT * FROM deseos WHERE cumplido = 'n' AND deseo like '%{$valor}%' ";
$result = mysql_query($consulta) or die('Ha fallado la conexión: ' . mysql_error());
$array = mysql_fetch_array($result);
$total_registros = mysql_num_rows($result);
do {
$id = $array['id'];
$id_usuario = $array['id_usuario'];
$consulta3 = "SELECT * FROM usuarios WHERE id = '{$id_usuario}' ";
$result3 = mysql_query($consulta3) or die('Ha fallado la conexión: ' . mysql_error());
$array3 = mysql_fetch_array($result3);
$total_registros3 = mysql_num_rows($result3);
do {
$nombre = $array3['nombre'];
} while ($array3 = mysql_fetch_array($result3));
开发者ID:elhackaton,项目名称:elhackaton-2015-equipo-03,代码行数:31,代码来源:resultado_busqueda.php
示例14: get_subscription_photo
/**
* This function get photo details, setups an array for content.
* This also serves as an example on how to use custom callback
* for subscription type
*
* @author Fawaz Tahir <[email protected]>
* @param type $id
* @return array|boolean
*/
function get_subscription_photo($id)
{
global $cbphoto, $userquery;
$photo = $cbphoto->get_photo($id, true);
if ($photo) {
$fields = array('photo_description', 'photo_tags', 'collection_id', 'collection_name', 'views', 'file_directory', 'server_url', 'broadcast', 'date_added');
$fields = get_photo_fields($fields);
foreach ($fields as $field) {
if ($field == 'photo_details') {
continue;
}
$details[$field] = $photo[$field];
}
$details['title'] = $photo['photo_title'];
$details['description'] = $photo['photo_descritpion'];
$details['tags'] = tags($photo['photo_tags'], "photos");
$details['heading'] = sprintf(lang('<a href="%s">%s</a> added a new photo in <a href="%s">%s</a>'), $userquery->profile_link($photo), name($photo), collection_links($photo), $photo['collection_name']);
$details['link'] = view_photo_link($photo);
$details['thumb'] = get_image_url($photo, 'm');
return $details;
}
return false;
}
开发者ID:yukisky,项目名称:clipbucket,代码行数:32,代码来源:functions_subscriptions.php
示例15: elseif
} elseif (!UID) {
return;
}
}
#Evaluate PHP first
if ($page['opt'] & 16) {
ob_start();
eval('?>' . $page['text']);
$page['text'] = ob_get_clean();
}
#Emoticons
if ($page['opt'] & 2) {
$page['text'] = emots($page['text']);
}
#Line breaks
if ($page['opt'] & 1) {
$page['text'] = nl2br($page['text']);
}
#Page title, template
$view->title = $page['name'];
$view->add('page', array('page' => &$page, 'box' => $page['opt'] & 4, 'all' => $edit ? url('pages', '', 'admin') : false, 'edit' => $edit ? url('editPage/' . $id, 'ref', 'admin') : false));
#Keywords
if (isset($cfg['tags'])) {
include './lib/tags.php';
tags($id, 59);
}
#Comments
if ($page['opt'] & 8) {
require './lib/comm.php';
comments($id, 59);
}
开发者ID:BGCX067,项目名称:f3site-svn-to-git,代码行数:31,代码来源:page.php
示例16: tags
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="hu" xml:lang="hu">
<head>
<?php
require 'adatbazis.php';
include 'functions.php';
?>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<title>Régi Magyar Exemplumadatbázis</title>
<meta name="author" content="Bartók Zsófia Ágnes">
<meta name="description" content="Régi Magyar Exemplumadatbázis: Kereső">
<meta itemscope itemtype="CreativeWork" itemprop="keywords" name="keywords" content="exemplum, adatbazis, regi, magyar, irodalom, egyhazi, elte, btk, középkor<?php
tags();
?>
">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56011780-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body id="index">
开发者ID:simonzsolt,项目名称:rmex,代码行数:31,代码来源:index.php
示例17: die
die('Failed Query');
}
while ($row = $result->fetch_assoc()) {
print "http://dropbox.easytospell.net/thumb/{$row['id']}/{$row['id']}.jpg\n";
}
}
print "GET\n";
print var_dump($_GET);
print "POST\n";
print var_dump($_POST);
$args = explode('/', $_GET['args']);
switch ($_GET['cmd']) {
case 'get':
switch ($args[0]) {
case 'tags':
tags($db);
break;
case 'images':
images($db);
break;
case 'thumbs':
thumbs($db);
break;
}
break;
}
?>
api methods:
get:
tags:
开发者ID:richardmarshall,项目名称:image-dropbox,代码行数:31,代码来源:api.php
示例18: switch
if ($prevAct != $action) {
$mySess->set('prevAct', $action);
JRequest::setVar('pg', 20);
} else {
// doesnt need to set
}
}
}
if ($task == 'edit' || $task == 'add') {
// JRequest::setVar( 'hidemainmenu', 1 );
JRequest::setVar('hidemainmenu', 0);
}
//action cases
switch ($action) {
case 'tags':
tags($action, $task, $template_id);
break;
case 'templates':
require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'templates.jnews.php';
require_once JNEWSPATH_ADMIN . 'views' . DS . 'templates.jnews.html.php';
templates($action, $task, $template_id);
break;
case 'list':
$listType = 1;
require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'lists.jnews.php';
require_once JNEWSPATH_ADMIN . 'views' . DS . 'lists.jnews.html.php';
lists($action, $task, $listId, $listType);
break;
case 'arlist':
$listType = 2;
require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'lists.jnews.php';
开发者ID:naka211,项目名称:kkvn,代码行数:31,代码来源:jnews.php
示例19: tags_link
" height="<?php
echo $height;
?>
"/>
</a>
<?if($arProps['metka']['~VALUE']!=''):?>
<div class="tag row">
<?
$link_tag = tags_link($arProps['metka']['~VALUE']);
?>
<a href="<?php
echo $link_tag;
?>
" class="link_tag">
<div class="name-tag"><?php
echo tags($arProps['metka']['~VALUE']);
?>
</div>
<div class="trigon"></div>
</a>
</div>
<?endif;?>
<div class="pad_10_15 name-item">
<h3>
<a href="/<?php
echo $arProps['type']['VALUE_XML_ID'];
?>
/<?php
echo $arFields['CODE'];
?>
/"><?php
开发者ID:CheBurashka334,项目名称:crado,代码行数:31,代码来源:template.php
示例20: comment
//.........这里部分代码省略.........
if (isset($commentsPage)) {
$pageNum = $commentsPage;
}
$offset = ($pageNum - 1) * $comment_limit;
$totalrows = 'SELECT count(id) AS num FROM ' . _PRE . 'comments' . '
WHERE articleid = ' . $_ID . ' AND approved = \'True\';';
$rowsresult = mysql_query($totalrows);
$numrows = mysql_fetch_array($rowsresult);
$numrows = $numrows['num'];
/**** redundant/excessive
/* if ($numrows == 0) {
if ($freeze_status != 'freezed' && s('freeze_comments') != 'YES') {
echo '<p>'.l('no_comment').'</p>';
} else {
echo '<p>'.l('frozen_comments').'</p>';
}
} else {
/**** end redundant/excessive*****/
if ($numrows > 0) {
$query = 'SELECT
id,articleid,name,url,comment,time,approved
FROM ' . _PRE . 'comments' . '
WHERE articleid = ' . $_ID . '
AND approved = \'True\'
ORDER BY id ' . $comments_order . '
LIMIT ' . "{$offset}, {$comment_limit}";
$result = mysql_query($query) or die(l('dberror'));
$ordinal = 1;
$date_format = s('date_format');
$edit_link = ' <a href="' . _SITE . '?action=';
while ($r = mysql_fetch_array($result)) {
$date = date($date_format, strtotime($r['time']));
$commentNum = $offset + $ordinal;
$tag = explode(',', tags('comments'));
foreach ($tag as $tag) {
switch (true) {
case $tag == 'date':
echo '<a id="' . l('comment') . $commentNum . '"
name="' . l('comment') . $commentNum . '"></a>' . $date;
break;
case $tag == 'name':
$name = $r['name'];
echo !empty($r['url']) ? '<a href="' . $r['url'] . '" title="' . $r['url'] . '" rel="nofollow">
' . $name . '</a> ' : $name;
break;
case $tag == 'comment':
echo $r['comment'];
break;
case $tag == 'edit' && _ADMIN:
echo $edit_link . 'editcomment&commentid=' . $r['id'] . '"
title="' . l('edit') . ' ' . l('comment') . '">' . l('edit') . '</a> ';
echo $edit_link . 'process&task=deletecomment&commentid=' . $r['id'] . '"
title="' . l('delete') . ' ' . l('comment') . '" onclick="return pop()">' . l('delete') . '</a>';
break;
case $tag == 'edit':
break;
default:
echo $tag;
}
}
$ordinal++;
}
$maxPage = ceil($numrows / $comment_limit);
$back_to_page = ceil(($numrows + 1) / $comment_limit);
if ($maxPage > 1) {
paginator($pageNum, $maxPage, l('comment_pages'));
开发者ID:retrofox,项目名称:PCC,代码行数:67,代码来源:snews.php
注:本文中的tags函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论