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


PHP ItemList::setTitle方法代码示例

本文整理汇总了PHP中ItemList::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ItemList::setTitle方法的具体用法?PHP ItemList::setTitle怎么用?PHP ItemList::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ItemList的用法示例。


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

示例1: __exp__getFeedContent

function __exp__getFeedContent($cid)
{
    $cid = sanitize($cid, RSS_SANITIZER_NUMERIC);
    ob_start();
    rss_require('cls/items.php');
    $readItems = new ItemList();
    $readItems->populate(" not(i.unread & " . RSS_MODE_UNREAD_STATE . ") and i.cid= {$cid}", "", 0, 2, ITEM_SORT_HINT_READ);
    $readItems->setTitle(__('Recent items'));
    $readItems->setRenderOptions(IL_TITLE_NO_ESCAPE);
    foreach ($readItems->feeds[0]->items as $item) {
        $item->render();
    }
    $c = ob_get_contents();
    ob_end_clean();
    return "{$cid}|@|{$c}";
}
开发者ID:nerdling,项目名称:gregarius,代码行数:16,代码来源:ajax.php

示例2: trim

# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
# http://www.gnu.org/licenses/gpl.html
#
###############################################################################
# E-mail:	   mbonetti at gmail dot com
# Web page:	   http://gregarius.net/
#
###############################################################################
require_once 'init.php';
$a = trim(sanitize($_REQUEST['author'], RSS_SANITIZER_WORDS));
$sql = "select distinct(author) from " . getTable('item') . " where author  like '%{$a}'";
list($ra) = rss_fetch_row(rss_query($sql));
if (!$ra) {
    rss_404();
    exit;
}
$t = ucfirst(__('items')) . " " . __(' by ') . " " . $ra;
$GLOBALS['rss']->header = new Header($t);
$GLOBALS['rss']->feedList = new FeedList(false);
$authorItems = new ItemList();
$sqlWhere = " i.author like '%{$a}' ";
$numItems = getConfig('rss.output.frontpage.numitems');
$authorItems->populate($sqlWhere, "", 0, $numItems);
$authorItems->setTitle($t);
$authorItems->setRenderOptions(IL_NO_COLLAPSE | IL_TITLE_NO_ESCAPE);
$GLOBALS['rss']->appendContentObject($authorItems);
$GLOBALS['rss']->renderWithTemplate('index.php', 'items');
开发者ID:jphpsf,项目名称:gregarius,代码行数:31,代码来源:author.php


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