The Red Project
|
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 |
array_xmlify | ( | $val | ) |
apply xmlify() to all values of array $val, recursively
Referenced by api_apply_template(), and poco_init().
base64url_decode | ( | $s | ) |
Referenced by aes_unencapsulate(), get_atom_elements(), import_post(), import_xchan(), oembed_init(), pemtome(), post_post(), pubrsatome(), smile_decode(), and zfinger_init().
base64url_encode | ( | $s, | |
$strip_padding = true |
|||
) |
Referenced by aes_encapsulate(), allowed_public_recips(), atom_entry(), create_identity(), get_item_elements(), get_mail_elements(), get_profile_elements(), identity_basic_export(), import_post(), import_xchan(), magic_init(), oembed_iframe(), post_post(), salmon_key(), smile_encode(), zfinger_init(), zot_build_packet(), zot_fetch(), zot_import(), zot_new_uid(), zot_notify(), zot_register_hub(), and zperms_init().
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 | ) |
Referenced by Item\check_wall_to_wall(), directory_content(), fetch_post_tags(), Item\get_template_data(), and localize_item().
check_webbie | ( | $arr | ) |
Referenced by create_identity(), and new_channel_init().
if (!function_exists('str_getcsv')) cleardiv | ( | ) |
Referenced by allfriends_content(), common_content(), match_content(), and suggest_content().
file_tag_decode | ( | $s | ) |
Referenced by file_tag_file_to_list().
file_tag_encode | ( | $s | ) |
Referenced by file_tag_list_to_file(), file_tag_save_file(), file_tag_unsave_file(), and file_tag_update_pconfig().
file_tag_file_query | ( | $table, | |
$s, | |||
$type = 'file' |
|||
) |
Referenced by channel_content(), file_tag_unsave_file(), file_tag_update_pconfig(), and get_feed_for().
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 | ) |
Referenced by api_statuses_mediap(), api_statuses_update(), and get_atom_elements().
ids_to_querystr | ( | $arr, | |
$idx = 'id' |
|||
) |
Referenced by channel_content(), display_content(), network_content(), and search_content().
is_a_date_arg | ( | $s | ) |
Referenced by channel_content(), network_content(), and network_init().
item_post_type | ( | $item | ) |
Referenced by notification().
jindent | ( | $json | ) |
Indents a flat JSON string to make it more human-readable.
string | $json | The original JSON string to process. |
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().
protect_sprintf | ( | $s | ) |
Referenced by acl_init(), api_statuses_mentions(), attach_count_files(), attach_list_files(), channel_content(), connections_content(), dirsearch_content(), file_tag_file_query(), item_permissions_sql(), network_content(), permissions_sql(), public_permissions_sql(), search_ac_init(), search_content(), and term_query().
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 |
|||
) |
Referenced by expand_groups(), identity_basic_export(), lockview_content(), notifier_run(), and zot_import().
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().
xchan_query | ( | & | $items, |
$abook = false |
|||
) |
Referenced by api_format_items(), api_statuses_home_timeline(), api_statuses_public_timeline(), api_statuses_show(), channel_content(), display_content(), events_content(), network_content(), notification(), notifier_run(), page_content(), ping_init(), search_content(), share_init(), and zot_feed().
const RANDOM_STRING_HEX(!function_exists('replace_macros')) 0x00 |
const RANDOM_STRING_TEXT 0x01 |
Referenced by aes_encapsulate().