• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CampTemplate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: smarty_function_set_language

/**
 * Campsite set_language function plugin
 *
 * Type:     function
 * Name:     set_language
 * Purpose:
 *
 * @param array
 *     $p_params The English name of the language to be set
 * @param object
 *     $p_smarty The Smarty object
 */
function smarty_function_set_language($p_params, &$p_smarty)
{
    // gets the context variable
    $campsite = $p_smarty->get_template_vars('gimme');

    if (isset($p_params['name'])) {
    	$languageName = $p_params['name'];
    } else {
    	$property = array_shift(array_keys($p_params));
        CampTemplate::singleton()->trigger_error("invalid parameter '$property' in set_language");
    	return false;
    }

    if ($campsite->language->defined
            && $campsite->language->english_name == $languageName) {
        return;
    }

    $languages = Language::GetLanguages(null, null, $languageName);
    if (empty($languages)) {
    	$campsite->language->trigger_invalid_value_error('name', $languageName, $p_smarty);
    	return false;
    }
    $campsite->language = new MetaLanguage($languages[0]->getLanguageId());
} // fn smarty_function_set_language
开发者ID:nistormihai,项目名称:Newscoop,代码行数:37,代码来源:function.set_language.php


示例2: smarty_function_set_section

/**
 * Campsite set_section function plugin
 *
 * Type:     function
 * Name:     set_section
 * Purpose:
 *
 * @param array
 *     $p_params[name] The Name of the section to be set
 *     $p_params[number] The Number of the section to be set
 * @param object
 *     $p_smarty The Smarty object
 */
function smarty_function_set_section($p_params, &$p_smarty)
{
    // gets the context variable
    $campsite = $p_smarty->getTemplateVars('gimme');
    if (isset($p_params['number'])) {
        $attrName = 'number';
        $attrValue = $p_params['number'];
        $sectionNumber = intval($p_params['number']);
    } elseif (isset($p_params['name'])) {
        $sections = Section::GetSections($campsite->publication->identifier, $campsite->issue->number, $campsite->language->number, null, $p_params['name']);
        if (isset($sections[0])) {
            $attrName = 'name';
            $attrValue = $p_params['name'];
            $sectionNumber = intval($sections[0]->getSectionNumber());
        } else {
            $campsite->section->trigger_invalid_value_error($attrName, $attrValue, $p_smarty);
            return false;
        }
    } else {
        $property = array_shift(array_keys($p_params));
        CampTemplate::singleton()->trigger_error("invalid parameter '{$property}' in set_section");
        return false;
    }
    if ($campsite->section->defined && $campsite->section->number == $sectionNumber) {
        return;
    }
    $sectionObj = new MetaSection($campsite->publication->identifier, $campsite->issue->number, $campsite->language->number, $sectionNumber);
    if ($sectionObj->defined) {
        $campsite->section = $sectionObj;
    }
}
开发者ID:sourcefabric,项目名称:newscoop,代码行数:44,代码来源:function.set_section.php


