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


PHP TikiMail::scrambleEmail方法代码示例

本文整理汇总了PHP中TikiMail::scrambleEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP TikiMail::scrambleEmail方法的具体用法?PHP TikiMail::scrambleEmail怎么用?PHP TikiMail::scrambleEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TikiMail的用法示例。


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

示例1: module_contributors

/**
 * @param $mod_reference
 * @param $module_params
 */
function module_contributors($mod_reference, $module_params)
{
    $userlib = TikiLib::lib('user');
    $tikilib = TikiLib::lib('tiki');
    $smarty = TikiLib::lib('smarty');
    $headerlib = TikiLib::lib('header');
    $wikilib = TikiLib::lib('wiki');
    $currentObject = current_object();
    if ($currentObject['type'] == 'wiki page') {
        $objectperms = Perms::get(array('type' => 'wiki page', 'object' => $currentObject['object']));
        if ($objectperms->view) {
            $contributors = $wikilib->get_contributors($currentObject['object']);
            $contributors_details = array();
            $headerlib->add_css('div.contributors div br {clear: both;}');
            // Avoid avatar conflicts with lines below
            foreach ($contributors as $contributor) {
                $details = array('login' => $contributor);
                $details['realName'] = $userlib->get_user_preference($contributor, 'realName');
                $country = $tikilib->get_user_preference($contributor, 'country');
                if (!is_null($country) && $country != 'Other') {
                    $details['country'] = $country;
                }
                $email_isPublic = $tikilib->get_user_preference($contributor, 'email is public');
                if ($email_isPublic != 'n') {
                    $details['email'] = $userlib->get_user_email($contributor);
                    $details['scrambledEmail'] = TikiMail::scrambleEmail($details['email'], $email_isPublic);
                }
                $details['homePage'] = $tikilib->get_user_preference($contributor, 'homePage');
                $details['avatar'] = $tikilib->get_user_avatar($contributor);
                $contributors_details[] = $details;
            }
            $smarty->assign_by_ref('contributors_details', $contributors_details);
            $hiddenContributors = count($contributors_details) - 5;
            if ($hiddenContributors > 0) {
                $smarty->assign('hiddenContributors', $hiddenContributors);
            }
        }
    }
}
开发者ID:rjsmelo,项目名称:tiki,代码行数:43,代码来源:mod-func-contributors.php

示例2:

$smarty->assign('country', $country);
$anonpref = $tikilib->get_preference('userbreadCrumb', 4);
$userbreadCrumb = $tikilib->get_user_preference($userwatch, 'userbreadCrumb', $anonpref);
$smarty->assign_by_ref('realName', $realName);
$smarty->assign_by_ref('gender', $gender);
$smarty->assign_by_ref('userbreadCrumb', $userbreadCrumb);
$homePage = $tikilib->get_user_preference($userwatch, 'homePage', '');
$smarty->assign_by_ref('homePage', $homePage);
$avatar = $tikilib->get_user_avatar($userwatch);
$smarty->assign('avatar', $avatar);
$user_information = $tikilib->get_user_preference($userwatch, 'user_information', 'public');
$smarty->assign('user_information', $user_information);
$userinfo = $userlib->get_user_info($userwatch);
$email_isPublic = $tikilib->get_user_preference($userwatch, 'email is public', 'n');
if ($email_isPublic != 'n') {
    $smarty->assign('scrambledEmail', TikiMail::scrambleEmail($userinfo['email'], $email_isPublic));
}
$userinfo['score'] = TikiLib::lib('score')->get_user_score($userwatch);
$smarty->assign_by_ref('userinfo', $userinfo);
$smarty->assign_by_ref('email_isPublic', $email_isPublic);
$userPage = $prefs['feature_wiki_userpage_prefix'] . $userinfo['login'];
$exist = $tikilib->page_exists($userPage);
$smarty->assign("userPage_exists", $exist);
if ($prefs['feature_display_my_to_others'] == 'y') {
    if ($prefs['feature_wiki'] == 'y') {
        $wikilib = TikiLib::lib('wiki');
        $user_pages = $wikilib->get_user_all_pages($userwatch, 'pageName_asc');
        $smarty->assign_by_ref('user_pages', $user_pages);
    }
    if ($prefs['feature_blogs'] == 'y') {
        $bloglib = TikiLib::lib('blog');
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:31,代码来源:tiki-user_information.php

示例3: tra

            $message = tra("You must make sure to have a valid email address in the From field.");
        } else {
            $message = $captchalib->getErrors();
        }
        $smarty->assign('errorMessage', $message);
    } else {
        $access->check_ticket();
        $body = tr("%0 sent you a message:", $from) . "\n" . $body;
        $messulib->post_message($prefs['contact_user'], $from, $_REQUEST['to'], '', $_REQUEST['subject'], $body, $priority);
        $contact_name = $userlib->get_user_preference($prefs['contact_user'], 'realName');
        if ($contact_name == '') {
            $contact_name = $prefs['contact_user'];
        }
        $message = tra('Message sent to') . ': ' . $contact_name . '<br />';
        $smarty->assign('sent', 1);
        $smarty->assign('message', $message);
    }
}
$email = $userlib->get_user_email($prefs['contact_user']);
if ($email == '') {
    $email = $userlib->get_admin_email();
}
$smarty->assign('email0', $email);
$email = TikiMail::scrambleEmail($email, $tikilib->get_user_preference('admin', "email is public"));
$smarty->assign('email', $email);
$smarty->assign('priority', $priority);
$smarty->assign('from', $from);
$smarty->assign('subject', $subject);
$smarty->assign('body', $body);
$smarty->assign('mid', 'tiki-contact.tpl');
$smarty->display("tiki.tpl");
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:31,代码来源:tiki-contact.php

