From b69fca14e76a2f5db0cd0924fe5e7056e94771b1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Feb 2013 15:49:37 -0800 Subject: initial doco --- doc/html/text_8php.html | 1471 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1471 insertions(+) create mode 100644 doc/html/text_8php.html (limited to 'doc/html/text_8php.html') diff --git a/doc/html/text_8php.html b/doc/html/text_8php.html new file mode 100644 index 000000000..680e70223 --- /dev/null +++ b/doc/html/text_8php.html @@ -0,0 +1,1471 @@ + + + + + + +The Red Project: include/text.php File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Project +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
text.php File Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

if(!function_exists('random_string'))
+if(!function_exists('notags'))
+if(!function_exists('escape_tags'))
+if(!function_exists('autoname'))
+if(!function_exists('xmlify'))
+if(!function_exists('unxmlify'))
+if(!function_exists('hex2bin'))
+if(!function_exists('paginate'))
+if(!function_exists('alt_pager'))
+if(!function_exists('expand_acl'))
+if(!function_exists('sanitise_acl'))
+if(!function_exists('perms2str'))
+if(!function_exists('item_message_id'))
+if(!function_exists('photo_new_resource'))
+if(!function_exists('attribute_contains'))
+if(!function_exists('logger'))
+if(!function_exists('dlogger')) 
profiler ($t1, $t2, $label)
 
if(!function_exists('activity_match'))
+if(!function_exists('get_tags'))
+if(!function_exists('qp')) if(!function_exists('get_mentions'))
+if(!function_exists('contact_block')) 
chanlink_hash ($s)
 
 chanlink_url ($s)
 
 chanlink_cid ($d)
 
 magiclink_url ($observer, $myaddr, $url)
 
if(!function_exists('micropro'))
+if(!function_exists('search'))
+if(!function_exists('valid_email'))
+if(!function_exists('linkify')) 
get_poke_verbs ()
 
 get_mood_verbs ()
 
if(!function_exists('smilies')) smile_encode ($m)
 
 smile_decode ($m)
 
 preg_heart ($x)
 
if(!function_exists('day_translate'))
+if(!function_exists('normalise_link'))
+if(!function_exists('link_compare'))
+if(!function_exists('prepare_body'))
+if(!function_exists('prepare_text'))
+if(!function_exists('feed_hublinks'))
+if(!function_exists('feed_salmonlinks'))
+if(!function_exists('get_plink'))
+if(!function_exists('unamp'))
+if(!function_exists('lang_selector'))
+if(!function_exists('return_bytes')) 
generate_user_guid ()
 
 base64url_encode ($s, $strip_padding=true)
 
 base64url_decode ($s)
 
if(!function_exists('str_getcsv')) cleardiv ()
 
 bb_translate_video ($s)
 
 html2bb_video ($s)
 
 array_xmlify ($val)
 
 reltoabs ($text, $base)
 
 item_post_type ($item)
 
 file_tag_encode ($s)
 
 file_tag_decode ($s)
 
 file_tag_file_query ($table, $s, $type= 'file')
 
 term_query ($table, $s, $type=TERM_UNKNOWN)
 
 file_tag_list_to_file ($list, $type= 'file')
 
 file_tag_file_to_list ($file, $type= 'file')
 
 file_tag_update_pconfig ($uid, $file_old, $file_new, $type= 'file')
 
 store_item_tag ($uid, $iid, $otype, $type, $term, $url= '')
 
 get_terms_oftype ($arr, $type)
 
 format_term_for_display ($term)
 
 file_tag_save_file ($uid, $item, $file)
 
 file_tag_unsave_file ($uid, $item, $file, $cat=false)
 
 normalise_openid ($s)
 
 undo_post_tagging ($s)
 
 fix_mce_lf ($s)
 
 protect_sprintf ($s)
 
 is_a_date_arg ($s)
 
 legal_webbie ($s)
 
 check_webbie ($arr)
 
 ids_to_querystr ($arr, $idx= 'id')
 
 xchan_query (&$items, $abook=false)
 
 xchan_mail_query (&$item)
 
 find_xchan_in_array ($xchan, $arr)
 
 get_rel_link ($j, $rel)
 
 magic_link ($s)
 
 stringify_array_elms (&$arr, $escape=false)
 
 jindent ($json)
 
 tagadelic ($uid, $count=0, $type=TERM_HASHTAG)
 
 tags_sort ($a, $b)
 
 tagblock ($link, $uid, $count=0, $type=TERM_HASHTAG)
 
