本文整理汇总了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}";
}
示例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');