http://BLOG-URL/summary.php?op=infohelp
http://BLOG-URL/summary.php?op=display&page=infohelp
<?php include_once( PLOG_CLASS_PATH."class/summary/action/summaryaction.class.php" ); include_once( PLOG_CLASS_PATH."class/summary/dao/summarystats.class.php" ); include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" ); include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" ); include_once( PLOG_CLASS_PATH."class/logger/LogUtil.php" ); /** * This is the one and only default action. It simply fetches all the most recent * posts from the database and shows them. The default locale is the one specified * in the configuration file and the amount of posts shown in this page is also * configurable through the config file. */ class SummaryDefaultAction extends SummaryAction { var $_numPosts; function SummaryDefaultAction( $actionInfo, $request ) { $this->SummaryAction( $actionInfo, $request ); $this->_numPosts = $this->_config->getValue( "summary_page_show_max" ); } /** * Loads the posts and shows them. */ function perform() { $this->_view = new SummaryCachedView( "[b][color=Red]infohelp[/color][/b]", Array( "summary" => "[b][color=Red]infohelp[/color][/b]", "locale" => $this->_locale->getLocaleCode())); if( $this->_view->isCached()) { // if the view is already cached... move along! nothing to see here return true; } $blogs = new Blogs(); $stats = new SummaryStats(); // load the posts, filtering out all those registration messages... $registerTopic = $this->_locale->tr( "register_default_article_topic" ); $registerText = $this->_locale->tr( "register_default_article_text" ); $recentPosts = $stats->getRecentArticles( $this->_numPosts, $registerTopic, $registerText ); // get all the blogs $siteBlogs = $blogs->getAllBlogs( true ); $recentBlogs = $stats->getRecentBlogs( $this->_numPosts ); $activeBlogs = $stats->getMostActiveBlogs( $this->_numPosts); $commentedPosts = $stats->getMostCommentedArticles( $this->_numPosts, $registerTopic, $registerText ); $readestBlogs = $stats->getMostReadArticles( $this->_numPosts, $registerTopic, $registerText ); // export all these things to the view $this->_view->setValue( "posts", $recentPosts ); $this->_view->setValue( "recentBlogs", $recentBlogs ); $this->_view->setValue( "activeBlogs", $activeBlogs ); $this->_view->setValue( "commentedPosts", $commentedPosts ); $this->_view->setValue( "readestBlogs", $readestBlogs ); $this->_view->setValue( "blogs", $siteBlogs ); // // :KLUDGE: // we just need a random blog so... we'll get one :) // $randomBlog = array_pop($siteBlogs); $url = $randomBlog->getBlogRequestGenerator(); $this->_view->setValue( "url", $url ); $this->setCommonData(); return true; } }?>
{include file="summary/header.template" selected="index"}<div id="column-left"> <div id="summary_login"> <form id="loginForm" method="post" action="admin.php"> <fieldset class="inputField" > <h4>{$locale->tr("login")}</h4> <div id="login_bg"> <div class="field"> <label for="userName">{$locale->tr("username")}</label> <input type="text" tabindex="10" name="userName" id="userName" value="" maxlength="50" /> </div> <div class="field"> <label for="userPassword">{$locale->tr("password")}</label> <input type="password" tabindex="11" name="userPassword" id="userPassword" maxlength="50" /> </div> <input type="submit" class="button" name="Login" value="{$locale->tr("login")}" tabindex="12" id="login"/> <input type="hidden" name="op" value="Login" /> <span style="float:right; margin-top:-20px;"><a href="?op=resetPasswordForm">{$locale->tr("password_forgotten")}</a></span> </div> </fieldset> </form> </div> <div id="newblogs"> <h4>{$locale->tr("summary_newest_blogs")}</h4> <ul class="itemList"> {foreach from=$recentBlogs item=blog} {assign var="url" value=$blog->getBlogRequestGenerator()} {** remove this if you're having problems with blogs in encondings other than iso-8859-1 **} <li class="item"><a href="{$url->blogLink()}" title="{$blog->getBlog()|strip_tags}">{$blog->getBlog()|strip_tags|truncate:30:"..."}</a></li> {/foreach} </ul> </div> <div id="links"> <h4>{$locale->tr("summary_links")}</h4> <ul> <li><a href="http://www.revefrance.com/bbs" target="_blank">a</a></li> <li><a href="http://www.revefrance.com" target="_blank">b</a></li> <li><a href="http://www.revefrance.com" target="_blank">c</a></li> <li><a href="http://www.revefrance.com" target="_blank">d</a></li> </ul> </div> <!--<div id="links"> <h4>{$locale->tr("summary_statistics")}</h4> <ul> <li><a href="http://www.revefrance.com/bbs" target="_blank">a</a></li> <li><a href="http://www.revefrance.com" target="_blank">f</a></li> <li><a href="http://www.revefrance.com" target="_blank">e</a></li> <li><a href="http://www.revefrance.com" target="_blank">w</a></li> </ul> </div>--> </div><div id="maincolumn"> <div id="intro"> <div id="intro_title"> <div id="fp_left"><img src="imgs/fp_left.jpg" /></div> <div id="title">{$locale->tr("summary_welcome")}</div> <div id="fp_right"><img src="imgs/fp_right.jpg" /></div> </div> <div id="intro_text"> 欢迎欢迎,热烈欢迎... You should place here whatever welcome message you would like your users to see. Or remove this one completely and rearrange the whole page. Or something :) Take a look at templates/summary, that is where all template files that make up this page are stored. You are free to change them in any way you like. </div> </div> <div id="help">Our help information put here...</div> <div id="privacy" style="display:none;">{include file="summary/info_privacy.template"}</div> <div id="statement" style="display:none;">{include file="summary/info_statement.template"}</div> <div id="aboutus" style="display:none;">{include file="summary/info_aboutus.template"}</div> <div id="contact" style="display:none;">{include file="summary/info_contact.template"}</div> <div id="help" style="display:none;">{include file="summary/info_help.template"}</div> <script src="js/ui/info.js" type="text/javascript"></script></div><div id="column-right"> <form id="searchForm" method="post" action="."> <fieldset class="inputField"> <div id="search_title"><img src="imgs/new/search.gif" width="16" height="16" />{$locale->tr("summary_search_blogs")}</div> <div id="search_box"> <div class="field"> <label for="searchTerms">{$locale->tr("search_terms")}</label><br /> <input type="text" tabindex="20" name="searchTerms" id="searchTerms" value="" /> </div> <input type="hidden" name="op" value="summarySearch" /> <input type="submit" class="button" name="summarySearch" value="{$locale->tr("search")}" tabindex="21" id="summarysearch"/> </div> </fieldset> </form> <div id="mab_title">{$locale->tr("summary_most_active_blogs")}</div> <ul class="itemList"> {foreach from=$activeBlogs item=blog} {assign var="url" value=$blog->getBlogRequestGenerator()} <li class="item"><a href="{$url->blogLink()}" title="{$blog->getBlog()|strip_tags}">{$blog->getBlog()|strip_tags|truncate:23:"..."}</a></li> {/foreach} </ul> <div id="mca_title">{$locale->tr("summary_most_commented_articles")} {if $commentedPosts} <a href="{$url->getRssUrl()}?summary=1&type=mostcommented" > <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}" alt="RSS"/></a> {/if} </div> {foreach name=commented from=$commentedPosts item=post} {if $smarty.foreach.commented.first} <ul class="itemList"> {/if} {assign var="blog" value=$post->getBlogInfo()} {assign var="url" value=$blog->getBlogRequestGenerator()} <li class="item"> <a href="{$url->postPermalink($post)}" title="{$post->getTopic()|strip_tags}">{$post->getTopic()|strip_tags|truncate:18:"..."} ({$post->getTotalComments()})</a><br /> </li> {if $smarty.foreach.commented.last} </ul> {/if} {/foreach} <div id="mra_title">{$locale->tr("summary_most_read_articles")} {if $readestBlogs} <a href="{$url->getRssUrl()}?summary=1&type=mostread"> <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}" alt="RSS" /></a> {/if} </div> {foreach name=readest from=$readestBlogs item=post} {if $smarty.foreach.readest.first} <ul class="itemList"> {/if} {assign var="blog" value=$post->getBlogInfo()} {assign var="url" value=$blog->getBlogRequestGenerator()} <li class="item"> <a href="{$url->postPermalink($post)}" title="{$post->getTopic()|strip_tags}">{$post->getTopic()|strip_tags|truncate:17:"..."} ({$post->getNumReads()})</a><br /> </li> {if $smarty.foreach.readest.last} </ul> {/if} {/foreach}</div></div><br /> {include file="summary/footer.template"}
class InfoHelpAction extends SummaryAction { var $_numPosts; function InfoHelpAction( $actionInfo, $request ) { $this->SummaryAction( $actionInfo, $request ); $this->_numPosts = $this->_config->getValue( "summary_page_show_max" ); } /** * Loads the posts and shows them. */ function perform() { $this->_view = new SummaryCachedView( "infohelp", Array( "summary" => "infohelp", "locale" => $this->_locale->getLocaleCode()));
$_actionMap["InfoHelp"] = "InfoHelpAction";