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/items_8php.html | 1606 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1606 insertions(+) create mode 100644 doc/html/items_8php.html (limited to 'doc/html/items_8php.html') diff --git a/doc/html/items_8php.html b/doc/html/items_8php.html new file mode 100644 index 000000000..cafb0fc1c --- /dev/null +++ b/doc/html/items_8php.html @@ -0,0 +1,1606 @@ + + + + + + +The Red Project: include/items.php File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Project +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
items.php File Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 collect_recipients ($item, &$private)
 
 get_public_feed ($channel, $params)
 
 get_feed_for (&$a, $dfrn_id, $owner_nick, $last_update, $direction=0)
 
 construct_verb ($item)
 
 construct_activity_object ($item)
 
 construct_activity_target ($item)
 
if(!function_exists('limit_body_size')) title_is_body ($title, $body)
 
 get_item_elements ($x)
 
 import_author_xchan ($x)
 
 encode_item ($item)
 
 map_scope ($scope)
 
 encode_item_xchan ($xchan)
 
 encode_item_terms ($terms)
 
 termtype ($t)
 
 decode_tags ($t)
 
 activity_sanitise ($arr)
 
 array_sanitise ($arr)
 
 encode_item_flags ($item)
 
 encode_mail ($item)
 
 get_mail_elements ($x)
 
 get_profile_elements ($x)
 
 get_atom_elements ($feed, $item)
 
 encode_rel_links ($links)
 
 item_store ($arr, $force_parent=false)
 
 send_status_notifications ($post_id, $item)
 
 get_item_contact ($item, $contacts)
 
 tag_deliver ($uid, $item_id)
 
 tgroup_check ($uid, $item)
 
 mail_store ($arr)
 
 dfrn_deliver ($owner, $contact, $atom, $dissolve=false)
 
 consume_feed ($xml, $importer, &$contact, &$hub, $datedir=0, $pass=0)
 
 local_delivery ($importer, $data)
 
 new_follower ($importer, $contact, $datarray, $item, $sharing=false)
 
 lose_follower ($importer, $contact, $datarray, $item)
 
 lose_sharer ($importer, $contact, $datarray, $item)
 
 atom_author ($tag, $name, $uri, $h, $w, $photo)
 
 atom_entry ($item, $type, $author, $owner, $comment=false, $cid=0)
 
 fix_private_photos ($s, $uid, $item=null, $cid=0)
 
 has_permissions ($obj)
 
 compare_permissions ($obj1, $obj2)
 
 enumerate_permissions ($obj)
 
 item_getfeedtags ($item)
 
 item_getfeedattach ($item)
 
 item_expire ($uid, $days)
 
 drop_items ($items)
 
 drop_item ($id, $interactive=true)
 
 delete_item_lowlevel ($item)
 
 first_post_date ($uid, $wall=false)
 
 posted_dates ($uid, $wall)
 
 posted_date_widget ($url, $uid, $wall)
 
 fetch_post_tags ($items, $link=false)
 
 zot_feed ($uid, $observer_xchan, $mindate)
 
+

Function Documentation

+ +
+
+ + + + + + + + +
activity_sanitise ( $arr)
+
+ +

Referenced by get_item_elements(), and item_store().

+ +
+
+ +
+
+ + + + + + + + +
array_sanitise ( $arr)
+
+ +

Referenced by get_profile_elements().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
atom_author ( $tag,
 $name,
 $uri,
 $h,
 $w,
 $photo 
)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
atom_entry ( $item,
 $type,
 $author,
 $owner,
 $comment = false,
 $cid = 0 
)
+
+ +

Referenced by get_feed_for().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
collect_recipients ( $item,
$private 
)
+
+ +

Referenced by notifier_run().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
compare_permissions ( $obj1,
 $obj2 
)
+
+ +

Referenced by fix_private_photos().

+ +
+
+ +
+
+ + + + + + + + +
construct_activity_object ( $item)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + +
construct_activity_target ( $item)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + +
construct_verb ( $item)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
consume_feed ( $xml,
 $importer,
$contact,
$hub,
 $datedir = 0,
 $pass = 0 
)
+
+

consume_feed - process atom feed and update anything/everything we might need to update

+

$xml = the (atom) feed to consume - RSS isn't as fully supported but may work for simple feeds.

+

$importer = the contact_record (joined to user_record) of the local user who owns this relationship. It is this person's stuff that is going to be updated. $contact = the person who is sending us stuff. If not set, we MAY be processing a "follow" activity from an external network and MAY create an appropriate contact record. Otherwise, we MUST have a contact record. $hub = should we find a hub declation in the feed, pass it back to our calling process, who might (or might not) try and subscribe to it. $datedir sorts in reverse order $pass - by default ($pass = 0) we cannot guarantee that a parent item has been imported prior to its children being seen in the stream unless we are certain of how the feed is arranged/ordered. With $pass = 1, we only pull parent items out of the stream. With $pass = 2, we only pull children (comments/likes).

+

So running this twice, first with pass 1 and then with pass 2 will do the right thing regardless of feed ordering. This won't be adequate in a fully-threaded model where comments can have sub-threads. That would require some massive sorting to get all the feed items into a mostly linear ordering, and might still require recursion.

