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


PHP display_comments函数代码示例

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


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

示例1: asdf_most_recent

function asdf_most_recent()
{
    ?>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js" type="text/javascript"></script>
	<script type="text/javascript" src="<?php 
    echo bloginfo('stylesheet_directory');
    ?>
/asdf_most_recent.js"></script> 
	<div class="widget">
		<div class="asdf_most_recent">
			<div class="buttons">
				<h1 class="articles widget-title">ARTIKEL</h1>
				<h1 class="widget-title">&middot;</h1>
				<h1 class="comments widget-title">KOMMENTARE</h1>
				<h1 class="widget-title">&middot;</h1>
				<h1 class="tweets widget-title">TWEETS</h1>
			</div>
			<div class="content">
				<div class="articles">
					<?php 
    display_articles();
    ?>
				</div>
				<div class="comments">
					<?php 
    display_comments();
    ?>
				</div>
				<div class="tweets">
					<?php 
    display_tweets();
    ?>
				</div>
			</div>
		</div>
	</div>
<?php 
}
开发者ID:asdf-systems,项目名称:legourmand,代码行数:38,代码来源:asdf_most_recent.php

示例2: edit_post_link

							Both comments and pings are currently closed.

						<?php 
        }
        edit_post_link('Edit this entry.', '', '');
        ?>

					</small>
				</p>

			</div>

		</div>

	<?php 
        display_comments();
        ?>

	<?php 
    }
} else {
    ?>

		<p>Sorry, no attachments matched your criteria.</p>

<?php 
}
?>

<?php 
get_sidebar();
开发者ID:ethicalux,项目名称:kairos_eux,代码行数:31,代码来源:image.php

