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

PHP ezi18n函数代码示例

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

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



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

示例1: akismet_ContentActionHandler

function akismet_ContentActionHandler($module, $http, $objectID)
{
    $object = eZContentObject::fetch($objectID);
    $version = $object->attribute('current');
    if ($http->hasPostVariable('AkismetSubmitSpam')) {
        $user = eZUser::currentUser();
        $accessResult = $user->hasAccessTo('akismet', 'submit');
        if ($accessResult['accessWord'] === 'yes') {
            $mainNode = $object->attribute('main_node');
            $module->redirectTo($mainNode->attribute('url_alias'));
            $akismetObject = new eZContentObjectAkismet();
            $comment = $akismetObject->akismetInformationExtractor($version);
            if ($comment) {
                $akismet = new eZAkismet($comment);
                if ($akismet) {
                    $feedback = $akismet->submitSpam();
                    $response[] = $feedback[1];
                } else {
                    $response[] = ezi18n('extension/contactivity/akismet/submit', "An error has occured, unable to submit spam to Akismet.");
                }
            } else {
                $response[] = ezi18n('extension/contactivity/akismet/submit', "An error has occured, unable to submit spam to Akismet.");
            }
        }
        $mainNode = $object->attribute('main_node');
        $module->redirectTo($mainNode->attribute('url_alias'));
        return true;
    }
}
开发者ID:BGCX067,项目名称:ezakismet-svn-to-git,代码行数:29,代码来源:content_actionhandler.php


示例2: validateObjectAttributeHTTPInput

 /**
  * Validates the input from the object edit form concerning this attribute.
  *
  * @param mixed  $http                   Class eZHTTPTool.
  * @param string $base                   Seems to be always 'ContentObjectAttribute'.
  * @param mixed  $contentObjectAttribute Class eZContentObjectAttribute.
  *
  * @return int eZInputValidator::STATE_INVALID/STATE_ACCEPTED
  */
 public function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
 {
     if ($http->hasPostVariable($base . "_data_domain_" . $contentObjectAttribute->attribute("id"))) {
         $data = $http->postVariable($base . "_data_domain_" . $contentObjectAttribute->attribute("id"));
         $data = str_replace(" ", "", $data);
         if (!$contentObjectAttribute->validateIsRequired() && $data == "") {
             return eZInputValidator::STATE_ACCEPTED;
         }
         $withSubdomain = $contentObjectAttribute->contentClassAttribute()->attribute(self::SUBDOMAIN_FIELD);
         if ($withSubdomain == 1) {
             if (!ereg('^' . self::SUBDOMAIN_REGEXP . '$', $data)) {
                 $contentObjectAttribute->setValidationError(ezi18n('kernel/classes/datatypes', 'No valid domain'));
                 return eZInputValidator::STATE_INVALID;
             }
         } else {
             if (!ereg('^' . self::DOMAIN_REGEXP . '$', $data)) {
                 $contentObjectAttribute->setValidationError(ezi18n('kernel/classes/datatypes', 'No valid domain'));
                 return eZInputValidator::STATE_INVALID;
             }
         }
         return eZInputValidator::STATE_ACCEPTED;
     } else {
         return eZInputValidator::STATE_ACCEPTED;
     }
     return eZInputValidator::STATE_INVALID;
 }
开发者ID:kmajkowski,项目名称:ymc-ezp-datatypes,代码行数:35,代码来源:ymcdomaintype.php


示例3: validateObjectAttributeHTTPInput

 /**
  * Validates the input from the object edit form concerning this attribute.
  *
  * @param mixed  $http                   Class eZHTTPTool.
  * @param string $base                   Seems to be always 'ContentObjectAttribute'.
  * @param mixed  $contentObjectAttribute Class eZContentObjectAttribute.
  *
  * @return int eZInputValidator::STATE_INVALID/STATE_ACCEPTED
  */
 public function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
 {
     if ($http->hasPostVariable($base . "_data_ipv4_" . $contentObjectAttribute->attribute("id"))) {
         $data = $http->postVariable($base . "_data_ipv4_" . $contentObjectAttribute->attribute("id"));
         $data = str_replace(" ", "", $data);
         $classAttribute = $contentObjectAttribute->contentClassAttribute();
         if (!$contentObjectAttribute->validateIsRequired() && $data == "") {
             return eZInputValidator::STATE_ACCEPTED;
         }
         $ipParts = explode(".", $data);
         if (count($ipParts) !== 4) {
             $contentObjectAttribute->setValidationError(ezi18n('kernel/classes/datatypes', 'No valid IP v4 address'));
             return eZInputValidator::STATE_INVALID;
         }
         $this->IntegerValidator->setRange(0, 255);
         foreach ($ipParts as $ipPart) {
             $state = $this->IntegerValidator->validate($ipPart);
             if ($state !== 1) {
                 $contentObjectAttribute->setValidationError(ezi18n('kernel/classes/datatypes', 'No valid IP v4 address'));
                 return eZInputValidator::STATE_INVALID;
             }
         }
         return eZInputValidator::STATE_ACCEPTED;
     } else {
         return eZInputValidator::STATE_ACCEPTED;
     }
     return eZInputValidator::STATE_INVALID;
 }
