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


PHP acymailing_initJSStrings函数代码示例

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


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

示例1: modify

 function modify()
 {
     global $Itemid;
     $app = JFactory::getApplication();
     $pathway = $app->getPathway();
     $document = JFactory::getDocument();
     $values = new stdClass();
     $values->show_page_heading = 0;
     $listsClass = acymailing_get('class.list');
     $subscriberClass = acymailing_get('class.subscriber');
     $jsite = JFactory::getApplication('site');
     $menus = $jsite->getMenu();
     $menu = $menus->getActive();
     if (empty($menu) and !empty($Itemid)) {
         $menus->setActive($Itemid);
         $menu = $menus->getItem($Itemid);
     }
     if (is_object($menu)) {
         jimport('joomla.html.parameter');
         $menuparams = new acyParameter($menu->params);
         if (!empty($menuparams)) {
             $this->assign('introtext', $menuparams->get('introtext'));
             $this->assign('finaltext', $menuparams->get('finaltext'));
             if ($menuparams->get('menu-meta_description')) {
                 $document->setDescription($menuparams->get('menu-meta_description'));
             }
             if ($menuparams->get('menu-meta_keywords')) {
                 $document->setMetadata('keywords', $menuparams->get('menu-meta_keywords'));
             }
             if ($menuparams->get('robots')) {
                 $document->setMetadata('robots', $menuparams->get('robots'));
             }
             if ($menuparams->get('page_title')) {
                 acymailing_setPageTitle($menuparams->get('page_title'));
             }
             $values->suffix = $menuparams->get('pageclass_sfx', '');
             $values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title');
             $values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading', 0) : $menuparams->get('show_page_title', 0);
         }
     }
     $subscriber = $subscriberClass->identify(true);
     if (empty($subscriber)) {
         $subscription = $listsClass->getLists('listid');
         $subscriber = new stdClass();
         $subscriber->html = 1;
         $subscriber->subid = 0;
         $subscriber->key = 0;
         if (!empty($subscription)) {
             foreach ($subscription as $id => $onesub) {
                 $subscription[$id]->status = 1;
                 if (!empty($menuparams) and strtolower($menuparams->get('listschecked', 'all')) != 'all' and !in_array($id, explode(',', $menuparams->get('listschecked', 'all')))) {
                     $subscription[$id]->status = 0;
                 }
             }
         }
         $pathway->addItem(JText::_('SUBSCRIPTION'));
         if (empty($menu)) {
             acymailing_setPageTitle(JText::_('SUBSCRIPTION'));
         }
     } else {
         $subscription = $subscriberClass->getSubscription($subscriber->subid, 'listid');
         $pathway->addItem(JText::_('MODIFY_SUBSCRIPTION'));
         if (empty($menu)) {
             acymailing_setPageTitle(JText::_('MODIFY_SUBSCRIPTION'));
         }
     }
     acymailing_initJSStrings();
     if (!empty($menuparams) and strtolower($menuparams->get('lists', 'all')) != 'all') {
         $visibleLists = strtolower($menuparams->get('lists', 'all'));
         if ($visibleLists == 'none') {
             $subscription = array();
         } else {
             $newSubscription = array();
             $visiblesListsArray = explode(',', $visibleLists);
             foreach ($subscription as $id => $onesub) {
                 if (in_array($id, $visiblesListsArray)) {
                     $newSubscription[$id] = $onesub;
                 }
             }
             $subscription = $newSubscription;
         }
     }
     if (!acymailing_level(3)) {
         if (!empty($menuparams) && strtolower($menuparams->get('customfields', 'default')) != 'default') {
             $fieldsToDisplay = strtolower($menuparams->get('customfields', 'default'));
             $this->assignRef('fieldsToDisplay', $fieldsToDisplay);
         } else {
             $this->assign('fieldsToDisplay', 'default');
         }
     }
     $displayLists = false;
     foreach ($subscription as $oneSub) {
         if (!empty($oneSub->published) and $oneSub->visible) {
             $displayLists = true;
             break;
         }
     }
     $this->assignRef('values', $values);
     $this->assign('status', acymailing_get('type.festatus'));
     $this->assignRef('subscription', $subscription);
//.........这里部分代码省略.........
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:101,代码来源:view.html.php

示例2: initJSStrings

 static function initJSStrings($includejs = 'header', $params = null)
 {
     return acymailing_initJSStrings($includejs, $params);
 }
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:4,代码来源:helper.php

示例3: modify

	function modify(){
		global $Itemid;

		$app = JFactory::getApplication();
		$pathway	= $app->getPathway();
		$document	= JFactory::getDocument();
		$values = new stdClass();
		$values->show_page_heading = 0;

		$listsClass = acymailing_get('class.list');
		$subscriberClass = acymailing_get('class.subscriber');

		$jsite = JFactory::getApplication('site');
		$menus = $jsite->getMenu();
		$menu	= $menus->getActive();

		if(empty($menu) AND !empty($Itemid)){
			$menus->setActive($Itemid);
			$menu	= $menus->getItem($Itemid);
		}

		if (is_object( $menu )) {
			jimport('joomla.html.parameter');
			$menuparams = new acyParameter( $menu->params );

			if(!empty($menuparams)){
				$this->assign('introtext',$menuparams->get('introtext'));
				$this->assign('finaltext',$menuparams->get('finaltext'));

				if ($menuparams->get('menu-meta_description')) $document->setDescription($menuparams->get('menu-meta_description'));
				if ($menuparams->get('menu-meta_keywords')) $document->setMetadata('keywords',$menuparams->get('menu-meta_keywords'));
				if ($menuparams->get('robots')) $document->setMetadata('robots',$menuparams->get('robots'));
				if ($menuparams->get('page_title')) acymailing_setPageTitle($menuparams->get('page_title'));

				$values->suffix = $menuparams->get('pageclass_sfx','');
				$values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title');
				$values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading',0) : $menuparams->get('show_page_title',0);
			}
		}

		$subscriber = $subscriberClass->identify(true);
		if(empty($subscriber)){
			$subscription = $listsClass->getLists('listid');
			$subscriber = new stdClass();
			$subscriber->html = 1;
			$subscriber->subid = 0;
			$subscriber->key = 0;

			if(!empty($subscription)){
				foreach($subscription as $id => $onesub){
					$subscription[$id]->status = 1;
					if(!empty($menuparams) && strtolower($menuparams->get('listschecked','all')) != 'all' && !in_array($id,explode(',',$menuparams->get('listschecked','all')))){
						$subscription[$id]->status = 0;
					}
				}
			}

			$pathway->addItem(JText::_('SUBSCRIPTION'));
			if(empty($menu)) acymailing_setPageTitle(JText::_('SUBSCRIPTION'));
		}else{
			$subscription = $subscriberClass->getSubscription($subscriber->subid,'listid');

			$pathway->addItem(JText::_('MODIFY_SUBSCRIPTION'));
			if(empty($menu)) acymailing_setPageTitle(JText::_('MODIFY_SUBSCRIPTION'));
		}

		acymailing_initJSStrings();

		if(!empty($menuparams) AND strtolower($menuparams->get('lists','all')) != 'all'){
			$visibleLists = strtolower($menuparams->get('lists','all'));
			if($visibleLists == 'none') $subscription = array();
			else{
				$newSubscription = array();
				$visiblesListsArray = explode(',',$visibleLists);
				foreach($subscription as $id => $onesub){
					if(in_array($id,$visiblesListsArray)) $newSubscription[$id] = $onesub;
				}
				$subscription = $newSubscription;
			}
		}

		if(acymailing_level(1)){
			$subscription = $listsClass->onlyCurrentLanguage($subscription);

			$js = "function refreshCaptcha(){
					var captchaLink = document.getElementById('captcha_picture').src;
					myregexp = new RegExp('val[-=]([0-9]+)');
					valToChange=captchaLink.match(myregexp)[1];
					document.getElementById('captcha_picture').src = captchaLink.replace(valToChange,valToChange+'0');
				}";
			$document->addScriptDeclaration( $js );
		}

		if(acymailing_level(3)){
			$fieldsClass = acymailing_get('class.fields');
			$fieldsClass->origin = 'subform';
			if(!empty($menuparams) && strtolower($menuparams->get('customfields','default')) != 'default'){
				$extraFields = $fieldsClass->getFields(strtolower($menuparams->get('customfields')),$subscriber);
			} else{
				$extraFields = $fieldsClass->getFields('frontcomp',$subscriber);
//.........这里部分代码省略.........
开发者ID:utopszkij,项目名称:lmp,代码行数:101,代码来源:view.html.php


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