+ + + + + +

+Variables

const RANDOM_STRING_HEX (!function_exists('replace_macros')) 0x00
 
const RANDOM_STRING_TEXT 0x01
 
+

Function Documentation

+ +
+
+ + + + + + + + +
array_xmlify ( $val)
+
+

apply xmlify() to all values of array $val, recursively

+ +

Referenced by api_apply_template(), and poco_init().

+ +
+
+ +
+
+ + + + + + + + +
base64url_decode ( $s)
+
+
+ + + +
+
+ + + + + + + + +
bb_translate_video ( $s)
+
+ +

Referenced by item_post().

+ +
+
+ +
+
+ + + + + + + + +
chanlink_cid ( $d)
+
+ +
+
+ +
+
+ + + + + + + + +
if (!function_exists('activity_match')) if (!function_exists('get_tags')) if (!function_exists('qp')) if (!function_exists('get_mentions')) if (!function_exists('contact_block')) chanlink_hash ( $s)
+
+ +

Referenced by message_content().

+ +
+
+ +
+
+ + + + + + + + +
chanlink_url ( $s)
+
+
+ +
+
+ + + + + + + + +
check_webbie ( $arr)
+
+ +

Referenced by create_identity(), and new_channel_init().

+ +
+
+ +
+
+ + + + + + + +
if (!function_exists('str_getcsv')) cleardiv ()
+
+
+ +
+
+ + + + + + + + +
file_tag_decode ( $s)
+
+ +

Referenced by file_tag_file_to_list().