示例3: display_comments

    function display_comments($comments, $module, $user, $is_answer = false, $offset)
    {
        if (isset($_GET['answer']) && isint($_GET['answer'])) {
            $answer = $_GET['answer'];
        } else {
            $answer = 0;
        }
        foreach ($comments as $c) {
            ?>
		<div class="comment<?php 
            echo $is_answer ? ' answer' : '';
            ?>
" id="comment-<?php 
            echo $c->id;
            ?>
">
			<?php 
            echo $is_answer ? '<a href="#comment-' . $c->id . '" class="fa fa-caret-right expander"></a>' : '';
            ?>
			<div class="comment-text">
				<a href="<?php 
            echo site_url('user/' . $c->creator->id);
            ?>
"><?php 
            echo showname($c->creator);
            ?>
</a>
				<span class="text"><?php 
            echo htmlentities($c->comment);
            ?>
</span>
			</div>
			<div class="comment-actions">
				<?php 
            echo dt_tm($c->date);
            ?>
 
				<?php 
            if ($answer != $c->id) {
                ?>
					<a href="?answer=<?php 
                echo $c->id;
                ?>
#comment-<?php 
                echo $c->id;
                ?>
" data-comment-answer="<?php 
                echo $c->id;
                ?>
">Answer</a>
				<?php 
            }
            ?>
				<?php 
            if (!isset($c->answers) && $c->count_answers > 0) {
                ?>
					 <a href="?answers=<?php 
                echo $c->id;
                ?>
#comment-<?php 
                echo $c->id;
                ?>
" data-comment-answers="true" data-comment-reference="<?php 
                echo $c->id;
                ?>
" data-comment-action="next">Show answers (<?php 
                echo $c->count_answers;
                ?>
)</a>
				<?php 
            }
            ?>
				
				<?php 
            echo $c->ratings->display_small('comment-' . $c->id);
            ?>
			</div>
			<a class="user-image" href="<?php 
            echo site_url('user/' . $c->creator->id);
            ?>
"><img src="<?php 
            echo avatar_image($c->creator->id);
            ?>
" class="avatar" /></a>
			<?php 
            echo '';
            ?>
			<?php 
            if (isset($c->answers)) {
                $is_this_answer_post = isset($_GET['answers']) && $_GET['answers'] == $c->id;
                if ($is_this_answer_post && $offset > 0) {
                    ?>
					<a class="show-answers-button" data-comment-reference="<?php 
                    echo $c->id;
                    ?>
" data-comment-action="previous" href="?answers=<?php 
                    echo $c->id;
                    ?>
&end=<?php 
                    echo $_GET['end'] > 30 ? $_GET['end'] - 30 : 0;
//.........这里部分代码省略.........
开发者ID:inexor-game-obsolete,项目名称:project-site,代码行数:101,代码来源:comments.php

示例4: render_news_item

    /**
     * News Item Page Template
     * @param $info
     */
    function render_news_item($info)
    {
        global $aidlink;
        $locale = fusion_get_locale();
        $news_settings = get_settings('news');
        $data = $info['news_item'];
        add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>");
        add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
        add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
        add_to_footer('<script type="text/javascript">
			$(document).ready(function() {
				$(".news-image-overlay").colorbox({
					transition: "elasic",
					height:"100%",
					width:"100%",
					maxWidth:"98%",
					maxHeight:"98%",
					scrolling:false,
					overlayClose:true,
					close:false,
					photo:true,
					onComplete: function(result) {
						$("#colorbox").live("click", function(){
						$(this).unbind("click");
						$.fn.colorbox.close();
						});
					},
					onLoad: function () {
					}
			   });
			});
			</script>');
        opentable($locale['news_0004']);
        echo render_breadcrumbs();
        echo "<!--news_pre_readmore-->";
        echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n";
        echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n";
        echo "<div class='news_news text-dark m-t-20 m-b-20'>\n";
        if ($data['news_image_src']) {
            echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n            <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>";
        } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) {
            echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n            <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n            </a>";
        }
        echo $data['news_news'];
        echo "</div>\n";
        echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n";
        echo "<div style='clear:both;'></div>\n";
        echo "<div class='well m-t-5 text-center'>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n";
        echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>";
        echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : '';
        echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : '';
        echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&amp;item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>";
        echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&amp;action=edit&amp;section=news_form&amp;news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : "";
        echo "</div>";
        echo "<!--news_sub_readmore-->";
        echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : "";
        if ($data['page_count'] > 0) {
            echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&amp;") . "\n</div>\n";
        }
        if ($data['news_allow_comments']) {
            echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        if ($data['news_allow_ratings']) {
            echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        echo "</article>\n";
        closetable();
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:74,代码来源:custom_news.php

示例5: pages_second_parse

    }
    $Template->assign_vars(array('TITLE' => $page_infos['title'], 'CONTENTS' => pages_second_parse($page_infos['contents']), 'COUNT_HITS' => $page_infos['count_hits'] ? sprintf($LANG['page_hits'], $page_infos['hits'] + 1) : '&nbsp;', 'PAGES_PATH' => $pages_data_path, 'L_LINKS' => $LANG['pages_links_list']));
    $Template->pparse('page');
} elseif ((!empty($encoded_title) || $id_com > 0) && $num_rows == 0) {
    redirect(HOST . DIR . url('/pages/pages.php?error=e_page_not_found'));
} elseif ($id_com > 0) {
    if ($page_infos['activ_com'] == 0) {
        redirect(HOST . DIR . '/pages/pages.php?error=e_unactiv_com');
    }
    $special_auth = !empty($page_infos['auth']);
    $array_auth = unserialize($page_infos['auth']);
    if ($special_auth && !$User->check_auth($array_auth, READ_PAGE) || !$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE) && ($special_auth && !$User->check_auth($array_auth, READ_COM)) || !$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_COM)) {
        redirect(HOST . DIR . '/pages/pages.php?error=e_auth_com');
    }
    $Template->set_filenames(array('com' => 'pages/com.tpl'));
    $Template->assign_vars(array('COMMENTS' => display_comments('pages', $id_com, url('pages.php?id=' . $id_com . '&amp;com=%s'))));
    $Template->pparse('com');
} elseif (!empty($error)) {
    $Template->set_filenames(array('error' => 'pages/error.tpl'));
    $Template->assign_vars(array('L_TITLE' => $LANG['error']));
    switch ($error) {
        case 'e_page_not_found':
            $Errorh->handler($LANG['pages_not_found'], E_USER_WARNING);
            break;
        case 'e_auth':
            $Errorh->handler($LANG['pages_error_auth_read'], E_USER_WARNING);
            break;
        case 'e_auth_com':
            $Errorh->handler($LANG['pages_error_auth_com'], E_USER_WARNING);
            break;
        case 'e_unactiv_com':
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:pages.php

示例6: foreach

:
			<?php 
    foreach ($post->keywords as $keyword) {
        ?>
				<span><?php 
        echo anchor('blog/tagged/' . $keyword->name, $keyword->name, 'class="keyword"');
        ?>
</span>
			<?php 
    }
    ?>
		</div>
		<?php 
}
?>
	</div>

	<div class="body">
		<?php 
echo $post->body;
?>
	</div>
	
</div>

<?php 
if ($post->comments_enabled) {
    ?>
	<?php 
    echo display_comments($post->id);
}
开发者ID:namdum,项目名称:pyrocms,代码行数:31,代码来源:view.php

示例7: lang

		<p class="article_date"><?php 
echo lang('news_posted_label');
?>
: <?php 
echo format_date($article->created_on);
?>
</p>
		<?php 
if ($article->category->slug) {
    ?>
		<p class="article_category">
			<?php 
    echo lang('news_category_label');
    ?>
: <?php 
    echo anchor('news/category/' . $article->category->slug, $article->category->title);
    ?>
		</p>
		<?php 
}
?>
	</div>
	<div class="article_body">
		<?php 
echo stripslashes($article->body);
?>
	</div>
</div>
<?php 
echo display_comments($article->id);
开发者ID:vmichnowicz,项目名称:pyrocms,代码行数:30,代码来源:view.php

示例8: site_url

		<!-- Div containing the full sized image -->
		<div class="gallery_image_full">
			<img src="<?php 
echo site_url('uploads/galleries/' . $gallery->slug . '/full/' . $gallery_image->filename . '.' . $gallery_image->extension);
?>
" alt="<?php 
echo $gallery_image->title;
?>
" />
		</div>
		<?php 
if (!empty($gallery_image->description)) {
    ?>
		<!-- An image needs a description.. -->
		<div class="gallery_image_description">
			<p><?php 
    echo $gallery_image->description;
    ?>
</p>
		</div>
		<?php 
}
?>
	</div>
</div>
<?php 
if ($gallery->enable_comments == 1) {
    ?>
	<?php 
    echo display_comments($gallery_image->id, 'gallery-image');
}
开发者ID:8496tar,项目名称:pyrocms,代码行数:31,代码来源:image.php

示例9: strprotect

             $end_thumbnails += $nbr_pics_display_before - $thumbnails_before;
         }
         if ($thumbnails_after < $nbr_pics_display_after) {
             $start_thumbnails += $nbr_pics_display_after - $thumbnails_after;
         }
         $html_protected_name = strprotect($info_pics['name'], HTML_PROTECT, ADDSLASHES_FORCE);
         $Template->assign_vars(array('C_GALLERY_PICS_MAX' => true, 'C_GALLERY_PICS_MODO' => $is_modo ? true : false, 'ID' => $info_pics['id'], 'IMG_MAX' => '<img src="show_pics' . url('.php?id=' . $g_idpics . '&amp;cat=' . $g_idcat) . '" alt="" />', 'NAME' => '<span id="fi_' . $info_pics['id'] . '">' . $info_pics['name'] . '</span> <span id="fi' . $info_pics['id'] . '"></span>', 'POSTOR' => '<a class="small_link" href="../member/member' . url('.php?id=' . $info_pics['user_id'], '-' . $info_pics['user_id'] . '.php') . '">' . $info_pics['login'] . '</a>', 'DATE' => gmdate_format('date_format_short', $info_pics['timestamp']), 'VIEWS' => $info_pics['views'] + 1, 'DIMENSION' => $info_pics['width'] . ' x ' . $info_pics['height'], 'SIZE' => number_round($info_pics['weight'] / 1024, 1), 'COM' => Comments::com_display_link($info_pics['nbr_com'], '../gallery/gallery' . url('.php?cat=' . $info_pics['idcat'] . '&amp;id=' . $info_pics['id'] . '&amp;com=0&amp;sort=' . $g_sort, '-' . $info_pics['idcat'] . '-' . $info_pics['id'] . '.php?com=0&amp;sort=' . $g_sort), $info_pics['id'], 'gallery'), 'KERNEL_NOTATION' => $activ_note ? $Note->display_form() : '', 'COLSPAN' => $CONFIG_GALLERY['nbr_column'] + 2, 'CAT' => $cat_list, 'RENAME' => $html_protected_name, 'RENAME_CUT' => $html_protected_name, 'IMG_APROB' => get_ulang() . '/' . ($info_pics['aprob'] == 1 ? 'unvisible.png' : 'visible.png'), 'ARRAY_JS' => $array_js, 'NBR_PICS' => $i - 1, 'MAX_START' => $i - 1 - $nbr_column_pics, 'START_THUMB' => $pos_pics - $start_thumbnails > 0 ? $pos_pics - $start_thumbnails : 0, 'END_THUMB' => $pos_pics + $end_thumbnails, 'L_KB' => $LANG['unit_kilobytes'], 'L_INFORMATIONS' => $LANG['informations'], 'L_NAME' => $LANG['name'], 'L_POSTOR' => $LANG['postor'], 'L_VIEWS' => $LANG['views'], 'L_ADD_ON' => $LANG['add_on'], 'L_DIMENSION' => $LANG['dimension'], 'L_SIZE' => $LANG['size'], 'L_NOTE' => $LANG['note'], 'L_COM' => $LANG['com'], 'L_EDIT' => $LANG['edit'], 'L_APROB_IMG' => $info_pics['aprob'] == 1 ? $LANG['unaprob'] : $LANG['aprob'], 'L_THUMBNAILS' => $LANG['thumbnails'], 'U_DEL' => url('.php?del=' . $info_pics['id'] . '&amp;token=' . $Session->get_token() . '&amp;cat=' . $g_idcat, '-' . $g_idcat . '.php?token=' . $Session->get_token() . '&amp;del=' . $info_pics['id']), 'U_MOVE' => url('.php?id=' . $info_pics['id'] . '&amp;token=' . $Session->get_token() . '&amp;move=\' + this.options[this.selectedIndex].value', '-0-' . $info_pics['id'] . '.php?token=' . $Session->get_token() . '&amp;move=\' + this.options[this.selectedIndex].value'), 'U_PREVIOUS' => $pos_pics > 0 ? '<a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_previous, '-' . $g_idcat . '-' . $id_previous . '.php') . '#pics_max"><img src="../templates/' . get_utheme() . '/images/left.png" alt="" class="valign_middle" /></a> <a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_previous, '-' . $g_idcat . '-' . $id_previous . '.php') . '#pics_max">' . $LANG['previous'] . '</a>' : '', 'U_NEXT' => $pos_pics < $i - 1 ? '<a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_next, '-' . $g_idcat . '-' . $id_next . '.php') . '#pics_max">' . $LANG['next'] . '</a> <a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_next, '-' . $g_idcat . '-' . $id_next . '.php') . '#pics_max"><img src="../templates/' . get_utheme() . '/images/right.png" alt="" class="valign_middle" /></a>' : '', 'U_LEFT_THUMBNAILS' => $pos_pics - $start_thumbnails > 0 ? '<span id="display_left"><a href="javascript:display_thumbnails(\'left\')"><img src="../templates/' . get_utheme() . '/images/left.png" class="valign_middle" alt="" /></a></span>' : '<span id="display_left"></span>', 'U_RIGHT_THUMBNAILS' => $pos_pics - $start_thumbnails <= $i - 1 - $nbr_column_pics ? '<span id="display_right"><a href="javascript:display_thumbnails(\'right\')"><img src="../templates/' . get_utheme() . '/images/right.png" class="valign_middle" alt="" /></a></span>' : '<span id="display_right"></span>'));
         $i = 0;
         foreach ($array_pics as $pics) {
             if ($i >= $pos_pics - $start_thumbnails && $i <= $pos_pics + $end_thumbnails) {
                 $Template->assign_block_vars('list_preview_pics', array('PICS' => $pics));
             }
             $i++;
         }
         if (isset($_GET['com'])) {
             $Template->assign_vars(array('COMMENTS' => display_comments('gallery', $g_idpics, url('gallery.php?cat=' . $g_idcat . '&amp;id=' . $g_idpics . '&amp;com=%s', 'gallery-' . $g_idcat . '-' . $g_idpics . '.php?com=%s'))));
         }
     }
 } else {
     import('util/pagination');
     $Pagination = new Pagination();
     $Template->assign_vars(array('C_GALLERY_MODO' => $is_modo ? true : false, 'PAGINATION_PICS' => $Pagination->display('gallery' . url('.php?pp=%d&amp;cat=' . $g_idcat, '-' . $g_idcat . '+' . $rewrite_title . '.php?pp=%d'), $nbr_pics, 'pp', $CONFIG_GALLERY['nbr_pics_max'], 3), 'L_EDIT' => $LANG['edit'], 'L_VIEW' => $LANG['view'], 'L_VIEWS' => $LANG['views']));
     import('content/note');
     $is_connected = $User->check_level(MEMBER_LEVEL);
     $j = 0;
     $result = $Sql->query_while("SELECT g.id, g.idcat, g.name, g.path, g.timestamp, g.aprob, g.width, g.height, g.user_id, g.views, g.note, g.nbrnote, g.nbr_com, g.aprob, m.login\n\t\t\tFROM " . PREFIX . "gallery g\n\t\t\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = g.user_id\n\t\t\tWHERE g.idcat = '" . $g_idcat . "' AND g.aprob = 1\n\t\t\t" . $g_sql_sort . "\n\t\t\t" . $Sql->limit($Pagination->get_first_msg($CONFIG_GALLERY['nbr_pics_max'], 'pp'), $CONFIG_GALLERY['nbr_pics_max']), __LINE__, __FILE__);
     while ($row = $Sql->fetch_assoc($result)) {
         if (!file_exists('pics/thumbnails/' . $row['path'])) {
             $Gallery->Resize_pics('pics/' . $row['path']);
         }
         if ($CONFIG_GALLERY['display_pics'] == 3) {
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:gallery.php

示例10: elseif

    if ($download_info['size'] > 1) {
        $size_tpl = $download_info['size'] . ' ' . $LANG['unit_megabytes'];
    } elseif ($download_info['size'] > 0) {
        $size_tpl = $download_info['size'] * 1024 . ' ' . $LANG['unit_kilobytes'];
    } else {
        $size_tpl = $DOWNLOAD_LANG['unknown_size'];
    }
    import('util/date');
    $creation_date = new Date(DATE_TIMESTAMP, TIMEZONE_SYSTEM, $download_info['timestamp']);
    $release_date = new Date(DATE_TIMESTAMP, TIMEZONE_SYSTEM, $download_info['release_timestamp']);
    import('content/note');
    $Note = new Note('download', $file_id, url('download.php?id=' . $file_id, 'category-' . $category_id . '-' . $file_id . '.php'), $CONFIG_DOWNLOAD['note_max'], '', NOTE_NODISPLAY_NBRNOTES);
    import('content/comments');
    $Template->assign_vars(array('C_DISPLAY_DOWNLOAD' => true, 'C_IMG' => !empty($download_info['image']), 'C_EDIT_AUTH' => $auth_write, 'MODULE_DATA_PATH' => $Template->get_module_data_path('download'), 'ID_FILE' => $file_id, 'NAME' => $download_info['title'], 'CONTENTS' => second_parse($download_info['contents']), 'CREATION_DATE' => $creation_date->format(DATE_FORMAT_SHORT), 'RELEASE_DATE' => $release_date->get_timestamp() > 0 ? $release_date->format(DATE_FORMAT_SHORT) : $DOWNLOAD_LANG['unknown_date'], 'SIZE' => $size_tpl, 'COUNT' => $download_info['count'], 'THEME' => get_utheme(), 'KERNEL_NOTATION' => $Note->display_form(), 'HITS' => sprintf($DOWNLOAD_LANG['n_times'], (int) $download_info['count']), 'NUM_NOTES' => sprintf($DOWNLOAD_LANG['num_notes'], (int) $download_info['nbrnote']), 'U_IMG' => $download_info['image'], 'IMAGE_ALT' => str_replace('"', '\\"', $download_info['title']), 'LANG' => get_ulang(), 'U_COM' => Comments::com_display_link($download_info['nbr_com'], '../download/download' . url('.php?id=' . $file_id . '&amp;com=0', '-' . $file_id . '+' . url_encode_rewrite($download_info['title']) . '.php?com=0'), $file_id, 'download'), 'L_DATE' => $LANG['date'], 'L_SIZE' => $LANG['size'], 'L_DOWNLOAD' => $DOWNLOAD_LANG['download'], 'L_DOWNLOAD_FILE' => $DOWNLOAD_LANG['download_file'], 'L_FILE_INFOS' => $DOWNLOAD_LANG['file_infos'], 'L_INSERTION_DATE' => $DOWNLOAD_LANG['insertion_date'], 'L_RELEASE_DATE' => $DOWNLOAD_LANG['last_update_date'], 'L_DOWNLOADED' => $DOWNLOAD_LANG['downloaded'], 'L_EDIT_FILE' => str_replace('"', '\\"', $DOWNLOAD_LANG['edit_file']), 'L_CONFIRM_DELETE_FILE' => str_replace('\'', '\\\'', $DOWNLOAD_LANG['confirm_delete_file']), 'L_DELETE_FILE' => str_replace('"', '\\"', $DOWNLOAD_LANG['delete_file']), 'U_EDIT_FILE' => url('management.php?edit=' . $file_id), 'U_DELETE_FILE' => url('management.php?del=' . $file_id . '&amp;token=' . $Session->get_token()), 'U_DOWNLOAD_FILE' => url('count.php?id=' . $file_id, 'file-' . $file_id . '+' . url_encode_rewrite($download_info['title']) . '.php')));
    if (isset($_GET['com'])) {
        $Template->assign_vars(array('COMMENTS' => display_comments('download', $file_id, url('download.php?id=' . $file_id . '&amp;com=%s', 'download-' . $file_id . '.php?com=%s'))));
    }
    $Template->pparse('download');
} else {
    $Template->set_filenames(array('download' => 'download/download.tpl'));
    $Template->assign_vars(array('C_ADMIN' => $auth_write, 'C_DOWNLOAD_CAT' => true, 'C_ADD_FILE' => $auth_write || $auth_contribution, 'C_DESCRIPTION' => !empty($DOWNLOAD_CATS[$category_id]['contents']) || $category_id == 0 && !empty($CONFIG_DOWNLOAD['root_contents']), 'IDCAT' => $category_id, 'TITLE' => sprintf($DOWNLOAD_LANG['title_download'] . ($category_id > 0 ? ' - ' . $DOWNLOAD_CATS[$category_id]['name'] : '')), 'DESCRIPTION' => $category_id > 0 ? second_parse($DOWNLOAD_CATS[$category_id]['contents']) : second_parse($CONFIG_DOWNLOAD['root_contents']), 'L_ADD_FILE' => $DOWNLOAD_LANG['add_file'], 'U_ADMIN_CAT' => $category_id > 0 ? url('admin_download_cat.php?edit=' . $category_id) : url('admin_download_cat.php'), 'U_ADD_FILE' => url('management.php?new=1&amp;idcat=' . $category_id)));
    $num_subcats = 0;
    foreach ($DOWNLOAD_CATS as $id => $value) {
        if ($id != 0 && $value['id_parent'] == $category_id) {
            $num_subcats++;
        }
    }
    if ($num_subcats > 0) {
        $Template->assign_vars(array('C_SUB_CATS' => true));
        $i = 1;
        foreach ($DOWNLOAD_CATS as $id => $value) {
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:download.php

示例11: display_comments

<!-- Page layout: <?php 
echo $page['layout']['title'];
?>
 -->
<?php 
echo $page['layout']['body'];
?>

<?php 
if ($page['comments_enabled']) {
    ?>
	<?php 
    echo display_comments($page['id']);
}
开发者ID:vmichnowicz,项目名称:pyrocms,代码行数:14,代码来源:page.php

示例12: preg_match_all

    preg_match_all('`\\[page\\]([^[]+)\\[/page\\]`U', $articles['contents'], $array_page);
    $page_list = '<option value="1">' . $LANG['select_page'] . '</option>';
    $page_list .= '<option value="1"></option>';
    $i = 1;
    foreach ($array_page[1] as $page_name) {
        $selected = $i == $page ? 'selected="selected"' : '';
        $page_list .= '<option value="' . $i++ . '"' . $selected . '>' . $page_name . '</option>';
    }
    $nbr_page = count($array_page[1]);
    $nbr_page = !empty($nbr_page) ? $nbr_page : 1;
    import('content/note');
    $Note = new Note('articles', $idart, url('articles.php?cat=' . $idartcat . '&amp;id=' . $idart, 'articles-' . $idartcat . '-' . $idart . '.php'), $CONFIG_ARTICLES['note_max'], '', NOTE_DISPLAY_NOTE);
    import('content/comments');
    $Template->assign_vars(array('C_IS_ADMIN' => $User->check_level(ADMIN_LEVEL), 'C_DISPLAY_ARTICLE' => true, 'IDART' => $articles['id'], 'IDCAT' => $idartcat, 'NAME' => $articles['title'], 'PSEUDO' => $Sql->query("SELECT login FROM " . DB_TABLE_MEMBER . " WHERE user_id = '" . $articles['user_id'] . "'", __LINE__, __FILE__), 'CONTENTS' => isset($array_contents[$page]) ? second_parse($array_contents[$page]) : '', 'CAT' => $CAT_ARTICLES[$idartcat]['name'], 'DATE' => gmdate_format('date_format_short', $articles['timestamp']), 'PAGES_LIST' => $page_list, 'PAGINATION_ARTICLES' => $Pagination->display('articles' . url('.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;p=%d', '-' . $idartcat . '-' . $idart . '-%d+' . url_encode_rewrite($articles['title']) . '.php'), $nbr_page, 'p', 1, 3, 11, NO_PREVIOUS_NEXT_LINKS), 'PAGE_NAME' => isset($array_page[1][$page - 1]) && $array_page[1][$page - 1] != '&nbsp;' ? $array_page[1][$page - 1] : '', 'PAGE_PREVIOUS_ARTICLES' => $page > 1 && $page <= $nbr_page && $nbr_page > 1 ? '<a href="' . url('articles.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;p=' . ($page - 1), 'articles-' . $idartcat . '-' . $idart . '-' . ($page - 1) . '+' . url_encode_rewrite($articles['title']) . '.php') . '">&laquo; ' . $LANG['previous_page'] . '</a><br />' . $array_page[1][$page - 2] : '', 'PAGE_NEXT_ARTICLES' => $page > 0 && $page < $nbr_page && $nbr_page > 1 ? '<a href="' . url('articles.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;p=' . ($page + 1), 'articles-' . $idartcat . '-' . $idart . '-' . ($page + 1) . '+' . url_encode_rewrite($articles['title']) . '.php') . '">' . $LANG['next_page'] . ' &raquo;</a><br />' . $array_page[1][$page] : '', 'COM' => Comments::com_display_link($articles['nbr_com'], '../articles/articles' . url('.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;com=0', '-' . $idartcat . '-' . $idart . '+' . url_encode_rewrite($articles['title']) . '.php?com=0'), $articles['id'], 'articles'), 'KERNEL_NOTATION' => $Note->display_form(), 'U_USER_ID' => url('.php?id=' . $articles['user_id'], '-' . $articles['user_id'] . '.php'), 'U_ONCHANGE_ARTICLE' => "'" . url('articles.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;p=\' + this.options[this.selectedIndex].value', 'articles-' . $idartcat . '-' . $idart . '-\'+ this.options[this.selectedIndex].value + \'+' . url_encode_rewrite($articles['title']) . '.php' . "'"), 'U_PRINT_ARTICLE' => url('print.php?id=' . $idart), 'L_ALERT_DELETE_ARTICLE' => $LANG['alert_delete_article'], 'L_SUMMARY' => $LANG['summary'], 'L_DELETE' => $LANG['delete'], 'L_EDIT' => $LANG['edit'], 'L_SUBMIT' => $LANG['submit'], 'L_WRITTEN' => $LANG['written_by'], 'L_ON' => $LANG['on'], 'L_PRINTABLE_VERSION' => $LANG['printable_version']));
    if (isset($_GET['com'])) {
        $Template->assign_vars(array('COMMENTS' => display_comments('articles', $idart, url('articles.php?cat=' . $idartcat . '&amp;id=' . $idart . '&amp;com=%s', 'articles-' . $idartcat . '-' . $idart . '.php?com=%s'))));
    }
    $Template->pparse('articles');
} else {
    import('modules/modules_discovery_service');
    $modulesLoader = new ModulesDiscoveryService();
    $module_name = 'articles';
    $module = $modulesLoader->get_module($module_name);
    if ($module->has_functionality('get_home_page')) {
        echo $module->functionality('get_home_page');
    } elseif (!$no_alert_on_error) {
        global $Errorh;
        $Errorh->handler('Le module <strong>' . $module_name . '</strong> n\'a pas de fonction get_home_page!', E_USER_ERROR, __LINE__, __FILE__);
        exit;
    }
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:articles.php

示例13: htmlspecialchars

	</tr>
		<tr>
		<td valign="top">Comments 
		</td>
		<td><textarea name="comments" cols="40" rows="5"><?php 
    echo htmlspecialchars($defaults['comments']);
    ?>
</textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="Submit Comments" /></td>
	</tr>
	</table>
	</form>
<?php 
}
if ($_POST) {
    $errors = validate_form($_POST);
    if ($errors) {
        echo "<p>Sorry, we are unable to process your submission because:</p><ul><li>", implode('</li><li>', $errors), "</li></ul>", "<p>Please correct your form below and re-submit it</p>";
        display_form($_POST);
    } else {
        save_comment($_POST) or die("Sorry, our guestbook is out of order. Please try again later");
        display_comments() or die("Sorry, our guestbook is out of order. Please try again later");
        display_form($defaults);
    }
} else {
    display_comments() or die("Sorry, our guestbook is out of order. Please try again later");
    display_form($defaults);
}
开发者ID:jmyroup,项目名称:uci_projects,代码行数:31,代码来源:guestbook.php

示例14: get_NewsData

 /**
  * Parse MVC Data output
  * @param array $data - dbarray of newsQuery()
  * @return array
  */
 public static function get_NewsData(array $data)
 {
     $news_settings = self::get_news_settings();
     if (!empty($data)) {
         $largeImg = "";
         $news_subject = stripslashes($data['news_subject']);
         $imageSource = IMAGES_N . "news_default.jpg";
         if ($data['news_cat_image']) {
             $imageSource = get_image("nc_" . $data['news_cat_name']);
         }
         if ($news_settings['news_image_frontpage'] == 0) {
             if ($data['news_image'] && file_exists(IMAGES_N . $data['news_image'])) {
                 $imageSource = IMAGES_N . $data['news_image'];
                 $largeImg = $imageSource;
             }
             if ($data['news_image_t2'] && file_exists(IMAGES_N_T . $data['news_image_t2'])) {
                 $imageSource = IMAGES_N_T . $data['news_image_t2'];
             }
             if ($data['news_image_t1'] && file_exists(IMAGES_N_T . $data['news_image_t1'])) {
                 $imageSource = IMAGES_N_T . $data['news_image_t1'];
             }
         }
         $image = "<img class='img-responsive' src='" . $imageSource . "' alt='" . $data['news_subject'] . "' />\n";
         if (!empty($data['news_extended'])) {
             $news_image_link = $news_settings['news_image_link'] == 0 ? INFUSIONS . "news/news.php?cat_id=" . $data['news_cat'] : INFUSIONS . "news/news.php?readmore=" . $data['news_id'];
             $news_image = "<a class='img-link' href='{$news_image_link}'>{$image}</a>\n";
         } else {
             $news_image = $image;
         }
         $news_cat_image = "<a href='" . ($news_settings['news_image_link'] == 0 ? "" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat'] : INFUSIONS . "news/news.php?readmore=" . $data['news_id']) . "'>";
         if ($data['news_image_t2'] && $news_settings['news_image_frontpage'] == 0) {
             $news_cat_image .= $image . "</a>";
         } elseif ($data['news_cat_image']) {
             $news_cat_image .= "<img src='" . get_image("nc_" . $data['news_cat_name']) . "' alt='" . $data['news_cat_name'] . "' class='img-responsive news-category' /></a>";
         }
         $news_news = preg_replace("/<!?--\\s*pagebreak\\s*-->/i", "", $data['news_breaks'] == "y" ? nl2br(parse_textarea($data['news_news'])) : parse_textarea($data['news_news']));
         $info = array("news_id" => $data['news_id'], 'news_subject' => $news_subject, "news_url" => INFUSIONS . 'news/news.php?readmore=' . $data['news_id'], "news_cat_url" => INFUSIONS . 'news/news.php?cat_id=' . $data['news_cat_id'], "news_image_url" => $news_settings['news_image_link'] == 0 ? INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] : INFUSIONS . "news/news.php?readmore=" . $data['news_id'], 'news_anchor' => "<a name='news_" . $data['news_id'] . "' id='news_" . $data['news_id'] . "'></a>", 'news_news' => $news_news, "news_keywords" => $data['news_keywords'], "user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_status" => $data['user_status'], "user_avatar" => $data['user_avatar'], 'user_level' => $data['user_level'], "news_date" => $data['news_datestamp'], "news_cat_id" => $data['news_cat'], "news_cat_name" => !empty($data['news_cat_name']) ? $data['news_cat_name'] : fusion_get_locale('news_0006'), "news_cat_image" => $news_cat_image, "news_image" => $news_image, 'news_image_src' => $largeImg, "news_image_optimized" => $imageSource, "news_ext" => $data['news_extended'] ? "y" : "n", "news_reads" => $data['news_reads'], "news_comments" => $data['count_comment'], 'news_sum_rating' => $data['sum_rating'] ? $data['sum_rating'] : 0, 'news_count_votes' => $data['count_votes'], "news_allow_comments" => $data['news_allow_comments'], "news_display_comments" => $data['news_allow_comments'] ? display_comments($data['count_comment'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments", '', 2) : '', "news_allow_ratings" => $data['news_allow_ratings'], "news_display_ratings" => $data['news_allow_ratings'] ? display_ratings($data['sum_rating'], $data['count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#postrating", '', 2) : '', "news_sticky" => $data['news_sticky'], "print_link" => BASEDIR . "print.php?type=N&amp;item_id=" . $data['news_id']);
         $info += $data;
         return (array) $info;
     }
     return array();
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:47,代码来源:news.php

示例15: elseif

        $Errorh->handler('Le module <strong>' . $module_name . '</strong> n\'a pas de fonction get_home_page!', E_USER_ERROR, __LINE__, __FILE__);
        exit;
    }
} elseif (!empty($idnews)) {
    if (empty($news['id'])) {
        $Errorh->handler('e_unexist_news', E_USER_REDIRECT);
    }
    import('content/comments');
    import('content/syndication/feed');
    $tpl_news = new Template('news/news.tpl');
    $next_news = $Sql->query_array(PREFIX . "news", "title", "id", "WHERE visible = 1 AND id > '" . $idnews . "' " . $Sql->limit(0, 1), __LINE__, __FILE__);
    $previous_news = $Sql->query_array(PREFIX . "news", "title", "id", "WHERE visible = 1 AND id < '" . $idnews . "' ORDER BY id DESC " . $Sql->limit(0, 1), __LINE__, __FILE__);
    $tpl_news->assign_vars(array('C_IS_ADMIN' => $is_admin, 'C_NEWS_BLOCK' => true, 'C_NEWS_NAVIGATION_LINKS' => true, 'C_PREVIOUS_NEWS' => !empty($previous_news['id']), 'C_NEXT_NEWS' => !empty($next_news['id']), 'TOKEN' => $Session->get_token(), 'PREVIOUS_NEWS' => $previous_news['title'], 'NEXT_NEWS' => $next_news['title'], 'U_PREVIOUS_NEWS' => url('.php?id=' . $previous_news['id'], '-0-' . $previous_news['id'] . '+' . url_encode_rewrite($previous_news['title']) . '.php'), 'U_NEXT_NEWS' => url('.php?id=' . $next_news['id'], '-0-' . $next_news['id'] . '+' . url_encode_rewrite($next_news['title']) . '.php'), 'L_SYNDICATION' => $LANG['syndication'], 'L_ALERT_DELETE_NEWS' => $LANG['alert_delete_news'], 'L_ON' => $LANG['on'], 'L_DELETE' => $LANG['delete'], 'L_EDIT' => $LANG['edit']));
    $tpl_news->assign_block_vars('news', array('C_IMG' => !empty($news['img']), 'C_ICON' => !empty($news['icon']) && $CONFIG_NEWS['activ_icon'] == 1, 'ID' => $news['id'], 'IDCAT' => $news['idcat'], 'ICON' => second_parse_url($news['icon']), 'TITLE' => $news['title'], 'CONTENTS' => second_parse($news['contents']), 'EXTEND_CONTENTS' => second_parse($news['extend_contents']) . '<br /><br />', 'IMG' => second_parse_url($news['img']), 'IMG_DESC' => $news['alt'], 'PSEUDO' => $CONFIG_NEWS['display_author'] ? $news['login'] : '', 'DATE' => $CONFIG_NEWS['display_date'] ? $LANG['on'] . ': ' . gmdate_format('date_format_short', $news['timestamp']) : '', 'U_COM' => $CONFIG_NEWS['activ_com'] == 1 ? Comments::com_display_link($news['nbr_com'], '../news/news' . url('.php?cat=0&amp;id=' . $idnews . '&amp;com=0', '-0-' . $idnews . '+' . url_encode_rewrite($news['title']) . '.php?com=0'), $idnews, 'news') : '', 'U_USER_ID' => url('.php?id=' . $news['user_id'], '-' . $news['user_id'] . '.php'), 'U_NEWS_LINK' => url('.php?id=' . $news['id'], '-0-' . $news['id'] . '+' . url_encode_rewrite($news['title']) . '.php'), 'FEED_MENU' => Feed::get_feed_menu(FEED_URL)));
} elseif (!empty($idcat)) {
    $tpl_news = new Template('news/news_cat.tpl');
    $cat = $Sql->query_array(PREFIX . 'news_cat', 'id', 'name', 'icon', "WHERE id = '" . $idcat . "'", __LINE__, __FILE__);
    if (empty($cat['id'])) {
        $Errorh->handler('error_unexist_cat', E_USER_REDIRECT);
    }
    $tpl_news->assign_vars(array('C_IS_ADMIN' => $is_admin, 'C_NEWS_LINK' => true, 'CAT_NAME' => $cat['name'], 'IDCAT' => $cat['id'], 'L_EDIT' => $LANG['edit'], 'L_CATEGORY' => $LANG['category']));
    $result = $Sql->query_while("SELECT n.id, n.title, n.nbr_com, nc.id AS idcat, nc.icon\n\tFROM " . PREFIX . "news n\n\tLEFT JOIN " . PREFIX . "news_cat nc ON nc.id = n.idcat\n\tWHERE n.visible = 1 AND n.idcat = '" . $idcat . "'\n\tORDER BY n.timestamp DESC", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $tpl_news->assign_block_vars('list', array('ICON' => !empty($row['icon']) && $CONFIG_NEWS['activ_icon'] == 1 ? '<a href="news' . url('.php?cat=' . $row['idcat'], '-' . $row['idcat'] . '.php') . '"><img class="valign_middle" src="' . $row['icon'] . '" alt="" /></a>' : '', 'TITLE' => $row['title'], 'COM' => $row['nbr_com'], 'U_NEWS' => 'news' . url('.php?id=' . $row['id'], '-0-' . $row['id'] . '+' . url_encode_rewrite($row['title']) . '.php')));
    }
}
if (isset($_GET['com']) && $idnews > 0) {
    $tpl_news->assign_vars(array('COMMENTS' => display_comments('news', $idnews, url('news.php?id=' . $idnews . '&amp;com=%s', 'news-0-' . $idnews . '.php?com=%s'))));
}
$tpl_news->parse();
require_once '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:news.php


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