开发者ID:kmajkowski,项目名称:ymc-ezp-datatypes,代码行数:37,代码来源:ymcipv4type.php


示例4: eZXMLPublisherType

 public function eZXMLPublisherType()
 {
     if (class_exists('ezpI18n')) {
         $this->eZWorkflowEventType('ezxmlpublisher', ezpI18n::tr('extension/ezxmkinstaller', 'XML Publisher'));
     } else {
         include_once 'kernel/common/i18n.php';
         $this->eZWorkflowEventType('ezxmlpublisher', ezi18n('extension/ezxmkinstaller', 'XML Publisher'));
     }
     $this->setTriggerTypes(array('content' => array('publish' => array('after'))));
 }
开发者ID:heliopsis,项目名称:ezxmlinstaller,代码行数:10,代码来源:ezxmlpublishertype.php


示例5: i18n

 /**
  * i18n
  * Provides all i18n strings for use by TinyMCE and other javascript dialogs.
  * 
  * @static
  * @param array $args
  * @param string $fileExtension
  * @return string returns json string with translation data
  */
 public static function i18n($args, $fileExtension)
 {
     $lang = '-en';
     $locale = eZLocale::instance();
     if ($args && $args[0]) {
         $lang = $args[0];
     }
     $i18nArray = array($lang => array('soextra' => array('font_size' => ezi18n('design/standard/soextra', "Font size"), 'font_class' => ezi18n('design/standard/soextra', "Font style"), 'class' => ezi18n('design/standard/soextra', "Element style"), 'remove_tag' => ezi18n('design/standard/soextra', 'Remove &quot;%tag&quot; tag', null, array('%tag' => '<tag>')), 'remove_tag_keep_contents' => ezi18n('design/standard/soextra', 'Remove &quot;%tag&quot; tag (keep contents)', null, array('%tag' => '<tag>')), 'cursor_before' => ezi18n('design/standard/soextra', 'Place cursor before &quot;%tag&quot;', null, array('%tag' => '<tag>')), 'cursor_after' => ezi18n('design/standard/soextra', 'Place cursor after &quot;%tag&quot;', null, array('%tag' => '<tag>')))));
     $i18nString = json_encode($i18nArray);
     return 'tinyMCE.addI18n( ' . $i18nString . ' );';
 }
开发者ID:stevoland,项目名称:ez_soextra,代码行数:20,代码来源:soextraserverfunctions.php


示例6: translate

 /**
  * Abstract method to translate labels and eventually takes advantage of new 4.3 i18n API
  * @param $context
  * @param $message
  * @param $comment
  * @param $argument
  * @return string
  */
 public static function translate($context, $message, $comment = null, $argument = null)
 {
     $translated = '';
     // eZ Publish < 4.3 => use old i18n system
     if (eZPublishSDK::majorVersion() >= 4 && eZPublishSDK::minorVersion() < 3) {
         if (!function_exists('ezi18n')) {
             include_once 'kernel/common/i18n.php';
         }
         $translated = ezi18n($context, $message, $comment, $argument);
     } else {
         $translated = ezpI18n::tr($context, $message, $comment, $argument);
     }
     return $translated;
 }
开发者ID:lolautruche,项目名称:sqliimport,代码行数:22,代码来源:sqliimportutils.php


