The Hubzilla
|
Functions | |
replace_macros ($s, $r) | |
This is our template processor. More... | |
random_string ($size=64, $type=RANDOM_STRING_HEX) | |
Generates a random string. More... | |
notags ($string) | |
This is our primary input filter. More... | |
escape_tags ($string) | |
z_input_filter ($s, $type= 'text/bbcode', $allow_code=false) | |
purify_html ($s, $allow_position=false) | |
Use HTMLPurifier to get standards compliant HTML. More... | |
autoname ($len) | |
generate a string that's random, but usually pronounceable. More... | |
xmlify ($str) | |
escape text ($str) for XML transport More... | |
unxmlify ($s) | |
Undo an xmlify. More... | |
paginate (&$a) | |
Automatic pagination. More... | |
alt_pager (&$a, $i, $more= '', $less= '') | |
item_message_id () | |
Generate a guaranteed unique (for this domain) item ID for ATOM. More... | |
photo_new_resource () | |
Generate a guaranteed unique photo ID. More... | |
attribute_contains ($attr, $s) | |
for html,xml parsing - let's say you've got an attribute foobar="class1 class2 class3" and you want to find out if it contains 'class3'. you can't use a normal sub string search because you might match 'notclass3' and a regex to do the job is possible but a bit complicated. More... | |
logger ($msg, $level=LOGGER_NORMAL, $priority=LOG_INFO) | |
Logging function for Hubzilla. More... | |
btlogger ($msg, $level=LOGGER_NORMAL, $priority=LOG_INFO) | |
like logger() but with a function backtrace to pinpoint certain classes of problems which show up deep in the calling stack. More... | |
log_priority_str ($priority) | |
dlogger ($msg, $level=0) | |
This is a special logging facility for developers. More... | |
profiler ($t1, $t2, $label) | |
activity_match ($haystack, $needle) | |
get_tags ($s) | |
Pull out all #hashtags and @person tags from $s. More... | |
tag_sort_length ($a, $b) | |
total_sort ($a, $b) | |
qp ($s) | |
Quick and dirty quoted_printable encoding. More... | |
get_mentions ($item, $tags) | |
contact_block () | |
chanlink_hash ($s) | |
chanlink_url ($s) | |
chanlink_cid ($d) | |
magiclink_url ($observer, $myaddr, $url) | |
micropro ($contact, $redirect=false, $class= '', $textmode=false) | |
search ($s, $id='search-box', $url='/search', $save=false) | |
searchbox ($s, $id='search-box', $url='/search', $save=false) | |
linkify ($s, $me=false) | |
Replace naked text hyperlink with HTML formatted hyperlink. More... | |
sslify ($s) | |
Replace media element using http url with https to a local redirector if using https locally. More... | |
get_poke_verbs () | |
get_mood_verbs () | |
list_smilies ($default_only=false) | |
Function to list all smilies, both internal and from addons. More... | |
smilies ($s, $sample=false) | |
Replaces text emoticons with graphical images. More... | |
smile_shield ($m) | |
smile_unshield ($m) | |
preg_heart ($x) | |
Expand <3333 to the correct number of hearts. More... | |
day_translate ($s) | |
normalise_link ($url) | |
normalises a string. More... | |
link_compare ($a, $b) | |
Compare two URLs to see if they are the same. More... | |
unobscure (&$item) | |
unobscure_mail (&$item) | |
theme_attachments (&$item) | |
format_categories (&$item, $writeable) | |
format_hashtags (&$item) | |
Add any hashtags which weren't mentioned in the message body, e.g. community tags. More... | |
format_mentions (&$item) | |
format_filer (&$item) | |
generate_map ($coord) | |
generate_named_map ($location) | |
prepare_body (&$item, $attach=false) | |
prepare_binary ($item) | |
prepare_text ($text, $content_type= 'text/bbcode', $cache=false) | |
Given a text string, convert from bbcode to html and add smilie icons. More... | |
create_export_photo_body (&$item) | |
feed_hublinks () | |
Return atom link elements for all of our hubs. More... | |
feed_salmonlinks ($nick) | |
Return atom link elements for salmon endpoints. More... | |
get_plink ($item, $conversation_mode=true) | |
unamp ($s) | |
layout_select ($channel_id, $current= '') | |
mimetype_select ($channel_id, $current= 'text/bbcode', $choices=null, $element= 'mimetype') | |
engr_units_to_bytes ($size_str) | |
base64url_encode ($s, $strip_padding=true) | |
base64url_decode ($s) | |
base64special_encode ($s, $strip_padding=true) | |
base64special_decode ($s) | |
cleardiv () | |
Return a div to clear floats. More... | |
bb_translate_video ($s) | |
html2bb_video ($s) | |
array_xmlify ($val) | |
reltoabs ($text, $base) | |
item_post_type ($item) | |
undo_post_tagging ($s) | |
fix_mce_lf ($s) | |
protect_sprintf ($s) | |
is_a_date_arg ($s) | |
legal_webbie ($s) | |
legal_webbie_text () | |
check_webbie ($arr) | |
ids_to_array ($arr, $idx= 'id') | |
ids_to_querystr ($arr, $idx= 'id', $quote=false) | |
xchan_query (&$items, $abook=true, $effective_uid=0) | |
Fetches xchan and hubloc data for an array of items with only an author_xchan and owner_xchan. More... | |
xchan_mail_query (&$item) | |
find_xchan_in_array ($xchan, $arr) | |
get_rel_link ($j, $rel) | |
magic_link ($s) | |
stringify_array_elms (&$arr, $escape=false) | |
If $escape is true, dbesc() each element before adding quotes. More... | |
jindent ($json) | |
Indents a flat JSON string to make it more human-readable. More... | |
design_tools () | |
Creates navigation menu for webpage, layout, blocks, menu sites. More... | |
website_portation_tools () | |
Creates website portation tools menu. More... | |
in_arrayi ($needle, $haystack) | |
case insensitive in_array() More... | |
normalise_openid ($s) | |
extra_query_args () | |
handle_tag ($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $diaspora=false) | |
This function removes the tag $tag from the text $body and replaces it with the appropiate link. More... | |
linkify_tags ($a, &$body, $uid, $diaspora=false) | |
getIconFromType ($type) | |
returns icon name for use with e.g. font-awesome based on mime-type. More... | |
userReadableSize ($size) | |
Returns a human readable formatted string for filesizes. More... | |
str_rot47 ($str) | |
string_replace ($old, $new, &$s) | |
json_url_replace ($old, $new, &$s) | |
item_url_replace ($channel, &$item, $old, $new, $oldnick= '') | |
sanitise_acl (&$item) | |
Used to wrap ACL elements in angle brackets for storage. More... | |
perms2str ($p) | |
Convert an ACL array to a storable string. More... | |
expand_acl ($s) | |
Turn user/group ACLs stored as angle bracketed text into arrays. More... | |
acl2json ($s) | |
pdl_selector ($uid, $current='') | |
When editing a webpage - a dropdown is needed to select a page layout. More... | |
flatten_array_recursive ($arr) | |
returns a one-dimensional array from a multi-dimensional array empty values are discarded More... | |
text_highlight ($s, $lang) | |
Highlight Text. More... | |
arrtoxml ($root_elem, $arr) | |
array2XML ($obj, $array) | |
create_table_from_array ($table, $arr) | |
Inserts an array into $table. More... | |
share_shield ($m) | |
share_unshield ($m) | |
cleanup_bbcode ($body) | |
gen_link_id ($mid) | |
array_trim (&$v, $k) | |
array_escape_tags (&$v, $k) | |
ellipsify ($s, $maxlen) | |
purify_filename ($s) | |
Variables | |
const | RANDOM_STRING_HEX 0x00 |
const | RANDOM_STRING_TEXT 0x01 |
acl2json | ( | $s | ) |
activity_match | ( | $haystack, | |
$needle | |||
) |
Referenced by Zotlabs\Lib\ThreadItem\add_child(), Zotlabs\Lib\ThreadStream\add_thread(), atom_entry(), builtin_activity_puller(), consume_feed(), conversation(), Zotlabs\Module\Like\get(), get_atom_elements(), item_post_type(), localize_item(), remove_community_tag(), Zotlabs\Lib\Enotify\submit(), and visible_activity().
alt_pager | ( | & | $a, |
$i, | |||
$more = '' , |
|||
$less = '' |
|||
) |
array2XML | ( | $obj, | |
$array | |||
) |
Referenced by arrtoxml().
array_escape_tags | ( | & | $v, |
$k | |||
) |
array_trim | ( | & | $v, |
$k | |||
) |
arrtoxml | ( | $root_elem, | |
$arr | |||
) |
Referenced by api_apply_template().
attribute_contains | ( | $attr, | |
$s | |||
) |
for html,xml parsing - let's say you've got an attribute foobar="class1 class2 class3" and you want to find out if it contains 'class3'. you can't use a normal sub string search because you might match 'notclass3' and a regex to do the job is possible but a bit complicated.
pass the attribute string as $attr and the attribute you are looking for as $s - returns true if found, otherwise false
string | $attr | attribute string |
string | $s | attribute you are looking for |
Referenced by scrape_vcard().
autoname | ( | $len | ) |
generate a string that's random, but usually pronounceable.
Used to generate initial passwords.
int | $len |
Referenced by Zotlabs\Module\Setup\check_php(), Zotlabs\Module\Lostpass\get(), Zotlabs\Module\Settings\Tokens\get(), and Zotlabs\Module\Invite\get().
base64special_decode | ( | $s | ) |
Referenced by smile_unshield().
base64special_encode | ( | $s, | |
$strip_padding = true |
|||
) |
Referenced by smile_shield().
base64url_decode | ( | $s | ) |
Referenced by aes_unencapsulate(), check_zotinfo(), convert_salmon_key(), encode_mail(), Zotlabs\Module\Contactgroup\get(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Mail\get(), get_atom_elements(), get_item_elements(), identity_basic_export(), Zotlabs\Module\Import\import_account(), import_site(), import_xchan(), Zotlabs\Module\Oembed\init(), Zotlabs\Module\Magic\init(), Zotlabs\Module\Impel\init(), mail_store(), Zotlabs\Module\Oep\oep_display_reply(), other_unencapsulate(), pemtome(), Zotlabs\Module\Getfile\post(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_channel_sync_delivery(), process_rating_delivery(), pubrsatome(), Zotlabs\Zot\Finger\run(), share_unshield(), sync_directories(), sync_locations(), unobscure_mail(), Zotlabs\Zot\Auth\Verify(), xchan_store(), zot_refresh(), zot_register_hub(), zot_rekey_request(), zot_reply_auth_check(), zot_reply_pickup(), and zotinfo().
base64url_encode | ( | $s, | |
$strip_padding = true |
|||
) |
Referenced by aes_encapsulate(), change_channel_keys(), check_zotinfo(), create_conversation(), create_identity(), fix_system_urls(), Zotlabs\Lib\Enotify\format(), gen_link_id(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Fhublocs\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Layouts\get(), Zotlabs\Module\Blocks\get(), Zotlabs\Module\Webpages\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Menu\get(), get_mail_elements(), get_webpage_elements(), group_side(), identity_basic_export(), Zotlabs\Module\Import\import_account(), import_conv(), Zotlabs\Module\Owa\init(), Zotlabs\Module\Ping\init(), item_sign(), item_url_replace(), make_xchan_hash(), oembed_iframe(), other_encapsulate(), Zotlabs\Module\Prate\post(), Zotlabs\Module\Rate\post(), Zotlabs\Module\Connedit\post(), process_channel_sync_delivery(), random_string(), salmon_key(), Zotlabs\Lib\LDSignatures\salmon_sign(), send_message(), share_shield(), Zotlabs\Lib\JSalmon\sign(), sync_files(), zot_build_packet(), zot_fetch(), zot_new_uid(), zot_reply_auth_check(), zot_reply_ping(), zot_site_info(), and zotinfo().
bb_translate_video | ( | $s | ) |
Referenced by cleanup_bbcode().
btlogger | ( | $msg, | |
$level = LOGGER_NORMAL , |
|||
$priority = LOG_INFO |
|||
) |
like logger() but with a function backtrace to pinpoint certain classes of problems which show up deep in the calling stack.
string | $msg | Message to log |
int | $level | A log level |
int | $priority | - compatible with syslog |
Referenced by Zotlabs\Access\Permissions\FilledPerms(), Zotlabs\Lib\PConfig\Load(), markdown_to_bb(), rsa_verify(), Zotlabs\Lib\PConfig\Set(), and xmlify().
chanlink_cid | ( | $d | ) |
Referenced by Zotlabs\Module\Connedit\get().
chanlink_hash | ( | $s | ) |
Referenced by builtin_activity_puller(), Zotlabs\Lib\ThreadItem\check_wall_to_wall(), Zotlabs\Module\Viewconnections\get(), Zotlabs\Module\Connections\get(), Zotlabs\Module\Mail\get(), Zotlabs\Lib\ThreadItem\get_template_data(), Zotlabs\Module\Randprof\init(), micropro(), thread_author_menu(), and Zotlabs\Widget\Conversations\widget().
chanlink_url | ( | $s | ) |
check_webbie | ( | $arr | ) |
cleanup_bbcode | ( | $body | ) |
fix naked links by passing through a callback to see if this is a hubzilla site (already known to us) which will get a zrl, otherwise link with url, add bookmark tag to both. First protect any url inside certain bbcode tags so we don't double link it.
Fold multi-line [code] sequences
Referenced by Zotlabs\Module\Mail\post(), Zotlabs\Module\Item\post(), and send_message().
cleardiv | ( | ) |
Return a div to clear floats.
contact_block | ( | ) |
Referenced by profile_sidebar().
create_export_photo_body | ( | & | $item | ) |
Referenced by atom_entry().
create_table_from_array | ( | $table, | |
$arr | |||
) |
Inserts an array into $table.
string | $table | |
array | $arr |
Referenced by abook_store_lowlevel(), account_store_lowlevel(), channel_store_lowlevel(), hubloc_store_lowlevel(), Zotlabs\Module\Import\import_account(), import_apps(), import_channel(), import_chatrooms(), import_config(), import_conv(), import_events(), import_hublocs(), import_likes(), import_objs(), import_profiles(), Zotlabs\Module\Profiles\init(), item_store(), mail_store(), profile_store_lowlevel(), site_store_lowlevel(), sync_apps(), sync_chatrooms(), sync_events(), sync_files(), sync_objs(), and xchan_store_lowlevel().
day_translate | ( | $s | ) |
design_tools | ( | ) |
Creates navigation menu for webpage, layout, blocks, menu sites.
Referenced by Zotlabs\Widget\Design_tools\widget().
dlogger | ( | $msg, | |
$level = 0 |
|||
) |
This is a special logging facility for developers.
It allows one to target specific things to trace/debug and is identical to logger() with the exception of the log filename. This allows one to isolate specific calls while allowing logger() to paint a bigger picture of overall activity and capture more detail.
If you find dlogger() calls in checked in code, you are free to remove them - so as to provide a noise-free development environment which responds to events you are targetting personally.
string | $msg | Message to log |
int | $level | A log level. |
ellipsify | ( | $s, | |
$maxlen | |||
) |
Referenced by photos_albums_list().
engr_units_to_bytes | ( | $size_str | ) |
escape_tags | ( | $string | ) |
use this on "body" or "content" input where angle chars shouldn't be removed, and allow them to be safely displayed.
string | $string |
Referenced by api_client_register(), Zotlabs\Lib\Apps\app_feature(), Zotlabs\Lib\Apps\app_store(), Zotlabs\Lib\Apps\app_update(), array_escape_tags(), bookmark_add(), Zotlabs\Lib\NativeWikiPage\commit(), Zotlabs\Lib\NativeWikiPage\convert_links(), create_identity(), Zotlabs\Widget\Wiki_pages\create_missing_page(), Zotlabs\Lib\NativeWikiPage\create_page(), decode_item_meta(), Zotlabs\Module\Dreport\get(), Zotlabs\Module\Viewsrc\get(), Zotlabs\Module\Apps\get(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Admin\Logs\get(), Zotlabs\Module\Pconfig\get(), Zotlabs\Module\Rbmark\get(), get_atom_elements(), get_plugin_info(), get_vcard_array(), Zotlabs\Lib\NativeWiki\get_wiki(), import_apps(), import_menus(), Zotlabs\Module\Notes\init(), Zotlabs\Module\Feed\init(), Zotlabs\Module\Page\init(), Zotlabs\Module\Ofeed\init(), Zotlabs\Module\Impel\init(), Zotlabs\Module\Thing\init(), Zotlabs\Lib\NativeWiki\listwikis(), mail_store(), menu_add_item(), menu_create(), menu_edit(), menu_edit_item(), Zotlabs\Lib\NativeWikiPage\page_list(), Zotlabs\Module\Pconfig\pconfig_form(), poco_load(), Zotlabs\Module\Pdledit\post(), Zotlabs\Module\Settings\Permcats\post(), Zotlabs\Module\Settings\Tokens\post(), Zotlabs\Module\Pconfig\post(), Zotlabs\Module\Settings\Channel\post(), Zotlabs\Module\Appman\post(), Zotlabs\Module\Events\post(), Zotlabs\Module\Mail\post(), Zotlabs\Module\Prate\post(), Zotlabs\Module\Item\post(), Zotlabs\Module\Rbmark\post(), Zotlabs\Module\Chatsvc\post(), Zotlabs\Module\Connect\post(), Zotlabs\Module\Tasks\post(), Zotlabs\Module\Rate\post(), Zotlabs\Module\Connedit\post(), Zotlabs\Module\Profiles\post(), Zotlabs\Module\Wiki\post(), post_activity_item(), prepare_text(), Zotlabs\Lib\NativeWikiPage\rename_page(), sync_apps(), sync_menus(), and z_input_filter().
expand_acl | ( | $s | ) |
Turn user/group ACLs stored as angle bracketed text into arrays.
turn string array of angle-bracketed elements into string array e.g. "<123xyz><246qyo><sxo33e>" => array(123xyz,246qyo,sxo33e);
string | $s |
Referenced by acl2json(), attach_recursive_perms(), collect_recipients(), enumerate_permissions(), file_activity(), Zotlabs\Module\Lockview\get(), Zotlabs\Module\File_upload\post(), and Zotlabs\Module\Photos\post().
extra_query_args | ( | ) |
Used in ajax endless scroll request to find out all the args that the master page was viewing. This was using $_REQUEST, but $_REQUEST also contains all your cookies. So we're restricting it to $_GET and $_POST.
Referenced by Zotlabs\Module\Viewconnections\get(), Zotlabs\Module\Connections\get(), Zotlabs\Module\Directory\get(), and Zotlabs\Module\Photos\get().
feed_hublinks | ( | ) |
Return atom link elements for all of our hubs.
feed_salmonlinks | ( | $nick | ) |
Return atom link elements for salmon endpoints.
string | $nick |
find_xchan_in_array | ( | $xchan, | |
$arr | |||
) |
fix_mce_lf | ( | $s | ) |
Referenced by Zotlabs\Module\Profiles\post().
flatten_array_recursive | ( | $arr | ) |
returns a one-dimensional array from a multi-dimensional array empty values are discarded
example: print_r(flatten_array_recursive(array('foo','bar',array('baz','blip',array('zob','glob')),'','grip')));
Array ( [0] => foo [1] => bar [2] => baz [3] => blip [4] => zob [5] => glob [6] => grip )
array | $arr | multi-dimensional array |
Referenced by proc_run().
format_categories | ( | & | $item, |
$writeable | |||
) |
Referenced by prepare_body().
format_filer | ( | & | $item | ) |
Referenced by prepare_body().
format_hashtags | ( | & | $item | ) |
Add any hashtags which weren't mentioned in the message body, e.g. community tags.
[in] | array | &$item |
Referenced by prepare_body().
format_mentions | ( | & | $item | ) |
Referenced by prepare_body().
gen_link_id | ( | $mid | ) |
generate_map | ( | $coord | ) |
Referenced by prepare_body().
generate_named_map | ( | $location | ) |
get_mentions | ( | $item, | |
$tags | |||
) |
get_mood_verbs | ( | ) |
Referenced by Zotlabs\Module\Mood\get(), and Zotlabs\Module\Mood\init().
get_plink | ( | $item, | |
$conversation_mode = true |
|||
) |
Referenced by conversation(), and Zotlabs\Lib\ThreadItem\get_template_data().
get_poke_verbs | ( | ) |
Referenced by Zotlabs\Module\Poke\get(), and Zotlabs\Module\Poke\init().
get_rel_link | ( | $j, | |
$rel | |||
) |
Referenced by Zotlabs\Module\Sharedwithme\get(), localize_item(), remove_community_tag(), and tag_deliver().
get_tags | ( | $s | ) |
Pull out all #hashtags and @person tags from $s.
We also get @person@domain.com - which would make the regex quite complicated as tags can also end a sentence. So we'll run through our results and strip the period from any tags which end with one.
string | $s |
Referenced by linkify_tags().
getIconFromType | ( | $type | ) |
returns icon name for use with e.g. font-awesome based on mime-type.
These are the the font-awesome names of version 3.2.1. The newer font-awesome 4 has different names.
string | $type | mime type |
Referenced by Zotlabs\Module\Sharedwithme\get(), and theme_attachments().
handle_tag | ( | $a, | |
& | $body, | ||
& | $access_tag, | ||
& | $str_tags, | ||
$profile_uid, | |||
$tag, | |||
$diaspora = false |
|||
) |
This function removes the tag $tag from the text $body and replaces it with the appropiate link.
App | $a | ||
[in,out] | string | &$body | the text to replace the tag in |
[in,out] | string | &$access_tag | used to return tag ACL exclusions e.g. @!foo |
[in,out] | string | &$str_tags | string to add the tag to |
int | $profile_uid | ||
string | $tag | the tag to replace | |
boolean | $diaspora | default false |
Referenced by linkify_tags().
html2bb_video | ( | $s | ) |
Referenced by get_atom_elements().
ids_to_array | ( | $arr, | |
$idx = 'id' |
|||
) |
Referenced by Zotlabs\Module\Acl\init(), and visible_plugin_list().
ids_to_querystr | ( | $arr, | |
$idx = 'id' , |
|||
$quote = false |
|||
) |
Referenced by Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Channel\get(), items_fetch(), photos_albums_list(), stream_perms_api_uids(), stream_perms_xchans(), Zotlabs\Widget\Forums\widget(), and zot_feed().
in_arrayi | ( | $needle, | |
$haystack | |||
) |
case insensitive in_array()
string | $needle | |
array | $haystack |
Referenced by Zotlabs\Module\Directory\get(), and import_directory_profile().
is_a_date_arg | ( | $s | ) |
Referenced by Zotlabs\Module\Network\get(), and Zotlabs\Module\Channel\get().
item_message_id | ( | ) |
Generate a guaranteed unique (for this domain) item ID for ATOM.
Safe from birthday paradox.
Referenced by Zotlabs\Lib\NativeWiki\create_wiki(), event_store_item(), file_activity(), Zotlabs\Module\React\get(), Zotlabs\Module\Subthread\get(), Zotlabs\Module\Like\get(), import_webpage_element(), Zotlabs\Module\Impel\init(), Zotlabs\Module\Mood\init(), item_create_edit_activity(), photo_upload(), photos_create_item(), Zotlabs\Module\Item\post(), post_activity_item(), profile_activity(), and store_doc_file().
item_post_type | ( | $item | ) |
Referenced by Zotlabs\Lib\Enotify\submit().
item_url_replace | ( | $channel, | |
& | $item, | ||
$old, | |||
$new, | |||
$oldnick = '' |
|||
) |
Referenced by import_items().
jindent | ( | $json | ) |
Indents a flat JSON string to make it more human-readable.
string | $json | The original JSON string to process. |
Referenced by text_highlight().
json_url_replace | ( | $old, | |
$new, | |||
& | $s | ||
) |
Referenced by item_url_replace().
layout_select | ( | $channel_id, | |
$current = '' |
|||
) |
legal_webbie | ( | $s | ) |
Referenced by auto_channel_create(), check_webbie(), and Zotlabs\Module\New_channel\init().
legal_webbie_text | ( | ) |
link_compare | ( | $a, | |
$b | |||
) |
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.
string | $a | |
string | $b |
Referenced by consume_feed(), tag_deliver(), tgroup_check(), and zid().
linkify | ( | $s, | |
$me = false |
|||
) |
Replace naked text hyperlink with HTML formatted hyperlink.
string | $s | |
boolean | $me | (optional) default false |
Referenced by advanced_profile(), Zotlabs\Module\Directory\get(), and profile_sidebar().
linkify_tags | ( | $a, | |
& | $body, | ||
$uid, | |||
$diaspora = false |
|||
) |
list_smilies | ( | $default_only = false | ) |
Function to list all smilies, both internal and from addons.
Referenced by Zotlabs\Module\Smilies\get(), and smilies().
log_priority_str | ( | $priority | ) |
Referenced by btlogger(), and logger().
logger | ( | $msg, | |
$level = LOGGER_NORMAL , |
|||
$priority = LOG_INFO |
|||
) |
Logging function for Hubzilla.
Logging output is configured through Hubzilla's system config. The log file is set in system logfile, log level in system loglevel and to enable logging set system debugging.
Available constants for log level are LOGGER_NORMAL, LOGGER_TRACE, LOGGER_DEBUG, LOGGER_DATA and LOGGER_ALL.
Since PHP5.4 we get the file, function and line automatically where the logger was called, so no need to add it to the message anymore.
string | $msg | Message to log |
int | $level | A log level |
int | $priority | - compatible with syslog |
Referenced by Zotlabs\Lib\DB_Upgrade\__construct(), Zotlabs\Storage\GitRepo\__construct(), Zotlabs\Zot\Auth\__construct(), Zotlabs\Web\Router\__construct(), account_remove(), account_verify_password(), Zotlabs\Lib\ThreadItem\add_child(), Zotlabs\Lib\ThreadStream\add_thread(), aes_encapsulate(), allowed_public_recips(), anon_identity_init(), api_attach_list(), api_call(), api_channel_stream(), api_export_basic(), api_login(), api_network_stream(), api_oauth_request_token(), api_red_xchan(), api_zot_abook_xchan(), attach_mkdir(), attach_mkdirp(), attach_store(), base64special_decode(), base64url_decode(), bookmark_add(), btlogger(), build_sync_packet(), channel_remove(), check_config(), check_form_security_token_ForbiddenOnErr(), check_form_security_token_redirectOnErr(), check_plugin_versions(), check_zotinfo(), consume_feed(), contact_remove(), conversation(), convert_salmon_key(), copy_folder_to_cloudfiles(), copy_of_pubitem(), create_account(), create_identity(), Zotlabs\Lib\NativeWikiPage\create_page(), datetime_convert(), Zotlabs\Render\Theme\debug(), delete_imported_item(), delete_item_lowlevel(), detect_language(), Zotlabs\Module\Dirsearch\dir_parse_query(), discover_by_url(), discover_by_webbie(), do_delivery(), downgrade_accounts(), encode_item(), event_import_ical(), event_import_ical_task(), feed_conversation_fetch(), feed_meta(), fetch_lrdd_template(), Zotlabs\Lib\ActivityStreams\fetch_property(), fetch_xrd_links(), find_folder_hash_by_attach_hash(), fix_private_photos(), fix_system_urls(), Zotlabs\Lib\PermissionDescription\fromGlobalPermission(), Zotlabs\Lib\PermissionDescription\fromStandalonePermission(), Zotlabs\Module\Filerm\get(), Zotlabs\Module\Chanview\get(), Zotlabs\Module\Linkinfo\get(), Zotlabs\Module\Filer\get(), Zotlabs\Module\Like\get(), Zotlabs\Module\Subthread\get(), Zotlabs\Module\Tagger\get(), Zotlabs\Module\Wiki\get(), Zotlabs\Module\Admin\get(), Zotlabs\Module\Directory\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Register\get(), get_atom_elements(), get_item_elements(), Zotlabs\Lib\ThreadStream\get_template_data(), get_zcard(), get_zcard_embed(), Zotlabs\Zot\Auth\GetHublocs(), guess_image_type(), html2markdown(), http_status(), hubloc_change_primary(), Zotlabs\Module\Import\import_account(), import_author_rss(), import_author_unknown(), import_author_zot(), import_channel(), import_channel_photo(), import_directory_profile(), import_hublocs(), import_site(), import_xchan(), import_xchan_photo(), Zotlabs\Module\Hostxrd\init(), Zotlabs\Module\Bookmarks\init(), Zotlabs\Module\Hcard\init(), Zotlabs\Module\Notes\init(), Zotlabs\Module\Siteinfo\init(), Zotlabs\Module\Well_known\init(), Zotlabs\Module\Search_ac\init(), Zotlabs\Module\Magic\init(), Zotlabs\Module\Wfinger\init(), Zotlabs\Module\Wall_attach\init(), Zotlabs\Module\Xrd\init(), Zotlabs\Module\Zotfeed\init(), Zotlabs\Module\Feed\init(), Zotlabs\Module\Impel\init(), Zotlabs\Module\Cdav\init(), Zotlabs\Module\Ofeed\init(), Zotlabs\Module\Photo\init(), Zotlabs\Module\Mood\init(), Zotlabs\Module\Oep\init(), Zotlabs\Web\Session\init(), Zotlabs\Module\Ping\init(), Zotlabs\Module\Acl\init(), Zotlabs\Module\Poke\init(), install_plugin(), item_store(), item_store_update(), jsonld_document_loader(), limit_body_size(), load_plugin(), local_dir_update(), localize_item(), ZotOAuth1\loginUser(), ZotOAuth1DataStore\lookup_consumer(), ZotOAuth1DataStore\lookup_token(), mail_store(), menu_edit(), mini_group_select(), ZotOAuth1DataStore\new_access_token(), new_contact(), Zotlabs\Web\Session\new_cookie(), new_keypair(), ZotOAuth1DataStore\new_request_token(), Zotlabs\Lib\LDSignatures\normalise(), oembed_action(), oembed_fetch_url(), oembed_process(), Zotlabs\Module\Oep\oep_display_reply(), old_webfinger(), other_encapsulate(), owt_init(), parse_vobject(), parse_xml_string(), photo_factory(), photo_upload(), poco(), poco_load(), Zotlabs\Module\Admin\Features\post(), Zotlabs\Module\File_upload\post(), Zotlabs\Module\Settings\Display\post(), Zotlabs\Module\Events\post(), Zotlabs\Module\Import_items\post(), Zotlabs\Module\Admin\Plugins\post(), Zotlabs\Module\Mail\post(), Zotlabs\Module\Admin\post(), Zotlabs\Module\Getfile\post(), Zotlabs\Module\Rbmark\post(), Zotlabs\Module\Item\post(), Zotlabs\Module\Cover_photo\post(), Zotlabs\Module\Chat\post(), Zotlabs\Module\Profile_photo\post(), Zotlabs\Module\Photos\post(), Zotlabs\Module\Webpages\post(), Zotlabs\Module\Wiki\post(), post_activity_item(), proc_run(), process_channel_sync_delivery(), process_delivery(), process_feed_tombstones(), process_location_delivery(), process_mail_delivery(), process_profile_delivery(), process_rating_delivery(), process_salmon_feed(), profile_load(), profile_photo_set_profile_perms(), prune_hub_reinstalls(), public_recips(), dba_mysql\q(), queue_deliver(), queue_set_delivered(), random_profile(), red_item(), Zotlabs\Daemon\Master\Release(), reload_plugins(), Zotlabs\Lib\ThreadItem\remove_child(), remove_community_tag(), remove_obsolete_hublocs(), remove_queue_by_posturl(), remove_queue_item(), Zotlabs\Web\Session\return_check(), rsa_verify(), Zotlabs\Daemon\Cron\run(), Zotlabs\Daemon\Importfile\run(), Zotlabs\Daemon\Poller\run(), Zotlabs\Daemon\Cronhooks\run(), Zotlabs\Daemon\Cron_daily\run(), Zotlabs\Daemon\Cron_weekly\run(), Zotlabs\Daemon\Expire\run(), Zotlabs\Daemon\Checksites\run(), Zotlabs\Daemon\Queue\run(), Zotlabs\Daemon\Onedirsync\run(), Zotlabs\Daemon\Onepoll\run(), Zotlabs\Daemon\Externals\run(), Zotlabs\Daemon\Deliver\run(), Zotlabs\Daemon\Ratenotif\run(), Zotlabs\Daemon\Directory\run(), Zotlabs\Zot\Finger\run(), Zotlabs\Daemon\Notifier\run(), photo_driver\save(), scale_external_images(), scan_webpage_elements(), scrape_feed(), scrape_vcard(), Zotlabs\Lib\Enotify\send(), send_reg_approval_email(), set_linkified_perms(), Zotlabs\Lib\ThreadStream\set_mode(), start_delivery_chain(), stream_perms_api_uids(), stream_perms_xchans(), Zotlabs\Lib\Enotify\submit(), sync_directories(), sync_files(), sync_locations(), tag_deliver(), tgroup_check(), Zotlabs\Thumbs\Video\Thumb(), Zotlabs\Thumbs\Pdf\Thumb(), uninstall_plugin(), unload_plugin(), update_directory_entry(), update_imported_item(), update_queue_item(), Zotlabs\Lib\LDSignatures\verify(), Zotlabs\Web\HTTPSig\verify(), Zotlabs\Zot\Auth\Verify(), verify_email_address(), webfinger_rfc7033(), xchan_store(), xml2array(), z_fetch_url(), z_mail(), z_post_url(), zid_init(), zot_build_packet(), zot_feed(), zot_fetch(), zot_gethub(), zot_import(), zot_item_update(), zot_process_response(), zot_refresh(), zot_register_hub(), zot_reply_auth_check(), zot_reply_message_request(), zot_reply_notify(), zot_reply_pickup(), zot_reply_ping(), and zotinfo().
magic_link | ( | $s | ) |
magiclink_url | ( | $observer, | |
$myaddr, | |||
$url | |||
) |
Referenced by item_redir_and_replace_images().
micropro | ( | $contact, | |
$redirect = false , |
|||
$class = '' , |
|||
$textmode = false |
|||
) |
Referenced by contact_block().
mimetype_select | ( | $channel_id, | |
$current = 'text/bbcode' , |
|||
$choices = null , |
|||
$element = 'mimetype' |
|||
) |
Referenced by Zotlabs\Widget\Wiki_pages\create_missing_page(), and Zotlabs\Widget\Wiki_pages\widget().
normalise_link | ( | $url | ) |
normalises a string.
string | $url |
Referenced by best_link_url(), link_compare(), tag_deliver(), tgroup_check(), and thread_author_menu().
normalise_openid | ( | $s | ) |
notags | ( | $string | ) |
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.
string | $string | Input string |
Referenced by channel_apps(), conversation(), create_account(), discover_by_url(), feed_get_reshare(), Zotlabs\Module\Subthread\get(), Zotlabs\Module\Tagger\get(), Zotlabs\Module\Like\get(), Zotlabs\Module\Help\get(), Zotlabs\Module\Oexchange\get(), Zotlabs\Module\Connections\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Directory\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Setup\get(), get_atom_elements(), get_dirpath_by_cloudpath(), get_help_content(), Zotlabs\Module\Xrd\init(), Zotlabs\Module\Follow\init(), Zotlabs\Module\Mood\init(), Zotlabs\Module\Poke\init(), item_store(), item_store_update(), mail_store(), poco(), Zotlabs\Module\Settings\Account\post(), Zotlabs\Module\Admin\Security\post(), Zotlabs\Module\Lostpass\post(), Zotlabs\Module\Filestorage\post(), Zotlabs\Module\Group\post(), Zotlabs\Module\Settings\Channel\post(), Zotlabs\Module\Settings\Display\post(), Zotlabs\Module\Admin\Site\post(), Zotlabs\Module\Events\post(), Zotlabs\Module\Invite\post(), Zotlabs\Module\Mail\post(), Zotlabs\Module\Admin\Logs\post(), Zotlabs\Module\Item\post(), Zotlabs\Module\Register\post(), Zotlabs\Module\Photos\post(), Zotlabs\Module\Profiles\post(), and sanitise_acl().
paginate | ( | & | $a | ) |
Automatic pagination.
To use, get the count of total items. Then call App::set_pager_total($number_items); Optionally call App::set_pager_itemspage($n) to the number of items to display on each page Then call paginate($a) after the end of the display loop to insert the pager block on the page (assuming there are enough items to paginate). When using with SQL, the setting LIMIT d, d => App::$pager['start'],App::$pager['itemspage'] will limit the results to the correct items for the current page. The actual page handling is then accomplished at the application layer.
App | &$a |
Referenced by Zotlabs\Module\Connections\get(), Zotlabs\Module\Admin\Channels\get(), and Zotlabs\Module\Admin\Accounts\get().
pdl_selector | ( | $uid, | |
$current = '' |
|||
) |
When editing a webpage - a dropdown is needed to select a page layout.
On submit, the pdl_select value (which is the mid of an item with item_type = ITEM_TYPE_PDL) is stored in the webpage's resource_id, with resource_type 'pdl'.
Then when displaying a webpage, we can see if it has a pdl attached. If not we'll use the default site/page layout.
If it has a pdl we'll load it as we know the mid and pass the body through comanche_parser() which will generate the page layout from the given description
int | $uid | |
string | $current |
perms2str | ( | $p | ) |
Convert an ACL array to a storable string.
array | $p |
Referenced by attach_store(), file_activity(), and Zotlabs\Module\File_upload\post().
photo_new_resource | ( | ) |
Generate a guaranteed unique photo ID.
Safe from birthday paradox.
Referenced by import_channel_photo(), import_xchan_photo(), photo_upload(), Zotlabs\Module\Cover_photo\post(), and Zotlabs\Module\Profile_photo\post().
preg_heart | ( | $x | ) |
Expand <3333 to the correct number of hearts.
array | $x |
prepare_binary | ( | $item | ) |
Referenced by prepare_body().
prepare_body | ( | & | $item, |
$attach = false |
|||
) |
Referenced by conversation(), and Zotlabs\Lib\ThreadItem\get_template_data().
prepare_text | ( | $text, | |
$content_type = 'text/bbcode' , |
|||
$cache = false |
|||
) |
Given a text string, convert from bbcode to html and add smilie icons.
string | $text | |
sting | $content_type | (optional) default text/bbcode |
boolean | $cache | (optional) default false |
Referenced by advanced_profile(), atom_entry(), Zotlabs\Render\Comanche\block(), check_item_source(), Zotlabs\Module\Search\get(), Zotlabs\Module\Connect\get(), post_is_importable(), prepare_body(), store_doc_file(), and Zotlabs\Widget\Random_block\widget().
profiler | ( | $t1, | |
$t2, | |||
$label | |||
) |
protect_sprintf | ( | $s | ) |
Referenced by attach_count_files(), attach_list_files(), Zotlabs\Lib\Chatroom\destroy(), Zotlabs\Module\Dirsearch\dir_query_build(), file_tag_file_query(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Dirsearch\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Connections\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Search_ac\init(), Zotlabs\Module\Acl\init(), item_permissions_sql(), items_fetch(), menu_list(), menu_list_count(), permissions_sql(), photos_list_photos(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), public_permissions_sql(), Zotlabs\Daemon\Notifier\run(), sync_directories(), term_query(), vcard_query(), xchan_mail_query(), xchan_query(), and zot_gethub().
purify_filename | ( | $s | ) |
Referenced by nav(), and Zotlabs\Render\Comanche\widget().
purify_html | ( | $s, | |
$allow_position = false |
|||
) |
Use HTMLPurifier to get standards compliant HTML.
Use the HTMLPurifier library to get filtered and standards compliant HTML.
string | $s | raw HTML |
boolean | $allow_position | allow CSS position |
Referenced by feed_get_reshare(), get_atom_elements(), oembed_fetch_url(), Zotlabs\Lib\MarkdownSoap\purify(), and z_input_filter().
qp | ( | $s | ) |
Quick and dirty quoted_printable encoding.
string | $s |
random_string | ( | $size = 64 , |
|
$type = RANDOM_STRING_HEX |
|||
) |
Generates a random string.
number | $size | |
int | $type |
Referenced by Zotlabs\Lib\MarkdownSoap\__construct(), api_client_register(), Zotlabs\Lib\Apps\app_store(), attach_mkdir(), attach_store(), bb_parse_crypt(), bbcode(), build_sync_packet(), create_account(), create_conversation(), create_identity(), Zotlabs\Lib\NativeWiki\create_wiki(), event_store_event(), Zotlabs\Module\Wiki\get(), Zotlabs\Module\Removeaccount\get(), Zotlabs\Module\Removeme\get(), Zotlabs\Module\Lostpass\get(), Zotlabs\Module\Changeaddr\get(), Zotlabs\Module\Settings\Oauth\get(), Zotlabs\Module\Admin\Plugins\get(), group_add(), import_directory_profile(), import_xchan(), Zotlabs\Module\Magic\init(), Zotlabs\Module\Profiles\init(), Zotlabs\Module\Thing\init(), Zotlabs\Module\Owa\init(), item_message_id(), item_store(), local_dir_update(), mail_store(), Zotlabs\Module\Settings\Account\post(), Zotlabs\Module\Lostpass\post(), Zotlabs\Module\Admin\Account_edit\post(), Zotlabs\Module\Setup\post(), Zotlabs\Module\Cdav\post(), Zotlabs\Module\Webpages\post(), process_location_delivery(), reflect_comment_store(), Zotlabs\Daemon\Importfile\run(), Zotlabs\Daemon\Ratenotif\run(), Zotlabs\Daemon\Directory\run(), Zotlabs\Zot\Finger\run(), Zotlabs\Daemon\Notifier\run(), send_message(), send_reg_approval_email(), Zotlabs\Lib\LDSignatures\sign(), Zotlabs\Lib\Enotify\submit(), sync_files(), verify_email_address(), zot_refresh(), and zot_reply_message_request().
reltoabs | ( | $text, | |
$base | |||
) |
Referenced by get_atom_elements().
replace_macros | ( | $s, | |
$r | |||
) |
This is our template processor.
string | SmartyEngine | $s | the string requiring macro substitution, or an instance of SmartyEngine |
array | $r | key value pairs (search => replace) |
Referenced by Zotlabs\Lib\DB_Upgrade\__construct(), Zotlabs\Web\Router\__construct(), account_allow(), Zotlabs\Module\Admin\admin_page_summary(), advanced_profile(), alt_pager(), Zotlabs\Lib\Apps\app_render(), articlecategories_widget(), App\build_pagehead(), cardcategories_widget(), categories_widget(), cert_bad_email(), channel_apps(), check_cron_broken(), Zotlabs\Module\Setup\check_php(), common_friends_visitor_widget(), construct_page(), contact_block(), conversation(), Zotlabs\Module\Cover_photo\cover_photo_crop_ui_head(), Zotlabs\Widget\Wiki_pages\create_missing_page(), datetimesel(), design_tools(), dir_sort_links(), dob(), Zotlabs\Module\Embedphotos\embedphotos_widget_album(), fileas_widget(), findpeople_widget(), Zotlabs\Theme\RedbasicConfig\form(), format_categories(), format_event_obj(), format_filer(), Zotlabs\Module\Dreport\get(), Zotlabs\Module\Achievements\get(), Zotlabs\Module\Manage\get(), Zotlabs\Module\Notifications\get(), Zotlabs\Module\Chanview\get(), Zotlabs\Module\Apps\get(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Article_edit\get(), Zotlabs\Module\Card_edit\get(), Zotlabs\Module\Admin\Queue\get(), Zotlabs\Module\Admin\Dbsync\get(), Zotlabs\Module\Editpost\get(), Zotlabs\Module\Filer\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Apporder\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Sharedwithme\get(), Zotlabs\Module\Siteinfo\get(), Zotlabs\Module\Fbrowser\get(), Zotlabs\Module\Help\get(), Zotlabs\Module\Viewconnections\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Connections\get(), Zotlabs\Module\Suggest\get(), Zotlabs\Module\Pdledit\get(), Zotlabs\Module\Common\get(), Zotlabs\Module\Editblock\get(), Zotlabs\Module\Editlayout\get(), Zotlabs\Module\Layouts\get(), Zotlabs\Module\Editwebpage\get(), Zotlabs\Module\Settings\Features\get(), Zotlabs\Module\Api\get(), Zotlabs\Module\Blocks\get(), Zotlabs\Module\Webpages\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Rpost\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Settings\Featured\get(), Zotlabs\Module\Notify\get(), Zotlabs\Module\Wiki\get(), Zotlabs\Module\Admin\Logs\get(), Zotlabs\Module\Admin\Themes\get(), Zotlabs\Module\Admin\Features\get(), Zotlabs\Module\Settings\Permcats\get(), Zotlabs\Module\Removeaccount\get(), Zotlabs\Module\Filestorage\get(), Zotlabs\Module\Removeme\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Uexport\get(), Zotlabs\Module\Rbmark\get(), Zotlabs\Module\Admin\Account_edit\get(), Zotlabs\Module\Admin\Security\get(), Zotlabs\Module\Admin\Profs\get(), Zotlabs\Module\Admin\Channels\get(), Zotlabs\Module\Lostpass\get(), Zotlabs\Module\Directory\get(), Zotlabs\Module\Changeaddr\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Menu\get(), Zotlabs\Module\Admin\Accounts\get(), Zotlabs\Module\Rmagic\get(), Zotlabs\Module\Sources\get(), Zotlabs\Module\Ratings\get(), Zotlabs\Module\Settings\Oauth\get(), Zotlabs\Module\Connect\get(), Zotlabs\Module\Settings\Tokens\get(), Zotlabs\Module\Appman\get(), Zotlabs\Module\Locs\get(), Zotlabs\Module\Chat\get(), Zotlabs\Module\Invite\get(), Zotlabs\Module\Settings\Account\get(), Zotlabs\Module\Mitem\get(), Zotlabs\Module\New_channel\get(), Zotlabs\Module\Settings\Display\get(), Zotlabs\Module\Rate\get(), Zotlabs\Module\Mood\get(), Zotlabs\Module\Import_items\get(), Zotlabs\Module\Mail\get(), Zotlabs\Module\Poke\get(), Zotlabs\Module\Admin\Site\get(), Zotlabs\Module\Setup\get(), Zotlabs\Module\Defperms\get(), Zotlabs\Module\Register\get(), Zotlabs\Module\Thing\get(), Zotlabs\Module\Events\get(), Zotlabs\Module\Admin\Plugins\get(), Zotlabs\Module\Cover_photo\get(), Zotlabs\Module\Profile_photo\get(), Zotlabs\Module\Settings\Channel\get(), Zotlabs\Module\Connedit\get(), Zotlabs\Module\Import\get(), Zotlabs\Module\Photos\get(), Zotlabs\Module\Profiles\get(), Zotlabs\Lib\ThreadItem\get_comment_box(), get_feed_for(), get_help_content(), get_zcard(), get_zcard_embed(), group_side(), identity_selector(), Zotlabs\Module\Hostxrd\init(), Zotlabs\Module\Oexchange\init(), Zotlabs\Module\Xrd\init(), lang_selector(), layout_select(), login(), mail_prepare_binary(), menu_render(), micropro(), mimetype_select(), mini_group_select(), nav(), oembed_format_object(), photos_album_widget(), poco(), populate_acl(), Zotlabs\Module\Lostpass\post(), Zotlabs\Module\Setup\post(), prepare_binary(), Zotlabs\Module\Profile_photo\profile_photo_crop_ui_head(), profile_sidebar(), remote_login(), Zotlabs\Lib\NativeWikiPage\render_page_history(), search(), searchbox(), send_reg_approval_email(), send_register_success_email(), Zotlabs\Lib\Enotify\submit(), theme_attachments(), vcard_from_xchan(), verify_email_address(), website_portation_tools(), Zotlabs\Widget\Bookmarkedchats\widget(), Zotlabs\Widget\Affinity\widget(), Zotlabs\Widget\Chatroom_list\widget(), Zotlabs\Widget\Wiki_list\widget(), Zotlabs\Widget\Appcategories\widget(), Zotlabs\Widget\Notifications\widget(), Zotlabs\Widget\Suggestedchats\widget(), Zotlabs\Widget\Wiki_page_history\widget(), Zotlabs\Widget\Notes\widget(), Zotlabs\Widget\Hq_controls\widget(), Zotlabs\Widget\Cover_photo\widget(), Zotlabs\Widget\Settings_menu\widget(), Zotlabs\Widget\Mailmenu\widget(), Zotlabs\Widget\Conversations\widget(), Zotlabs\Widget\Admin\widget(), Zotlabs\Widget\Savedsearch\widget(), Zotlabs\Widget\Eventstools\widget(), Zotlabs\Widget\Follow\widget(), Zotlabs\Widget\Archive\widget(), Zotlabs\Widget\Sitesearch\widget(), Zotlabs\Widget\Portfolio\widget(), Zotlabs\Widget\Filer\widget(), Zotlabs\Widget\Cdav\widget(), Zotlabs\Widget\Album\widget(), Zotlabs\Widget\Chatroom_members\widget(), Zotlabs\Widget\Suggestions\widget(), and Zotlabs\Widget\Wiki_pages\widget().
sanitise_acl | ( | & | $item | ) |
Used to wrap ACL elements in angle brackets for storage.
[in,out] | array | &$item |
search | ( | $s, | |
$id = 'search-box' , |
|||
$url = '/search' , |
|||
$save = false |
|||
) |
Referenced by Zotlabs\Module\Search\get().
Referenced by Zotlabs\Widget\Savedsearch\widget(), and Zotlabs\Widget\Sitesearch\widget().
share_shield | ( | $m | ) |
share_unshield | ( | $m | ) |
smile_shield | ( | $m | ) |
array | $m |
smile_unshield | ( | $m | ) |
smilies | ( | $s, | |
$sample = false |
|||
) |
Replaces text emoticons with graphical images.
It is expected that this function will be called using HTML text. We will escape text between HTML pre and code blocks, and HTML attributes (such as urls) 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.
string | $s | |
boolean | $sample | (optional) default false |
Referenced by format_event_html(), format_event_obj(), Zotlabs\Module\Smilies\get(), Zotlabs\Module\Wiki\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Chatsvc\get(), Zotlabs\Module\Mail\get(), Zotlabs\Module\Events\get(), menu_render(), Zotlabs\Module\Mail\post(), Zotlabs\Module\Wiki\post(), and prepare_text().
sslify | ( | $s | ) |
Replace media element using http url with https to a local redirector if using https locally.
Looks for HTML tags containing src elements that are http when we're viewing an https page Typically this throws an insecure content violation in the browser. So we redirect them to a local redirector which uses https and which redirects to the selected content
string | $s |
Referenced by prepare_body().
str_rot47 | ( | $str | ) |
Referenced by create_conversation(), encode_mail(), Zotlabs\Module\Mail\get(), get_mail_elements(), identity_basic_export(), import_conv(), mail_store(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), send_message(), and unobscure_mail().
string_replace | ( | $old, | |
$new, | |||
& | $s | ||
) |
Referenced by item_url_replace().
stringify_array_elms | ( | & | $arr, |
$escape = false |
|||
) |
If $escape is true, dbesc() each element before adding quotes.
[in,out] | array | &$arr | |
boolean | $escape | (optional) default false |
Referenced by article_tagadelic(), card_tagadelic(), expand_groups(), Zotlabs\Module\Lockview\get(), get_things(), identity_basic_export(), Zotlabs\Daemon\Notifier\run(), tagadelic(), and zot_import().
tag_sort_length | ( | $a, | |
$b | |||
) |
text_highlight | ( | $s, | |
$lang | |||
) |
Highlight Text.
string | $s | Text to highlight |
string | $lang | Which language should be highlighted |
Referenced by bb_highlight().
theme_attachments | ( | & | $item | ) |
Referenced by Zotlabs\Module\Mail\get(), and prepare_body().
total_sort | ( | $a, | |
$b | |||
) |
unamp | ( | $s | ) |
Referenced by Zotlabs\Module\Webfinger\get().
undo_post_tagging | ( | $s | ) |
unobscure | ( | & | $item | ) |
Referenced by Zotlabs\Module\Webpages\get(), get_webpage_elements(), and post_is_importable().
unobscure_mail | ( | & | $item | ) |
unxmlify | ( | $s | ) |
Undo an xmlify.
Pass xml escaped text ($s), returns unescaped text.
string | $s |
Referenced by discover_by_url(), feed_get_reshare(), feed_meta(), Zotlabs\Module\Filer\get(), and get_atom_elements().
userReadableSize | ( | $size | ) |
Returns a human readable formatted string for filesizes.
int | $size | filesize in bytes |
Referenced by Zotlabs\Module\Setup\check_phpconfig(), Zotlabs\Module\Sharedwithme\get(), and theme_attachments().
website_portation_tools | ( | ) |
Creates website portation tools menu.
Referenced by Zotlabs\Widget\Website_portation_tools\widget().
xchan_mail_query | ( | & | $item | ) |
xchan_query | ( | & | $items, |
$abook = true , |
|||
$effective_uid = 0 |
|||
) |
Fetches xchan and hubloc data for an array of items with only an author_xchan and owner_xchan.
If $abook is true also include the abook info. This is needed in the API to save extra per item lookups there.
[in,out] | array | &$items | |
boolean | $abook | If true also include the abook info | |
number | $effective_uid |
Referenced by api_photo_detail(), attach_export_data(), channel_export_items(), event_addtocal(), event_store_item(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Moderate\get(), Zotlabs\Module\Like\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Block\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Rpost\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Page\get(), Zotlabs\Module\Events\get(), Zotlabs\Module\Item\get(), identity_basic_export(), identity_export_year(), Zotlabs\Module\Starred\init(), Zotlabs\Module\Share\init(), Zotlabs\Module\Ping\init(), item_create_edit_activity(), items_fetch(), Zotlabs\Lib\NativeWikiPage\load_page_history(), Zotlabs\Module\Oep\oep_articles_reply(), Zotlabs\Module\Oep\oep_cards_reply(), Zotlabs\Module\Oep\oep_display_reply(), Zotlabs\Module\Oep\oep_mid_reply(), Zotlabs\Module\Events\post(), Zotlabs\Module\Item\post(), Zotlabs\Daemon\Cron\run(), Zotlabs\Daemon\Notifier\run(), Zotlabs\Lib\Enotify\submit(), Zotlabs\Lib\NativeWiki\sync_a_wiki_item(), sync_an_item(), Zotlabs\Widget\Activity\widget(), Zotlabs\Widget\Item\widget(), and zot_feed().
xmlify | ( | $str | ) |
escape text ($str) for XML transport
string | $str |
Referenced by array_xmlify(), atom_author(), atom_entry(), atom_render_author(), construct_activity_object(), construct_activity_target(), feed_hublinks(), feed_salmonlinks(), Zotlabs\Module\Display\get(), get_atom_elements(), get_feed_for(), and item_getfeedattach().
z_input_filter | ( | $s, | |
$type = 'text/bbcode' , |
|||
$allow_code = false |
|||
) |
Referenced by item_store(), item_store_update(), and Zotlabs\Module\Item\post().
const RANDOM_STRING_HEX 0x00 |
const RANDOM_STRING_TEXT 0x01 |
Referenced by random_string().