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


PHP icms_core_DataFilter::makeClickable方法代码示例

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


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

示例1: icms_cp_header

 * @todo this has nothing to do in the version checker system module, but it is there as a
 * reminiscence of XOOPS. It needs to be moved elsewhere in 1.1
 */
if (isset($_GET['mid'])) {
    include_once ICMS_MODULES_PATH . '/system/admin/version/module_info.php';
    exit;
}
/**
 * Now here is the version checker :-)
 */
global $icmsAdminTpl, $xoTheme;
$icmsVersionChecker = icms_core_Versionchecker::getInstance();
icms_cp_header();
if ($icmsVersionChecker->check()) {
    $icmsAdminTpl->assign('update_available', TRUE);
    $icmsAdminTpl->assign('latest_changelog', icms_core_DataFilter::makeClickable($icmsVersionChecker->latest_changelog));
    $icmsAdminTpl->assign('latest_version', $icmsVersionChecker->latest_version_name);
    $icmsAdminTpl->assign('latest_url', $icmsVersionChecker->latest_url);
    if (ICMS_VERSION_STATUS == 10 && $icmsVersionChecker->latest_status < 10) {
        // I'm running a final release so make sure to notify the user that the update is not a final
        $icmsAdminTpl->assign('not_a_final_comment', TRUE);
    }
} else {
    $checkerErrors = $icmsVersionChecker->getErrors(TRUE);
    if ($checkerErrors) {
        $icmsAdminTpl->assign('errors', $checkerErrors);
    }
}
$icmsAdminTpl->assign('your_version', $icmsVersionChecker->installed_version_name);
$icmsAdminTpl->assign('lang_php_vesion', PHP_VERSION);
$icmsAdminTpl->assign('lang_mysql_version', mysql_get_server_info());
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:main.php

示例2: getOutputValue

 /**
  * Returns a value for output of this field
  *
  * @param icms_member_user_Object $user object to get the value of
  * @param mod_profile_Profile $profile object to get the value of
  * @global array $icmsConfigAuth
  * @return mixed
  **/
 public function getOutputValue(&$user, $profile)
 {
     global $icmsConfigAuth;
     $value = in_array($this->getVar('field_name'), $this->getUserVars()) ? $user->getVar($this->getVar('field_name')) : $profile->getVar($this->getVar('field_name'));
     switch ($this->getVar('field_type')) {
         case "textarea":
         case "dhtml":
             return icms_core_DataFilter::undoHtmlSpecialChars(str_replace('&amp;', '&', $value), 1);
             break;
         case "select":
         case "radio":
             $options = unserialize($this->getVar('field_options', 'n'));
             return isset($options[$value]) ? htmlspecialchars($options[$value]) : "";
             break;
         case "select_multi":
         case "checkbox":
             $options = unserialize($this->getVar('field_options', 'n'));
             $ret = array();
             if (count($options) > 0) {
                 foreach (array_keys($options) as $key) {
                     if (in_array($key, $value)) {
                         $ret[$key] = htmlspecialchars($options[$key]);
                     }
                 }
             }
             return $ret;
             break;
         case "group":
             //change to retrieve groups and return name of group
             return $value;
             break;
         case "group_multi":
             //change to retrieve groups and return array of group names
             return "";
             break;
         case "longdate":
             //return YYYY/MM/DD format - not optimal as it is not using local date format, but how do we do that
             //when we cannot convert it to a UNIX timestamp?
             return str_replace("-", "/", $value);
         case "date":
             if ($value > 0) {
                 return formatTimestamp($value, 's');
             }
             return "";
             break;
         case "datetime":
             if ($value > 0) {
                 return formatTimestamp($value, 'm');
             }
             return "";
             break;
         case "autotext":
             $value = $user->getVar($this->getVar('field_name'), 'n');
             //autotext can have HTML in it
             $value = str_replace("{X_UID}", $user->getVar("uid"), $value);
             $value = str_replace("{X_URL}", ICMS_URL, $value);
             $value = str_replace("{X_UNAME}", $user->getVar("uname"), $value);
             return $value;
             break;
         case "rank":
             $userrank = $user->rank();
             return '<img src="' . $userrank['image'] . '" alt="' . $userrank['title'] . '" />&nbsp;' . $userrank['title'];
             break;
         case "yesno":
             return $value ? _YES : _NO;
             break;
         case "timezone":
             $timezones = icms_form_elements_select_Timezone::getTimeZoneList();
             return $timezones[str_replace('.0', '', $value)];
             break;
         case "image":
             if ($value == "") {
                 return '';
             }
             return "<img src='" . ICMS_UPLOAD_URL . "/" . basename(dirname(dirname(__FILE__))) . "/" . $value . "' alt='image' />";
             break;
         case "url":
             if ($value == "") {
                 return '';
             }
             return icms_core_DataFilter::makeClickable(formatURL($value));
         case "location":
             if ($value == "") {
                 return '';
             }
             return $value . '&nbsp;<a href="http://maps.google.com/?q=' . $value . '" target="_blank" ><img src="' . ICMS_URL . '/modules/' . basename(dirname(dirname(__FILE__))) . '/images/mapsgoogle.gif" alt="" /></a>';
         case "email":
             if ($value == "") {
                 return '';
             }
             if ($user->getVar('user_viewemail') || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $user->getVar('uid'))) {
                 return '<a href="mailto:' . $value . '">' . $value . '</a>';
//.........这里部分代码省略.........
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:101,代码来源:Field.php

示例3: sanitizeForPreview

 /**
  * @deprecated Use displayTarea, instead
  * @todo	Remove in version 1.4 - there are no other occurrences in the core
  * Enter description here ...
  * @param $text
  * @param $allowhtml
  * @param $smiley
  * @param $bbcode
  */
 function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
 {
     icms_core_Debug::setDeprecated('icms_core_DataFilter->checkVar - type = text or html, options1 = input', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
     $text = $this->oopsStripSlashesGPC($text);
     if ($allowhtml == 0) {
         $text = icms_core_DataFilter::htmlSpecialChars($text);
     } else {
         $text = icms_core_DataFilter::makeClickable($text);
     }
     if ($smiley == 1) {
         $text = icms_core_DataFilter::smiley($text);
     }
     if ($bbcode == 1) {
         $text = icms_core_DataFilter::codeDecode($text);
     }
     $text = icms_core_DataFilter::nl2Br($text);
     return $text;
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:27,代码来源:Textsanitizer.php


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