示例7: get_zodiac_sign

 function get_zodiac_sign($month, $day)
 {
     // Check arguments for validity
     if ($month < 1 || $month > 12 || $day < 1 || $day > 31) {
         return array();
     }
     // List of zodiac signs with start day (start month is array-index + 1)
     $signs = array(array("20" => "11"), array("19" => "12"), array("21" => "1"), array("20" => "2"), array("21" => "3"), array("22" => "4"), array("23" => "5"), array("23" => "6"), array("23" => "7"), array("24" => "8"), array("22" => "9"), array("22" => "10"));
     $name = array(1 => ezi18n('kernel/classes/datatypes', 'Aries'), 2 => ezi18n('kernel/classes/datatypes', 'Taurus'), 3 => ezi18n('kernel/classes/datatypes', 'Gemini'), 4 => ezi18n('kernel/classes/datatypes', 'Cancer'), 5 => ezi18n('kernel/classes/datatypes', 'Leo'), 6 => ezi18n('kernel/classes/datatypes', 'Virgio'), 7 => ezi18n('kernel/classes/datatypes', 'Libra'), 8 => ezi18n('kernel/classes/datatypes', 'Scorpio'), 9 => ezi18n('kernel/classes/datatypes', 'Sagittarius'), 10 => ezi18n('kernel/classes/datatypes', 'Capricorn'), 11 => ezi18n('kernel/classes/datatypes', 'Aquarius'), 12 => ezi18n('kernel/classes/datatypes', 'Pisces'));
     list($sign_start, $sign_name) = each($signs[(int) $month - 1]);
     if ($day < $sign_start) {
         list($sign_start, $sign_name) = each($signs[$month - 2 < 0 ? $month = 11 : ($month -= 2)]);
     }
     return array("Number" => $sign_name, "Name" => $name[$sign_name]);
 }
开发者ID:Opencontent,项目名称:birthday,代码行数:15,代码来源:ezbirthday.php


示例8: validateObjectAttributeHTTPInput

 /**
  * Validate post data, these are then used by
  * {@link eZGmapLocationType::fetchObjectAttributeHTTPInput()}
  * 
  * @param eZHTTPTool $http
  * @param string $base
  * @param eZContentObjectAttribute $contentObjectAttribute
  */
 function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
 {
     $latitude = '';
     $longitude = '';
     $classAttribute = $contentObjectAttribute->contentClassAttribute();
     if ($http->hasPostVariable($base . '_data_gmaplocation_latitude_' . $contentObjectAttribute->attribute('id')) && $http->hasPostVariable($base . '_data_gmaplocation_longitude_' . $contentObjectAttribute->attribute('id'))) {
         $latitude = $http->postVariable($base . '_data_gmaplocation_latitude_' . $contentObjectAttribute->attribute('id'));
         $longitude = $http->postVariable($base . '_data_gmaplocation_longitude_' . $contentObjectAttribute->attribute('id'));
     }
     if ($latitude === '' || $longitude === '') {
         if (!$classAttribute->attribute('is_information_collector') && $contentObjectAttribute->validateIsRequired()) {
             $contentObjectAttribute->setValidationError(ezi18n('extension/ezgmaplocation/datatype', 'Missing Latitude/Longitude input.'));
             return eZInputValidator::STATE_INVALID;
         }
     } else {
         if (!is_numeric($latitude) || !is_numeric($longitude)) {
             $contentObjectAttribute->setValidationError(ezi18n('extension/ezgmaplocation/datatype', 'Invalid Latitude/Longitude input.'));
             return eZInputValidator::STATE_INVALID;
         }
     }
     return eZInputValidator::STATE_ACCEPTED;
 }
开发者ID:BGCX067,项目名称:ezpublish-thetechtalent-svn-to-git,代码行数:30,代码来源:ezgmaplocationtype.php


示例9: trim

//
// filter examples
//
//$filterArray[] = array( 'cjwnl_user.email' => array( 'OR', array( 'like', '%@%' ), array( 'like', '%abc@%' ) ) );
//$filterArray[] = array( 'cjwnl_user.email' => array( 'OR', array( 'AND', 'woldt', 'acd'  ), array( 'like', '%abc@%' ) ) );
//$filterArray[] = array( 'cjwnl_user.last_name' => array( array( 'woldt', 'acd' ) ) );
//$filterArray[] = array( 'cjwnl_user.last_name' => array( 'AND', 'woldt', 'acd'  ) );
//$filterArray[] = array( 'cjwnl_subscription.list_contentobject_id' => array(  array( 132 , 109 ) ) );
//$filterArray[] = array( 'cjwnl_subscription.status' => CjwNewsletterSubscription::STATUS_APPROVED );
//$filterArray[] = array( 'cjwnl_user.email' =>  array( 'like', '%@%.de' ) );
// get wanted user email and filter by itself
if ($http->hasVariable('SearchUserEmail')) {
    $searchUserEmail = trim($db->escapeString($http->variable('SearchUserEmail')));
    $filterArray[] = array('cjwnl_user.email' => array('like', $searchUserEmail));
}
// AND - all filter should match
// OR - 1 one the filter should be match
// AND-NOT - none of the filter should be matched
$userListSearch = CjwNewsletterUser::fetchUserListByFilter($filterArray, $limit, $offset);
$tpl->setVariable('user_list', $userListSearch);
$tpl->setVariable('user_list_count', count($userListSearch));
$viewParameters = array('offset' => 0, 'namefilter' => '');
$searchParameters = array('search_user_email' => $searchUserEmail);
$userParameters = $Params['UserParameters'];
$viewParameters = array_merge($viewParameters, $userParameters);
$viewParameters = array_merge($viewParameters, $searchParameters);
$tpl->setVariable('view_parameters', $viewParameters);
$Result = array();
$Result['content'] = $tpl->fetch($templateFile);
$Result['path'] = array(array('url' => 'newsletter/index', 'text' => ezi18n('cjw_newsletter/path', 'Newsletter')), array('url' => false, 'text' => ezi18n('cjw_newsletter/user_list', 'Users')));
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:30,代码来源:user_list.php