+

Add new birthday event for this person

+

$bdtext is just a readable placeholder in case the event is shared with others. We will replace it during presentation to our $importer to contain a sparkle link and perhaps a photo.

+ +
+
+ +
+
+ + + + + + + + +
decode_tags ( $t)
+
+ +

Referenced by get_item_elements().

+ +
+
+ +
+
+ + + + + + + + +
delete_item_lowlevel ( $item)
+
+ +

Referenced by drop_item().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
dfrn_deliver ( $owner,
 $contact,
 $atom,
 $dissolve = false 
)
+
+ +

Referenced by terminate_friendship().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
drop_item ( $id,
 $interactive = true 
)
+
+
+ +
+
+ + + + + + + + +
drop_items ( $items)
+
+ +

Referenced by item_post().

+ +
+
+ +
+
+ + + + + + + + +
encode_item ( $item)
+
+ +

Referenced by notifier_run(), and zot_feed().

+ +
+
+ +
+
+ + + + + + + + +
encode_item_flags ( $item)
+
+ +

Referenced by encode_item().

+ +
+
+ +
+
+ + + + + + + + +
encode_item_terms ( $terms)
+
+ +

Referenced by encode_item().

+ +
+
+ +
+
+ + + + + + + + +
encode_item_xchan ( $xchan)
+
+ +

Referenced by encode_item(), and encode_mail().

+ +
+
+ +
+
+ + + + + + + + +
encode_mail ( $item)
+
+ +

Referenced by notifier_run().

+ +
+
+ +
+
+ + + + + + + + +
encode_rel_links ( $links)
+
+ +

Referenced by get_atom_elements().

+ +
+
+ +
+
+ + + + + + + + +
enumerate_permissions ( $obj)
+
+ +

Referenced by compare_permissions(), and fix_private_photos().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
fetch_post_tags ( $items,
 $link = false 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
first_post_date ( $uid,
 $wall = false 
)
+
+ +

Referenced by posted_dates().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fix_private_photos ( $s,
 $uid,
 $item = null,
 $cid = 0 
)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
get_atom_elements ( $feed,
 $item 
)
+
+

If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it.

+ +

Referenced by consume_feed(), and local_delivery().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_feed_for ($a,
 $dfrn_id,
 $owner_nick,
 $last_update,
 $direction = 0 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
get_item_contact ( $item,
 $contacts 
)
+
+ +
+
+ +
+
+ + + + + + + + +
get_item_elements ( $x)
+
+ +

Referenced by zot_import().

+ +
+
+ +
+
+ + + + + + + + +
get_mail_elements ( $x)
+
+ +

Referenced by zot_import().

+ +
+
+ +
+
+ + + + + + + + +
get_profile_elements ( $x)
+
+ +

Referenced by zot_import().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
get_public_feed ( $channel,
 $params 
)
+
+ +

Referenced by feed_init().

+ +
+
+ +
+
+ + + + + + + + +
has_permissions ( $obj)
+
+ +

Referenced by fix_private_photos().

+ +
+
+ +
+
+ + + + + + + + +
import_author_xchan ( $x)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
item_expire ( $uid,
 $days 
)
+
+ +

Referenced by expire_run().

+ +
+
+ +
+
+ + + + + + + + +
item_getfeedattach ( $item)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + +
item_getfeedtags ( $item)
+
+ +

Referenced by atom_entry().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
item_store ( $arr,
 $force_parent = false 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
local_delivery ( $importer,
 $data 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lose_follower ( $importer,
 $contact,
 $datarray,
 $item 
)
+
+ +

Referenced by consume_feed().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lose_sharer ( $importer,
 $contact,
 $datarray,
 $item 
)
+
+ +

Referenced by consume_feed().

+ +
+
+ +
+
+ + + + + + + + +
mail_store ( $arr)
+
+ +

Referenced by process_mail_delivery().

+ +
+
+ +
+
+ + + + + + + + +
map_scope ( $scope)
+
+ +

Referenced by encode_item().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
new_follower ( $importer,
 $contact,
 $datarray,
 $item,
 $sharing = false 
)
+
+ +

Referenced by consume_feed().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
posted_date_widget ( $url,
 $uid,
 $wall 
)
+
+ +

Referenced by channel_aside(), and network_init().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
posted_dates ( $uid,
 $wall 
)
+
+ +

Referenced by posted_date_widget().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
send_status_notifications ( $post_id,
 $item 
)
+
+ +

Referenced by item_store().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
tag_deliver ( $uid,
 $item_id 
)
+
+ +

Referenced by item_store().

+ +
+
+ +
+
+ + + + + + + + +
termtype ( $t)
+
+ +

Referenced by encode_item_terms().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
tgroup_check ( $uid,
 $item 
)
+
+ +

Referenced by consume_feed(), and local_delivery().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
if (!function_exists('limit_body_size')) title_is_body ( $title,
 $body 
)
+
+ +

Referenced by get_atom_elements().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
zot_feed ( $uid,
 $observer_xchan,
 $mindate 
)
+
+ +

Referenced by zotfeed_init().

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