本文整理汇总了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;
}