当前位置: 首页>>代码示例>>PHP>>正文


PHP camp_load_translation_strings函数代码示例

本文整理汇总了PHP中camp_load_translation_strings函数的典型用法代码示例。如果您正苦于以下问题:PHP camp_load_translation_strings函数的具体用法?PHP camp_load_translation_strings怎么用?PHP camp_load_translation_strings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了camp_load_translation_strings函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: smarty_block_user_form

/**
 * Campsite user_form block plugin
 *
 * Type:     block
 * Name:     user_form
 * Purpose:  Provides a...
 *
 * @param string
 *     $p_params
 * @param string
 *     $p_smarty
 * @param string
 *     $p_content
 *
 * @return
 *
 */
function smarty_block_user_form($p_params, $p_content, &$p_smarty, &$p_repeat)
{
    $p_smarty->smarty->loadPlugin('smarty_function_get_resource_id');
    $resourceId = smarty_function_get_resource_id($p_params, $p_smarty);
    if (!isset($p_content)) {
        return null;
    }
    $p_smarty->smarty->loadPlugin('smarty_shared_escape_special_chars');
    $campsite = $p_smarty->getTemplateVars('gimme');
    $url = $campsite->url;
    $url->uri_parameter = "";
    $template = null;
    if (isset($p_params['template'])) {
        $template = new MetaTemplate($resourceId);
        if (!$template->defined()) {
            CampTemplate::singleton()->trigger_error('invalid template "' . $p_params['template'] . '" specified in the user form');
            return false;
        }
    } elseif (is_numeric($url->get_parameter('tpl'))) {
        $template = $campsite->default_template;
    }
    if (!isset($p_params['submit_button'])) {
        require_once $GLOBALS['g_campsiteDir'] . '/admin-files/localizer/Localizer.php';
        if (!isGS('Submit')) {
            camp_load_translation_strings("globals", $campsite->language->code);
        }
        $p_params['submit_button'] = getGS('Submit');
    }
    if (!isset($p_params['html_code']) || empty($p_params['html_code'])) {
        $p_params['html_code'] = '';
    }
    if (!isset($p_params['button_html_code']) || empty($p_params['button_html_code'])) {
        $p_params['button_html_code'] = '';
    }
    if (isset($template)) {
        $url->uri_parameter = "template " . str_replace(' ', "\\ ", $template->name);
    }
    if ($campsite->user->defined && $campsite->user->subscription->defined) {
        $subsType = $campsite->user->subscription->type == 'T' ? 'trial' : 'paid';
    } else {
        $subsType = null;
    }
    $html = "<form name=\"edit_user\" action=\"" . $url->uri_path . "\" method=\"post\" " . $p_params['html_code'] . ">\n";
    if (!is_null($subsType)) {
        $html .= "<input type=\"hidden\" name=\"f_substype\" value=\"" . $subsType . "\" />\n";
    }
    if (isset($template)) {
        $html .= "<input type=\"hidden\" name=\"tpl\" value=\"" . $template->identifier . "\" />\n";
    }
    foreach ($campsite->url->form_parameters as $param) {
        if ($param['name'] == 'tpl') {
            continue;
        }
        $html .= '<input type="hidden" name="' . $param['name'] . '" value="' . htmlentities($param['value']) . "\" />\n";
    }
    $html .= $p_content;
    $html .= "<input type=\"submit\" name=\"f_edit_user\" value=\"" . smarty_function_escape_special_chars($p_params['submit_button']) . "\" " . $p_params['button_html_code'] . " />\n</form>\n";
    return $html;
}
开发者ID:nidzix,项目名称:Newscoop,代码行数:76,代码来源:block.user_form.php

示例2: init

 public function init()
 {
     camp_load_translation_strings('article_images');
     $this->renditions = $this->_helper->service('image.rendition')->getRenditions();
     $this->_helper->contextSwitch()->addActionContext('edit', 'json')->addActionContext('set-rendition', 'json')->addActionContext('remove-rendition', 'json')->addActionContext('article-attach', 'json')->addActionContext('set-attach', 'json')->addActionContext('set-detach', 'json')->addActionContext('upload', 'json')->addActionContext('edit-image-data', 'json')->initContext();
     $this->view->previewWidth = 150;
     $this->view->previewHeight = 150;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:8,代码来源:ImageController.php

示例3: init

 /**
  * @var Newscoop\Services\Resource\ResourceId
  */
 public function init()
 {
     camp_load_translation_strings('api');
     camp_load_translation_strings('articles');
     $this->playlistRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Playlist');
     $this->playlistArticleRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\PlaylistArticle');
     $this->_helper->contextSwitch->addActionContext('list-data', 'json')->addActionContext('save-data', 'json')->addActionContext('delete', 'json')->initContext();
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:11,代码来源:PlaylistController.php

示例4: init

 public function init()
 {
     camp_load_translation_strings('article_images');
     $this->_helper->contextSwitch()->addActionContext('add-item', 'json')->addActionContext('set-order', 'json')->addActionContext('remove-item', 'json')->addActionContext('index', 'json')->initContext();
     $this->view->previewWidth = 100;
     $this->view->previewHeight = 100;
     $this->_helper->layout->setLayout('iframe');
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:8,代码来源:SlideshowController.php

示例5: init

 /**
  */
 public function init()
 {
     camp_load_translation_strings('users');
     $this->userService = $this->_helper->service('user');
     $this->userTypeService = $this->_helper->service('user_type');
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginator.phtml');
     $this->_helper->contextSwitch->addActionContext('index', 'json')->initContext();
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:10,代码来源:UserController.php

示例6: init

 public function init()
 {
     camp_load_translation_strings('api');
     camp_load_translation_strings('users');
     camp_load_translation_strings('user_subscriptions');
     $currency = new Zend_Currency('en_US');
     Zend_Registry::set('Zend_Currency', $currency);
     $this->_helper->layout->setLayout('modal');
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:9,代码来源:SubscriptionController.php

示例7: init

 public function init()
 {
     camp_load_translation_strings('comments');
     // get feedback repository
     $this->feedbackRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Feedback');
     //$this->form = new Admin_Form_Comment;
     //$this->editForm = new Admin_Form_Comment_EditForm;
     return $this;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:9,代码来源:FeedbackController.php

示例8: init

 public function init()
 {
     camp_load_translation_strings('comments');
     // get comment repository
     $this->repository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Comment\\Acceptance');
     $this->form = new Admin_Form_CommentAcceptance();
     $this->form->setMethod('post');
     return $this;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:9,代码来源:CommentAcceptanceController.php

示例9: __construct

 /**
  */
 public function __construct()
 {
     global $Campsite, $ADMIN;
     // set paths
     $this->web = $Campsite['WEBSITE_URL'];
     $this->path = $this->web . '/admin/libs/ArticleList';
     camp_load_translation_strings('articles');
     camp_load_translation_strings('library');
     $this->id = substr(sha1(get_class($this)), -6);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:12,代码来源:BaseList.php

示例10: RemoveTopicFromArticle

	/**
	 * Unlink a topic from an article.
	 * @param int $p_topicId
	 * @param int $p_articleNumber
	 * @return void
	 */
	public static function RemoveTopicFromArticle($p_topicId, $p_articleNumber)
	{
		global $g_ado_db;
		$queryStr = "DELETE FROM ArticleTopics WHERE NrArticle=$p_articleNumber AND TopicId=$p_topicId";
		$g_ado_db->Execute($queryStr);
		if (function_exists("camp_load_translation_strings")) {
			camp_load_translation_strings("api");
		}
		$logtext = getGS('Article topic $1 deleted from article $2', $p_topicId, $p_articleNumber);
		Log::Message($logtext, null, 145);
	} // fn RemoveTopicFromArticle
开发者ID:nistormihai,项目名称:Newscoop,代码行数:17,代码来源:ArticleTopic.php

示例11: create

  	/**
  	 * @param array $p_values
  	 * @return boolean
  	 */
  	public function create($p_values = null)
  	{
  		$success = parent::create($p_values);
  		$publicationObj = new Publication($this->m_data['IdPublication']);
		if (function_exists("camp_load_translation_strings")) {
			camp_load_translation_strings("api");
		}
		$logtext = getGS('The default subscription time for ($1 "$2":$3) has been added.', getGS("Publication"), $publicationObj->getName(), $this->m_data['CountryCode']);
		Log::Message($logtext, null, 4);
		return $success;
  	} // fn create
开发者ID:nistormihai,项目名称:Newscoop,代码行数:15,代码来源:SubscriptionDefaultTime.php

示例12: init

 public function init()
 {
     camp_load_translation_strings('user_types');
     $this->ruleRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Acl\\Rule');
     $this->ruleTypes = array('allow' => getGS('Allow'), 'deny' => getGS('Deny'));
     $this->groups = array('authoring' => getGS('Authoring'), 'structure' => getGS('Structure'), 'layout' => getGS('Layout'), 'users' => getGS('Users'), 'system' => getGS('System'), 'plugins' => getGS('Plugins'));
     $this->resources = array('authoring' => array('article' => getGS('Articles'), 'image' => getGS('Images'), 'comment' => getGS('Comments'), 'feedback' => getGS('Feedback Messages'), 'file' => getGS('Files'), 'editor' => getGS('Rich-Text Editor Preferences')), 'structure' => array('publication' => getGS('Publications'), 'issue' => getGS('Issues'), 'section' => getGS('Sections'), 'topic' => getGS('Topics'), 'language' => getGS('Languages'), 'playlist' => getGS('Article Playlists')), 'users' => array('user-group' => getGS('User Groups'), 'user' => getGS('Staff'), 'author' => getGS('Authors'), 'subscriber' => getGS('Subscribers'), 'subscription' => getGS('Subscriptions')), 'layout' => array('theme' => getGS('Themes'), 'template' => getGS('Templates'), 'article-type' => getGS('Article Types')), 'system' => array('system-preferences' => getGS('Global'), 'indexer' => getGS('Search Indexer'), 'country' => getGS('Countries'), 'log' => getGS('Log'), 'localizer' => getGS('Localizer'), 'backup' => getGS('Backup'), 'cache' => getGS('Cache'), 'notification' => getGS('Notification')), 'plugins' => array('plugin' => getGS('Plugins'), 'pluginpoll' => getGS('Polls'), 'plugin-recaptcha' => getGS('ReCaptcha'), 'plugin-soundcloud' => getGS('Soundcloud')));
     // i18n
     $this->actions = array('add' => getGS('add'), 'admin' => getGS('admin'), 'attach' => getGS('attach'), 'clear' => getGS('clear'), 'delete' => getGS('delete'), 'edit' => getGS('edit'), 'enable' => getGS('enable'), 'guest' => getGS('guest'), 'manage' => getGS('manage'), 'moderate' => getGS('moderate'), 'moderator' => getGS('moderate'), 'move' => getGS('move'), 'notify' => getGS('notify'), 'publish' => getGS('publish'), 'translate' => getGS('translate'), 'view' => getGS('view'), 'bold' => getGS('bold'), 'charactermap' => getGS('character map'), 'copycutpaste' => getGS('copy/cut/paste'), 'enlarge' => getGS('enlarge'), 'findreplace' => getGS('find/replace'), 'fontcolor' => getGS('font color'), 'fontface' => getGS('font face'), 'fontsize' => getGS('font size'), 'horizontalrule' => getGS('horizontal rule'), 'image' => getGS('image'), 'indent' => getGS('indent'), 'italic' => getGS('italic'), 'link' => getGS('link'), 'listbullet' => getGS('list bullet'), 'listnumber' => getGS('list number'), 'sourceview' => getGS('source view'), 'spellcheckerenabled' => getGS('spell checker enabled'), 'statusbar' => getGS('statusbar'), 'strikethrough' => getGS('strikethrough'), 'subhead' => getGS('subhead'), 'subscript' => getGS('subscript'), 'superscript' => getGS('superscript'), 'table' => getGS('table'), 'textalignment' => getGS('text alignment'), 'textdirection' => getGS('text direction'), 'underline' => getGS('underline'), 'undoredo' => getGS('undo/redo'));
     $this->_helper->contextSwitch()->addActionContext('edit', 'json')->initContext();
     $this->acl = Zend_Registry::get('acl');
     $this->resource = $this->_getParam('user', false) ? 'user' : 'user-group';
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:13,代码来源:AclController.php

示例13: init

 public function init()
 {
     camp_load_translation_strings('comments');
     // get comment repository
     $this->commentRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Comment');
     // get article repository
     $this->articleRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Article');
     // get language repository
     $this->languageRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Language');
     $this->form = new Admin_Form_Comment();
     $this->editForm = new Admin_Form_Comment_EditForm();
     return $this;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:13,代码来源:CommentController.php

示例14: AddAuthorTypeToAuthor

    /**
     * @param int $p_authorId
     * @param int $p_authorTypeId
     * @return void
     */
    public static function AddAuthorTypeToAuthor($p_authorId, $p_authorTypeId)
    {
        global $g_ado_db;

        $queryStr = 'INSERT IGNORE INTO ' . self::TABLE . ' (fk_author_id, fk_type_id)
            VALUES (' . (int) $p_authorId . ', ' . (int) $p_authorTypeId . ')';
        $g_ado_db->Execute($queryStr);
        if (function_exists("camp_load_translation_strings")) {
            camp_load_translation_strings("api");
        }
        $logText = getGS('Author type $1 linked to author $2', $p_authorTypeId, $p_authorId);
        Log::Message($logText, null, 175);
    }
开发者ID:nistormihai,项目名称:Newscoop,代码行数:18,代码来源:AuthorAssignedType.php

示例15: delete

	public function delete()
	{
	    $articleNumber = $this->getArticleNumber();
	    $deleted = parent::delete();
	    if ($deleted) {
	        if (function_exists("camp_load_translation_strings")) {
		    camp_load_translation_strings("api");
		}
		$logtext = getGS('Scheduled action deleted from Article #$1',
				 $articleNumber);
		Log::Message($logtext, null, 37);
	    }
	    return $deleted;
	} // fn delete
开发者ID:nistormihai,项目名称:Newscoop,代码行数:14,代码来源:ArticlePublish.php


注:本文中的camp_load_translation_strings函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。