|
Stud.IP
trunk Revision
|
Functions | |
| htmlReady ($what, $trim=TRUE, $br=FALSE, $double_encode=true) | |
| wysiwygReady ($what, $trim=TRUE, $br=FALSE, $double_encode=true) | |
| jsReady ($what, $target) | |
| quotes_encode ($text, $author='') | |
| formatReady ($text, $trim=true, $extern=false, $wiki=false, $show_comments='icon') | |
| formatLinks ($text, $nl2br=TRUE) | |
| wikiReady ($text, $trim=TRUE) | |
| transformBeforeSave ($text) | |
| decodeHTML ($string) | |
| preg_call_format_signature ($username, $timestamp) | |
| kill_format ($text) | |
| isURL ($url) | |
| isLinkIntern ($url) | |
| idna_link ($link, $mail=false) | |
| smile ($text='') | |
| symbol ($text='') | |
| mila ($titel, $size=60) | |
| printhead ($breite, $left, $link, $open, $new, $icon, $titel, $zusatz, $timestmp=0, $printout=TRUE, $index="", $indikator="age", $css_class=NULL) | |
| printcontent ($breite, $write=FALSE, $inhalt, $edit, $printout=TRUE, $addon="", $noTdTag=false) | |
| tooltip ($text, $with_alt=TRUE, $with_popup=FALSE) | |
| tooltip2 ($text, $with_alt=TRUE, $with_popup=FALSE) | |
| tooltipIcon ($text, $important=false, $html=false) | |
| tooltipHtmlIcon ($text, $important=false) | |
| TransformInternalLinks ($str) | |
| createQuestion ($question, $approveParams, $disapproveParams=[], $baseUrl='') | |
| createQuestion2 ($question, $approveParams, $disapproveParams=[], $baseUrl='') | |
| display_exception ($exception, $as_html=false, $deep=false) | |
| if(!function_exists( 'preg_replace_callback_array')) | arrayToHtmlAttributes (array $attributes) |
Variables | |
| const | FORMATTED_CONTENT_WRAPPER '<div class="formatted-content">%s</div>' |
| if(!function_exists('preg_replace_callback_array')) arrayToHtmlAttributes | ( | array | $attributes | ) |
Returns the appropriate stud.ip icon for a given mime type.
| String | $mime_type | Mime type to get the icon for |
| array | $attributes | Associative array of attributes |


| createQuestion | ( | $question, | |
| $approveParams, | |||
$disapproveParams = [], |
|||
$baseUrl = '' |
|||
| ) |
creates a modal dialog ensuring that the user is really aware about the action to perform
| string | $question | question of the modal dialog |
| array | $approveParams | an array of params for a link to be used on approval |
| array | $disapproveParams | an array of params for a link to be used on disapproval |
| string | $baseUrl | if set, this url is used, PHP_SELF otherwise |


| createQuestion2 | ( | $question, | |
| $approveParams, | |||
$disapproveParams = [], |
|||
$baseUrl = '' |
|||
| ) |
creates a modal dialog ensuring that the user is really aware about the action to perform with formulars
| string | $question | question of the modal dialog |
| array | $approveParams | an array of params for a link to be used on approval |
| array | $disapproveParams | an array of params for a link to be used on disapproval |
| string | $baseUrl | if set, this url is used, PHP_SELF otherwise |


| decodeHTML | ( | $string | ) |
decodes html entities to normal characters
@access public
| string |

Displays the provided exception in a more readable fashion.
| Exception | $exception | The exception to be displayed |
| bool | $as_html | Indicates whether the exception shall be displayed as plain text or html (optional, defaults to plain text) |
| bool | $deep | Indicates whether any previous exception should be included in the output (optional, defaults to false) |
Perform a regular expression search and replace using callbacks array $patterns_and_callbacks mixed $subject int $limit [optional] int $count [optional] array|NUll preg_replace_callback_array() returns an array if the subject parameter is an array, or a string otherwise. On errors the return value is NULL
If matches are found, the new subject will be returned, otherwise subject will be returned unchanged.


| formatLinks | ( | $text, | |
$nl2br = TRUE |
|||
| ) |
Simplified version of formatReady that handles link formatting only.
| string | $text | Marked-up text. |
| bool | $nl2br | Convert newlines to . |


Common function to get all special Stud.IP formattings.
@access public
| string | $text | Marked-up text. |
| boolean | $trim | Trim leading and trailing whitespace, if TRUE. |
| boolean | $extern | (deprecated, has no effect) |
| boolean | $wiki | (deprecated, has no effect) |
| string | $show_comments | (deprecated, has no effect) |

| htmlReady | ( | $what, | |
$trim = TRUE, |
|||
$br = FALSE, |
|||
$double_encode = true |
|||
| ) |

