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


PHP htmlReady函数代码示例

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


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

示例1: getDefaultConfig

 /**
 * 
 */
 function getDefaultConfig () {
     
     $config = array(
         "name" => '',
         /*
         "order" => '|0|1|2|3|4|5|6|7|8',
         "visible" => '|1|1|1|1|1|1|1|1|1',
         "aliases" => '||'._("Lebenslauf").'|'._("Schwerpunkte").'|'._("Lehrveranstaltungen").'|'
                 ._("Aktuell").'|'._("Termine").'|'._("Publikationen").'|'._("Literaturlisten").'|',
         */
         "order" => '|0|1|2|3|4|5|6|7',
         "visible" => '|1|1|1|1|1|1|1|1',
         "aliases" => '||'._("Lebenslauf").'|'._("Schwerpunkte").'|'._("Lehrveranstaltungen").'|'
                 ._("Aktuell").'|'._("Termine").'|'._("Publikationen").'|',
         "showcontact" => '1',
         "showimage" => 'right',
         "wholesite" => '0',
         "nameformat" => '',
         "dateformat" => '%d. %b. %Y',
         "language" => '',
         "studiplink" => 'top',
         "urlcss" => '',
         "title" => _("MitarbeiterInnen"),
         "copyright" => htmlReady($GLOBALS['UNI_NAME_CLEAN']
                 . " ({$GLOBALS['UNI_CONTACT']})"),
         "author" => ''
     );
     
     get_default_generic_datafields($config, "user");
     
     return $config;
 }
开发者ID:ratbird,项目名称:hope,代码行数:35,代码来源:ExternElementMainPersondetails.class.php

示例2: map

 /**
  * Mapping function where to find what
  * @param type $object the object
  * @param type $function the called function
  * @return string output
  */
 private static function map($object, $function)
 {
     /**
      * If you want to add an object to the helper simply add to this array
      */
     $mapping = array('User' => array('link' => function ($obj) {
         return URLHelper::getLink('dispatch.php/profile', array('username' => $obj->username));
     }, 'name' => function ($obj) {
         return htmlReady($obj->getFullname());
     }, 'avatar' => function ($obj) {
         return Avatar::getAvatar($obj->id, $obj->username)->getImageTag(Avatar::SMALL, array('title' => htmlReady($obj->getFullname('no_title'))));
     }), 'Course' => array('link' => function ($obj) {
         return URLHelper::getLink('seminar_main.php', array('auswahl' => $obj->id));
     }, 'name' => function ($obj) {
         return htmlReady($obj->name);
     }, 'avatar' => function ($obj) {
         return CourseAvatar::getAvatar($obj->id)->getImageTag($size = CourseAvatar::SMALL, array('title' => htmlReady($obj->name)));
     }));
     /*
      * Some php magic to call the right function if it exists
      */
     if ($object && $mapping[get_class($object)]) {
         return $mapping[get_class($object)][$function]($object);
     }
     return "";
 }
开发者ID:ratbird,项目名称:hope,代码行数:32,代码来源:ObjectdisplayHelper.php

示例3: highlight

 /**
  * Highlights the given needle in given subject with the given format.
  *
  * @param String $needle  Search for this string...
  * @param String $subject ...inside this string...
  * @param String $format  ...and replace it with this string (regexp
  *                        syntax)
  *
  * @return String containing the subject with highlighted needle
  */
 private function highlight($needle, $subject, $format = '<b>$0</b>')
 {
     $needle = htmlReady($needle);
     $subject = htmlReady($subject);
     $regexp = '/' . preg_quote($needle, '/') . '/i';
     return preg_replace($regexp, $format, $subject);
 }
开发者ID:ratbird,项目名称:hope,代码行数:17,代码来源:quicksearch.php