+ +
+
+ +
+
+ + + + + + + + +
file_tag_encode ( $s)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
file_tag_file_query ( $table,
 $s,
 $type = 'file' 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
file_tag_file_to_list ( $file,
 $type = 'file' 
)
+
+ +

Referenced by editpost_content(), and file_tag_update_pconfig().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
file_tag_list_to_file ( $list,
 $type = 'file' 
)
+
+ +

Referenced by file_tag_update_pconfig().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
file_tag_save_file ( $uid,
 $item,
 $file 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
file_tag_unsave_file ( $uid,
 $item,
 $file,
 $cat = false 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
file_tag_update_pconfig ( $uid,
 $file_old,
 $file_new,
 $type = 'file' 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
find_xchan_in_array ( $xchan,
 $arr 
)
+
+
+ +
+
+ + + + + + + + +
fix_mce_lf ( $s)
+
+ +

Referenced by item_post(), message_post(), and profiles_post().

+ +
+
+ +
+
+ + + + + + + + +
format_term_for_display ( $term)
+
+ +
+
+ +
+
+ + + + + + + +
if (!function_exists('day_translate')) if (!function_exists('normalise_link')) if (!function_exists('link_compare')) if (!function_exists('prepare_body')) if (!function_exists('prepare_text')) if (!function_exists('feed_hublinks')) if (!function_exists('feed_salmonlinks')) if (!function_exists('get_plink')) if (!function_exists('unamp')) if (!function_exists('lang_selector')) if (!function_exists('return_bytes')) generate_user_guid ()
+
+

Compare two URLs to see if they are the same, but ignore slight but hopefully insignificant differences such as if one is https and the other isn't, or if one is www.something and the other isn't - and also ignore case differences.

+

Return true if the URLs match, otherwise false. return atom link elements for all of our hubs

+ +
+
+ +
+
+ + + + + + + +
get_mood_verbs ()
+
+ +

Referenced by mood_content(), and mood_init().

+ +
+
+ +
+
+ + + + + + + +
if (!function_exists('micropro')) if (!function_exists('search')) if (!function_exists('valid_email')) if (!function_exists('linkify')) get_poke_verbs ()
+
+

Function: linkify

+

Replace naked text hyperlink with HTML formatted hyperlink

+ +

Referenced by poke_content(), and poke_init().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
get_rel_link ( $j,
 $rel 
)
+
+ +

Referenced by localize_item().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
get_terms_oftype ( $arr,
 $type 
)
+
+ +

Referenced by item_getfeedtags(), and tag_deliver().

+ +
+
+ +
+
+ + + + + + + + +
html2bb_video ( $s)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
ids_to_querystr ( $arr,
 $idx = 'id' 
)
+
+
+ +
+
+ + + + + + + + +
is_a_date_arg ( $s)
+
+
+ +
+
+ + + + + + + + +
item_post_type ( $item)
+
+ +

Referenced by notification().

+ +
+
+ +
+
+ + + + + + + + +
jindent ( $json)
+
+

Indents a flat JSON string to make it more human-readable.

+
Parameters
+ + +
string$jsonThe original JSON string to process.
+
+
+
Returns
string Indented version of the original JSON string.
+ +
+
+ +
+
+ + + + + + + + +
legal_webbie ( $s)
+
+ +

Referenced by check_webbie(), and new_channel_init().

+ +
+
+ +
+
+ + + + + + + + +
magic_link ( $s)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
magiclink_url ( $observer,
 $myaddr,
 $url 
)
+
+ +
+
+ +
+
+ + + + + + + + +
normalise_openid ( $s)
+
+ +
+
+ +
+
+ + + + + + + + +
preg_heart ( $x)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
if (!function_exists('random_string')) if (!function_exists('notags')) if (!function_exists('escape_tags')) if (!function_exists('autoname')) if (!function_exists('xmlify')) if (!function_exists('unxmlify')) if (!function_exists('hex2bin')) if (!function_exists('paginate')) if (!function_exists('alt_pager')) if (!function_exists('expand_acl')) if (!function_exists('sanitise_acl')) if (!function_exists('perms2str')) if (!function_exists('item_message_id')) if (!function_exists('photo_new_resource')) if (!function_exists('attribute_contains')) if (!function_exists('logger')) if (!function_exists('dlogger')) profiler ( $t1,
 $t2,
 $label 
)
+
+

This is our primary input filter.

+

The high bit hack only involved some old IE browser, forget which (IE5/Mac?) that had an XSS attack vector due to stripping the high-bit on an 8-bit character after cleansing, and angle chars with the high bit set could get through as markup.

+

This is now disabled because it was interfering with some legitimate unicode sequences and hopefully there aren't a lot of those browsers left.

+

Use this on any text input where angle chars are not valid or permitted They will be replaced with safer brackets. This may be filtered further if these are not allowed either.

+ +

Referenced by network_content().

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + +
reltoabs ( $text,
 $base 
)
+
+ +

Referenced by get_atom_elements().

+ +
+
+ +
+
+ + + + + + + + +
smile_decode ( $m)
+
+ +
+
+ +
+
+ + + + + + + + +
if (!function_exists('smilies')) smile_encode ( $m)
+
+

Function: smilies

+

Description: Replaces text emoticons with graphical images

+

: string $s

+

Returns string

+

It is expected that this function will be called using HTML text. We will escape text between HTML pre and code blocks from being processed.

+

At a higher level, the bbcode [nosmile] tag can be used to prevent this function from being executed by the prepare_text() routine when preparing bbcode source for HTML display

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
store_item_tag ( $uid,
 $iid,
 $otype,
 $type,
 $term,
 $url = '' 
)
+
+ +

Referenced by filer_content().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
stringify_array_elms ($arr,
 $escape = false 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
tagadelic ( $uid,
 $count = 0,
 $type = TERM_HASHTAG 
)
+
+ +

Referenced by tagblock().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tagblock ( $link,
 $uid,
 $count = 0,
 $type = TERM_HASHTAG 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
tags_sort ( $a,
 $b 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
term_query ( $table,
 $s,
 $type = TERM_UNKNOWN 
)
+
+ +

Referenced by network_content().

+ +
+
+ +
+
+ + + + + + + + +
undo_post_tagging ( $s)
+
+ +

Referenced by editpost_content().

+ +
+
+ +
+
+ + + + + + + + +
xchan_mail_query ($item)
+
+ +

Referenced by notifier_run().

+ +
+
+ + +

Variable Documentation

+ +
+
+ + + + +
const RANDOM_STRING_HEX(!function_exists('replace_macros')) 0x00
+
+ +
+
+ +
+
+ + + + +
const RANDOM_STRING_TEXT 0x01
+
+ +

Referenced by aes_encapsulate().

+ +
+
+
+
+ + + + -- cgit v1.2.3