示例10: elseif

    echo $mailboxItemObject->getRawMailMessageContent();
    eZExecution::cleanExit();
} elseif ($http->hasVariable('DownloadRawMailContent')) {
    downloadFile($mailboxItemObject->getFilePath());
} else {
    $cjwNewsletterMailParserObject = new CjwNewsletterMailParser($mailboxItemObject);
    if (is_object($cjwNewsletterMailParserObject)) {
        $parseHeaderArray = $cjwNewsletterMailParserObject->parse();
    }
    $tpl = templateInit();
    $tpl->setVariable('mailbox_item', $mailboxItemObject);
    $tpl->setVariable('mailbox_item_raw_content', $mailboxItemObject->getRawMailMessageContent());
    $tpl->setVariable('mailbox_header_hash', $parseHeaderArray);
    $Result = array();
    $Result['content'] = $tpl->fetch($templateFile);
    $Result['path'] = array(array('url' => 'newsletter/mailbox_item_list', 'text' => ezi18n('cjw_newsletter/mailbox_item_view', 'Mailbox item list')), array('url' => false, 'text' => ezi18n('cjw_newsletter/mailbox_item_view', 'Mailbox item view')));
}
// helpfunction
/**
 * Passthrough file, and exit cleanly
*/
function downloadFile($filePath)
{
    if (!file_exists($filePath)) {
        header("HTTP/1.1 404 Not Found");
        eZExecution::cleanExit();
    }
    ob_clean();
    header("Pragma: public");
    header("Expires: 0");
    // set expiration time
开发者ID:heliopsis,项目名称:cjw_newsletter,代码行数:31,代码来源:mailbox_item_view.php


示例11: array

<?php

require_once 'kernel/common/template.php';
$newsletterIni = eZINI::instance('jajnewsletter.ini');
$subscriptionListsNode = $newsletterIni->variable('ContentSettings', 'SubscriptionListsNode');
$subscriptionUsersNode = $newsletterIni->variable('ContentSettings', 'SubscriptionUsersNode');
$http = eZHTTPTool::instance();
$offset = $Params['Offset'];
if (!$offset) {
    $offset = 0;
}
$limit = 25;
$viewParameters = array('offset' => $offset, 'limit' => $limit);
$tpl = templateInit();
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('subscription_lists_node', $subscriptionListsNode);
$tpl->setVariable('subscription_users_node', $subscriptionUsersNode);
$Result = array();
$Result['left_menu'] = "design:parts/jnewsletter/menu.tpl";
$Result['content'] = $tpl->fetch('design:newsletter/lists_list.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezi18n('newsletter', 'Newsletter')));
开发者ID:jjohnsen,项目名称:jajnewsletter,代码行数:21,代码来源:lists_list.php


示例12: trim

    }
    if ($http->hasPostVariable('Subscription_Salutation')) {
        $subscriptionDataArray['salutation'] = trim($http->postVariable('Subscription_Salutation'));
    }
    if ($http->hasPostVariable('Subscription_IdArray')) {
        $subscriptionDataArray['id_array'] = $http->postVariable('Subscription_IdArray');
    }
    if ($http->hasPostVariable('Subscription_ListArray')) {
        $subscriptionDataArray['list_array'] = $http->postVariable('Subscription_ListArray');
    }
    // $subscriptionDataArr['list_output_format_array'] = array();
    foreach ($subscriptionDataArray['id_array'] as $listId) {
        if ($http->hasPostVariable("Subscription_OutputFormatArray_{$listId}")) {
            $subscriptionDataArray['list_output_format_array'][$listId] = $http->postVariable("Subscription_OutputFormatArray_{$listId}");
        } else {
            $defaultOutputFormatId = 0;
            $subscriptionDataArray['list_output_format_array'][$listId] = array($defaultOutputFormatId);
        }
    }
    // TODO
    // required fields
    // update subscribe/ remove supscripions
    $subscriptionResultArray = CjwNewsletterSubscription::createSubscriptionByArray($subscriptionDataArray, CjwNewsletterUser::STATUS_PENDING, $subscribeOnlyMode = false, $context = 'configure');
    $tpl->setVariable('changes_saved', true);
}
$newsletterUser = CjwNewsletterUser::fetchByHash($Params['UserHash']);
$tpl->setVariable('newsletter_user', $newsletterUser);
$Result = array();
$Result['content'] = $tpl->fetch('design:newsletter/configure.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezi18n('cjw_newsletter/configure', 'Configure newsletter settings')));
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:30,代码来源:configure.php


示例13: foreach

<?php

include_once 'kernel/common/template.php';
$Module = $Params['Module'];
$nodeID = $Params['NodeID'];
$node = eZContentObjectTreeNode::fetch($nodeID);
if ($node instanceof eZContentObjectTreeNode) {
    $object = $node->object();
} else {
    $object = false;
}
if ($Module->isCurrentAction('Store')) {
    $placementList = $Module->actionParameter('PlacementList');
    $db = eZDB::instance();
    foreach ($placementList as $frontpageID => $zones) {
        foreach ($zones as $zoneID => $blocks) {
            foreach ($blocks as $blockID => $timestamp) {
                $itemCount = $db->arrayQuery("SELECT COUNT( * ) as count FROM ezm_pool\n                                   WHERE block_id='" . $blockID . "'\n                                      AND object_id='" . $object->attribute('id') . "'");
                if ($itemCount[0]['count'] == 0) {
                    $db->query("INSERT INTO ezm_pool ( block_id, object_id, node_id, priority, ts_publication )\n                                        VALUES ( '" . $blockID . "',\n                                                 '" . $object->attribute('id') . "',\n                                                 '" . $node->attribute('node_id') . "',\n                                                 '0',\n                                                 '" . $timestamp . "'  )");
                }
            }
        }
    }
    $Module->redirectTo($node->urlAlias());
}
$tpl = templateInit();
$tpl->setVariable('node', $node);
$Result['path'] = array(array('url' => false, 'text' => ezi18n('ezflow/push', 'Push to block')));
$Result['content'] = $tpl->fetch('design:page/push.tpl');
开发者ID:BGCX067,项目名称:ezpublish-thetechtalent-svn-to-git,代码行数:30,代码来源:push.php


示例14: __construct

 function __construct()
 {
     $this->eZDataType( self::DATA_TYPE_STRING, ezi18n( 'kernel/classes/datatypes', "Solr Meta Data", 'Datatype name' ),
                        array( 'serialize_supported' => true ) );
 }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:5,代码来源:solrmetadatatype.php


示例15: customObjectAttributeHTTPAction

 function customObjectAttributeHTTPAction($http, $action, $contentObjectAttribute, $parameters)
 {
     switch ($action) {
         case "send_preview":
             $module = $parameters['module'];
             var_dump($module->obj);
             //viewData() );
             var_dump($obj);
             /*
                       $classAttribute = $contentObjectAttribute->contentClassAttribute();
                       var_dump($http);
                       var_dump($action);
                       var_dump($contentObjectAttribute);
                       var_dump
                       //$classAttribute = $contentObjectAttribute->contentClassAttribute();
                       //$module = $classAttribute->currentModule();
                       $module = $parameters['module'];
                       //var_dump($module);
                       
                       //var_dump($parameters);
                       $ObjectVersion = 26;
                       $ObjectID = 99;
                       $contentObject = ezContentObjectVersion::fetchVersion(  $ObjectVersion ,$ObjectID);
                       
                       $tpl =& templateInit();
                       $tpl->setVariable('object', $contentObject);
                       //$tpl->setVariable('newsletter', $newsletter);
                       $tpl->fetch( 'design:eznewsletter/newsletter_preview.tpl' );
             */
             /*
                     $cacheFileArray = array( 'cache_dir' => false, 'cache_path' => false );
                     $NodeID = 101;
                     
             //$Module = $Params['Module'];
             $tpl = templateInit();
             $LanguageCode = $Params['Language'];
             $ViewMode = "full";
             $Offset = $Params['Offset'];
             //$ini = eZINI::instance();
             $Year = $Params['Year'];
             $Month = $Params['Month'];
             $Day = $Params['Day'];
             $viewParameters = array( 'offset' => $Offset,
                                            'year' => $Year,
                                            'month' => $Month,
                                            'day' => $Day,
                                            'namefilter' => false );
             $viewParameters = array_merge( $viewParameters, $UserParameters );
             $collectionAttributes = false;
                   if ( isset( $Params['CollectionAttributes'] ) )
                     $collectionAttributes = $Params['CollectionAttributes'];
                   
                   $validation = array( 'processed' => false, 'attributes' => array() );
             
                   if ( isset( $Params['AttributeValidation'] ) )
                     $validation = $Params['AttributeValidation'];
                     
                   $localVars = array( "cacheFileArray", "NodeID",  "Module", "tpl",
                                           "LanguageCode",  "ViewMode", "Offset", "ini",
                                           "cacheFileArray", "viewParameters", "collectionAttributes",
                                           "validation" );
             
             
              
             
                     $args = compact( $localVars );
             
                     // the false parameter will disable generation of the 'binarydata' entry
                     $data = eZNodeviewfunctions::contentViewGenerate( false, $args ); 
             */
             $tpl = templateInit();
             $EditVersion = 26;
             $pathIdentificationString = "";
             $ObjectID = 99;
             $parentNodeID = 2;
             $virtualNodeID = null;
             $pathString = "";
             $depth = 2;
             $objectName = "OMG";
             $node = new eZContentObjectTreeNode();
             $node->setAttribute('contentobject_version', $EditVersion);
             $node->setAttribute('path_identification_string', $pathIdentificationString);
             $node->setAttribute('contentobject_id', $ObjectID);
             $node->setAttribute('parent_node_id', $parentNodeID);
             $node->setAttribute('main_node_id', $virtualNodeID);
             $node->setAttribute('path_string', $pathString);
             $node->setAttribute('depth', $depth);
             $node->setAttribute('node_id', $virtualNodeID);
             //$node->setAttribute( 'sort_field', $class->attribute( 'sort_field' ) );
             //$node->setAttribute( 'sort_order', $class->attribute( 'sort_order' ) );
             $node->setName($objectName);
             $node->setContentObject($contentObject);
             $contentObject = null;
             $LanguageCode = null;
             $viewParameters = array();
             $contentObject = eZContentObject::fetch($ObjectID);
             $Result = eZNodeviewfunctions::generateNodeViewData($tpl, $node, $contentObject, $LanguageCode, 'full', 0);
             var_dump($Result);
             //var_dump( $module->run("versionview") );
             $contentObjectAttribute->setValidationError(ezi18n('kernel/classes/datatypes', 'The email address is not valid.'));
//.........这里部分代码省略.........
开发者ID:jjohnsen,项目名称:jajnewsletter,代码行数:101,代码来源:jajpreviewnewslettertype.php


示例16: templateInit

 */
// Blacklist User by nl user id or by email
// update all nessesarry status fields to blacklisted
$module = $Params['Module'];
$templateFile = 'design:newsletter/blacklist_item_list.tpl';
require_once 'kernel/common/i18n.php';
include_once 'kernel/common/template.php';
$http = eZHTTPTool::instance();
$tpl = templateInit();
$http = eZHTTPTool::instance();
$db = eZDB::instance();
$viewParameters = array('offset' => 0, 'namefilter' => '');
$userParameters = $Params['UserParameters'];
$viewParameters = array_merge($viewParameters, $userParameters);
$limit = 10;
$limitArray = array(10, 10, 25, 50);
$limitArrayKey = eZPreferences::value('admin_blacklist_item_list_limit');
// get user limit preference
if (isset($limitArray[$limitArrayKey])) {
    $limit = $limitArray[$limitArrayKey];
}
$blacklistItemList = CjwNewsletterBlacklistItem::fetchAllBlacklistItems($limit, $viewParameters['offset']);
$blacklistItemListCount = CjwNewsletterBlacklistItem::fetchAllBlacklistItemsCount();
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('blacklist_item_list', $blacklistItemList);
$tpl->setVariable('blacklist_item_list_count', $blacklistItemListCount);
$tpl->setVariable('limit', $limit);
$Result = array();
$Result['content'] = $tpl->fetch($templateFile);
$Result['path'] = array(array('url' => 'newsletter/index', 'text' => ezi18n('cjw_newsletter/path', 'Newsletter')), array('url' => false, 'text' => ezi18n('cjw_newsletter/blacklist_item_list', 'Blacklists')));
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:30,代码来源:blacklist_item_list.php


示例17: templateInit

 */
require_once 'kernel/common/i18n.php';
include_once 'kernel/common/template.php';
$module = $Params['Module'];
$http = eZHTTPTool::instance();
$tpl = templateInit();
$nodeId = (int) $Params['NodeId'];
$node = eZContentObjectTreeNode::fetch($nodeId);
if (!is_object($node)) {
    return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
if (!$node->attribute('can_read')) {
    return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
$viewParameters = array('offset' => 0, 'namefilter' => '');
if (is_array($Params['UserParameters'])) {
    $viewParameters = array_merge($viewParameters, $Params['UserParameters']);
}
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('node', $node);
$systemNode = $node->attribute('parent');
$Result = array();
if ($node->attribute('class_identifier') == 'cjw_newsletter_list_virtual') {
    $templateFile = 'design:newsletter/subscription_list_virtual.tpl';
} else {
    $templateFile = 'design:newsletter/subscription_list.tpl';
}
$Result['node_id'] = $nodeId;
$Result['content'] = $tpl->fetch($templateFile);
$Result['path'] = array(array('url' => 'newsletter/index', 'text' => ezi18n('cjw_newsletter/path', 'Newsletter')), array('url' => $systemNode->attribute('url_alias'), 'text' => $systemNode->attribute('name')), array('url' => $node->attribute('url_alias'), 'text' => $node->attribute('name')), array('url' => false, 'text' => ezi18n('cjw_newsletter/subscription_list', 'Subscriptions')));
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:30,代码来源:subscription_list.php


示例18: validateObjectAttributeHTTPInput

 /**
  * Validates input on content object level
  *
  * (non-PHPdoc)
  * @see kernel/classes/eZDataType#validateObjectAttributeHTTPInput($http, $base, $objectAttribute)
  * @return EZ_INPUT_VALIDATOR_STATE
  */
 function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
 {
     $contentclassAttribute = $contentObjectAttribute->attribute('contentclass_attribute');
     $inputValidationCheck = true;
     $validationErrorMesssageArray = array();
     $prefix = $base . '_CjwNewsletterList_';
     $postfix = '_' . $contentObjectAttribute->attribute('id');
     // ContentObjectAttribute_CjwNewsletterList_MainSiteaccess_123
     $postListData = array();
     // set placeholders to detect if we should get the values from statick list
     $postListData['main_siteaccess'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     //$postListData['siteaccess_array'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['output_format_array'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['email_sender'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['email_reply_to'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['email_return_path'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['email_sender_name'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['email_receiver_test'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['auto_approve_registered_user'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_NUMERIC;
     $postListData['skin_name'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING;
     $postListData['personalize_content'] = CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_NUMERIC;
     // try to fetch post
     /* $postListData['main_siteaccess'] = $http->postVariable(  $prefix . 'MainSiteaccess' . $postfix );
        $postListData['siteaccess_array'] = $http->hasPostVariable(  $prefix . 'SiteaccessArray' . $postfix ) ? $http->postVariable(  $prefix . 'SiteaccessArray' . $postfix ) : array();
        $postListData['output_format_array'] = $http->hasPostVariable(  $prefix . 'OutputFormatArray' . $postfix ) ? $http->postVariable(  $prefix . 'OutputFormatArray' . $postfix ) : array();
        $postListData['email_sender'] = $http->postVariable(  $prefix . 'EmailSender' . $postfix );
        $postListData['email_reply_to'] = $http->postVariable(  $prefix . 'EmailReplyTo' . $postfix );
        $postListData['email_return_path'] = $http->postVariable(  $prefix . 'EmailReturnPath' . $postfix );
        $postListData['email_sender_name'] = $http->postVariable(  $prefix . 'EmailSenderName' . $postfix );
        $postListData['email_receiver_test'] = $http->postVariable(  $prefix . 'EmailReceiverTest' . $postfix );
        $postListData['auto_approve_registered_user'] = $http->postVariable(  $prefix . 'AutoApproveRegisterdUser' . $postfix );
        */
     $postListData['skin_name'] = $http->hasPostVariable($prefix . 'SkinName' . $postfix) ? $http->postVariable($prefix . 'SkinName' . $postfix) : '';
     //$postListData['personalize_content'] = (int) $http->postVariable(  $prefix . 'PersonalizeContent' . $postfix );
     //$requireFieldArray = array( 'main_siteaccess', 'siteaccess_array', 'output_format_array', 'email_sender' );
     $requireFieldArray = array();
     foreach ($postListData as $varName => $varValue) {
         if ($varValue == CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_STRING || $varValue == CjwNewsletterListVirtual::PARENT_LIST_VALUE_PLACEHOLDER_NUMERIC) {
             continue;
         } else {
             switch ($varName) {
                 case 'main_siteaccess':
                     if ($postListData['main_siteaccess'] == '') {
                         $validationErrorMesssageArray[] = ezi18n('cjw_newsletter/datatype/cjwnewsletterlist', "Main Siteaccess must be set", null, array());
                     } else {
                         // array_push( $postListData['siteaccess_array'], $postListData['main_siteaccess'] );
                         // $postListData['siteaccess_array'] = array_unique( $postListData['siteaccess_array'] );
                     }
                     break;
                     /*
                     case 'siteaccess_array':
                         if ( count( $postListData['siteaccess_array'] ) == 0 )
                         {
                             $validationErrorMesssageArray[] = ezi18n( 'cjw_newsletter/datatype/cjwnewsletterlist', "You have to choose a siteaccess for the list", null , array(  ) );
                         }
                         break;
                     */
                 /*
                 case 'siteaccess_array':
                     if ( count( $postListData['siteaccess_array'] ) == 0 )
                     {
                         $validationErrorMesssageArray[] = ezi18n( 'cjw_newsletter/datatype/cjwnewsletterlist', "You have to choose a siteaccess for the list", null , array(  ) );
                     }
                     break;
                 */
                 case 'output_format_array':
                     if (count($postListData['output_format_array']) == 0) {
                         $validationErrorMesssageArray[] = ezi18n('cjw_newsletter/datatype/cjwnewsletterlist', "You have to choose an output format", null, array());
                     }
                     break;
                 case 'email_sender':
                     if ($postListData['email_sender'] == '' or !eZMail::validate($postListData['email_sender'])) {
                         $validationErrorMesssageArray[] = ezi18n('cjw_newsletter/datatype/cjwnewsletterlist', "You have to set a valid email adress", null, array());
                     }
                     break;
                 case 'email_receiver_test':
                     if ($postListData['email_receiver_test'] == '') {
                         $validationErrorMesssageArray[] = ezi18n('cjw_newsletter/datatype/cjwnewsletterlist', "You have to set a valid semder email", null, array());
                     } else {
                         $explodeRecieverArr = explode(';', $postListData['email_receiver_test']);
                         foreach ($explodeRecieverArr as $index => $reciever) {
                             // check if email
                             if (eZMail::validate($reciever) == false) {
                                 $validationErrorMesssageArray[] = ezi18n('cjw_newsletter/datatype/cjwnewsletterlist', "You have to set a valid semder email adress >> {$reciever}", null, array());
                             }
                         }
                     }
                     break;
                 default:
                     break;
             }
         }
     }
//.........这里部分代码省略.........
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:101,代码来源:cjwnewsletterlistvirtualtype.php


示例19: CjwNewsletterMailbox

 *
 * @copyright Copyright (C) 2007-2010 CJW Network - Coolscreen.de, JAC Systeme GmbH, Webmanufaktur. All rights reserved.
 * @license http://ez.no/licenses/gnu_gpl GNU GPL v2
 * @version //autogentag//
 * @package cjw_newsletter
 * @subpackage modules
 * @filesource
 */
$module = $Params['Module'];
$templateFile = "design:newsletter/mailbox_list.tpl";
require_once 'kernel/common/i18n.php';
include_once 'kernel/common/template.php';
$mailboxObject = new CjwNewsletterMailbox(true);
$listMailboxesCount = 0;
// return array with mailbox objects
// TODO result check (is array or object etc )
if (is_object($mailboxObject)) {
    $listMailboxes = $mailboxObject->fetchAllMailboxes();
    $listMailboxesCount = count($listMailboxes);
}
$tpl = templateInit();
$viewParameters = array('offset' => 0, 'namefilter' => '', 'redirect_uri' => $module->currentRedirectionURI());
$userParameters = $Params['UserParameters'];
$viewParameters = array_merge($viewParameters, $userParameters);
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('mailbox_list', $listMailboxes);
$tpl->setVariable('mailbox_list_count', $listMailboxesCount);
$Result = array();
$Result['content'] = $tpl->fetch($templateFile);
$Result['path'] = array(array('url' => 'newsletter/index', 'text' => ezi18n('cjw_newsletter', 'Newsletter')), array('url' => false, 'text' => ezi18n('cjw_newsletter/mailbox_item_list', 'Mail accounts')));
开发者ID:heliopsis,项目名称:cjw_newsletter,代码行数:30,代码来源:mailbox_list.php


示例20: ezpI18ntr

 /**
  * Wrapper method to translate labels and eventually takes advantage of new 4.3 i18n API
  * @p 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP f函数代码示例发布时间:2022-05-15
下一篇:
PHP extraire_multi函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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