本文整理匯總了PHP中XenForo_Link::setIndexRoute方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Link::setIndexRoute方法的具體用法?PHP XenForo_Link::setIndexRoute怎麽用?PHP XenForo_Link::setIndexRoute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenForo_Link
的用法示例。
在下文中一共展示了XenForo_Link::setIndexRoute方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setDefaultsFromOptions
/**
* Setup necessary system defaults based on the options.
*
* @param XenForo_Options $options
*/
public static function setDefaultsFromOptions(XenForo_Options $options)
{
if ($options->useFriendlyUrls) {
XenForo_Link::useFriendlyUrls(true);
}
if ($options->romanizeUrls) {
XenForo_Link::romanizeTitles(true);
}
if ($options->indexRoute && preg_match('/^[a-z0-9-]/i', $options->indexRoute)) {
XenForo_Link::setIndexRoute($options->indexRoute);
}
XenForo_Link::includeTitlesInUrls($options->includeTitleInUrls);
self::$jsVersion = substr(md5(self::$jsVersion . $options->jsLastUpdate), 0, 8);
}
示例2: _setupForXenForo1_2_x
protected static function _setupForXenForo1_2_x()
{
// ONLY ONE LINE TO CHANGE THE INDEX ROUTE FOR XENFORO 1.2.x
// COMPARE TO THE SPAGHETTI CODE TO ACHIEVE THE SAME THING
// IN XENFORO 1.1.x, OH GOD WHY?
XenForo_Link::setIndexRoute('widget-page-index/');
}