| idna_link | ( | $link, | |
$mail = false |
|||
| ) |
convert links with 'umlauten' to punycode
@access public
| string | link to convert |
| boolean | for mailadr = true and for other link = false |


| isLinkIntern | ( | $url | ) |


| isURL | ( | $url | ) |
| jsReady | ( | $what, | |
| $target | |||
| ) |


| kill_format | ( | $text | ) |
removes all characters used by quick-format-syntax
@access public
| string |

| mila | ( | $titel, | |
$size = 60 |
|||
| ) |

| preg_call_format_signature | ( | $username, | |
| $timestamp | |||
| ) |
formats a ~~~~ wiki signature with username and timestamp
| string | |
| unix | timestamp |

| printcontent | ( | $breite, | |
$write = FALSE, |
|||
| $inhalt, | |||
| $edit, | |||
$printout = TRUE, |
|||
$addon = "", |
|||
$noTdTag = false |
|||
| ) |

| printhead | ( | $breite, | |
| $left, | |||
| $link, | |||
| $open, | |||
| $new, | |||
| $icon, | |||
| $titel, | |||
| $zusatz, | |||
$timestmp = 0, |
|||
$printout = TRUE, |
|||
$index = "", |
|||
$indikator = "age", |
|||
$css_class = NULL |
|||
| ) |
Ausgabe der Aufklapp-Kopfzeile
| $breite | |
| $left | |
| $link | |
| $open | |
| $new | |
| $icon | |
| $titel | |
| $zusatz | |
| $timestmp | |
| $printout | |
| $index | |
| $indikator | |
| $css_class |


| quotes_encode | ( | $text, | |
$author = '' |
|||
| ) |
Quote a piece of text, optionally include the author's name.
Applies Stud.IP-Markup if WYSIWYG/HTML is disabled and HTML if it is enabled.
| string | $text | Text that is to be quoted. |
| string | $author | Name of the text's author (optional). |

| smile | ( | $text = '' | ) |
Create smileys
This functions converts the smiley codes notation (:name:) as well as the available short notation.
@access public
| string | $text | The text to convert |

| symbol | ( | $text = '' | ) |
create symbols from the shorts
This functions converts the short, locatet in the config.inc into the assigned pictures. It uses a different directory as the smile-function, becauso symbols should not be shown in the smiley and so, no link is given onto the picture. A tooltip which shows the symbol code is given, too.
@access public
| string | the text to convert |
| tooltip | ( | $text, | |
$with_alt = TRUE, |
|||
$with_popup = FALSE |
|||
| ) |
Returns a given text as html tooltip
title and alt attribute is default, with_popup means a JS alert box activated on click
| string | $text | |
| boolean | $with_alt | return text with alt attribute |
| boolean | $with_popup | return text with JS alert box on click |


| tooltip2 | ( | $text, | |
$with_alt = TRUE, |
|||
$with_popup = FALSE |
|||
| ) |
Returns a given text as an array of html attributes used as tooltip
title and alt attribute is default, with_popup means a JS alert box activated on click
| string | $text | |
| boolean | $with_alt | return text with alt attribute |
| boolean | $with_popup | return text with JS alert box on click |


| tooltipHtmlIcon | ( | $text, | |
$important = false |
|||
| ) |
returns a html-snippet with an icon and a tooltip on it
| string | $text | tooltip text, html is rendered as is |
| bool | $important | render icon in "important" style |
returns a html-snippet with an icon and a tooltip on it
| string | $text | tooltip text, html gets encoded |
| bool | $important | render icon in "important" style |
| bool | $html | tooltip text is HTML content |

| transformBeforeSave | ( | $text | ) |
Apply StudipTransformFormat rules to marked-up text.
| string | $text | Marked-up text. |

| TransformInternalLinks | ( | $str | ) |
detects internal links in a given string and convert used domain to the domain actually used (only necessary if more than one domain exists), relative URLs are converted to absolute URLs
| string | $str | URL/Link to convert |

| wikiReady | ( | $text, | |
$trim = TRUE |
|||
| ) |
Special version of formatReady for wiki-webs.
@access public
| string | $what | Marked-up text. |
| string | $trim | Trim leading and trailing whitespace, if TRUE. |

| wysiwygReady | ( | $what, | |
$trim = TRUE, |
|||
$br = FALSE, |
|||
$double_encode = true |
|||
| ) |
Prepare text for wysiwyg (if enabled), otherwise convert special characters using htmlReady.
| string | $text | The text. |
| boolean | $trim | Trim text before applying markup rules, if TRUE. |
| boolean | $br | Replace newlines by , if TRUE and wysiwyg editor disabled. |
| boolean | $double_encode | Encode existing HTML entities, if TRUE and wysiwyg editor disabled. |


| const FORMATTED_CONTENT_WRAPPER '<div class="formatted-content">%s</div>' |