本文整理匯總了PHP中JFile::Exists方法的典型用法代碼示例。如果您正苦於以下問題:PHP JFile::Exists方法的具體用法?PHP JFile::Exists怎麽用?PHP JFile::Exists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JFile
的用法示例。
在下文中一共展示了JFile::Exists方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getStatus
/**
* Return current user status
* @return string user status
*/
public function getStatus($rawFormat = false)
{
jimport('joomla.filesystem.file');
// @rule: If user requested for a raw format, we should pass back the raw status.
$statusmodel = CFactory::getModel('status');
$statusmodel = $statusmodel->get($this->_userid);
$status = $statusmodel->status;
if ($rawFormat) {
return $status;
}
// @rule: We need to escape any unwanted stuffs here before proceeding.
CFactory::load('helpers', 'string');
$status = CStringHelper::escape($status);
if (JFile::Exists(CPluginHelper::getPluginURI('community', 'wordfilter') . DS . 'wordfilter.php') && JPluginHelper::isEnabled('community', 'wordfilter')) {
require_once CPluginHelper::getPluginURI('community', 'wordfilter') . DS . 'wordfilter.php';
if (class_exists('plgCommunityWordfilter')) {
$dispatcher =& JDispatcher::getInstance();
$plugin =& JPluginHelper::getPlugin('community', 'wordfilter');
$instance = new plgCommunityWordfilter($dispatcher, (array) $plugin);
}
$status = $instance->_censor($status);
}
// @rule: Create proper line breaks.
$status = CStringHelper::nl2br($status);
// @rule: Auto link statuses
CFactory::load('helpers', 'linkgenerator');
$status = CLinkGeneratorHelper::replaceURL($status);
return $status;
}
示例2: getStatus
/**
* Return current user status
* @return string user status
*/
public function getStatus($rawFormat = false)
{
jimport('joomla.filesystem.file');
// @rule: If user requested for a raw format, we should pass back the raw status.
$statusmodel = CFactory::getModel('status');
$statusmodel = $statusmodel->get($this->_userid);
$status = $statusmodel->status;
if ($rawFormat) {
return $status;
}
$CPluginHelper = new CPluginHelper();
if (JFile::Exists($CPluginHelper->getPluginURI('community', 'wordfilter') . '/wordfilter.php') && $CPluginHelper->isEnabled('community', 'wordfilter')) {
require_once $CPluginHelper->getPluginURI('community', 'wordfilter') . '/wordfilter.php';
if (class_exists('plgCommunityWordfilter')) {
$dispatcher = JDispatcher::getInstance();
$plugin = JPluginHelper::getPlugin('community', 'wordfilter');
$instance = new plgCommunityWordfilter($dispatcher, (array) $plugin);
}
$status = $instance->_censor($status);
}
// Damn it! this really should have been in the template! not littered in the code here
$status = CActivities::format($status);
return $status;
}