示例4: before_filter

 /**
  * This function is called before any output is generated or any other
  * actions are performed. Initializations happen here.
  *
  * @param $action Name of the action to perform
  * @param $args   Arguments for the given action
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $this->modules = array();
     // Set Navigation
     PageLayout::setHelpKeyword("Basis.ProfileModules");
     PageLayout::setTitle(_("Mehr Funktionen"));
     PageLayout::addSqueezePackage('lightbox');
     Navigation::activateItem('/profile/modules');
     // Get current user.
     $this->username = Request::username('username', $GLOBALS['user']->username);
     $this->user_id = get_userid($this->username);
     $this->plugins = array();
     $blubber = PluginEngine::getPlugin('Blubber');
     // Add blubber to plugin list so status can be updated.
     if ($blubber) {
         $this->plugins[] = $blubber;
     }
     // Get homepage plugins from database.
     $this->plugins = array_merge($this->plugins, PluginEngine::getPlugins('HomepagePlugin'));
     // Show info message if user is not on his own profile
     if ($this->user_id != $GLOBALS['user']->id) {
         $current_user = User::find($this->user_id);
         $message = sprintf(_('Daten von: %s %s (%s), Status: %s'), htmlReady($current_user->Vorname), htmlReady($current_user->Nachname), htmlReady($current_user->username), htmlReady($current_user->perms));
         PageLayout::postMessage(MessageBox::info($message));
     }
     $this->setupSidebar();
 }
开发者ID:ratbird,项目名称:hope,代码行数:35,代码来源:profilemodules.php

示例5: getAdminModuleLinks

 /**
  * get admin module links
  *
  * returns links add or remove a module from course
  * @access public
  * @return string returns html-code
  */
 function getAdminModuleLinks()
 {
     global $connected_cms, $view, $search_key, $cms_select, $current_module;
     $output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">\n";
     $output .= CSRFProtection::tokenTag();
     $output .= "<input type=\"HIDDEN\" name=\"view\" value=\"" . htmlReady($view) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"search_key\" value=\"" . htmlReady($search_key) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"cms_select\" value=\"" . htmlReady($cms_select) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_type\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_id\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getId()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_system_type\" value=\"" . htmlReady($this->cms_type) . "\">\n";
     if ($connected_cms[$this->cms_type]->content_module[$current_module]->isConnected()) {
         $output .= "&nbsp;" . Button::create(_('Entfernen'), 'remove');
     } elseif ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_WRITE)) {
         $output .= "<div align=\"left\"><input type=\"CHECKBOX\" value=\"1\" name=\"write_permission\" style=\"vertical-align:middle\">";
         $output .= _("Mit Schreibrechten für alle Dozenten/Tutoren dieser Veranstaltung") . "<br>";
         $output .= "<input type=\"CHECKBOX\" value=\"1\" style=\"vertical-align:middle\" name=\"write_permission_autor\">";
         $output .= _("Mit Schreibrechten für alle Teilnehmer dieser Veranstaltung") . "</div>";
         $output .= Button::create(_('Hinzufügen'), 'add') . "<br>";
     } else {
         $output .= "&nbsp;" . Button::create(_('Hinzufügen'), 'add');
     }
     $output .= "</form>";
     return $output;
     //      $output .= parent::getAdminModuleLinks();
 }
开发者ID:ratbird,项目名称:hope,代码行数:33,代码来源:Ilias3ConnectedLink.class.php

示例6: getDefaultConfig

 /**
 * 
 */
 function getDefaultConfig () {
     
     $config = array(
         "name" => "",
         "order" => "|0|1",
         "visible" => "|1|1",
         "aliases" => "|"._("Datum")."|"._("Nachricht"),
         "width" => "|10%|90%",
         "widthpp" => "",
         "sort" => "|1|0",
         "wholesite" => "",
         "studiplink" => "top",
         "nameformat" => "",
         "dateformat" => "%d. %b. %Y",
         "language" => "",
         "urlcss" => "",
         "title" => _("News"),
         "nodatatext" => _("Keine aktuellen News"),
         "copyright" => htmlReady($GLOBALS['UNI_NAME_CLEAN']
                 . " ({$GLOBALS['UNI_CONTACT']})"),
         "author" => "",
         "showdateauthor" => "0",
         "notauthorlink" => ""
     );
     
     return $config;
 }
开发者ID:ratbird,项目名称:hope,代码行数:30,代码来源:ExternElementMainNews.class.php

