本文整理汇总了PHP中Phpfox::getPhrase方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getPhrase方法的具体用法?PHP Phpfox::getPhrase怎么用?PHP Phpfox::getPhrase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getPhrase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
Phpfox::getUserParam('language.can_manage_lang_packs', true);
$bNoJsValidation = $this->getParam('bNoJsValidation');
$aModules = Phpfox::getService('admincp.module')->getModules();
$aLanguages = Phpfox::getService('language')->get();
if ($sPhrase = $this->getParam('sVar')) {
$aParts = explode('.', $sPhrase);
$sPhrase = $aParts[1];
}
/*
$aValidation = array(
'var_name' => array(
'def' => 'required',
'title' => Phpfox::getPhrase('language.select_varname')
)
);
*/
$aValidation = array();
$oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_phrase_form', 'aParams' => $aValidation));
if ($aVals = $this->request()->getArray('val')) {
if (empty($aVals['var_name']) && isset($aVals['text']['en'])) {
$aVals['var_name'] = $aVals['text']['en'];
}
if (empty($aVals['var_name'])) {
Phpfox_Error::set('Provide a var name.');
}
// Check that all the fields are valid
if ($oValid->isValid($aVals)) {
// Check to make sure the phrase has not already been added
if ($sIsPhrase = Phpfox::getService('language.phrase')->isPhrase($aVals)) {
Phpfox_Error::set(Phpfox::getPhrase('language.phrase_already_created', array('phrase' => $sIsPhrase)) . ' - ' . Phpfox::getPhrase($sIsPhrase));
$sCachePhrase = $sIsPhrase;
} else {
$sVarName = Phpfox::getService('language.phrase.process')->prepare($aVals['var_name']);
if (isset($aVals['module'])) {
$aParts = explode('|', $aVals['module']);
$sVarName = $aParts[1] . '.' . $sVarName;
}
$sCached = Phpfox::getPhrase('language.phrase_added', array('phrase' => $sVarName));
// Add the new phrase
$sPhrase = Phpfox::getService('language.phrase.process')->add($aVals);
// Verify if we have a return URL, if we do send them there instead
if ($sReturn = $this->request()->get('return')) {
$this->url()->forward($sReturn, $sCached);
} else {
Phpfox::getLib('session')->set('cache_new_phrase', $sVarName);
// Phrase added lets send them back to the same page with a message that the phrase was added
$this->url()->send('admincp.language.phrase.add', array('last-module' => $aParts[1]), $sCached);
}
}
}
}
if (!isset($sCachePhrase) && ($sCachePhrase = Phpfox::getLib('session')->get('cache_new_phrase'))) {
Phpfox::getLib('session')->remove('cache_new_phrase');
}
// Assign needed vars to the template
$this->template()->assign(array('aProducts' => Phpfox::getService('admincp.product')->get(), 'aModules' => $aModules, 'aLanguages' => $aLanguages, 'sCreateJs' => $oValid->createJS(), 'sGetJsForm' => $bNoJsValidation ? 'return true;' : $oValid->getJsForm(), 'sReturn' => ($sReturn = $this->request()->get('return')) ? $sReturn : $this->getParam('sReturnUrl'), 'sVar' => $sPhrase, 'sCachePhrase' => isset($sCachePhrase) ? $sCachePhrase : '', 'sLastModuleId' => $this->request()->get('last-module')))->setBreadCrumb(Phpfox::getPhrase('language.add_phrase'))->setTitle(Phpfox::getPhrase('language.add_phrase'));
($sPlugin = Phpfox_Plugin::get('language.component_controller_admincp_phrase_add_process')) ? eval($sPlugin) : false;
}
示例2: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
if ($aVals = $this->request()->getArray('val')) {
if (isset($aVals['question_id'])) {
if (Phpfox::getService('user.process')->editSpamQuestion($aVals)) {
//die('Finished editing question');
}
} else {
if (Phpfox::getService('user.process')->addSpamQuestion($aVals)) {
//die('Finished adding question');
}
}
}
$aOut = array();
$aOut['questions'] = Phpfox::getService('user')->getSpamQuestions();
if ($iQuestionId = $this->request()->getInt('id')) {
foreach ($aOut['questions'] as $aQuestion) {
if ($aQuestion['question_id'] == $iQuestionId) {
$aOut['edit'] = $aQuestion;
}
}
}
$jOut = json_encode($aOut);
$this->template()->setBreadCrumb(Phpfox::getPhrase('user.anti_spam_security_questions'))->setTitle(Phpfox::getPhrase('user.anti_spam_security_questions'))->assign(array('sSiteUsePhrase' => $this->url()->makeUrl('admincp.language.phrase.add', array('last-module' => 'user'))))->setHeader(array('admin.spam.js' => 'module_user', 'admin.spam.css' => 'module_user', '<script type="text/javascript">$Behavior.initSpamQuestions = function(){$Core.User.Spam.initAdd();};</script>', '<script type="text/javascript">$Behavior.initData = function(){$Core.User.Spam.initPopulate(' . $jOut . ');};</script>'))->setPhrase(array('user.setting_require_all_spam_questions_on_signup', 'user.edit_question'));
}
示例3: moderation
/**
* Need this to take over photo moderation
* Enter description here ...
*/
public function moderation()
{
Phpfox::isUser(true);
switch ($this->get('action')) {
case 'approve':
Phpfox::getUserParam('photo.can_approve_photos', true);
foreach ((array) $this->get('item_moderate') as $iId) {
Phpfox::getService('photo.process')->approve($iId);
$this->call('$(\'#js_photo_id_' . $iId . '\').remove();');
}
$sMessage = Phpfox::getPhrase('photo.photo_s_successfully_approved');
$this->alert($sMessage, 'Moderation', 300, 150, true);
break;
case 'delete':
Phpfox::getUserParam('photo.can_delete_other_photos', true);
$item = $this->get('item_moderate')[0];
$bReload = Phpfox::getService('profiles')->getUserAndProfile($item);
if ($bReload) {
$this->call('location.reload();');
}
foreach ((array) $this->get('item_moderate') as $iId) {
Phpfox::getService('photo.process')->delete($iId);
$this->call('$(\'#js_photo_id_' . $iId . '\').remove();');
}
$sMessage = Phpfox::getPhrase('photo.photo_s_successfully_deleted');
break;
}
$this->updateCount();
$this->hide('.moderation_process');
}
示例4: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
// assign the categories
$this->template()->assign(array('aCategories' => Phpfox::getService('contact.contact')->getCategories()));
// create the captcha check JS
// they need to input some text always
$aValidation = array('text' => Phpfox::getPhrase('contact.fill_in_some_text_for_your_message'), 'category_id' => Phpfox::getPhrase('contact.you_need_to_choose_a_category'), 'subject' => Phpfox::getPhrase('contact.provide_a_subject'), 'full_name' => Phpfox::getPhrase('contact.provide_your_full_name'));
// do they need to complete a captcha challenge?
if (Phpfox::isModule('captcha') && Phpfox::getParam('contact.contact_enable_captcha')) {
$aValidation['image_verification'] = Phpfox::getPhrase('captcha.complete_captcha_challenge');
}
// They always need to input their email address
$aValidation['email'] = array('def' => 'email', 'title' => Phpfox::getPhrase('contact.provide_a_valid_email'));
$oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_contact_form', 'aParams' => $aValidation));
// check if we're getting a request:
if ($aVals = $this->request()->getArray('val')) {
// check the fields are valid
if ($oValid->isValid($aVals)) {
if (Phpfox::getService('contact.contact')->sendContactMessage($aVals)) {
if (!empty($aVals['category_id']) && $aVals['category_id'] == 'phpfox_sales_ticket') {
$this->url()->send('contact', array('sent' => 'true'));
} else {
$this->url()->send('contact', null, Phpfox::getPhrase('contact.your_message_was_successfully_sent'));
}
} else {
$this->template()->assign(array('aContactErrors' => Phpfox_Error::set(Phpfox::getPhrase('error.site_email_not_set'))));
}
}
}
if (Phpfox::isUser()) {
$this->template()->assign(array('sFullName' => Phpfox::getUserBy('full_name'), 'sEmail' => Phpfox::getUserBy('email')));
}
$this->template()->setTitle(Phpfox::getPhrase('contact.contact_us'))->setBreadcrumb(Phpfox::getPhrase('contact.contact_us'))->assign(array('sCreateJs' => $oValid->createJs(), 'sGetJsForm' => $oValid->getJsForm(), 'bIsSent' => $this->request()->get('sent')))->setFullSite();
}
示例5: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
if ($aOrder = $this->request()->getArray('order'))
{
if (Phpfox::getService('event.category.process')->updateOrder($aOrder))
{
$this->url()->send('admincp.event', null, Phpfox::getPhrase('event.category_order_successfully_updated'));
}
}
if ($iDelete = $this->request()->getInt('delete'))
{
if (Phpfox::getService('event.category.process')->delete($iDelete))
{
$this->url()->send('admincp.event', null, Phpfox::getPhrase('event.category_successfully_deleted'));
}
}
$this->template()->setTitle(Phpfox::getPhrase('event.manage_categories'))
->setBreadcrumb(Phpfox::getPhrase('event.manage_categories'), $this->url()->makeUrl('admincp.event'))
->setPhrase(array(
'event.are_you_sure_this_will_delete_all_events_that_belong_to_this_category_and_cannot_be_undone'
)
)
->setHeader(array(
'jquery/ui.js' => 'static_script',
'admin.js' => 'module_event',
'<script type="text/javascript">$Core.event.url(\'' . $this->url()->makeUrl('admincp.event') . '\');</script>'
)
)
->assign(array(
'sCategories' => Phpfox::getService('event.category')->display('admincp')->get()
)
);
}
示例6: process
public function process()
{
Phpfox::isUser(true);
Phpfox::getUserParam('profiles.is_enabled', true);
if ($sName = $this->request()->get('req3')) {
$aExtraProfile = Phpfox::getService('profiles')->getProfile($sName);
}
if (count($aExtraProfile) == 0) {
return Phpfox::getLib('module')->setController('error.404');
}
if (Phpfox::getUserId() != $aExtraProfile['user_id']) {
Phpfox::getUserParam('profiles.can_edit_others', true);
if (($aUser = Phpfox::getService('user')->getUser($aExtraProfile['user_id'], 'u.user_group_id')) && isset($aUser['user_group_id'])) {
$iUserGroupId = $aUser['user_group_id'];
}
} else {
$iUserGroupId = Phpfox::getUserBy('user_group_id');
}
$bIsEdit = false;
if ($iId = $this->request()->getInt('id', false)) {
$iUserGroupId = $iId;
if ($aVals = $this->request()->getArray('custom') && !empty($aVals)) {
$bIsEdit = true;
if (Phpfox::getService('profiles.process')->updateFields($aExtraProfile['extra_id'], $aExtraProfile['user_id'], $aVals)) {
$this->url()->send('profiles.' . $aExtraProfile['title_url'], null, Phpfox::getPhrase('profiles.successfully_updated_name_profile', array('extra_name' => $aExtraProfile['title'])));
}
}
}
$aCustomFields = Phpfox::getService('profiles')->getFields(array('extra_main', 'extra_panel', 'extra_side'), $aExtraProfile['extra_id'], $iUserGroupId);
$this->template()->setTitle(Phpfox::getPhrase('profiles.edit_extra_profiles'))->setBreadcrumb($aExtraProfile['title']);
$this->template()->setHeader(array('custom.js' => 'module_profiles'))->assign(array('aExtraProfile' => $aExtraProfile, 'aSettings' => $aCustomFields, 'bIsEdit' => $bIsEdit));
}
示例7: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
if ($aTables = $this->request()->getArray('tables')) {
if ($this->request()->get('optimize')) {
foreach ($aTables as $sTable) {
Phpfox::getLib('database')->optimizeTable($sTable);
}
$this->url()->send('admincp.sql', null, Phpfox::getPhrase('admincp.table_s_successfully_optimized'));
} elseif ($this->request()->get('repair')) {
foreach ($aTables as $sTable) {
Phpfox::getLib('database')->repairTable($sTable);
}
$this->url()->send('admincp.sql', null, Phpfox::getPhrase('admincp.table_s_successfully_repaired'));
}
}
$aItems = Phpfox::getLib('database')->getTableStatus();
$iSize = 0;
$iOverhead = 0;
foreach ($aItems as $iKey => $aItem) {
$iSize += $aItem['Data_length'];
$iOverhead += $aItem['Data_free'];
$aItems[$iKey]['Name'] = $aItems[$iKey]['Name'];
}
$this->template()->setTitle(Phpfox::getPhrase('admincp.sql_maintenance_title'))->setBreadcrumb(Phpfox::getPhrase('admincp.sql_maintenance_title'), $this->url()->makeUrl('admincp.sql'))->assign(array('aItems' => $aItems, 'iSize' => $iSize, 'iOverhead' => $iOverhead, 'iCnt' => count($aItems)));
}
示例8: process
/**
* Controller
*/
public function process()
{
if (Phpfox::getParam('core.phpfox_is_hosted')) {
$this->url()->send('admincp');
}
$oArchiveExport = Phpfox::getLib('archive.export')->set(array('zip'));
$oArchiveImport = Phpfox::getLib('archive.import')->set(array('zip'));
if (($sExportId = $this->request()->get('id')) && !empty($sExportId)) {
if ($sData = Phpfox::getService('emoticon')->export($sExportId)) {
$oArchiveExport->download('phpfox-emoticon-' . $sExportId, 'xml', $sData);
}
}
if (isset($_FILES['import']) && ($aFile = $_FILES['import'])) {
if (preg_match('/^phpfox-emoticon-(.*?)\\.xml$/i', $aFile['name'], $aMatches)) {
if ($sXmlData = file_get_contents($aFile['tmp_name'])) {
$aParams = Phpfox::getLib('xml.parser')->parse($sXmlData);
if (($mReturn = Phpfox::getService('emoticon.process')->import($this->request()->getArray('val'), $aParams)) && is_array($mReturn)) {
$this->url()->send('admincp.emoticon.view', array('id' => $mReturn['id']), Phpfox::getPhrase('emoticon.emoticon_package_successfully_created', array('success' => $mReturn['success'], 'failed' => $mReturn['failed'])));
}
}
} else {
Phpfox_Error::set(Phpfox::getPhrase('emoticon.not_a_valid_emoticon_package_to_import'));
}
}
$this->template()->setTitle(Phpfox::getPhrase('emoticon.import_emoticons'))->setBreadcrumb(Phpfox::getPhrase('emoticon.emoticons'), $this->url()->makeUrl('admincp.emoticon.package'))->setBreadCrumb(Phpfox::getPhrase('emoticon.import_emoticons'), null, true);
}
示例9: process
public function process()
{
if ($aVals = $this->request()->getArray('val')) {
if (Phpfox::getService('custom.relation.process')->add($aVals)) {
$this->url()->send('admincp.custom.relationships', array(), Phpfox::getPhrase('custom.status_added'));
}
}
if ($iId = $this->request()->getInt('delete')) {
if (Phpfox::getService('custom.relation.process')->delete($iId)) {
$this->url()->send('admincp.custom.relationships', array(), Phpfox::getPhrase('custom.status_deleted'));
}
}
$aStatuses = Phpfox::getService('custom.relation')->getAll();
/* If we're editing lets make it easier and just find the one we're looking for here */
if ($iEdit = $this->request()->getInt('edit')) {
$aEdit = array();
foreach ($aStatuses as $aStatus) {
if ($aStatus['relation_id'] == $iEdit) {
$aEdit = $aStatus;
break;
}
}
if (empty($aEdit)) {
Phpfox_Error::display(Phpfox::getPhrase('custom.not_found'));
} else {
$this->template()->assign(array('aEdit' => $aEdit));
}
}
$this->template()->setTitle(Phpfox::getPhrase('custom.admin_menu_manage_relationships'))->setBreadcrumb(Phpfox::getPhrase('custom.admin_menu_manage_relationships'))->setPhrase(array())->assign(array('aStatuses' => $aStatuses));
}
示例10: process
/**
* Class process method which is used to execute this component.
*/
public function process()
{
if (!Phpfox::isModule('ad'))
{
return false;
}
if (defined('PHPFOX_IS_GROUP_VIEW'))
{
return false;
}
$aSponsorEvents = Phpfox::getService('event')->getRandomSponsored();
if (empty($aSponsorEvents))
{
return false;
}
Phpfox::getService('ad.process')->addSponsorViewsCount($aSponsorEvents['sponsor_id'], 'event');
$this->template()->assign(array(
'sHeader' => Phpfox::getPhrase('event.sponsored_event'),
'aSponsorEvents' => $aSponsorEvents,
'aFooter' => array(Phpfox::getPhrase('event.encourage_sponsor') => $this->url()->makeUrl('event', array('view' => 'my', 'sponsor' => 1)))
)
);
return 'block';
}
示例11: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$aValidation = array('name' => Phpfox::getPhrase('photo.provide_a_name_for_your_photo_category'));
$oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_form', 'aParams' => $aValidation));
if (($aOrder = $this->request()->getArray('order')) && Phpfox::getUserParam('photo.can_edit_photo_categories', true) && Phpfox::getService('photo.category.process')->updateOrder($aOrder)) {
$this->url()->send('admincp.photo', null, Phpfox::getPhrase('photo.photo_category_order_successfully_updated'));
}
if (!Phpfox::getUserParam('photo.can_add_public_categories') && !Phpfox::getUserParam('photo.can_edit_photo_categories')) {
return Phpfox_Error::display(Phpfox::getPhrase('photo.invalid_section'));
}
if ($aVals = $this->request()->getArray('val')) {
if ($oValid->isValid($aVals)) {
if (isset($aVals['delete']) && Phpfox::getUserParam('photo.can_edit_photo_categories', true)) {
if (Phpfox::getService('photo.category.process')->delete($aVals['edit_id'])) {
$this->url()->send('admincp.photo', null, Phpfox::getPhrase('photo.photo_category_successfully_deleted'));
}
} else {
if (isset($aVals['edit_id'])) {
Phpfox::getUserParam('photo.can_edit_photo_categories', true);
if (Phpfox::getService('photo.category.process')->update($aVals)) {
$this->url()->send('admincp.photo', null, Phpfox::getPhrase('photo.photo_category_successfully_updated'));
}
} else {
Phpfox::getUserParam('photo.can_add_public_categories', true);
if (Phpfox::getService('photo.category.process')->add($aVals)) {
$this->url()->send('admincp.photo', null, Phpfox::getPhrase('photo.photo_category_successfully_added'));
}
}
}
}
}
$this->template()->setTitle(Phpfox::getPhrase('photo.manage_photo_categories'))->setBreadCrumb(Phpfox::getPhrase('photo.manage_photo_categories'), $this->url()->makeUrl('admincp.photo'))->setHeader('cache', array('admin.js' => 'module_photo', 'jquery/ui.js' => 'static_script', 'sort.js' => 'module_photo'))->assign(array('sCreateJs' => $oValid->createJS(), 'sGetJsForm' => $oValid->getJsForm()));
}
示例12: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
if ($sPlugin = Phpfox_Plugin::get('core.component_controller_index_member_start')) {
eval($sPlugin);
}
Phpfox::isUser(true);
if ($this->request()->get('req3') == 'customize') {
define('PHPFOX_IN_DESIGN_MODE', true);
define('PHPFOX_CAN_MOVE_BLOCKS', true);
if ($iTestStyle = $this->request()->get('test_style_id')) {
if (Phpfox::getLib('template')->testStyle($iTestStyle)) {
}
}
$aDesigner = array('current_style_id' => Phpfox::getUserBy('style_id'), 'design_header' => Phpfox::getPhrase('core.customize_dashboard'), 'current_page' => $this->url()->makeUrl(''), 'design_page' => $this->url()->makeUrl('core.index-member', 'customize'), 'block' => 'core.index-member', 'item_id' => Phpfox::getUserId(), 'type_id' => 'user');
$this->setParam('aDesigner', $aDesigner);
$this->template()->setPhrase(array('theme.are_you_sure'))->setHeader('cache', array('style.css' => 'style_css', 'video.css' => 'module_video', 'design.js' => 'module_theme', 'select.js' => 'module_theme'));
if (Phpfox::getParam('profile.can_drag_drop_blocks_on_profile')) {
$this->template()->setHeader('cache', array('jquery/ui.js' => 'static_script', 'sort.js' => 'module_theme'))->setHeader(array('<script type="text/javascript">$Behavior.core_controller_member_designonupdate = function() { function designOnUpdate() { $Core.design.updateSorting(); } };</script>', '<script type="text/javascript">$Behavior.core_controller_init = function() { $Core.design.init({type_id: \'user\'}); };</script>'));
}
} else {
// $this->template()->setHeader('jquery/ui.js', 'static_script');
$this->template()->setHeader('cache', array('sort.js' => 'module_theme', 'design.js' => 'module_theme', 'video.css' => 'module_video'))->setHeader(array());
}
if (Phpfox::getParam('video.convert_servers_enable')) {
$this->template()->setHeader('<script type="text/javascript">document.domain = "' . Phpfox::getParam('video.convert_js_parent') . '";</script>');
}
Phpfox::getLib('module')->setCacheBlockData(array('table' => 'user_dashboard', 'field' => 'user_id', 'item_id' => Phpfox::getUserId(), 'controller' => 'core.index-member'));
$this->template()->setHeader('cache', array('feed.js' => 'module_feed', 'welcome.css' => 'style_css', 'announcement.css' => 'style_css', 'comment.css' => 'style_css', 'quick_edit.js' => 'static_script', 'jquery/plugin/jquery.highlightFade.js' => 'static_script', 'jquery/plugin/jquery.scrollTo.js' => 'static_script', 'player/flowplayer/flowplayer.js' => 'static_script'))->setEditor(array('load' => 'simple'));
}
示例13: process
/**
* Controller
*/
public function process()
{
if (!$this->getParam('bIsValidImage')) {
return false;
}
$aUser = $this->getParam('aUser');
$aPhoto = $this->getParam('aPhoto');
$bIsInPhoto = $this->getParam('is_in_photo');
if ($aPhoto === null) {
return false;
}
$sCategories = '';
if (isset($aPhoto['categories']) && is_array($aPhoto['categories'])) {
foreach ($aPhoto['categories'] as $aCategory) {
$sCategories .= $aCategory[0] . ',';
}
$sCategories = rtrim($sCategories, ',');
}
$aInfo = array(Phpfox::getPhrase('photo.added') => '<span itemprop="dateCreated">' . Phpfox::getTime(Phpfox::getParam('photo.photo_image_details_time_stamp'), $aPhoto['time_stamp']) . '</span>', Phpfox::getPhrase('photo.category') => $sCategories, Phpfox::getPhrase('photo.file_size') => Phpfox_File::instance()->filesize($aPhoto['file_size']), Phpfox::getPhrase('photo.resolution') => $aPhoto['width'] . '×' . $aPhoto['height'], Phpfox::getPhrase('photo.comments') => $aPhoto['total_comment'], Phpfox::getPhrase('photo.views') => '<span itemprop="interactionCount">' . $aPhoto['total_view'] . '</span>', Phpfox::getPhrase('photo.rating') => round($aPhoto['total_rating']), Phpfox::getPhrase('photo.battle_wins') => round($aPhoto['total_battle']), Phpfox::getPhrase('photo.downloads') => $aPhoto['total_download']);
if ($bIsInPhoto) {
unset($aInfo[Phpfox::getPhrase('photo.added')]);
}
foreach ($aInfo as $sKey => $mValue) {
if (empty($mValue)) {
unset($aInfo[$sKey]);
}
}
$this->template()->assign(array('sHeader' => Phpfox::getPhrase('photo.image_details'), 'aPhotoDetails' => $aInfo, 'bIsInPhoto' => $bIsInPhoto, 'sUrlPath' => preg_match("/\\{file\\/pic\\/(.*)\\/(.*)\\.jpg\\}/i", $aPhoto['destination'], $aMatches) ? Phpfox::getParam('core.path') . str_replace(array('{', '}'), '', $aMatches[0]) : ($aPhoto['server_id'] && Phpfox::getParam('core.allow_cdn') ? Phpfox::getLib('cdn')->getUrl(Phpfox::getParam('photo.url_photo') . sprintf($aPhoto['destination'], '_500'), $aPhoto['server_id']) : Phpfox::getParam('photo.url_photo') . sprintf($aPhoto['destination'], '_500'))));
// return 'block';
}
示例14: process
/**
* Controller
*/
public function process()
{
$this->url()->send('admincp');
list($aGroups, $aModules, $aProductGroups) = Phpfox::getService('admincp.setting.group')->get();
$this->template()->setBreadCrumb(Phpfox::getPhrase('admincp.manage_settings'))->setTitle(Phpfox::getPhrase('admincp.manage_settings'))->assign(array('aGroups' => $aGroups, 'aModules' => $aModules, 'aProductGroups' => $aProductGroups));
($sPlugin = Phpfox_Plugin::get('admincp.component_controller_setting_index_process')) ? eval($sPlugin) : false;
}
示例15: getApiSupportedMethods
public function getApiSupportedMethods()
{
$aMethods = array();
$aMethods[] = array('call' => 'getNewCount', 'requires' => array('user_id' => 'user_id'), 'detail' => Phpfox::getPhrase('notification.get_the_total_number_of_unseen_notifications_if_you_do_not_pass_the_user_id_we_will_return_information_about_the_user_that_is_currently_logged_in'), 'type' => 'GET', 'response' => '{"api":{"total":5,"pages":0,"current_page":0},"output":5}');
$aMethods[] = array('call' => 'get', 'requires' => array('user_id' => 'user_id'), 'detail' => Phpfox::getPhrase('notification.get_all_of_the_users_notifications_if_you_do_not_pass_the_user_id_we_will_return_information_about_the_user_that_is_currently_logged_in'), 'type' => 'GET', 'response' => '{"api":{"total":0,"pages":0,"current_page":0},"output":[{"notification_id":"3","link":"http:\\/\\/[DOMAIN_REPLACE]\\/john-doe\\/comment-id_1\\/","message":"Jane Doe commented on your wall","icon":"http:\\/\\/[DOMAIN_REPLACE]\\/module\\/blog\\/static\\/image\\/default\\/default\\/activity.png"}]}');
return array('module' => 'notification', 'module_info' => '', 'methods' => $aMethods);
}