示例3: indexAction

 public function indexAction()
 {
     if ($this->_getParam('language')) {
         $gimme = CampTemplate::singleton()->context();
         $gimme->language = MetaLanguage::createFromCode($this->_getParam('language'));
     }
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:7,代码来源:SearchController.php


示例4: smarty_function_render

/**
 * Campsite render function plugin
 *
 * Type:     function
 * Name:     render
 * Purpose:  template rendering
 *
 * @param array
 *     $p_params
 * @param object
 *     $p_smarty The Smarty object
 *
 * @return
 *     rendered content
 */
function smarty_function_render($p_params, &$p_smarty)
{
    if (empty($p_params['file'])) {
        return null;
    }
    $smarty = CampTemplate::singleton();
    $cache_lifetimeBak = $smarty->cache_lifetime;
    $campsiteVectorBak = $smarty->campsiteVector;
    if (SystemPref::Get('TemplateCacheHandler')) {
        $campsiteVector = $smarty->campsiteVector;
        foreach ($campsiteVector as $key => $value) {
            if (isset($p_params[$key])) {
                if (empty($p_params[$key]) || strtolower($p_params[$key]) == 'off') {
                    $campsiteVector[$key] = null;
                }
                if (is_int($p_params[$key])) {
                    $campsiteVector[$key] = $p_params[$key];
                }
            }
        }
        if (isset($p_params['params'])) {
            $campsiteVector['params'] = $p_params['params'];
        }
        $smarty->campsiteVector = $campsiteVector;
        if (empty($p_params['cache'])) {
            $template = new Template(CampSite::GetURIInstance()->getThemePath() . $p_params['file']);
            $smarty->cache_lifetime = (int) $template->getCacheLifetime();
        } else {
            $smarty->cache_lifetime = (int) $p_params['cache'];
        }
    }
    $smarty->display($p_params['file']);
    $smarty->cache_lifetime = $cache_lifetimeBak;
    $smarty->campsiteVector = $campsiteVectorBak;
}
开发者ID:nidzix,项目名称:Newscoop,代码行数:50,代码来源:function.render.php


示例5: ProcessParameters

 /**
  * Processes the input parameters passed in an array; drops the invalid
  * parameters and parameters with invalid values. Returns an array of
  * valid parameters.
  *
  * @param array $p_parameters
  * @return array
  */
 protected function ProcessParameters(array $p_parameters)
 {
     $parameters = array();
     foreach ($p_parameters as $parameter => $value) {
         $parameter = strtolower($parameter);
         switch ($parameter) {
             case 'length':
             case 'columns':
             case 'name':
                 if ($parameter == 'length' || $parameter == 'columns') {
                     $intValue = (int) $value;
                     if ("{$intValue}" != $value || $intValue < 0) {
                         CampTemplate::singleton()->trigger_error("invalid value {$value} of parameter {$parameter} in statement list_article_locations");
                     }
                     $parameters[$parameter] = (int) $value;
                 } else {
                     $parameters[$parameter] = $value;
                 }
                 break;
             default:
                 CampTemplate::singleton()->trigger_error("invalid parameter {$parameter} in list_article_locations", $p_smarty);
         }
     }
     $operator = new Operator('is', 'integer');
     $context = CampTemplate::singleton()->context();
     if (!$context->article->defined) {
         CampTemplate::singleton()->trigger_error("undefined environment attribute 'Article' in statement list_article_locations");
         return array();
     }
     $this->m_constraints[] = new ComparisonOperation('article', $operator, $context->article->number);
     return $parameters;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:40,代码来源:ArticleLocationsList.php


示例6: smarty_block_search_form

/**
 * Campsite search_form block plugin
 *
 * Type:     block
 * Name:     search_form
 * Purpose:  Provides a...
 *
 * @param string $p_params
 *
 * @param string $p_content
 *
 * @param string $p_smarty
 *
 *
 * @return string $html
 */
function smarty_block_search_form($p_params, $p_content, &$p_smarty)
{
    if (!isset($p_content)) {
        return '';
    }

    require_once $p_smarty->_get_plugin_filepath('shared','escape_special_chars');

    // gets the context variable
    $campsite = $p_smarty->get_template_vars('gimme');

    $url = $campsite->url;
    $url->uri_parameter = "";
    $template = null;
    if (isset($p_params['template'])) {
        $template = new MetaTemplate($p_params['template']);
        if (!$template->defined()) {
            CampTemplate::singleton()->trigger_error('invalid template "' . $p_params['template']
            . '" specified in the search form');
            return false;
        }
    } elseif (is_numeric($url->get_parameter('tpl'))) {
        $template = $campsite->default_template;
    }
    if (!isset($p_params['submit_button'])) {
        $p_params['submit_button'] = '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'] = '';
    }

    $searchListIdPrefix = $campsite->list_id_prefix('SearchResultsList');
    if (isset($template)) {
        $url->uri_parameter = "template " . str_replace(' ', "\\ ", $template->name);
    }
    $html = "<form name=\"search_articles\" action=\"" . $url->uri_path . "\" method=\"post\" "
    .$p_params['html_code'].">\n";
    if (isset($template)) {
        $html .= "<input type=\"hidden\" name=\"tpl\" value=\"" . $template->identifier . "\" />\n";
    }
    foreach ($campsite->url->form_parameters as $param) {
        if (strncasecmp($param[name], $searchListIdPrefix, strlen($searchListIdPrefix)) == 0) {
            continue;
        }
        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_search_articles\" value=\""
    .smarty_function_escape_special_chars($p_params['submit_button'])
    ."\" ".$p_params['button_html_code']." />\n</form>\n";

    return $html;
} // fn smarty_block_search_form
开发者ID:nistormihai,项目名称:Newscoop,代码行数:76,代码来源:block.search_form.php


示例7: smarty_function_set_topic

/**
 * Campsite set_topic function plugin
 *
 * Type:     function
 * Name:     set_topic
 * Purpose:
 *
 * @param array
 *     $p_params[name] The Name of the topic to be set
 *     $p_params[identifier] The Identifier of the topic to be set
 * @param object
 *     $p_smarty The Smarty object
 */
function smarty_function_set_topic($p_params, &$p_smarty)
{
    // gets the context variable
    $campsite = $p_smarty->getTemplateVars('gimme');
    if (isset($p_params['identifier'])) {
        $attrName = 'identifier';
        $attrValue = $p_params['identifier'];
        $topicId = intval($p_params['identifier']);
    } elseif (isset($p_params['name'])) {
        $attrName = 'name';
        $attrValue = $p_params['name'];
        $topicService = \Zend_Registry::get('container')->getService('newscoop_newscoop.topic_service');
        $topic = $topicService->getTopicByFullName($p_params['name']);
        if (!is_null($topic) && $topic) {
            $topicId = $topic->getId();
        } else {
            $campsite->topic->trigger_invalid_value_error($attrName, $attrValue, $p_smarty);
            return false;
        }
    } else {
        $property = array_shift(array_keys($p_params));
        CampTemplate::singleton()->trigger_error("invalid parameter '{$property}' in set_topic");
        return false;
    }
    if ($campsite->topic->defined && $campsite->topic->identifier == $topicId) {
        return;
    }
    $topicObj = new MetaTopic($topicId);
    if ($topicObj->defined) {
        $campsite->topic = $topicObj;
    } else {
        $campsite->topic->trigger_invalid_value_error($attrName, $attrValue, $p_smarty);
    }
}
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:47,代码来源:function.set_topic.php


示例8: convertParameters

 protected function convertParameters($firstResult, $parameters)
 {
     $this->criteria->orderBy = array();
     // run default simple parameters converting
     parent::convertParameters($firstResult, $parameters);
     // apply attributes as a filters
     if (array_key_exists('attributes', $parameters)) {
         $this->criteria->attributes = $this->parseConstraintsString($parameters['attributes']);
     }
     // convert your special parameters into criteria properties.
     if (array_key_exists('search', $parameters)) {
         $this->criteria->query = $parameters['search'];
     } elseif (array_key_exists('filter', $parameters)) {
         $filter = $parameters['filter'];
         $this->criteria->groups = !empty($parameters['editor_groups']) ? array_map('intval', explode(',', $parameters['editor_groups'])) : array();
         switch ($filter) {
             case 'active':
                 $this->criteria->orderBy = array('points' => 'desc');
                 $this->criteria->excludeGroups = true;
                 break;
             case 'editors':
                 $this->criteria->excludeGroups = false;
                 break;
             default:
                 $this->criteria->groups = array();
                 // example: filter="a-c"
                 if (preg_match('/([a-z])-([a-z])/', $filter, $matches)) {
                     $this->criteria->nameRange = range($matches[1], $matches[2]);
                 } else {
                     \CampTemplate::singleton()->trigger_error("invalid parameter {$filter} in filter");
                 }
                 break;
         }
     }
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:35,代码来源:UsersList.php


示例9: singleton

 /**
  * Singleton function that returns the global class object.
  *
  * @return object
  *    CampTemplate
  */
 public static function singleton()
 {
     if (!isset(self::$m_instance)) {
         self::$m_instance = new CampTemplate();
     }
     return self::$m_instance;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:13,代码来源:CampTemplate.php


示例10: smarty_function_set_publication

/**
 * Campsite set_publication function plugin
 *
 * Type:     function
 * Name:     set_publication
 * Purpose:
 *
 * @param array
 *     $p_params[name] The Name of the publication to be set
 *     $p_params[identifier] The Identifier of the publication to be set
 * @param object
 *     $p_smarty The Smarty object
 */
function smarty_function_set_publication($p_params, &$p_smarty)
{
    // gets the context variable
    $campsite = $p_smarty->getTemplateVars('gimme');
    if (isset($p_params['identifier'])) {
        $attrName = 'identifier';
        $attrValue = $p_params['identifier'];
        $publicationId = intval($p_params['identifier']);
    } elseif (isset($p_params['name'])) {
        $attrName = 'name';
        $attrValue = $p_params['name'];
        $publications = Publication::GetPublications($p_params['name']);
        if (!empty($publications)) {
            $publicationId = $publications[0]->getPublicationId();
        } else {
            $campsite->publication->trigger_invalid_value_error($attrName, $attrValue, $p_smarty);
            return false;
        }
    } else {
        $property = array_shift(array_keys($p_params));
        CampTemplate::singleton()->trigger_error("invalid parameter '{$property}' in set_publication");
        return false;
    }
    if ($campsite->publication->defined && $campsite->publication->identifier == $publicationId) {
        return;
    }
    $publicationObj = new MetaPublication($publicationId);
    if ($publicationObj->defined) {
        $campsite->publication = $publicationObj;
    } else {
        $campsite->publication->trigger_invalid_value_error($attrName, $attrValue, $p_smarty);
    }
}
开发者ID:nidzix,项目名称:Newscoop,代码行数:46,代码来源:function.set_publication.php


示例11: __construct

 public function __construct($publicationId, $userId)
 {
     $this->subscriptions = $this->getSubscriptions(\CampTemplate::singleton()->context()->publication->identifier, \CampTemplate::singleton()->context()->user->identifier);
     if (count($this->subscriptions) == 0) {
         $this->subscriptions = array();
     }
 }
开发者ID:riverans,项目名称:plugin-NewscoopPaywallBundle,代码行数:7,代码来源:MetaSubscriptions.php


示例12: getRightOperand

 /**
  * Returns the right operand
  *
  * @return mix
  */
 public function getRightOperand()
 {
     // some values have to be computed
     switch (strtolower($this->m_rightOperand)) {
         case 'now()':
             $this->m_rightOperand = strftime('%Y-%m-%d %H:%M:%S');
             break;
         case 'curdate()':
             $this->m_rightOperand = strftime('%Y-%m-%d');
             break;
         case 'curtime()':
             $this->m_rightOperand = strftime('%H:%M:%S');
             break;
         case 'current()':
             // this value indicates that the left operand have to compared with the value from current context
             // e.g. language_number is current()
             $Context = CampTemplate::singleton()->context();
             $object = strtolower($this->m_leftOperand);
             switch ($object) {
                 case 'language':
                 case 'publication':
                 case 'issue':
                 case 'section':
                 case 'article':
                     $this->m_rightOperand = $Context->{$object}->number;
                     break;
                 case 'publication':
                     $this->m_rightOperand = $Context->{$object}->identifier;
                     break;
             }
             break;
     }
     return $this->m_rightOperand;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:39,代码来源:ComparisonOperation.php


示例13: smarty_function_set_issue

/**
 * Campsite set_issue function plugin
 *
 * Type:     function
 * Name:     set_issue
 * Purpose:
 *
 * @param array
 *     $p_params The number of the issue to be set
 * @param object
 *     $p_smarty The Smarty object
 */
function smarty_function_set_issue($p_params, &$p_smarty)
{
    // gets the context variable
    $campsite = $p_smarty->get_template_vars('gimme');

    if (isset($p_params['number'])) {
    	$issueNumber = intval($p_params['number']);
    } else {
    	$property = array_shift(array_keys($p_params));
        CampTemplate::singleton()->trigger_error("invalid parameter '$property' in set_issue");
    	return false;
    }

    if ($campsite->issue->defined
            && $campsite->issue->number == $issueNumber) {
        return;
    }

    $issueObj = new MetaIssue($campsite->publication->identifier,
                              $campsite->language->number, $issueNumber);
    if ($issueObj->defined) {
        $campsite->issue = $issueObj;
    } else {
    	$campsite->issue->trigger_invalid_value_error('number', $p_params['number'], $p_smarty);
    }
} // fn smarty_function_set_issue
开发者ID:nistormihai,项目名称:Newscoop,代码行数:38,代码来源:function.set_issue.php


示例14: 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


示例15: getWeekDayName

 public function getWeekDayName()
 {
     $language = new Language(CampTemplate::singleton()->context()->language->number);
     if (!$language->exists()) {
         return null;
     }
     return $language->getProperty('WDay' . (int) $this->getWeekDay());
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:8,代码来源:MetaDate.php


示例16: isEnabled

 /**
  * Get enabled state
  * @return boolean
  */
 protected function isEnabled()
 {
     $languageId = (int) CampTemplate::singleton()->context()->language->number;
     if ($this->m_dbObject->isEnabled($languageId)) {
         return true;
     }
     return false;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:12,代码来源:MetaMapLocation.php


示例17: getBiography

 protected function getBiography()
 {
     if (is_null($this->m_biography)) {
         $language = (int) CampTemplate::singleton()->context()->language->number;
         $this->m_biography = new MetaAuthorBiography($this->m_dbObject->getId(), $language);
     }
     return $this->m_biography;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:8,代码来源:MetaAuthor.php


示例18: smarty_block_comment_form

/**
 * Campsite comment_form block plugin
 *
 * Type:     block
 * Name:     comment_form
 * Purpose:  Displays a form for comment input
 *
 * @param string
 *     $p_params
 * @param string
 *     $p_smarty
 * @param string
 *     $p_content
 *
 * @return
 *
 */
function smarty_block_comment_form($p_params, $p_content, &$p_smarty, &$p_repeat)
{
    if (!isset($p_content)) {
        return '';
    }
    $p_smarty->smarty->loadPlugin('smarty_shared_escape_special_chars');
    $campsite = $p_smarty->getTemplateVars('gimme');
    if (!$campsite->article->comments_enabled) {
        return '';
    }
    $url = $campsite->url;
    $url->uri_parameter = "";
    $template = null;
    if (isset($p_params['template'])) {
        $themePath = $campsite->issue->defined() ? $campsite->issue->theme_path : $campsite->publication->theme_path;
        $template = new MetaTemplate($p_params['template'], $themePath);
        if (!$template->defined()) {
            CampTemplate::singleton()->trigger_error('invalid template "' . $p_params['template'] . '" specified in the comment form');
            return false;
        }
    } elseif (is_numeric($url->get_parameter('tpl'))) {
        $template = $campsite->default_template;
    }
    if (!isset($p_params['submit_button'])) {
        $p_params['submit_button'] = 'Submit';
    }
    $anchor = isset($p_params['anchor']) ? '#' . $p_params['anchor'] : null;
    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);
    }
    $html = "<form name=\"submit_comment\" action=\"" . $url->uri_path . "{$anchor}\" " . "method=\"post\" " . $p_params['html_code'] . ">\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";
    }
    if ($campsite->comment->identifier > 0) {
        $html .= "<input type=\"hidden\" name=\"acid\" " . "value=\"" . $campsite->comment->identifier . "\" />\n";
    }
    $html .= $p_content;
    $html .= "<input type=\"submit\" name=\"f_submit_comment\" " . "id=\"article_comment_submit\" value=\"" . smarty_function_escape_special_chars($p_params['submit_button']) . "\" " . $p_params['button_html_code'] . " />\n";
    if (isset($p_params['preview_button']) && !empty($p_params['preview_button'])) {
        $html .= "<input type=\"submit\" name=\"f_preview_comment\" " . "id=\"article_comment_preview\" value=\"" . smarty_function_escape_special_chars($p_params['preview_button']) . "\" " . $p_params['button_html_code'] . " />\n";
    }
    $html .= "</form>\n";
    return $html;
}
开发者ID:nidzix,项目名称:Newscoop,代码行数:74,代码来源:block.comment_form.php


示例19: getDescription

 protected function getDescription($p_languageId = null)
 {
     if (is_null($p_languageId)) {
         $smartyObj = CampTemplate::singleton();
         $contextObj = $smartyObj->getTemplateVars('gimme');
         $p_languageId = $contextObj->language->number;
     }
     return $this->m_dbObject->getDescription($p_languageId);
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:9,代码来源:MetaAttachment.php


示例20: languages_list

 /**
  * Returns a list of MetaLanguage objects - list of languages in which
  * the issue was translated.
  *
  * @param  boolean $p_excludeCurrent
  * @param  array   $p_order
  * @param  boolean $p_allIssues
  * @return array   of MetaLanguage
  */
 public function languages_list($p_excludeCurrent = true, array $p_order = array(), $p_allIssues = false)
 {
     $languages = $this->m_dbObject->getLanguages(false, $p_excludeCurrent, $p_order, $p_allIssues, !CampTemplate::singleton()->context()->preview);
     $metaLanguagesList = array();
     foreach ($languages as $language) {
         $metaLanguagesList[] = new MetaLanguage($language->getLanguageId());
     }
     return $metaLanguagesList;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:18,代码来源:MetaIssue.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Campaign类代码示例发布时间:2022-05-20
下一篇:
PHP CampCache类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap