本文整理匯總了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');