示例4: array

$smarty->assign_by_ref('languages', $languages);
$user_pages = $tikilib->get_user_pages($userwatch, -1);
$smarty->assign_by_ref('user_pages', $user_pages);
$bloglib = TikiLib::lib('blog');
$user_blogs = $bloglib->list_user_blogs($userwatch, false);
$smarty->assign_by_ref('user_blogs', $user_blogs);
$user_galleries = $tikilib->get_user_galleries($userwatch, -1);
$smarty->assign_by_ref('user_galleries', $user_galleries);
$user_items = TikiLib::lib('trk')->get_user_items($userwatch);
$smarty->assign_by_ref('user_items', $user_items);
$flags = $tikilib->get_flags('', '', '', true);
$smarty->assign_by_ref('flags', $flags);
$scramblingMethods = array("n", "strtr", "unicode", "x", 'y');
// email_isPublic utilizes 'n'
$smarty->assign_by_ref('scramblingMethods', $scramblingMethods);
$scramblingEmails = array(tra("no"), TikiMail::scrambleEmail($userinfo['email'], 'strtr'), TikiMail::scrambleEmail($userinfo['email'], 'unicode') . "-" . tra("unicode"), TikiMail::scrambleEmail($userinfo['email'], 'x'), $userinfo['email']);
$smarty->assign_by_ref('scramblingEmails', $scramblingEmails);
$avatar = $tikilib->get_user_avatar($userwatch);
$smarty->assign_by_ref('avatar', $avatar);
$mailCharsets = array('utf-8', 'iso-8859-1');
$smarty->assign_by_ref('mailCharsets', $mailCharsets);
$smarty->assign_by_ref('user_prefs', $user_preferences[$userwatch]);
$tikilib->get_user_preference($userwatch, 'user_information', 'public');
$tikilib->get_user_preference($userwatch, 'diff_versions', 'n');
$usertrackerId = false;
$useritemId = false;
if ($prefs['userTracker'] == 'y') {
    $re = $userlib->get_usertracker($userinfo["userId"]);
    if (isset($re['usersTrackerId']) and $re['usersTrackerId']) {
        $trklib = TikiLib::lib('trk');
        $info = $trklib->get_item_id($re['usersTrackerId'], $re['usersFieldId'], $userwatch);
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:31,代码来源:tiki-user_preferences.php

示例5: onSetupPage

 function onSetupPage($homepageUrl)
 {
     global $user, $prefs, $tiki_p_messages;
     $userlib = TikiLib::lib('user');
     $tikilib = TikiLib::lib('tiki');
     $smarty = TikiLib::lib('smarty');
     // Run the parent first
     parent::onSetupPage($homepageUrl);
     $showPage = false;
     // Show if option is selected
     if ($prefs['feature_userPreferences'] === 'y') {
         $showPage = true;
     }
     if (!$showPage) {
         return false;
     }
     $userwatch = $user;
     $smarty->assign('userwatch', $userwatch);
     $smarty->assign('show_mouseover_user_info', isset($prefs['show_mouseover_user_info']) ? $prefs['show_mouseover_user_info'] : $prefs['feature_community_mouseover']);
     $mailCharsets = array('utf-8', 'iso-8859-1');
     $smarty->assign_by_ref('mailCharsets', $mailCharsets);
     $mytiki_pages = $tikilib->get_user_preference($userwatch, 'mytiki_pages', 'y');
     $smarty->assign('mytiki_pages', $mytiki_pages);
     $mytiki_blogs = $tikilib->get_user_preference($userwatch, 'mytiki_blogs', 'y');
     $smarty->assign('mytiki_blogs', $mytiki_blogs);
     $mytiki_gals = $tikilib->get_user_preference($userwatch, 'mytiki_gals', 'y');
     $smarty->assign('mytiki_gals', $mytiki_gals);
     $mytiki_items = $tikilib->get_user_preference($userwatch, 'mytiki_items', 'y');
     $smarty->assign('mytiki_items', $mytiki_items);
     $mytiki_msgs = $tikilib->get_user_preference($userwatch, 'mytiki_msgs', 'y');
     $smarty->assign('mytiki_msgs', $mytiki_msgs);
     $mytiki_tasks = $tikilib->get_user_preference($userwatch, 'mytiki_tasks', 'y');
     $smarty->assign('mytiki_tasks', $mytiki_tasks);
     $mylevel = $tikilib->get_user_preference($userwatch, 'mylevel', '1');
     $smarty->assign('mylevel', $mylevel);
     $allowMsgs = $tikilib->get_user_preference($userwatch, 'allowMsgs', 'y');
     $smarty->assign('allowMsgs', $allowMsgs);
     $minPrio = $tikilib->get_user_preference($userwatch, 'minPrio', 3);
     $smarty->assign('minPrio', $minPrio);
     $theme = $tikilib->get_user_preference($userwatch, 'theme', '');
     $smarty->assign('theme', $theme);
     $language = $tikilib->get_user_preference($userwatch, 'language', $prefs['language']);
     $smarty->assign('language', $language);
     $email_isPublic = $tikilib->get_user_preference($userwatch, 'email is public', 'n');
     if (isset($user_preferences[$userwatch]['email is public'])) {
         $user_preferences[$userwatch]['email_isPublic'] = $user_preferences[$userwatch]['email is public'];
         $email_isPublic = $user_preferences[$userwatch]['email is public'];
     }
     $smarty->assign('email_isPublic', $email_isPublic);
     $mailCharset = $tikilib->get_user_preference($userwatch, 'mailCharset', $prefs['default_mail_charset']);
     $smarty->assign('mailCharset', $mailCharset);
     $user_dbl = $tikilib->get_user_preference($userwatch, 'user_dbl', 'n');
     $userbreadCrumb = $tikilib->get_user_preference($userwatch, 'userbreadCrumb', $prefs['site_userbreadCrumb']);
     $smarty->assign('userbreadCrumb', $userbreadCrumb);
     $smarty->assign('user_dbl', $user_dbl);
     $display_12hr_clock = $tikilib->get_user_preference($userwatch, 'display_12hr_clock', 'n');
     $smarty->assign('display_12hr_clock', $display_12hr_clock);
     $userinfo = $userlib->get_user_info($userwatch);
     $smarty->assign_by_ref('userinfo', $userinfo);
     $llist = array();
     $llist = $tikilib->list_styles();
     $smarty->assign_by_ref('styles', $llist);
     $languages = array();
     $langLib = TikiLib::lib('language');
     $languages = $langLib->list_languages();
     $smarty->assign_by_ref('languages', $languages);
     $user_pages = $tikilib->get_user_pages($userwatch, -1);
     $smarty->assign_by_ref('user_pages', $user_pages);
     $bloglib = TikiLib::lib('blog');
     $user_blogs = $bloglib->list_user_blogs($userwatch, false);
     $smarty->assign_by_ref('user_blogs', $user_blogs);
     $user_galleries = $tikilib->get_user_galleries($userwatch, -1);
     $smarty->assign_by_ref('user_galleries', $user_galleries);
     $user_items = TikiLib::lib('trk')->get_user_items($userwatch);
     $smarty->assign_by_ref('user_items', $user_items);
     $scramblingMethods = array("n", "strtr", "unicode", "x", 'y');
     // email_isPublic utilizes 'n'
     $smarty->assign_by_ref('scramblingMethods', $scramblingMethods);
     $scramblingEmails = array(tra("no"), TikiMail::scrambleEmail($userinfo['email'], 'strtr'), TikiMail::scrambleEmail($userinfo['email'], 'unicode') . "-" . tra("unicode"), TikiMail::scrambleEmail($userinfo['email'], 'x'), $userinfo['email']);
     $smarty->assign_by_ref('scramblingEmails', $scramblingEmails);
     $mailCharsets = array('utf-8', 'iso-8859-1');
     $smarty->assign_by_ref('mailCharsets', $mailCharsets);
     $smarty->assign_by_ref('user_prefs', $user_preferences[$userwatch]);
     $tikilib->get_user_preference($userwatch, 'diff_versions', 'n');
     $usertrackerId = false;
     $useritemId = false;
     if ($prefs['userTracker'] == 'y') {
         $re = $userlib->get_usertracker($userinfo["userId"]);
         if (isset($re['usersTrackerId']) and $re['usersTrackerId']) {
             $trklib = TikiLib::lib('trk');
             $info = $trklib->get_item_id($re['usersTrackerId'], $trklib->get_field_id($re['usersTrackerId'], 'Login'), $userwatch);
             $usertrackerId = $re['usersTrackerId'];
             $useritemId = $info;
         }
     }
     $smarty->assign('usertrackerId', $usertrackerId);
     $smarty->assign('useritemId', $useritemId);
     //// Custom fields
     //foreach ($customfields as $custpref => $prefvalue) {
     //$customfields[$custpref]['value'] = $tikilib->get_user_preference($userwatch, $customfields[$custpref]['prefName'], $customfields[$custpref]['value']);
//.........这里部分代码省略.........
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:101,代码来源:user_preferences_params.php

示例6: action_info

 /**
  * Show user info popup
  *
  * @param $input JitFilter (username)
  * @return array
  */
 function action_info($input)
 {
     global $prefs, $user;
     $tikilib = TikiLib::lib('tiki');
     $sociallib = TikiLib::lib('social');
     $result = array('fullname' => '', 'gender' => '', 'starHtml' => '', 'country' => '', 'distance' => '', 'email' => '', 'lastSeen' => '', 'avatarHtml' => '', 'error' => '', 'shared_groups' => '');
     if ($prefs['feature_community_mouseover'] == 'y' && $this->lib->get_user_preference($user, 'show_mouseover_user_info', 'y') == 'y' || $prefs['feature_friends'] == 'y') {
         $other_user = $input->username->email();
         $result['other_user'] = $other_user;
         if ($this->lib->user_exists($other_user) && ($tikilib->get_user_preference($other_user, 'user_information', 'public') === 'public' || $user == $other_user || $prefs['feature_friends'] == 'y')) {
             $info = $this->lib->get_user_info($other_user);
             $result['add_friend_button'] = '';
             $result['friendship'] = array();
             if ($prefs['feature_friends'] === 'y' && $user) {
                 $friendship = array();
                 if ($prefs['social_network_type'] === 'friend') {
                     $friend = $this->isFriend($sociallib->listFriends($user), $other_user);
                     if ($friend) {
                         $friendship[] = array('type' => 'friend', 'label' => tra('Friend'), 'remove' => tra('Remove Friend'));
                     } else {
                         $result['add_friend_button'] = tra('Add Friend');
                     }
                 } else {
                     $follower = $this->isFriend($sociallib->listFollowers($user), $other_user);
                     $following = $this->isFriend($sociallib->listFollowers($other_user), $user);
                     if ($follower) {
                         $friendship[] = array('type' => 'follower', 'label' => tra('Following you'));
                         if ($prefs['social_network_type'] === 'follow_approval') {
                             $friendship[count($friendship) - 1]['remove'] = tra('Remove Follower');
                         }
                     }
                     if ($following) {
                         $friendship[] = array('type' => 'following', 'label' => tra('You are following'), 'remove' => tra('Stop Following'));
                     } else {
                         $result['add_friend_button'] = tra('Follow');
                     }
                 }
                 $incoming = $this->isFriend($sociallib->listIncomingRequests($user), $other_user);
                 if ($incoming) {
                     $friendship[] = array('type' => 'incoming', 'label' => tra('Awaiting your approval'), 'remove' => tra('Refuse Request'), 'add' => tra('Accept &amp; Add'));
                     if ($prefs['social_network_type'] === 'follow_approval') {
                         $friendship[count($friendship) - 1]['approve'] = tra('Accept Request');
                     }
                     $result['add_friend_button'] = '';
                 }
                 $outgoing = $this->isFriend($sociallib->listOutgoingRequests($user), $other_user);
                 if ($outgoing) {
                     $friendship[] = array('type' => 'outgoing', 'label' => tra('Waiting for approval'), 'remove' => tra('Cancel Request'));
                     $result['add_friend_button'] = '';
                 }
                 $result['friendship'] = $friendship;
                 if ($user === $other_user) {
                     $result['add_friend_button'] = '';
                     // can't befriend yourself
                 }
             }
             if ($prefs['feature_community_mouseover_name'] == 'y') {
                 $result['fullname'] = $this->lib->clean_user($other_user);
             } else {
                 $result['fullname'] = $other_user;
             }
             if ($prefs['feature_community_mouseover_gender'] == 'y' && $prefs['feature_community_gender'] == 'y') {
                 $result['gender'] = $this->lib->get_user_preference($other_user, 'gender');
                 if ($result['gender'] == tr('Hidden')) {
                     $result['gender'] = '';
                 }
             }
             if ($prefs['feature_score'] == 'y') {
                 $info['score'] = TikiLib::lib('score')->get_user_score($other_user);
                 if ($prefs['feature_community_mouseover_score'] == 'y' && !empty($info['score']) && $other_user !== 'admin' && $other_user !== 'system' && $other_user !== 'Anonymous') {
                     $result['starHtml'] = $tikilib->get_star($info['score']);
                 } else {
                     $result['starHtml'] = '';
                 }
             }
             if ($prefs['feature_community_mouseover_country'] == 'y') {
                 $result['country'] = $tikilib->get_user_preference($other_user, 'country', '');
                 if ($result['country'] == tr('Other')) {
                     $result['country'] = '';
                 }
             }
             if ($prefs['feature_community_mouseover_distance'] == 'y') {
                 $distance = TikiLib::lib('userprefs')->get_userdistance($other_user, $user);
                 if ($distance) {
                     $result['distance'] = $distance . ' ' . tra('km');
                 }
             }
             if ($prefs['feature_community_mouseover_email'] == 'y') {
                 $email_isPublic = $tikilib->get_user_preference($other_user, 'email is public');
                 if ($email_isPublic != 'n') {
                     $result['email'] = TikiMail::scrambleEmail($info['email'], $email_isPublic);
                     //} elseif ($friend) {
                     //	$result['email'] = $info['email']; // should friends see each other's emails whatever the settings? I doubt it (jb)
                 }
//.........这里部分代码省略.........
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:101,代码来源:Controller.php

示例7: process_item_author

 /**
  * Return information about the user acording to its preferences
  *
  * @param string $login
  * @return array author data (can be the login name or the realName if set and email if public)
  */
 function process_item_author($login)
 {
     $userlib = TikiLib::lib('user');
     $tikilib = TikiLib::lib('tiki');
     $author = array();
     if ($userlib->user_exists($login) && $tikilib->get_user_preference($login, 'user_information', 'private') == 'public') {
         // if realName is not set use $login
         $author['name'] = $tikilib->get_user_preference($login, 'realName', $login);
         if ($tikilib->get_user_preference($login, 'email is public', 'n') != 'n') {
             $res = $userlib->get_user_info($login, false);
             $author['email'] = TikiMail::scrambleEmail($res['email']);
         }
     } else {
         $author['name'] = $login;
     }
     return $author;
 }
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:23,代码来源:rsslib.php


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