示例7: testHtmlReady

 public function testHtmlReady()
 {
     $pairs = array('abc' => 'abc', 'äöü' => 'äöü', '<' => '&lt;', '"' => '&quot;', "'" => '&#039;', '&amp;' => '&amp;amp;', '&#039;' => '&amp;#039;', '' => '', NULL => NULL);
     foreach ($pairs as $string => $expected) {
         $this->assertEquals($expected, htmlReady($string));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:VisualTest.php

示例8: do_highlight

 /**
  * helper_function for highlight($text, $highlight)
  *
  * @param  string  $text
  * @param  array   $highlight
  * @return string
  */
 static function do_highlight($text, $highlight)
 {
     foreach ($highlight as $hl) {
         $text = preg_replace('/' . preg_quote(htmlReady($hl), '/') . '/i', '<span class="highlight">$0</span>', $text);
     }
     return $text;
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:ForumHelpers.php

示例9: getDefaultConfig

 /**
 * 
 */
 function getDefaultConfig () {
     $config = array(
         "name" => "",
         "order" => "|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15",
         "visible" => "|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1",
         "aliases" => "|"._("Untertitel:")." |"._("Lehrende")." |"._("Veranstaltungsart:")
             ." |"._("Veranstaltungstyp:")." |"._("Beschreibung:")." |"._("Ort:")." |"._("Semester:")
             ." |"._("Zeiten:")." |"._("Veranstaltungsnummer:")." |"._("Teilnehmende:")
             ." |"._("Voraussetzungen:")." |"._("Lernorganisation:")." |"._("Leistungsnachweis:")
             ." |"._("Bereichseinordnung:")." |"._("Sonstiges:")." |"._("ECTS-Punkte:"),
         "aliaspredisc" => _("Vorbesprechung:") . " ",
         "aliasfirstmeeting" => _("Erster Termin:") . " ",
         "headlinerow" => "1",
         "rangepathlevel" => "1",
         "studipinfo" => "1",
         "studiplink" => "top",
         "studiplinktarget" => "admin",
         "wholesite" => "",
         "nameformat" => "",
         "urlcss" => "",
         "title" => _("Veranstaltungsdaten"),
         "language" => "",
         "copyright" => htmlReady($GLOBALS['UNI_NAME_CLEAN']
                 . " ({$GLOBALS['UNI_CONTACT']})"),
         "author" => ""
     );
     
     get_default_generic_datafields($config, "sem");
     
     return $config;
 }
开发者ID:ratbird,项目名称:hope,代码行数:34,代码来源:ExternElementMainLecturedetails.class.php

示例10: getDisplayValue

 /**
  * Returns the display/rendered value of this datafield
  *
  * @param bool $entities Should html entities be encoded (defaults to true)
  * @return String containg the rendered value
  */
 public function getDisplayValue($entities = true)
 {
     if ($entities) {
         return htmlReady($this->getValue(), true, true);
     }
     return $this->getValue();
 }
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:DataFieldTextareaEntry.class.php

示例11: render

 public function render($variables = array())
 {
     $attributes = array();
     foreach ((array) $this->template_variables['attributes'] as $key => $value) {
         $attributes[] = sprintf('%s="%s"', htmlReady($key), htmlReady($value));
     }
     $this->template_variables['attributes'] = implode(' ', $attributes) ?: '';
     return parent::render($variables);
 }
开发者ID:ratbird,项目名称:hope,代码行数:9,代码来源:SelectWidget.php

示例12: markupHashtags

 /**
  * Markup-rule for hashtags. Inserts links to blubber-globalstream for each tag.
  * @param StudipFormat $markup
  * @param array $matches
  * @return string : marked-up text
  */
 public static function markupHashtags($markup, $matches)
 {
     if (self::$course_hashes) {
         $url = URLHelper::getLink("plugins.php/Blubber/streams/forum", array('hash' => $matches[2], 'cid' => self::$course_hashes));
     } else {
         $url = URLHelper::getLink("plugins.php/Blubber/streams/global", array('hash' => $matches[2]));
     }
     return $matches[1] . '<a href="' . $url . '" class="hashtag">#' . htmlReady($matches[2]) . '</a>';
 }
开发者ID:ratbird,项目名称:hope,代码行数:15,代码来源:BlubberPosting.class.php

示例13: getColumnName

 function getColumnName($id, $print_view = false)
 {
     $res_obj = ResourceObject::Factory($this->show_columns[$id]);
     if (!$print_view) {
         $ret = '<a class="tree" href="' . URLHelper::getLink('?show_object=' . $this->show_columns[$id] . '&view=' . (Request::option('view') == 'openobject_group_schedule' ? 'openobject_schedule' : 'view_schedule')) . '">' . htmlReady($res_obj->getName()) . '</a>' . ($res_obj->getSeats() ? '<br>(' . $res_obj->getSeats() . ')' : '');
     } else {
         $ret = '<span style="font-size:10pt;">' . htmlReady($res_obj->getName()) . '</span>';
     }
     return $ret . chr(10);
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:SemGroupScheduleDayOfWeek.class.php

示例14: getError

 function getError($format = "clear")
 {
     if ($format == "clear") {
         return $this->error_msg;
     } else {
         for ($i = 0; $i < count($this->error_msg); ++$i) {
             $ret .= $this->error_msg[$i]['type'] . "§" . htmlReady($this->error_msg[$i]['msg']) . "§";
         }
         return $ret;
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:11,代码来源:StudipLitSearchPluginAbstract.class.php

示例15: __toString

 /**
  * @return  returns a HTML representation of this button.
  */
 function __toString()
 {
     // add "button" to attribute @class
     @($this->attributes["class"] .= " button");
     $attributes = array();
     ksort($this->attributes);
     foreach ($this->attributes as $k => $v) {
         $attributes[] = sprintf(' %s="%s"', $k, htmlReady($v));
     }
     return sprintf('<button type="reset"%s>%s</button>', join('', $attributes), htmlReady($this->label));
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:ResetButton.class.php


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