1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Updated Hubzilla and addons to version 1.2

This commit is contained in:
anmol26s 2016-02-28 16:41:12 +05:30
parent b73d5bd454
commit 09d0676112
206 changed files with 37315 additions and 36052 deletions

2
sources/.gitignore vendored
View file

@ -27,6 +27,8 @@ custom/
apps/
# default startpage
home.html
# page header plugin
pageheader.html
# Ignore site TOS
doc/SiteTOS.md
# themes except for redbasic

View file

@ -179,8 +179,10 @@ echo "chmod done, permissions set to 777 on poller script."
# Hubzilla configuration - changes to default settings
# to make Hubzilla on OpenShift a more pleasant experience
echo "Changing default configuration to conserve space"
echo "Changing default configuration to conserve space and autocreate a social private channel upon account registration"
cd ${OPENSHIFT_REPO_DIR}
util/config system default_permissions_role social_private
util/config system workflow_channel_next channel
util/config system expire_delivery_reports 3
util/config system feed_contacts 0
util/config system diaspora_enabled 0
@ -197,7 +199,7 @@ util/add_addon_repo https://github.com/redmatrix/hubzilla-addons.git HubzillaAdd
# Hubzilla themes
echo "Try to add or update Hubzilla themes"
cd ${OPENSHIFT_REPO_DIR}
util/add_theme_repo https://github.com/DeadSuperHero/redmatrix-themes.git DeadSuperHeroThemes
util/add_theme_repo https://github.com/DeadSuperHero/hubzilla-themes.git DeadSuperHeroThemes
# Hubzilla ownMapp
echo "Try to add or update Hubzilla ownMapp"
@ -205,6 +207,11 @@ cd ${OPENSHIFT_REPO_DIR}
util/add_addon_repo https://gitlab.com/zot/ownmapp.git ownMapp
# Hubzilla Chess
echo "Try to add or update Hubzilla chess to Hubzilla on OpenShift"
echo "Try to add or update Hubzilla chess "
cd ${OPENSHIFT_REPO_DIR}
util/add_addon_repo https://gitlab.com/zot/hubzilla-chess.git Chess
# Hubzilla Hubsites
echo "Try to add or update Hubzilla Hubsites"
cd ${OPENSHIFT_REPO_DIR}
util/add_addon_repo https://gitlab.com/zot/hubsites.git Hubsites

View file

@ -6,7 +6,9 @@ Hubzilla - Community Server
Help us redefine the web - using integrated and united community websites.
--------------------------------------------------------------------------
[![Build Status](https://travis-ci.org/redmatrix/hubzilla.svg)](https://travis-ci.org/redmatrix/hubzilla)
<p align="center" markdown="1">
<em><a href="https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt">Installing Hubzilla</a></em>
</p>
**What are Hubs?**
@ -38,3 +40,8 @@ Possible website applications include
* dating websites
* pretty much anything you can do on a traditional blog or community website, but that you could do better if you could easily connect it with other websites or privately share things across website boundaries.
<p align="center" markdown="1">
<em><a href="https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt">Installing Hubzilla</a></em>
</p>
[![Build Status](https://travis-ci.org/redmatrix/hubzilla.svg)](https://travis-ci.org/redmatrix/hubzilla)

View file

@ -6,7 +6,7 @@
* Description: Provides an optional feature to hide individual photos from the default album view
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: none
*/
function adultphotoflag_load() {

View file

@ -5,7 +5,7 @@
* Description: Display math
* Version: 0.0
* Author: Stefan Parviainen <pafcu@iki.fi>
*
* Maintainer: none
*/
require_once('phplatex.php');

View file

@ -6,6 +6,7 @@
* Description: replace #^ with bookmark icon
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*
*/

View file

@ -1,15 +1,16 @@
<?php
/**
* Name: BugLink
* Description: Show link to Red bug site at bottom of page
* Description: Show link to project bug site at bottom of page
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
* MinVersion: 1.0
*/
function buglink_load() { register_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_unload() { unregister_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_active(&$a,&$b) { $b .= '<div style="position: fixed; bottom: 5px; left: 5px;" class="hidden-xs"><a href="https://github.com/redmatrix/hubzilla/issues" target="_blank" title="' . t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . t('Report Bug') . '" /></a></div>'; }

View file

@ -4,6 +4,7 @@
* Description: Simple Calculator Application
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: none
*/

View file

@ -5,6 +5,7 @@
* Description: Guitar Chord Generator Application
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: none
*/

View file

@ -4,6 +4,7 @@
* Description: Set a custom home page or display a random channel from this server on the home page.
* Version: 1.0
* Author: Thomas Willingham <zot:beardyunixer@beardyunixer.com>
* Maintainer: none
*/

View file

@ -4,6 +4,7 @@
* Description: Fix Diaspora federation until the proper fix is deployed
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/

View file

@ -6,6 +6,7 @@
* Description: Diaspora Protocol (Experimental, Unsupported)
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/
@ -15,12 +16,14 @@ require_once('include/crypto.php');
require_once('include/items.php');
require_once('include/bb2diaspora.php');
require_once('include/contact_selectors.php');
require_once('include/queue_fn.php');
function diaspora_load() {
register_hook('notifier_hub', 'addon/diaspora/diaspora.php', 'diaspora_process_outbound');
register_hook('permissions_create', 'addon/diaspora/diaspora.php', 'diaspora_permissions_create');
register_hook('permissions_update', 'addon/diaspora/diaspora.php', 'diaspora_permissions_update');
register_hook('module_loaded', 'addon/diaspora/diaspora.php', 'diaspora_load_module');
register_hook('follow_allow', 'addon/diaspora/diaspora.php', 'diaspora_follow_allow');
register_hook('feature_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_feature_settings_post');
@ -52,7 +55,7 @@ function diaspora_load_module(&$a, &$b) {
function diaspora_permissions_create(&$a,&$b) {
if($b['recipient']['hubloc_network'] === 'diaspora' || $b['recipient']['hubloc_network'] === 'friendica-over-diaspora') {
if($b['recipient']['xchan_network'] === 'diaspora' || $b['recipient']['xchan_network'] === 'friendica-over-diaspora') {
$b['deliveries'] = diaspora_share($b['sender'],$b['recipient']);
if($b['deliveries'])
@ -60,6 +63,13 @@ function diaspora_permissions_create(&$a,&$b) {
}
}
function diaspora_permissions_update(&$a,&$b) {
if($b['recipient']['xchan_network'] === 'diaspora' || $b['recipient']['xchan_network'] === 'friendica-over-diaspora') {
discover_by_webbie($b['recipient']['xchan_hash']);
$b['success'] = 1;
}
}
function diaspora_dispatch_public($msg) {
@ -204,6 +214,7 @@ function diaspora_process_outbound(&$a, &$arr) {
$arr = array(
'channel' => $channel,
'env_recips' => $env_recips,
'packet_recips' => $packet_recips,
'recipients' => $recipients,
'item' => $item,
'target_item' => $target_item,
@ -214,10 +225,8 @@ function diaspora_process_outbound(&$a, &$arr) {
'relay_to_owner' => $relay_to_owner,
'uplink' => $uplink,
'cmd' => $cmd,
'expire' => $expire,
'mail' => $mail,
'location' => $location,
'fsuggest' => $fsuggest,
'normal_mode' => $normal_mode,
'packet_type' => $packet_type,
'walltowall' => $walltowall,
@ -242,6 +251,7 @@ function diaspora_process_outbound(&$a, &$arr) {
if($arr['location'])
return;
$target_item = $arr['target_item'];
@ -253,14 +263,23 @@ function diaspora_process_outbound(&$a, &$arr) {
$target_item['body'] = crypto_unencapsulate(json_decode($target_item['body'],true),$key);
}
$prv_recips = $arr['env_recips'];
// The Diaspora profile message is unusual in that it is sent privately.
if($arr['env_recips']) {
if($arr['cmd'] === 'refresh_all' && $arr['recipients']) {
$prv_recips = array();
foreach($arr['recipients'] as $r) {
$prv_recips[] = array('hash' => trim($r,"'"));
}
}
if($prv_recips) {
$hashes = array();
// re-explode the recipients, but only for this hub/pod
foreach($arr['env_recips'] as $recip)
foreach($prv_recips as $recip)
$hashes[] = "'" . $recip['hash'] . "'";
$r = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_url = '%s'
@ -268,13 +287,31 @@ function diaspora_process_outbound(&$a, &$arr) {
dbesc($arr['hub']['hubloc_url'])
);
// send to public relay server - probably needs work once the spec solidifies
if($arr['top_level_post']) {
$r[] = array('hubloc_callback' => 'https://relay.iliketoast.net/receive', 'xchan_pubkey' => 'bogus');
}
if(! $r) {
logger('diaspora_process_outbound: no recipients');
return;
}
foreach($r as $contact) {
if(! deliverable_singleton($contact)) {
logger('not deliverable from this hub');
continue;
}
if($arr['packet_type'] == 'refresh') {
$qi = diaspora_profile_change($arr['channel'],$contact);
if($qi)
$arr['queued'][] = $qi;
return;
}
if($arr['mail']) {
$qi = diaspora_send_mail($arr['item'],$arr['channel'],$contact);
if($qi)
@ -298,6 +335,7 @@ function diaspora_process_outbound(&$a, &$arr) {
if(! $contact['xchan_pubkey'])
continue;
if(intval($target_item['item_deleted'])
&& (($target_item['mid'] === $target_item['parent_mid']) || $arr['followup'])) {
// send both top-level retractions and relayable retractions for owner to relay
@ -353,16 +391,15 @@ function diaspora_process_outbound(&$a, &$arr) {
return;
}
elseif($arr['top_level_post']) {
logger('delivery: diaspora status: ' . $loc);
$qi = diaspora_send_status($target_item,$arr['channel'],$contact,true);
if($qi)
$arr['queued'][] = $qi;
return;
if(perm_is_allowed($arr['channel'],'','view_stream')) {
logger('delivery: diaspora status: ' . $loc);
$qi = diaspora_send_status($target_item,$arr['channel'],$contact,true);
if($qi)
$arr['queued'][] = $qi;
return;
}
}
}
}
@ -414,7 +451,7 @@ function find_diaspora_person_by_handle($handle) {
);
if($r) {
$person = $r[0];
logger('find_diaspora_person_by handle: in cache ' . print_r($r,true), LOGGER_DATA);
logger('find_diaspora_person_by handle: in cache ' . print_r($r,true), LOGGER_DATA, LOG_DEBUG);
if($person['xchan_name_date'] < datetime_convert('UTC','UTC', 'now - 1 month')) {
logger('Updating Diaspora cached record for ' . $handle);
$refresh = true;
@ -433,7 +470,7 @@ function find_diaspora_person_by_handle($handle) {
);
if($r) {
$person = $r[0];
logger('find_diaspora_person_by handle: discovered ' . print_r($r,true), LOGGER_DATA);
logger('find_diaspora_person_by handle: discovered ' . print_r($r,true), LOGGER_DATA, LOG_DEBUG);
}
}
}
@ -453,7 +490,7 @@ function diaspora_pubmsg_build($msg,$channel,$contact,$prvkey,$pubkey) {
$a = get_app();
logger('diaspora_pubmsg_build: ' . $msg, LOGGER_DATA);
logger('diaspora_pubmsg_build: ' . $msg, LOGGER_DATA, LOG_DEBUG);
$handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
@ -487,7 +524,7 @@ $magic_env = <<< EOT
</diaspora>
EOT;
logger('diaspora_pubmsg_build: magic_env: ' . $magic_env, LOGGER_DATA);
logger('diaspora_pubmsg_build: magic_env: ' . $magic_env, LOGGER_DATA, LOG_DEBUG);
return $magic_env;
}
@ -501,12 +538,12 @@ function diaspora_msg_build($msg,$channel,$contact,$prvkey,$pubkey,$public = fal
if($public)
return diaspora_pubmsg_build($msg,$channel,$contact,$prvkey,$pubkey);
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA, LOG_DEBUG);
// without a public key nothing will work
if(! $pubkey) {
logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['abook_id']);
logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['abook_id'], LOG_ERR);
return '';
}
@ -538,7 +575,7 @@ function diaspora_msg_build($msg,$channel,$contact,$prvkey,$pubkey,$public = fal
$signable_data = $data . '.' . base64url_encode($type,false) . '.'
. base64url_encode($encoding,false) . '.' . base64url_encode($alg,false) ;
logger('diaspora_msg_build: signable_data: ' . $signable_data, LOGGER_DATA);
logger('diaspora_msg_build: signable_data: ' . $signable_data, LOGGER_DATA, LOG_DEBUG);
$signature = rsa_sign($signable_data,$prvkey);
$sig = base64url_encode($signature,false);
@ -562,7 +599,7 @@ EOT;
$b64_encrypted_outer_key_bundle = base64_encode($encrypted_outer_key_bundle);
logger('outer_bundle: ' . $b64_encrypted_outer_key_bundle . ' key: ' . $pubkey, LOGGER_DATA);
logger('outer_bundle: ' . $b64_encrypted_outer_key_bundle . ' key: ' . $pubkey, LOGGER_DATA, LOG_DEBUG);
$encrypted_header_json_object = json_encode(array('aes_key' => base64_encode($encrypted_outer_key_bundle),
'ciphertext' => base64_encode($ciphertext)));
@ -583,7 +620,7 @@ $magic_env = <<< EOT
</diaspora>
EOT;
logger('diaspora_msg_build: magic_env: ' . $magic_env, LOGGER_DATA);
logger('diaspora_msg_build: magic_env: ' . $magic_env, LOGGER_DATA, LOG_DEBUG);
return $magic_env;
}
@ -679,7 +716,7 @@ function diaspora_decode($importer,$xml) {
$base = $dom;
if(! $base) {
logger('mod-diaspora: unable to locate salmon data in xml ');
logger('mod-diaspora: unable to locate salmon data in xml ', LOGGER_NORMAL, LOG_ERR);
http_status_exit(400);
}
@ -732,14 +769,14 @@ function diaspora_decode($importer,$xml) {
$key = get_diaspora_key($author_link);
if(! $key) {
logger('mod-diaspora: Could not retrieve author key.');
logger('mod-diaspora: Could not retrieve author key.', LOGGER_NORMAL, LOG_WARNING);
http_status_exit(400);
}
$verify = rsa_verify($signed_data,$signature,$key);
if(! $verify) {
logger('mod-diaspora: Message did not verify. Discarding.');
logger('mod-diaspora: Message did not verify. Discarding.', LOGGER_NORMAL, LOG_ERR);
http_status_exit(400);
}
@ -777,8 +814,15 @@ function diaspora_request($importer,$xml) {
$newperms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
$r = q("update abook set abook_their_perms = %d where abook_id = %d and abook_channel = %d",
$abook_instance = $contact['abook_instance'];
if($abook_instance)
$abook_instance .= ',';
$abook_instance .= z_root();
$r = q("update abook set abook_their_perms = %d, abook_instance = '%s' where abook_id = %d and abook_channel = %d",
intval($newperms),
dbesc($abook_instance),
intval($contact['abook_id']),
intval($importer['channel_id'])
);
@ -832,7 +876,7 @@ function diaspora_request($importer,$xml) {
);
$conv['messages'] = array($msg);
$tpl = get_markup_template('diaspora_conversation.tpl');
$tpl = get_markup_template('diaspora_conversation.tpl','addon/diaspora');
$xmsg = replace_macros($tpl, array('$conv' => $conv));
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($xmsg,$importer,$ret,$importer['channel_prvkey'],$ret['xchan_pubkey'],false)));
@ -862,7 +906,7 @@ function diaspora_request($importer,$xml) {
$closeness = 80;
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_my_perms, abook_their_perms, abook_closeness, abook_created, abook_updated, abook_connected, abook_dob, abook_pending) values ( %d, %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', %d )",
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_my_perms, abook_their_perms, abook_closeness, abook_created, abook_updated, abook_connected, abook_dob, abook_pending, abook_instance ) values ( %d, %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', %d, '%s' )",
intval($importer['channel_account_id']),
intval($importer['channel_id']),
dbesc($ret['xchan_hash']),
@ -873,7 +917,8 @@ function diaspora_request($importer,$xml) {
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(NULL_DATE),
intval(($default_perms) ? 0 : 1)
intval(($default_perms) ? 0 : 1),
dbesc(z_root())
);
@ -1701,7 +1746,7 @@ function diaspora_conversation($importer,$xml,$msg) {
$participant_handles = notags(unxmlify($xml->participant_handles));
$created_at = datetime_convert('UTC','UTC',notags(unxmlify($xml->created_at)));
$parent_uri = $diaspora_handle . ':' . $guid;
$parent_uri = $guid;
$messages = $xml->message;
@ -1823,6 +1868,8 @@ function diaspora_conversation($importer,$xml,$msg) {
}
}
$stored_parent_mid = (($msg_parent_guid == $msg_conversation_guid) ? $msg_guid : $msg_parent_guid);
$r = q("select id from mail where mid = '%s' limit 1",
dbesc($message_id)
);
@ -1836,17 +1883,18 @@ function diaspora_conversation($importer,$xml,$msg) {
if($body)
$body = str_rot47(base64url_encode($body));
q("insert into mail ( `channel_id`, `convid`, `conv_guid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_obscured`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')",
q("insert into mail ( `account_id`, `channel_id`, `convid`, `conv_guid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_obscured`,`mid`,`parent_mid`,`created`) values ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')",
intval($importer['channel_account_id']),
intval($importer['channel_id']),
intval($conversation['id']),
intval($conversation['guid']),
dbesc($conversation['guid']),
dbesc($person['xchan_hash']),
dbesc($importer['channel_hash']),
dbesc($subject),
dbesc($body),
intval(1),
dbesc($msg_guid),
dbesc($parent_uri),
dbesc($stored_parent_mid),
dbesc($msg_created_at)
);
@ -1855,26 +1903,20 @@ function diaspora_conversation($importer,$xml,$msg) {
intval($conversation['id'])
);
require_once('include/enotify.php');
/******
//FIXME
$z = q("select * from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($msg_guid),
intval($importer['channel_id'])
);
require_once('include/enotify.php');
notification(array(
'from_xchan' => $person['xchan_hash'],
'to_xchan' => $importer['channel_hash'],
'type' => NOTIFY_MAIL,
'notify_flags' => $importer['notify-flags'],
'language' => $importer['language'],
'to_name' => $importer['username'],
'to_email' => $importer['email'],
'uid' =>$importer['importer_uid'],
'item' => array('subject' => $subject, 'body' => $body),
'source_name' => $person['name'],
'source_link' => $person['url'],
'source_photo' => $person['thumb'],
'item' => $z[0],
'verb' => ACTIVITY_POST,
'otype' => 'mail'
));
*******/
}
return;
@ -1901,8 +1943,8 @@ function diaspora_message($importer,$xml,$msg) {
return;
}
if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) {
logger('diaspora_message: Ignoring this author.');
if(! perm_is_allowed($importer['channel_id'],$contact['xchan_hash'],'post_mail')) {
logger('Ignoring this author.');
return 202;
}
@ -1921,7 +1963,7 @@ function diaspora_message($importer,$xml,$msg) {
$reply = 0;
$subject = $conversation['subject'];
$subject = $conversation['subject']; //this is already encoded
$body = diaspora2bb($msg_text);
@ -1933,8 +1975,17 @@ function diaspora_message($importer,$xml,$msg) {
}
$parent_ptr = $msg_parent_guid;
if($parent_ptr === $conversation['guid']) {
// this should always be the case
$x = q("select mid from mail where conv_guid = '%s' and channel_id = %d order by id asc limit 1",
dbesc($conversation['guid']),
intval($importer['channel_id'])
);
if($x)
$parent_ptr = $x[0]['mid'];
}
$message_id = $msg_diaspora_handle . ':' . $msg_guid;
$author_signed_data = $msg_guid . ';' . $msg_parent_guid . ';' . $msg_text . ';' . unxmlify($xml->created_at) . ';' . $msg_diaspora_handle . ';' . $msg_conversation_guid;
@ -1955,7 +2006,7 @@ function diaspora_message($importer,$xml,$msg) {
}
$r = q("select id from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($message_id),
dbesc($msg_guid),
intval($importer['channel_id'])
);
if($r) {
@ -1963,24 +2014,26 @@ function diaspora_message($importer,$xml,$msg) {
return;
}
$key = get_config('system','pubkey');
if($subject)
$subject = str_rot47(base64url_encode($subject));
// $subject is a copy of the already obscured subject from the conversation structure
if($body)
$body = str_rot47(base64url_encode($body));
q("insert into mail ( `channel_id`, `convid`, `conv_guid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_obscured`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%d','%s','%s','%s')",
q("insert into mail ( `account_id`, `channel_id`, `convid`, `conv_guid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_obscured`,`mid`,`parent_mid`,`created`, mail_isreply) values ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', %d)",
intval($importer['channel_account_id']),
intval($importer['channel_id']),
intval($conversation['id']),
intval($conversation['guid']),
dbesc($conversation['guid']),
dbesc($person['xchan_hash']),
dbesc($importer['xchan_hash']),
dbesc($subject),
dbesc($body),
intval(1),
dbesc($msg_guid),
dbesc($parent_uri),
dbesc($msg_created_at)
dbesc($parent_ptr),
dbesc($msg_created_at),
intval(1)
);
q("update conv set updated = '%s' where id = %d",
@ -1988,6 +2041,21 @@ function diaspora_message($importer,$xml,$msg) {
intval($conversation['id'])
);
$z = q("select * from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($msg_guid),
intval($importer['channel_id'])
);
require_once('include/enotify.php');
notification(array(
'from_xchan' => $person['xchan_hash'],
'to_xchan' => $importer['channel_hash'],
'type' => NOTIFY_MAIL,
'item' => $z[0],
'verb' => ACTIVITY_POST,
'otype' => 'mail'
));
return;
}
@ -2298,7 +2366,7 @@ function diaspora_retraction($importer,$xml) {
require_once('include/Contact.php');
contact_remove($importer['channel_id'],$contact['abook_id']);
}
elseif($type === 'Post') {
elseif(($type === 'Post') || ($type === 'StatusMessage')) {
$r = q("select * from item where mid = '%s' and uid = %d limit 1",
dbesc('guid'),
intval($importer['channel_id'])
@ -2421,7 +2489,7 @@ function diaspora_profile($importer,$xml,$msg) {
return;
if($contact['blocked']) {
logger('diaspora_post: Ignoring this author.');
logger('diaspora_profile: Ignoring this author.');
return 202;
}
@ -2486,9 +2554,9 @@ function diaspora_share($owner,$contact) {
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
if(! array_key_exists('xchan_hash',$contact)) {
if(! array_key_exists('hubloc_hash',$contact)) {
$c = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where xchan_hash = '%s' limit 1",
dbesc($contact['hubloc_hash'])
dbesc($contact['xchan_hash'])
);
if(! $c) {
logger('diaspora_share: ' . $contact['hubloc_hash'] . ' not found.');
@ -2499,7 +2567,7 @@ function diaspora_share($owner,$contact) {
$theiraddr = $contact['xchan_addr'];
$tpl = get_markup_template('diaspora_share.tpl');
$tpl = get_markup_template('diaspora_share.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
'$sender' => $myaddr,
'$recipient' => $theiraddr
@ -2514,7 +2582,7 @@ function diaspora_unshare($owner,$contact) {
$a = get_app();
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$tpl = get_markup_template('diaspora_retract.tpl');
$tpl = get_markup_template('diaspora_retract.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
'$guid' => $owner['channel_guid'] . str_replace('.','',get_app()->get_hostname()),
'$type' => 'Person',
@ -2566,7 +2634,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
*/
if(intval($item['item_consensus'])) {
$poll = replace_macros(get_markup_template('diaspora_consensus.tpl'), array(
$poll = replace_macros(get_markup_template('diaspora_consensus.tpl','addon/diaspora'), array(
'$guid_q' => '10000000',
'$question' => t('Please choose'),
'$guid_y' => '00000001',
@ -2578,7 +2646,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
));
}
elseif($item['resource_type'] === 'event' && $item['resource_id']) {
$poll = replace_macros(get_markup_template('diaspora_consensus.tpl'), array(
$poll = replace_macros(get_markup_template('diaspora_consensus.tpl','addon/diaspora'), array(
'$guid_q' => '1000000',
'$question' => t('Please choose'),
'$guid_y' => '0000001',
@ -2600,7 +2668,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
// Detect a share element and do a reshare
// see: https://github.com/Raven24/diaspora-federation/blob/master/lib/diaspora-federation/entities/reshare.rb
if (!$item['item_private'] AND ($ret = diaspora_is_reshare($item["body"]))) {
$tpl = get_markup_template('diaspora_reshare.tpl');
$tpl = get_markup_template('diaspora_reshare.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
'$root_handle' => xmlify($ret['root_handle']),
'$root_guid' => $ret['root_guid'],
@ -2611,7 +2679,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
'$provider' => (($item['app']) ? $item['app'] : t('$projectname'))
));
} else {
$tpl = get_markup_template('diaspora_post.tpl');
$tpl = get_markup_template('diaspora_post.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
'$body' => xmlify($body),
'$guid' => $item['mid'],
@ -2693,7 +2761,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
return;
$mysite = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://') + 3) . '/photo';
$tpl = get_markup_template('diaspora_photo.tpl');
$tpl = get_markup_template('diaspora_photo.tpl','addon/diaspora');
foreach($images as $image) {
if(! stristr($image['path'],$mysite))
continue;
@ -2756,7 +2824,7 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
if(($item['verb'] === ACTIVITY_LIKE) && ($parent['mid'] === $parent['parent_mid'])) {
$tpl = get_markup_template('diaspora_like.tpl');
$tpl = get_markup_template('diaspora_like.tpl','addon/diaspora');
$like = true;
$target_type = 'Post';
$positive = 'true';
@ -2765,7 +2833,7 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
logger('diaspora_send_followup: received deleted "like". Those should go to diaspora_send_retraction');
}
else {
$tpl = get_markup_template('diaspora_comment.tpl');
$tpl = get_markup_template('diaspora_comment.tpl','addon/diaspora');
$like = false;
}
@ -2869,7 +2937,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$target_type = ( ($item['verb'] === ACTIVITY_LIKE && (! $sublike)) ? 'Like' : 'Comment');
$sql_sign_id = 'retract_iid';
$tpl = get_markup_template('diaspora_relayable_retraction.tpl');
$tpl = get_markup_template('diaspora_relayable_retraction.tpl','addon/diaspora');
}
elseif(($item['verb'] === ACTIVITY_LIKE) && (! $sublike)) {
$like = true;
@ -2878,10 +2946,10 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
// $positive = (intval($item['item_deleted']) ? 'false' : 'true');
$positive = 'true';
$tpl = get_markup_template('diaspora_like_relay.tpl');
$tpl = get_markup_template('diaspora_like_relay.tpl','addon/diaspora');
}
else { // item is a comment
$tpl = get_markup_template('diaspora_comment_relay.tpl');
$tpl = get_markup_template('diaspora_comment_relay.tpl','addon/diaspora');
}
$diaspora_meta = (($item['diaspora_meta']) ? json_decode($item['diaspora_meta'],true) : '');
@ -2977,12 +3045,12 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
// Check whether the retraction is for a top-level post or whether it's a relayable
if( $item['mid'] !== $item['parent_mid'] ) {
$tpl = get_markup_template('diaspora_relay_retraction.tpl');
$tpl = get_markup_template('diaspora_relay_retraction.tpl','addon/diaspora');
$target_type = (($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
}
else {
$tpl = get_markup_template('diaspora_signed_retract.tpl');
$tpl = get_markup_template('diaspora_signed_retract.tpl','addon/diaspora');
$target_type = 'StatusMessage';
}
@ -3006,7 +3074,7 @@ function diaspora_send_mail($item,$owner,$contact) {
$myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
$r = q("select * from conv where guid = '%s' and uid = %d limit 1",
intval($item['conv_guid']),
dbesc($item['conv_guid']),
intval($item['channel_id'])
);
@ -3014,6 +3082,14 @@ function diaspora_send_mail($item,$owner,$contact) {
logger('diaspora_send_mail: conversation not found.');
return;
}
$z = q("select from_xchan from mail where conv_guid = '%s' and channel_id = %d and mid = parent_mid limit 1",
dbesc($item['conv_guid']),
intval($item['channel_id'])
);
$conv_owner = (($z && $z[0]['from_xchan'] === $owner['channel_hash']) ? true : false);
$cnv = $r[0];
$cnv['subject'] = base64url_decode(str_rot47($cnv['subject']));
@ -3025,6 +3101,7 @@ function diaspora_send_mail($item,$owner,$contact) {
'participant_handles' => xmlify($cnv['recips'])
);
if(array_key_exists('mail_obscured',$item) && intval($item['mail_obscured'])) {
if($item['title'])
$item['title'] = base64url_decode(str_rot47($item['title']));
@ -3032,19 +3109,23 @@ function diaspora_send_mail($item,$owner,$contact) {
$item['body'] = base64url_decode(str_rot47($item['body']));
}
// the parent_guid needs to be the conversation guid
$parent_ptr = $cnv['guid'];
$body = bb2diaspora($item['body']);
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
$signed_text = $item['mid'] . ';' . $cnv['guid'] . ';' . $body . ';'
$signed_text = $item['mid'] . ';' . $parent_ptr . ';' . $body . ';'
. $created . ';' . $myaddr . ';' . $cnv['guid'];
$sig = base64_encode(rsa_sign($signed_text,$owner['channel_prvkey'],'sha256'));
$msg = array(
'guid' => xmlify($item['mid']),
'parent_guid' => xmlify($cnv['guid']),
'parent_author_signature' => (($item['reply']) ? null : xmlify($sig)),
'parent_guid' => xmlify($parent_ptr),
'parent_author_signature' => (($conv_owner) ? xmlify($sig) : null),
'author_signature' => xmlify($sig),
'text' => xmlify($body),
'created_at' => xmlify($created),
@ -3052,13 +3133,13 @@ function diaspora_send_mail($item,$owner,$contact) {
'conversation_guid' => xmlify($cnv['guid'])
);
if($item['reply']) {
$tpl = get_markup_template('diaspora_message.tpl');
if($item['mail_isreply']) {
$tpl = get_markup_template('diaspora_message.tpl','addon/diaspora');
$xmsg = replace_macros($tpl, array('$msg' => $msg));
}
else {
$conv['messages'] = array($msg);
$tpl = get_markup_template('diaspora_conversation.tpl');
$tpl = get_markup_template('diaspora_conversation.tpl','addon/diaspora');
$xmsg = replace_macros($tpl, array('$conv' => $conv));
}
@ -3087,32 +3168,29 @@ function diaspora_queue($owner,$contact,$slap,$public_batch,$message_id = '') {
else
$dest_url = $contact['hubloc_callback'] . '/users/' . $contact['hubloc_guid'];
logger('diaspora_queue: URL: ' . $dest_url, LOGGER_DEBUG);
if(intval(get_config('system','diaspora_test')))
return false;
$a = get_app();
$logid = random_string(4);
logger('diaspora_queue: ' . $logid . ' ' . $dest_url, LOGGER_DEBUG);
$hash = random_string();
q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg ) values ( '%s', %d, %d, '%s', '%s', %d, '%s', '%s', '%s', '%s' )",
dbesc($hash),
intval($owner['account_id']),
intval($owner['channel_id']),
dbesc('post'),
dbesc($dest_url),
intval(1),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(''),
dbesc($slap)
);
logger('diaspora_queue: ' . $hash . ' ' . $dest_url, LOGGER_DEBUG);
if($message_id) {
queue_insert(array(
'hash' => $hash,
'account_id' => $owner['channel_account_id'],
'channel_id' => $owner['channel_id'],
'driver' => 'post',
'posturl' => $dest_url,
'notify' => '',
'msg' => $slap
));
if($message_id && (! get_config('system','disable_dreport'))) {
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan, dreport_queue ) values ( '%s','%s','%s','%s','%s','%s','%s' ) ",
dbesc($message_id),
dbesc($dest_url),
@ -3138,7 +3216,7 @@ function diaspora_follow_allow(&$a, &$b) {
if($allowed === false)
$allowed = 1;
$b['allowed'] = $allowed;
$b['singleton'] = 1; // this network does not support channel clones
}
@ -3395,3 +3473,101 @@ function diaspora_feature_settings(&$a,&$s) {
return;
}
function diaspora_profile_change($channel,$recip,$public_batch = false) {
$channel_id = $channel['channel_id'];
$r = q("SELECT profile.uid AS profile_uid, profile.* , channel.* FROM profile
left join channel on profile.uid = channel.channel_id
WHERE channel.channel_id = %d and profile.is_default = 1 ",
intval($channel_id)
);
$profile_visible = perm_is_allowed($channel_id,'','view_profile');
if(! $r)
return;
$profile = $r[0];
$handle = xmlify($channel['channel_address'] . '@' . get_app()->get_hostname());
$first = xmlify(((strpos($profile['channel_name'],' '))
? trim(substr($profile['channel_name'],0,strpos($profile['channel_name'],' '))) : $profile['channel_name']));
$last = xmlify((($first === $profile['channel_name']) ? '' : trim(substr($profile['channel_name'],strlen($first)))));
$large = xmlify(z_root() . '/photo/profile/300/' . $profile['profile_uid'] . '.jpg');
$medium = xmlify(z_root() . '/photo/profile/100/' . $profile['profile_uid'] . '.jpg');
$small = xmlify(z_root() . '/photo/profile/50/' . $profile['profile_uid'] . '.jpg');
$searchable = xmlify((($profile_visible) ? 'true' : 'false' ));
$nsfw = (($channel['channel_pageflags'] & (PAGE_ADULT|PAGE_CENSORED)) ? 'true' : 'false' );
if($searchable === 'true') {
$dob = '1000-00-00';
if(($profile['dob']) && ($profile['dob'] != '0000-00-00'))
$dob = ((intval($profile['dob'])) ? intval($profile['dob']) : '1000') . '-' . datetime_convert('UTC','UTC',$profile['dob'],'m-d');
if($dob === '1000-00-00')
$dob = '';
$gender = xmlify($profile['gender']);
$about = $profile['about'];
require_once('include/bbcode.php');
$about = xmlify(strip_tags(bbcode($about)));
$location = '';
if($profile['locality'])
$location .= $profile['locality'];
if($profile['region']) {
if($location)
$location .= ', ';
$location .= $profile['region'];
}
if($profile['country_name']) {
if($location)
$location .= ', ';
$location .= $profile['country_name'];
}
$location = xmlify($location);
$tags = '';
if($profile['keywords']) {
$kw = str_replace(',',' ',$profile['keywords']);
$kw = str_replace(' ',' ',$kw);
$arr = explode(' ',$profile['keywords']);
if(count($arr)) {
for($x = 0; $x < 5; $x ++) {
if(trim($arr[$x]))
$tags .= '#' . trim($arr[$x]) . ' ';
}
}
}
$tags = xmlify(trim($tags));
}
$tpl = get_markup_template('diaspora_profile.tpl','addon/diaspora');
$msg = replace_macros($tpl,array(
'$handle' => $handle,
'$first' => $first,
'$last' => $last,
'$large' => $large,
'$medium' => $medium,
'$small' => $small,
'$dob' => $dob,
'$gender' => $gender,
'$about' => $about,
'$location' => $location,
'$searchable' => $searchable,
'$nsfw' => $nsfw,
'$tags' => $tags
));
logger('profile_change: ' . $msg, LOGGER_ALL, LOG_DEBUG);
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$channel,$recip,$channel['channel_prvkey'],$recip['xchan_pubkey'],$public_batch)));
return(diaspora_queue($channel,$recip,$slap,$public_batch));
}

View file

@ -36,7 +36,7 @@ function p_init(&$a) {
$body = bb2diaspora_itembody($item);
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
$tpl = get_markup_template('diaspora_post.tpl');
$tpl = get_markup_template('diaspora_post.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
'$body' => xmlify($body),
'$guid' => $item['mid'],

View file

@ -5,6 +5,7 @@
* Description: Post to Diaspora
* Version: 0.1
* Author: Michael Vogel <heluecht@pirati.ca>
* Maintainer: none
*/
function diaspost_load() {
@ -101,7 +102,7 @@ function diaspost_queue_hook(&$a,&$b) {
if (!$success) {
logger('diaspost_queue: delayed');
update_queue_time($x['id']);
update_queue_item($x['id']);
}
}
}

View file

@ -13,6 +13,7 @@
*
* Version: 1.0
* Author: Thomas Willingham <zot:beardyunixer@beardyunixer.com>
* Maintainer: none
*/
function dirstats_load() {

View file

@ -5,6 +5,7 @@
* Description: Support the Redmatrix/Hubzilla projects
* Version: 1.0
* Author: Macgirvin
* Maintainer: none
*
*/

View file

@ -7,6 +7,7 @@
* Author: Tony Baldwin <https://red.free-haven.org/channel/tony>
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
* Maintainer: none
*/
require_once('include/permissions.php');

View file

@ -6,6 +6,7 @@
* Description: Use external server or service to run poller regularly
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*
* Notes: External service needs to make a web request to http(s)://yoursite/extcron
*/

View file

@ -4,6 +4,7 @@
* Description: Add a random fortune cookie at the bottom of every pages. [Requires manual confguration.]
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Maintainer: none
*/

View file

@ -2,9 +2,10 @@
/**
* Name: Friendica Photo Migrator
* Description: Migrate photo albums from Friendica to a Red channel
* Description: Migrate photo albums from Friendica to a Redmatrix channel (not yet ported to Hubzilla)
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/

View file

@ -5,6 +5,7 @@
* Description: Hexadecimal Conversion Tool
* Version: 1.0
* Author: Macgirvin
* Maintainer: none
*
*/

View file

@ -7,6 +7,7 @@
* Author: Tony Baldwin <https://red.free-haven.org/channel/tony>
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
* Maintainer: none
*/
require_once('include/permissions.php');

View file

@ -4,6 +4,7 @@
* Description: add an Internet Relay Chat chatroom
* Version: 1.0
* Author: tony baldwin <https://free-haven.org/profile/tony>
* Maintainer: none
*/
/* enable in admin->plugins

View file

@ -5,7 +5,7 @@
* Description: Provides a Facebook-like chat using Jappix Mini
* Version: 1.0.1
* Author: leberwurscht <leberwurscht@hoegners.de>
*
* Maintainer: none
*/
//

View file

@ -5,6 +5,7 @@
* Description: JavaScript photo/image uploader. Uses Valum 'qq' Uploader.
* Version: 1.0
* Author: Chris Case <http://friendika.openmindspace.org/profile/chris_case>
* Maintainer: none
*/
/**

View file

@ -1,9 +1,10 @@
<?php
/**
* Name: LDAP Authenticate
* Description: Authenticate a user against an LDAP directory
* Description: Authenticate an account against an LDAP directory
* Version: 1.0
* Author: Mike Macgirvin <zot:mike@zothub.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/
/**

View file

@ -5,6 +5,7 @@
* Description: Post to libertree accounts
* Version: 1.0
* Author: Tony Baldwin <https://red.free-haven.org/channel/tony>
* Maintainer: none
*/
require_once('include/permissions.php');

View file

@ -1,4 +1,15 @@
<?php
/**
* Name: Like Banner
* Description: Creates a "like us on redmatrix" banner (obsolete)
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/
function likebanner_load() {}
function likebanner_unload() {}
function likebanner_module() {}

View file

@ -7,6 +7,7 @@
* Author: Tony Baldwin <https://red.free-haven.org/channel/tony>
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
* Maintainer: none
*/
require_once('include/permissions.php');

View file

@ -5,6 +5,7 @@
* Description: Logfile Rotator
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/
@ -63,9 +64,9 @@ function logrot_logger(&$a,&$b) {
if(! $logrotsize)
return;
$x = filesize($b['filename']);
$x = @filesize($b['filename']);
if($x < $logrotsize)
if(($x === false) || ($x < $logrotsize))
return;
rename($b['filename'],$logrotpath . '/logfile-' . datetime_convert('UTC','UTC','now','Y-m-d_H:i') . '.out');

View file

@ -5,6 +5,7 @@
* Description: Ancient Chinese puzzle game that never gets old.
* Version: 1.0
* Author: Holger Froese
* Maintainer: none
*/

View file

@ -5,7 +5,7 @@
* Description: Select one server to send email notifications when you have multiple clones
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
*
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/
function mailhost_install() {

View file

@ -5,7 +5,7 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* - who takes no responsibility for any additional content which may appear herein
*
* Maintainer: none
*/

View file

@ -4,7 +4,7 @@
* Description: Additional mood options
* Version: 1.0
* Author: Macgirvin
*
* Maintainer: none
*/
function moremoods_load() {

View file

@ -4,7 +4,7 @@
* Description: Additional poke options
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*
* Maintainer: none
*/
function morepokes_load() {

View file

@ -4,6 +4,7 @@
* Name: No Federation (nofed)
* Description: Prevent posting from being federated to anybody. It will exist only on your channel page.
* Version: 1.0
* Maintainer: none
*/
/*

View file

@ -4,7 +4,7 @@
* Description: Make yourself a political target
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
* Maintainer: none
*/

View file

@ -6,7 +6,7 @@
* Description: Collapse posts with inappropriate content
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/
function nsfw_install() {

View file

@ -5,7 +5,7 @@
* Description: Allows you to select a profile photo from openclipart.org easily
* Version: 1.0
* Author: Habeas Codice <https://federated.social>
*
* Maintainer: Habeas Codice <https://federated.social>
*/
function openclipatar_load() {

View file

@ -5,7 +5,7 @@
* Version: 1.3
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Author: Klaus Weidenbach
*
* Maintainer: none
*/
function openstreetmap_load() {

View file

@ -1,10 +1,11 @@
<?php
/**
* Name: Piwik Analytics
* Description: Piwik Analytics Plugin for red#
* Description: Piwik Analytics Plugin for Hubzilla
* Version: 1.2
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
* Author: Klaus Weidenbach
* Maintainer: none
*/
/* Piwik Analytics Plugin for red#

View file

@ -5,6 +5,7 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
* Maintainer: none
*/

View file

@ -4,6 +4,7 @@
* Description: Post to pump.io
* Version: 0.1
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
* Maintainer: none
*/
require_once('library/oauth/http.php');

View file

@ -5,7 +5,7 @@
* Description: QR generator
* Version: 1.0
* Author: Macgirvin
*
* Maintainer: none
*/

View file

@ -6,6 +6,7 @@
* Description: Add some colour to tag clouds
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/

View file

@ -4,6 +4,7 @@
* Description: Make random posts/replies (requires fortunate and/or a fortunate server)
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/
require_once('include/crypto.php');

View file

@ -5,6 +5,7 @@
* Description: Migrate cloud storage from Redmatrix to Hubzilla
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/

View file

@ -5,6 +5,7 @@
* Description: Migrate photo albums from Redmatrix to Hubzilla
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/

View file

@ -1,13 +1,14 @@
<?php
/**
* Name: Red-to-Red Connector (redred)
* Description: Relay public postings to another Red channel
* Name: Hubzilla Crosspost Connector (redred)
* Description: Relay public postings to another Redmatrix/Hubzilla channel
* Version: 1.0
* Maintainer: none
*/
/*
* Red to Red
* Hubzilla to Hubzilla
*/
require_once('include/permissions.php');
@ -65,9 +66,7 @@ function redred_settings_post ($a,$post) {
return;
}
set_pconfig(local_channel(), 'redred', 'baseapi', trim($_POST['redred_baseapi']));
set_pconfig(local_channel(), 'redred', 'username', trim($_POST['redred_username']));
set_pconfig(local_channel(), 'redred', 'password', z_obscure(trim($_POST['redred_password'])));
@ -93,31 +92,31 @@ function redred_settings(&$a,&$s) {
$defchecked = (($defenabled) ? 1 : false);
$sc .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
'$field' => array('redred_enable', t('Allow posting to Red Channel'), $checked, '', array(t('No'),t('Yes'))),
'$field' => array('redred_enable', t('Allow posting to another Hubzilla Channel'), $checked, '', array(t('No'),t('Yes'))),
));
$sc .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
'$field' => array('redred_default', t('Send public postings to Red by default'), $defchecked, '', array(t('No'),t('Yes'))),
'$field' => array('redred_default', t('Send public postings to Hubzilla channel by default'), $defchecked, '', array(t('No'),t('Yes'))),
));
$sc .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('redred_baseapi', t('Red API Path'), $api, t('https://{sitename}/api'))
'$field' => array('redred_baseapi', t('Hubzilla API Path'), $api, t('https://{sitename}/api'))
));
$sc .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('redred_username', t('Red login name'), $username, t('Email'))
'$field' => array('redred_username', t('Hubzilla login name'), $username, t('Email'))
));
$sc .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('redred_channel', t('Red channel name'), $channel, t('Nickname'))
'$field' => array('redred_channel', t('Hubzilla channel name'), $channel, t('Nickname'))
));
$sc .= replace_macros(get_markup_template('field_password.tpl'), array(
'$field' => array('redred_password', t('Red password'), $password, '')
'$field' => array('redred_password', t('Hubzilla password'), $password, '')
));
$s .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array(
'$addon' => array('redred', '<img src="images/rm-32.png" style="width:auto; height:1em; margin:-3px 5px 0px 0px;">' . t('Red to Red Post Settings'), '', t('Submit')),
'$addon' => array('redred', '<img src="images/hz-32.png" style="width:auto; height:1em; margin:-3px 5px 0px 0px;">' . t('Hubzilla Crosspost Settings'), '', t('Submit')),
'$content' => $sc
));

View file

@ -1,9 +1,10 @@
<?php
/**
* Name: Red-to-Friendica Connector (rtof)
* Name: Hubzilla-to-Friendica Connector (rtof)
* Description: Relay public postings to a connected Friendica account
* Version: 1.0
* Maintainer: none
*/
/*
@ -97,7 +98,7 @@ function rtof_settings(&$a,&$s) {
));
$s .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array(
'$addon' => array('rtof', '<img src="addon/rtof/friendica.png" style="width:auto; height:1em; margin:-3px 5px 0px 0px;">' . t('Red to Friendica Post Settings'), '', t('Submit')),
'$addon' => array('rtof', '<img src="addon/rtof/friendica.png" style="width:auto; height:1em; margin:-3px 5px 0px 0px;">' . t('Hubzilla to Friendica Post Settings'), '', t('Submit')),
'$content' => $sc
));
}
@ -151,7 +152,7 @@ function rtof_post_hook(&$a,&$b) {
if(! strstr($b['postopts'],'rtof'))
return;
logger('Red-to-Friendica post invoked');
logger('Hubzilla-to-Friendica post invoked');
load_pconfig($b['uid'], 'rtof');

View file

@ -6,7 +6,7 @@
* Description: Provides an optional feature to send your identity to all websites
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: none
*/
function sendzid_load() {

View file

@ -7,6 +7,7 @@
* Recommends: None
* Category: Example
* Author: ken restivo <ken@restivo.org>
* Maintainer: ken restivo <ken@restivo.org>
*/

View file

@ -8,6 +8,7 @@
* Screenshot: None
* Depends: Core
* Recommends: None
* Maintainer: none
*/
function smiley_pack_load() {

View file

@ -5,6 +5,7 @@
* Version: 0.1
* Author: Johannes Schwab , Christian Vogeley
* ToDo: Add this to comments, Allow to disable on webpages, nicer position of button
* Maintainer: none
*/

View file

@ -4,7 +4,7 @@
* Description: Set a preferred page to load on login from home page
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/

View file

@ -5,6 +5,7 @@
* Description: Generates some statistics for the-federation.info (formerly http://pods.jasonrobinson.me/)
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
* Maintainer: none
*/
function statistics_json_load() {
@ -26,8 +27,8 @@ function statistics_json_init() {
$statistics = array(
"name" => get_config('system','sitename'),
"network" => PLATFORM_NAME,
"version" => RED_VERSION,
"network" => get_platform_name(),
"version" => get_project_version(),
"registrations_open" => (get_config('system','register_policy') != 0),
"total_users" => get_config('statistics_json','total_users'),
"active_users_halfyear" => get_config('statistics_json','active_users_halfyear'),

View file

@ -5,9 +5,11 @@
* Version: 1.0.5
* Author: Tobias Diekershoff <http://diekershoff.homeunix.net/friendika/profile/tobias>
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
* Maintainer: none
*/
require_once('include/permissions.php');
require_once('include/queue_fn.php');
/* GNU social Plugin for Hubzilla
*
@ -110,6 +112,7 @@ function statusnet_load() {
register_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
register_hook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
register_hook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
register_hook('queue_deliver', 'addon/statusnet/statusnet.php', 'statusnet_queue_deliver');
logger("loaded statusnet");
}
@ -122,6 +125,7 @@ function statusnet_unload() {
unregister_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
unregister_hook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
unregister_hook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
unregister_hook('queue_deliver', 'addon/statusnet/statusnet.php', 'statusnet_queue_deliver');
}
@ -485,13 +489,14 @@ function statusnet_shortenmsg($b, $max_char) {
// Looking for the first image
$image = '';
if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$b['body'],$matches))
if(preg_match("/\[[zi]mg\=([0-9]*)x([0-9]*)\](.*?)\[\/[zi]mg\]/is",$b['body'],$matches))
$image = $matches[3];
if ($image == '')
if(preg_match("/\[img\](.*?)\[\/img\]/is",$b['body'],$matches))
if(preg_match("/\[[zi]mg\](.*?)\[\/[zi]mg\]/is",$b['body'],$matches))
$image = $matches[1];
// @fixme for zmg
$multipleimages = (strpos($b['body'], "[img") != strrpos($b['body'], "[img"));
// When saved into the database the content is sent through htmlspecialchars
@ -616,23 +621,34 @@ function statusnet_post_hook(&$a,&$b) {
* Post to statusnet
*/
if((! is_item_normal($b)) || $b['item_private'] || ($b['created'] !== $b['edited']))
if(! strstr($b['postopts'],'statusnet')) {
logger('crosspost not enabled.');
return;
}
if(! perm_is_allowed($b['uid'],'','view_stream'))
if((! is_item_normal($b)) || $b['item_private'] || ($b['created'] !== $b['edited'])) {
logger('not a usable post. ' . print_r($b,true),LOGGER_DEBUG);
return;
}
if(! strstr($b['postopts'],'statusnet'))
if(! perm_is_allowed($b['uid'],'','view_stream')) {
logger('permissions prevent crossposting.',LOGGER_DEBUG);
return;
}
if($b['parent'] != $b['id'])
if($b['parent'] != $b['id']) {
logger('not a top level post.', LOGGER_DEBUG);
return;
}
// if posts comes from statusnet don't send it back
if($b['app'] == "StatusNet")
if($b['app'] == "StatusNet") {
logger('potential recursion. Crosspost ignored.');
return;
}
logger('statusnet post invoked');
logger('statusnet post invoked');
load_pconfig($b['uid'], 'statusnet');
@ -668,12 +684,13 @@ function statusnet_post_hook(&$a,&$b) {
}
// if [url=bla][img]blub.png[/img][/url] get blub.png
$tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\]\[img\](\\w+.*?)\\[\\/img\]\\[\\/url\]/i', '$2', $tmp);
$tmp = preg_replace( '/\[zrl\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\]\[zmg\](\\w+.*?)\\[\\/zmg\]\\[\\/zrl\]/i', '$2', $tmp);
// preserve links to images, videos and audios
$tmp = preg_replace( '/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism', '$3', $tmp);
$tmp = preg_replace( '/\[\\/?img(\\s+.*?\]|\])/i', '', $tmp);
$tmp = preg_replace( '/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism', '$3', $tmp);
$tmp = preg_replace( '/\[\\/?zmg(\\s+.*?\]|\])/i', '', $tmp);
$tmp = preg_replace( '/\[\\/?video(\\s+.*?\]|\])/i', '', $tmp);
$tmp = preg_replace( '/\[\\/?youtube(\\s+.*?\]|\])/i', '', $tmp);
$tmp = preg_replace( '/\[\\/?vimeo(\\s+.*?\]|\])/i', '', $tmp);
$tmp = preg_replace( '/\[\\/?audio(\\s+.*?\]|\])/i', '', $tmp);
$linksenabled = get_pconfig($b['uid'],'statusnet','post_taglinks');
// if a #tag is linked, don't send the [url] over to SN
@ -684,7 +701,12 @@ function statusnet_post_hook(&$a,&$b) {
$tmp = preg_replace( '/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $tmp);
// @-mentions
$tmp = preg_replace( '/@\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '@$2', $tmp);
// #-tags
$tmp = preg_replace( '/#\[zrl\=(\w+.*?)\](\w+.*?)\[\/zrl\]/i', '#$2', $tmp);
// @-mentions
$tmp = preg_replace( '/@\[zrl\=(\w+.*?)\](\w+.*?)\[\/zrl\]/i', '@$2', $tmp);
// recycle 1
$recycle = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8');
$tmp = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', $recycle.'$2', $tmp);
// recycle 2 (test)
@ -693,7 +715,7 @@ function statusnet_post_hook(&$a,&$b) {
}
// preserve links to webpages
$tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/url\]/i', '$2 $1', $tmp);
$tmp = preg_replace( '/\[bookmark\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/bookmark\]/i', '$2 $1', $tmp);
$tmp = preg_replace( '/\[zrl\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/zrl\]/i', '$2 $1', $tmp);
// find all http or https links in the body of the entry and
// apply the shortener if the link is longer then 20 characters
if (( strlen($tmp)>$max_char ) && ( $max_char > 0 )) {
@ -709,7 +731,7 @@ function statusnet_post_hook(&$a,&$b) {
}
// ok, all the links we want to send out are save, now strip
// away the remaining bbcode
//$msg = strip_tags(bbcode($tmp, false, false));
$msg = bbcode($tmp, false, false, true);
$msg = str_replace(array('<br>','<br />'),"\n",$msg);
$msg = strip_tags($msg);
@ -738,30 +760,82 @@ function statusnet_post_hook(&$a,&$b) {
$msg = $msgarr["msg"];
$image = $msgarr["image"];
if ($image != "") {
$imagedata = file_get_contents($image);
$tempfile = tempnam(get_config("system","temppath"), "upload");
file_put_contents($tempfile, $imagedata);
$postdata = array("status"=>$msg, "media"=>"@".$tempfile);
$x = z_fetch_url($image,true,0,array('novalidate' => true));
if($x['success']) {
$imagedata = $x['body'];
$tempfile = tempnam(get_config("system","temppath"), "upload");
file_put_contents($tempfile, $imagedata);
$postdata = array("status"=>$msg, "media"=>"@".$tempfile);
}
} else
$postdata = array("status"=>$msg);
}
// and now dent it :-)
if(strlen($msg)) {
//$result = $dent->post('statuses/update', array('status' => $msg));
$result = $dent->post('statuses/update', $postdata);
logger('statusnet_post send, result: ' . print_r($result, true).
"\nmessage: ".$msg, LOGGER_DEBUG);
logger("Original post: ".print_r($b, true)."\nPost Data: ".print_r($postdata, true), LOGGER_DEBUG);
if ($result->error) {
logger('Send to GNU social failed: "' . $result->error . '"');
}
$result = $dent->post('statuses/update', $postdata);
logger('statusnet_post send, result: ' . print_r($result, true).
"\nmessage: ".$msg, LOGGER_DEBUG);
logger("Original post: ".print_r($b, true)."\nPost Data: ".print_r($postdata, true), LOGGER_DEBUG);
if ($result->error) {
logger('Send to GNU social failed: queued."' . $result->error . '"');
// @fixme - unable to queue media uploads
if(! $image) {
queue_insert(array(
'hash' => random_string(),
'account_id' => $b['aid'],
'channel_id' => $b['uid'],
'driver' => 'statusnet',
'posturl' => $api,
'msg' => $msg
));
}
}
}
if ($tempfile != "")
unlink($tempfile);
}
}
function statusnet_queue_deliver(&$a,&$b) {
$outq = $b['outq'];
if($outq['outq_driver'] !== 'statusnet')
return;
$ckey = get_pconfig($outq['outq_channel'], 'statusnet', 'consumerkey');
$csecret = get_pconfig($outq['outq_channel'], 'statusnet', 'consumersecret');
$otoken = get_pconfig($outq['outq_channel'], 'statusnet', 'oauthtoken');
$osecret = get_pconfig($outq['outq_channel'], 'statusnet', 'oauthsecret');
if($ckey && $csecret && $otoken && $osecret) {
$dent = new StatusNetOAuth($api,$ckey,$csecret,$otoken,$osecret);
if($outq['outq_msg']) {
$result = $dent->post('statuses/update', array('status' => $outq['outq_msg']));
if ($result->error) {
logger('Send to GNU social failed: "' . $result->error . '"');
update_queue_item($outq['outq_hash']);
}
else {
logger('statusnet_post send, result: ' . print_r($result, true)
. "\nmessage: " . $outq['outq_msg'], LOGGER_DEBUG);
remove_queue_item($outq['outq_hash']);
}
}
}
$b['handled'] = true;
}
function statusnet_plugin_admin_post(&$a){
$sites = array();
@ -839,7 +913,7 @@ function statusnet_cron($a,$b) {
return;
}
}
logger('statusnet: cron_start');
logger('statusnet: cron_start', LOGGER_DEBUG);
$rand = db_getfunc('rand');
@ -851,7 +925,7 @@ function statusnet_cron($a,$b) {
}
}
logger('statusnet: cron_end');
logger('statusnet: cron_end', LOGGER_DEBUG);
set_config('statusnet','last_poll', time());
}

View file

@ -5,8 +5,9 @@
* Name: superblock
* Description: block people
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
* Author: Mike Macgirvin
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
* MinVersion: 1.1.3
*/
function superblock_load() {
@ -197,7 +198,7 @@ function superblock_item_photo_menu(&$a,&$b) {
}
}
$b['menu'][ t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
$b['author_menu'][ t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
}
function superblock_module() {}
@ -217,6 +218,8 @@ function superblock_init(&$a) {
}
set_pconfig(local_channel(),'system','blocked',$words);
build_sync_packet();
info( t('superblock settings updated') . EOL );
killme();
}

View file

@ -5,6 +5,7 @@
* Description: Sample Hubzilla plugin/addon for creating a test drive site with automatic account expiration.
* Version: 1.1
* Author: Mike Macgirvin <https://macgirvin.com/channel/mike>
* Maintainer: none
*/

View file

@ -4,6 +4,7 @@
* Description: The 3-D TicTacToe game application
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/

View file

@ -5,5 +5,6 @@
* Description: Flashlight
* Version: 1.0
* Author: Macgirvin
* Maintainer: none
*/
function torch_load(){}function torch_unload(){}function torch_module(){}function torch_content($a){killme();}

View file

@ -5,7 +5,7 @@
* Description: Show a tour for new users
* Version: 0.0
* Author: Stefan Parviainen <pafcu@iki.fi>
*
* Maintainer: none
*/
// Make addon a proper module so that we can use tour_content, tour_post functions
@ -101,7 +101,7 @@ function tour_addfooter($a,&$navHtml) {
// Network
$legs[] = array('#main-slider',t('Adjust from which channels posts should be displayed.'));
$legs[] = array('#group-sidebar',t('Only show posts from channels in the specified collection.'));
$legs[] = array('#group-sidebar',t('Only show posts from channels in the specified privacy group.'));
// Sidebar

View file

@ -1,10 +1,6 @@
Twitter Plugin
==============
*Warning: Because Twitter currently blocks ur1.ca links, tweets with these links are not accepted by Twitter. This means that you can only crosspost short messages to Twitter. Other link shortening services didn't seem to work at all, so #pleaseFIX! [BTW: the question is if we need link shortening, because Twitter has its own nowadays.]*
------------
Original main authors Tobias Diekershoff and Michael Vogel. Adapted for the Hubzilla by Mike Macgirvin.
With this addon for the Hubzilla you can give your hub members the possibility to post
@ -39,7 +35,7 @@ message was longer than 140 characters requires it, that you have *PHP5+* and
Where to find
-------------
In the [Red-addons git repository /twitter/](https://github.com/friendica/red-addons/tree/master/twitter). This directory
In the [Hubzilla-addons git repository /twitter/](https://github.com/redmatrix/hubzilla-addons/tree/master/twitter). This directory
contains all required PHP files (including the [Twitter OAuth library][1] by Abraham
Williams, MIT licensed and the [Slinky library][2] by Beau Lebens, BSD license),
a CSS file for styling of the user configuration and an image to _Sign in with

View file

@ -2,10 +2,11 @@
/**
* Name: Twitter Connector
* Description: Relay public postings to a connected Twitter account
* Version: 1.1r
* Version: 1.2
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
* Author: Mike Macgirvin <https://zothub.com/channel/mike>
* Maintainer: none
*
* Copyright (c) 2011-2013 Tobias Diekershoff, Michael Vogel
* All rights reserved.

View file

@ -5,6 +5,7 @@
* Description: visit $yoursite/upload_limits to show what system limits may apply to file/photo uploads
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/

View file

@ -4,7 +4,7 @@
* Description: Who viewed my channel/profile
* Version: 1.0
* Author: Mike Macgirvin <mike@zothub.com>
*
* Maintainer: none
*/

View file

@ -5,6 +5,7 @@
* Description: Find out who your biggest fans are (who "likes" your posts)
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/
function wholikesme_load() {}

View file

@ -5,6 +5,7 @@
* Description: Post to WordPress (or anything else which uses the wordpress XMLRPC API)
* Version: 1.0
* Author: Mike Macgirvin <zot:mike@zothub.com>
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
*/
require_once('include/permissions.php');
@ -153,6 +154,9 @@ function wppost_post_local(&$a,&$b) {
function wppost_dreport($dr,$update) {
$dr->update($update);
$xx = $dr->get();
if(get_config('system','disable_dreport'))
return;
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ",
dbesc($xx['message_id']),
dbesc($xx['location']),

View file

@ -48,7 +48,7 @@ require_once('include/AccessList.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
define ( 'STD_VERSION', '1.1' );
define ( 'STD_VERSION', '1.1.4' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1161 );
@ -245,6 +245,21 @@ define ( 'PHOTO_COVER', 0x0010 );
define ( 'PHOTO_ADULT', 0x0008 );
define ( 'PHOTO_FLAG_OS', 0x4000 );
define ( 'PHOTO_RES_ORIG', 0 );
define ( 'PHOTO_RES_1024', 1 ); // rectangular 1024 max width or height, floating height if not (4:3)
define ( 'PHOTO_RES_640', 2 ); // to accomodate SMBC vertical comic strips without scrunching the width
define ( 'PHOTO_RES_320', 3 ); // accordingly
define ( 'PHOTO_RES_PROFILE_300', 4 ); // square 300 px
define ( 'PHOTO_RES_PROFILE_80', 5 ); // square 80 px
define ( 'PHOTO_RES_PROFILE_48', 6 ); // square 48 px
define ( 'PHOTO_RES_COVER_1200', 7 ); // 1200w x 435h (2.75:1)
define ( 'PHOTO_RES_COVER_850', 8 ); // 850w x 310h
define ( 'PHOTO_RES_COVER_425', 9 ); // 425w x 160h
/**
* Menu types
*/
@ -256,11 +271,11 @@ define ( 'MENU_BOOKMARK', 0x0002 );
* Network and protocol family types
*/
define ( 'NETWORK_DFRN', 'dfrn'); // Friendica, Mistpark, other DFRN implementations
define ( 'NETWORK_ZOT', 'zot!'); // Zot!
define ( 'NETWORK_DFRN', 'friendica-over-diaspora'); // Friendica, Mistpark, other DFRN implementations
define ( 'NETWORK_ZOT', 'zot'); // Zot!
define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
define ( 'NETWORK_FEED', 'rss'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'diaspora'); // Diaspora
define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP
define ( 'NETWORK_MAIL2', 'mai2'); // extended IMAP/POP
define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API
@ -482,6 +497,11 @@ define ( 'ACTIVITY_POST', NAMESPACE_ACTIVITY_SCHEMA . 'post' );
define ( 'ACTIVITY_UPDATE', NAMESPACE_ACTIVITY_SCHEMA . 'update' );
define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' );
define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' );
define ( 'ACTIVITY_CREATE', NAMESPACE_ACTIVITY_SCHEMA . 'create' );
define ( 'ACTIVITY_WIN', NAMESPACE_ACTIVITY_SCHEMA . 'win' );
define ( 'ACTIVITY_LOSE', NAMESPACE_ACTIVITY_SCHEMA . 'lose' );
define ( 'ACTIVITY_TIE', NAMESPACE_ACTIVITY_SCHEMA . 'tie' );
define ( 'ACTIVITY_COMPLETE', NAMESPACE_ACTIVITY_SCHEMA . 'complete' );
define ( 'ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke' );
define ( 'ACTIVITY_MOOD', NAMESPACE_ZOT . '/activity/mood' );
@ -494,6 +514,7 @@ define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' );
define ( 'ACTIVITY_OBJ_ALBUM', NAMESPACE_ACTIVITY_SCHEMA . 'photo-album' );
define ( 'ACTIVITY_OBJ_EVENT', NAMESPACE_ACTIVITY_SCHEMA . 'event' );
define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' );
define ( 'ACTIVITY_OBJ_GAME', NAMESPACE_ACTIVITY_SCHEMA . 'game' );
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_ZOT . '/activity/tagterm' );
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_ZOT . '/activity/profile' );
define ( 'ACTIVITY_OBJ_THING', NAMESPACE_ZOT . '/activity/thing' );
@ -554,6 +575,9 @@ define ( 'ITEM_TYPE_WEBPAGE', 3 );
define ( 'ITEM_TYPE_BUG', 4 );
define ( 'ITEM_TYPE_DOC', 5 );
define ( 'ITEM_IS_STICKY', 1000 );
define ( 'DBTYPE_MYSQL', 0 );
define ( 'DBTYPE_POSTGRES', 1 );
@ -839,7 +863,7 @@ class App {
&& array_key_exists('baseurl',$this->config['system'])
&& strlen($this->config['system']['baseurl'])) {
$url = $this->config['system']['baseurl'];
$url = trim($url,'\\/');
return $url;
}
@ -857,6 +881,7 @@ class App {
&& array_key_exists('baseurl',$this->config['system'])
&& strlen($this->config['system']['baseurl'])) {
$url = $this->config['system']['baseurl'];
$url = trim($url,'\\/');
}
$parsed = @parse_url($url);
@ -874,6 +899,11 @@ class App {
}
}
function get_scheme() {
return $this->scheme;
}
function get_hostname() {
return $this->hostname;
}
@ -978,7 +1008,7 @@ class App {
'$user_scalable' => $user_scalable,
'$baseurl' => $this->get_baseurl(),
'$local_channel' => local_channel(),
'$generator' => PLATFORM_NAME . ' ' . RED_VERSION,
'$generator' => get_platform_name() . ((get_project_version()) ? ' ' . get_project_version() : ''),
'$update_interval' => $interval,
'$icon' => head_get_icon(),
'$head_css' => head_get_css(),
@ -1527,6 +1557,10 @@ function goaway($s) {
* @return int|bool account_id or false
*/
function get_account_id() {
if(intval($_SESSION['account_id']))
return intval($_SESSION['account_id']);
if(get_app()->account)
return intval(get_app()->account['account_id']);
@ -1697,8 +1731,12 @@ function proc_run($cmd){
$cmd = "cmd /c start \"title\" /D \"$cwd\" /b $cmdline";
proc_close(proc_open($cmd, array(), $foo));
}
else
proc_close(proc_open($cmdline ." &", array(), $foo));
else {
if(get_config('system','use_proc_open'))
proc_close(proc_open($cmdline ." &", array(), $foo));
else
exec($cmdline . ' > /dev/null &');
}
}
/**
@ -1984,12 +2022,14 @@ function load_pdl(&$a) {
$arr = array('module' => $a->module, 'layout' => '');
call_hooks('load_pdl',$arr);
$s = $arr['layout'];
$layout = $arr['layout'];
$n = 'mod_' . $a->module . '.pdl' ;
$u = comanche_get_channel_id();
if($u)
$s = get_pconfig($u, 'system', $n);
if(! $s)
$s = $layout;
if((! $s) && (($p = theme_include($n)) != ''))
$s = @file_get_contents($p);
@ -2122,6 +2162,23 @@ function construct_page(&$a) {
header("Content-type: text/html; charset=utf-8");
// security headers - see https://securityheaders.io
if($a->get_scheme() === 'https')
header("Strict-Transport-Security: max-age=31536000");
header("Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'");
if($a->config['system']['x_security_headers']) {
header("X-Frame-Options: SAMEORIGIN");
header("X-Xss-Protection: 1; mode=block;");
header("X-Content-Type-Options: nosniff");
}
if($a->config['system']['public_key_pins']) {
header("Public-Key-Pins: " . $a->config['system']['public_key_pins']);
}
require_once(theme_include(
((x($a->page, 'template')) ? $a->page['template'] : 'default' ) . '.php' )
);
@ -2299,3 +2356,41 @@ function check_cron_broken() {
set_config('system','lastpollcheck',datetime_convert());
return;
}
function get_platform_name() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['platform_name'])
return $a->config['system']['platform_name'];
return PLATFORM_NAME;
}
function get_project_version() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
return '';
return RED_VERSION;
}
function get_update_version() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
return '';
return DB_UPDATE_VERSION;
}
function get_notify_icon() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['email_notify_icon_url'])
return $a->config['system']['email_notify_icon_url'];
return z_root() . '/images/hz-white-32.png';
}
function get_site_icon() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['site_icon_url'])
return $a->config['system']['site_icon_url'];
return z_root() . '/images/hz-32.png';
}

View file

@ -57,9 +57,9 @@ Private messages are encrypted during transport and storage. In this day and age
This provides the ability to select posts by date ranges
**Collections Filter**
**Privacy Group Filter**
Enable widget to display stream posts only from selected collections. This also toggles the outbound permissions while you are viewing a collection. This is analogous to Google "circles" or Disapora "aspects".
Enable widget to display stream posts only from selected groups of connection. This also toggles the outbound permissions while you are viewing a privacy group. This is analogous to Google "circles" or Disapora "aspects".
**Saved Searches**

View file

@ -11,9 +11,9 @@ When you start to mention somebody, it will create an auto-complete box to selec
**Private Mentions**
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or collections from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to include them (and perhaps restrict the post from "everybody" if this was the default). You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda (in addition to any recipients you selected with the privacy selector - if any).
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to include them (and perhaps restrict the post from "everybody" if this was the default). You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda (in addition to any recipients you selected with the privacy selector - if any).
You may also tag public collections. When you create or edit a collection, there is a checkbox to allow the group members to be seen by others. If this box is checked for a collection and you tag (for instance) @!Friends - the post will be restricted to the Friends collection. Check that the collection is public before doing this - as there is no way to take back a post except to delete it. The collection name will appear in the post and will alert members of that collection that they are members of it.
You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.

View file

@ -4,13 +4,13 @@ Translating the $Projectname
Translation Process
-------------------
The strings used in the UI of Red is translated at [Transifex][1] and then
The strings used in the UI of Hubzilla is translated at [Transifex][1] and then
included in the git repository at github. If you want to help with translation
for any language, be it correcting terms or translating Red to a
for any language, be it correcting terms or translating Hubzilla to a
currently not supported language, please register an account at transifex.com
and contact the Red translation team there.
and contact the Redmatrix translation team there.
Translating Red is simple. Just use the online tool at transifex. If you
Translating Hubzilla is simple. Just use the online tool at transifex. If you
don't want to deal with git & co. that is fine, we check the status of the
translations regularly and import them into the source tree at github so that
others can use them.
@ -26,32 +26,32 @@ tree.
If you want to get your work into the source tree yourself, feel free to do so
and contact us with and question that arises. The process is simple and
Red ships with all the tools necessary.
Hubzilla ships with all the tools necessary.
The location of the translated files in the source tree is
/view/LNG-CODE/
where LNG-CODE is the language code used, e.g. de for German or fr for French.
For the email templates (the *.tpl files) just place them into the directory
and you are done. The translated strings come as a "messages.po" file from
transifex which needs to be translated into the PHP file Red uses. To do
and you are done. The translated strings come as a "hmessages.po" file from
transifex which needs to be translated into the PHP file Hubzilla uses. To do
so, place the file in the directory mentioned above and use the "po2php"
utility from the util directory of your Red installation.
utility from the util directory of your Hubzilla installation.
Assuming you want to convert the German localization which is placed in
view/de/messages.po you would do the following.
view/de/hmessages.po you would do the following.
1. Navigate at the command prompt to the base directory of your
Red installation
Hubzilla installation
2. Execute the po2php script, which will place the translation
in the strings.php file that is used by Red.
in the hstrings.php file that is used by Hubzilla.
$> php util/po2php.php view/de/messages.po
$> php util/po2php.php view/de/hmessages.po
The output of the script will be placed at view/de/strings.php where
The output of the script will be placed at view/de/hstrings.php where
froemdoca os expecting it, so you can test your translation mmediately.
3. Visit your Red page to check if it still works in the language you
3. Visit your Hubzilla page to check if it still works in the language you
just translated. If not try to find the error, most likely PHP will give
you a hint in the log/warnings.about the error.
@ -59,19 +59,19 @@ view/de/messages.po you would do the following.
not give any output if the file is ok but might give a hint for
searching the bug in the file.
$> php view/de/strings.php
$> php view/de/hstrings.php
4. commit the two files with a meaningful commit message to your git
repository, push it to your fork of the Red repository at github and
repository, push it to your fork of the Hubzilla repository at github and
issue a pull request for that commit.
Utilities
---------
Additional to the po2php script there are some more utilities for translation
in the "util" directory of the Red source tree. If you only want to
translate Red into another language you wont need any of these tools most
likely but it gives you an idea how the translation process of Red
in the "util" directory of the Hubzilla source tree. If you only want to
translate Hubzilla into another language you wont need any of these tools most
likely but it gives you an idea how the translation process of Hubzilla
works.
For further information see the utils/README file.
@ -79,7 +79,7 @@ For further information see the utils/README file.
Known Problems
--------------
* Red uses the language setting of the visitors browser to determain the
* Hubzilla uses the language setting of the visitors browser to determain the
language for the UI. Most of the time this works, but there are some known
quirks.
* the early translations are based on the friendica translations, if you

View file

@ -15,7 +15,7 @@ Some/many of these widgets have restrictions which may restrict the type of page
* args: count - number of items to return (default 24)
<br />&nbsp;<br />
* collections - collection selector for the current logged in channel
* collections - privacy group selector for the current logged in channel
* args: mode - one of "conversation", "group", "abook" depending on module
<br />&nbsp;<br />
@ -74,8 +74,11 @@ Some/many of these widgets have restrictions which may restrict the type of page
* suggestedchats - "interesting" chatrooms chosen for the current observer
* item - displays a single webpage item by mid
* args: mid - message_id of webpage to display (must be webpage, not a conversation item)
* item - displays a single webpage item by mid or page title
* args:
* channel_id - channel that owns the content, defualt is the profile_uid
* mid - message_id of webpage to display (must be webpage, not a conversation item)
* title - URL page title of webpage (must provide one of either title or mid)
<br />&nbsp;<br />
* photo - display a single photo
@ -85,6 +88,13 @@ Some/many of these widgets have restrictions which may restrict the type of page
* style - CSS style string
<br />&nbsp;<br />
* cover_photo - display the cover photo for the selected channel
* args:
* channel_id - channel to use, default is the profile_uid
* style - CSS style string (default is dynamically resized to width of region)
<br />&nbsp;<br />
* photo_rand - display a random photo from one of your photo albums. Photo permissions are honoured
* args:
* album - album name (very strongly recommended if you have lots of photos)

View file

@ -1,19 +1,22 @@
[h3]Plugins/Addons[/h3]
[list=1]
[*] abcjsplugin - Create musical scores in your posts
[*] adultphotoflag - prevents nsfw photos from being displayed in public albums
[*] bbmath - use complex math expressions in your posts
[*] bookmarker - replace #^ with bookmark link in posts
[*] buglink - provide a bug reporting icon in the lower-left corner of every page
[*] calc - a scientific calculator
[*] chess - cross domain identity aware interactive chess games
[*] chords - generate fingering charts and alternatives for every known guitar chord
[*] custom_home - set a custom page as the hub start page
[*] diaspora - crosspost to a Diaspora account (different from the built-in Diaspora emulator)
[*] dfedfix - fixes some federation issues with Diaspora releases around aug-sep 2015
[*] diaspora - Diaspora protocol emulator
[*] diaspost - crosspost to a Diaspora account (different from the Diaspora protocol emulator)
[*] dirstats - show some interesting statistics generated by the driectory server
[*] donate - provides a project donation page
[*] dwpost - crosspost to Dreamwidth
[*] embedly - use the embedly (formerly ooehmbed) service to embed media from many providers
[*] extcron - use an external cron service to run your hub's scheduled tasks
[*] flattr - provides a "Flattr Us" button
[*] flattrwidget - provides a "Flattr Us" button
[*] flip - create upside down text
[*] fortunate - displays random quote (fortune cookie). Requires setting up a fortune server.
[*] frphotos - import photo albums from Friendica
@ -26,12 +29,16 @@
[*] libertree - crosspost to Libertree
[*] likebanner - create a "like us on red#matrix" banner image
[*] ljpost - crosspost to LiveJournal
[*] logrot - logfile rotation utility
[*] mahjongg - Chinese puzzle game
[*] mailhost - when using multiple channel clones, select one to receive email notifications
[*] mayan_places - set location field to a random city in the Mayan world
[*] morechoice - additional gender/sexual-preference choices for profiles (not safe for work)
[*] moremoods - Additional mood options
[*] morepokes - additional poke options (not safe for work)
[*] msgfooter - provide legal or other text on each outgoing post
[*] noembed - use noembed.com as an addition to Hubzilla's native oembed functionality (currently broken)
[*] nofed - prevent "federation" of channel posts, maintains all interaction on your site
[*] nsabait - add random terrorism related hashtags to your posts
[*] nsfw - Highly recommended plugin to collpase posts with inappropriate content
[*] openclipatar - choose a profile photo from hundreds of royalty free images
@ -42,21 +49,29 @@
[*] qrator - generate QR code images
[*] rainbowtag - display your tag and category clouds in colours
[*] randpost - post/reply bot based on and requires fortunate
[*] redfiles - import file storage from redmatrix
[*] redphotos - import photo albums from redmatrix
[*] redred - Crosspost to another Red Matrix or Hubzilla channel
[*] rtof - Crosspost to Friendica
[*] sendzid - add 'zid' auth parmaters to all outbound links, not just in-network links
[*] skeleton - sample addon/plugin to demonstrate plugin development
[*] smiley_pack - extend the built-in smilie (emoticon) support
[*] smileybutton - provides a smiley selector on the post window
[*] startpage - set a personal preferred page to redirect after logging in.
[*] statistics_json - Diaspora statistics generator
[*] statusnet - GNU-social and StatusNet crosspost [zrl=[baseurl]/help/addons_gnusocial]Posting To Gnu Social[/zrl]
[*] superblock - Highly recommended - completely block an offensive channel from your stream
[*] testdrive - Turns your hub into a test drive site with accounts that expire after a trail period.
[*] tictac - 3D tic-tac-toe
[*] torch - flashlight app
[*] tour - feature tour for new members
[*] twitter - crosspost to Twitter
[*] upload_limits - discover what server setting (there are a few) may be causing large photo uploads to fail
[*] visage - show visitors to your channel
[*] wholikesme - provides a page to display what connections have 'liked' your posts the most
[*] webRTC - use an external server (mayfirst.org) to negotiate webRTC hookups
[*] wppost - crosspost to WordPress (or other wordpress XMLRPC service)
[*] xmpp - XMPP chat based on converse.js
[/list]
[h3]Addon Repositories[/h3]

View file

@ -22,6 +22,6 @@ See: [zrl=[baseurl]/help/cloud_desktop_clients]Cloud Desktop Clients[/zrl]
[b]Permissions[/b]
When using WebDAV, the file is created with your channel's default file permissions and this cannot be changed from within the operating system. It also may not be as restrictive as you would like. What we've found is that the preferred method of making files private is to first create folders or directories; then visit &quot;filestorage/{{username}}&quot;; select the directory and change the permissions. Do this before you put anything into the directory. The directory permissions take precedence so you can then put files or other folders into that container and they will be protected from unwanted viewers by the directory permissions. It is common for folks to create a &quot;personal&quot; or &quot;private&quot; folder which is restricted to themselves. You can use this as a personal cloud to store anything from anywhere on the web or any computer and it is protected from others. You might also create folders for &quot;family&quot; and &quot;friends&quot; with permission granted to appropriate collections of channels.
When using WebDAV, the file is created with your channel's default file permissions and this cannot be changed from within the operating system. It also may not be as restrictive as you would like. What we've found is that the preferred method of making files private is to first create folders or directories; then visit &quot;filestorage/{{username}}&quot;; select the directory and change the permissions. Do this before you put anything into the directory. The directory permissions take precedence so you can then put files or other folders into that container and they will be protected from unwanted viewers by the directory permissions. It is common for folks to create a &quot;personal&quot; or &quot;private&quot; folder which is restricted to themselves. You can use this as a personal cloud to store anything from anywhere on the web or any computer and it is protected from others. You might also create folders for &quot;family&quot; and &quot;friends&quot; with permission granted to appropriate privacy groups.
#include doc/macros/main_footer.bb;

View file

@ -47,9 +47,9 @@ Private messages are encrypted during transport and storage. In this day and age
This provides the ability to select posts by date ranges
[b]Collections Filter[/b]
[b]Privacy Group Filter[/b]
Enable widget to display stream posts only from selected collections. This also toggles the outbound permissions while you are viewing a collection. This is analogous to Google &quot;circles&quot; or Disapora &quot;aspects&quot;.
Enable widget to display stream posts only from selected privacy groups. This also toggles the outbound permissions while you are viewing a group. This is analogous to Google &quot;circles&quot; or Disapora &quot;aspects&quot;.
[b]Saved Searches[/b]

View file

@ -106,9 +106,9 @@ There is also experimental support for OpenID authentication which may be used i
Channels may have permissions to become "derivative channels" where two or more existing channels combine to create a new topical channel.
[b]Collections[/b]
[b]Privacy Groups[/b]
"Collections" is our implementation of privacy groups, which is similar to Google "Circles" and Diaspora "Aspects". This allows you to filter your incoming stream by collections or groups, and automatically set the outbound Access Control List to only those in the Collection when you post. You may over-ride this at any time (prior to sending the post).
Our implementation of privacy groups is similar to Google "Circles" and Diaspora "Aspects". This allows you to filter your incoming stream by selected groups, and automatically set the outbound Access Control List to only those in that privacy group when you post. You may over-ride this at any time (prior to sending the post).
[b]Directory Services[/b]

View file

@ -3,7 +3,7 @@
$Projectname contains many configuration options hidden from the main admin panel.
These are generally options considered too niche, confusing, or advanced for
the average member. These settings can be activated from the the top level Red
the average member. These settings can be activated from the the top level web
directory with the syntax [code]util/config cat key value[/code] for a site
configuration, or [code]util/pconfig channel_id cat key value[/code] for a
member configuration.
@ -11,14 +11,14 @@ member configuration.
This document assumes you're an administrator.
[b]pconfig[/b]
[b]system > user_scalable[/b]
[b]system.user_scalable[/b]
Determine if the app is scalable on touch screens. Defaults to on, to
disable, set to zero - real zero, not just false.
[b]system > always_my_theme[/b]
[b]system.always_my_theme[/b]
Always use your own theme when viewing channels on the same hub. This
will break in some quite imaginative ways when viewing channels with
theme dependent Comanche.
[b]system > paranoia[/b]
[b]system.paranoia[/b]
Sets the security level of IP checking. If the IP address of a logged-in session changes
apply this level to determine if the account should be logged out as a security breach.
Options are:
@ -26,155 +26,179 @@ This document assumes you're an administrator.
1 - check 3 octets
2 - check 2 octets
3 - check for any difference at all
[b]system > prevent_tag_hijacking[/b]
[b]system.prevent_tag_hijacking[/b]
Prevent foreign networks hijacking hashtags in your posts and directing them at its own resources.
[b]system > blocked[/b]
[b]system.blocked[/b]
An array of xchans blocked by this channel. Technically, this is a
hidden config and does belong here, however, addons (notably
superblock) have made this available in the UI.
[b]system > default_cipher[/b]
[b]system.default_cipher[/b]
Set the default cipher used for E2EE items.
[b]system > network_page_default[/b]
[b]system.network_page_default[/b]
Set default params when viewing the network page. This should contain
the same querystring as manual filtering.
[b]system > display_friend_count[/b]
[b]system.display_friend_count[/b]
Set the number of connections to display in the connections profile
widget.
[b]system > taganyone[/b]
[b]system.taganyone[/b]
Requires the config of the same name to be enabled. Allow the @mention tagging
of anyone, whether you are connected or not. This doesn't scale.
[b]system > startpage[/b]
[b]system.startpage[/b]
Another of those technically hidden configs made available by addons.
Sets the default page to view when logging in. This is exposed to the
UI by the startpage addon.
[b]system > forcepublicuploads[/b]
[b]system.forcepublicuploads[/b]
Force uploaded photos to be public when uploaded as wall items. It
makes far more sense to just set your permissions properly in the first
place. Do that instead.
[b]system > do_not_track[/b]
[b]system.do_not_track[/b]
As the browser header. This will break many identity based features.
You should really just set permissions that make sense.
[b]Site config[/b]
[b]system > taganyone[/b]
[b]system.taganyone[/b]
Allow the @mention tagging of anyone whether you are connected or not.
[b]system > directorytags[/b]
Set the number of keyword tags displayed on the directory page.
[b]system > startpage[/b]
[b]system.directorytags[/b]
Set the number of keyword tags displayed on the directory page. Default is 50 unless set to a
positive integer.
[b]system.disable_directory_keywords[/b]
If '1', do not show directory keywords. If the hub is a directory server, prevent returning
tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm.
[b]system.disable_dreport[/b]
If '1', don't store or link to delivery reports
[b]system.startpage[/b]
Set the default page to be taken to after a login for all channels at
this website. Can be overwritten by user settings.
[b]system > projecthome[/b]
Set the project homepage as the homepage of your hub.
[b]system > default_permissions_role[/b]
[b]system.projecthome[/b]
Set the project homepage as the homepage of your hub. (Obsolete)
[b]system.auto_channel_create[/b]
Add the necessary form elements to create the first channel on the account registration page, and create it
(possibly following email validation or administrator approval). This precludes the ability to import a channel
from another site as the first channel created on this site for a new account.
Use with system.default_permissions_role to streamline registration.
[b]system.default_permissions_role[/b]
If set to a valid permissions role name, use that role for
the first channel created by a new account and don't ask for the "Channel Type" on
the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private', 'forum', 'forum_restricted' and 'forum_private'. Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl].
[b]system > workflow_channel_next[/b]
the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private',
'forum', 'forum_restricted' and 'forum_private'.
Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl].
[b]system.workflow_channel_next[/b]
The page to direct users to immediately after creating a channel.
[b]system > max_daily_registrations[/b]
[b]system.max_daily_registrations[/b]
Set the maximum number of new registrations allowed on any day.
Useful to prevent oversubscription after a bout of publicity
for the project.
[b]system > tos_url[/b]
[b]system.tos_url[/b]
Set an alternative link for the ToS location.
[b]system > block_public_search[/b]
[b]system.block_public_search[/b]
Similar to block_public, except only blocks public access to
search features. Useful for sites that want to be public, but
keep getting hammered by search engines.
[b]system > paranoia[/b]
[b]system.proc_run_use_exec
If 1, use the exec system call in proc_run to run background tasks. By default
we use proc_open and proc_close. On some (currently rare) systems this does not work well.
[b]system.paranoia[/b]
As the pconfig, but on a site-wide basis. Can be overwritten
by member settings.
[b]system > openssl_conf_file[/b]
[b]system.openssl_conf_file[/b]
Specify a file containing OpenSSL configuration. Read the code first.
If you can't read the code, don't play with it.
[b]system > optimize_items[/b]
[b]system.optimize_items[/b]
Runs optimise_table during some tasks to keep your database nice and
defragmented. This comes at a performance cost while the operations
are running, but also keeps things a bit faster while it's not.
There also exist CLI utilities for performing this operation, which you
may prefer, especially if you're a large site.
[b]system > expire_limit
[b]system.expire_limit
Don't expire any more than this number of posts per channel per
expiration run to keep from exhausting memory. Default 5000.
[b]system > dlogfile[/b]
[b]system.dlogfile[/b]
Logfile to use for logging development errors. Exactly the same as
logger otherwise. This isn't magic, and requires your own logging
statements. Developer tool.
[b]system > authlog[/b]
[b]system.authlog[/b]
Logfile to use for logging auth errors. Used to plug in to server
side software such as fail2ban. Auth failures are still logged to
the main logs as well.
[b]system > hide_in_statistics[/b]
[b]system.hide_in_statistics[/b]
Tell the red statistics servers to completely hide this hub in hub lists.
[b]system > reserved_channels[/b]
[b]system.reserved_channels[/b]
Don't allow members to register channels with this comma separated
list of names (no spaces)
[b]system > auto_follow[/b]
[b]system.auto_follow[/b]
Make the first channel of an account auto-follow channels listed here - comma separated list of webbies (member@hub addresses).
[b]system > admin_email[/b]
[b]system.admin_email[/b]
Specifies the administrator's email for this site. This is initially set during install.
[b]system > cron_hour[/b]
[b]system.cron_hour[/b]
Specify an hour in which to run cron_daily. By default with no config, this will run at midnight UTC.
[b]system > minimum_feedcheck_minutes[/b]
[b]system.minimum_feedcheck_minutes[/b]
The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds will be polled with each cronjob. Defaults to 60 if not set. The site setting can also be over-ridden on a channel by channel basis by a service class setting aptly named 'minimum_feedcheck_minutes'.
[b]system > blacklisted_sites[/b]
[b]system.blacklisted_sites[/b]
An array of specific hubs to block from this hub completely.
[b]system > ignore_imagick[/b]
[b]system.ignore_imagick[/b]
Ignore imagick and use GD, even if imagick is installed on the server. Prevents some issues with PNG files in older versions of imagick.
[b]system > no_age_restriction[/b]
[b]system.no_age_restriction[/b]
Do not restrict registration to people over the age of 13. This carries legal responsibilities in many countries to require that age be provided and to block all personal information from minors, so please check your local laws before changing.
[b]system > override_poll_lockfile[/b]
[b]system.override_poll_lockfile[/b]
Ignore the lock file in the poller process to allow more than one process to run at a time.
[b]system > projecthome[/b]
[b]system.projecthome[/b]
Display the project page on your home page for logged out viewers.
[b]system > sellpage[/b]
[b]system.sellpage[/b]
A URL shown in the public sites list to sell your hub - display service classes, etc.
[b]randprofile > check[/b]
[b]randprofile.check[/b]
When requesting a random profile, check that it actually exists first
[b]randprofile > retry[/b]
[b]randprofile.retry[/b]
Number of times to retry getting a random profile
[b]system > photo_cache_time[/b]
[b]system.photo_cache_time[/b]
How long to cache photos, in seconds. Default is 86400 (1 day).
Longer time increases performance, but it also means it takes longer for changed permissions to apply.
[b]system > poco_rating_enable[/b]
[b]system.poco_rating_enable[/b]
Distributed reputation reporting and data collection may be disabled. If your site does not participate in distributed reputation you will also not be able to make use of the data from your connections on other sites. By default and in the absence of any setting it is enabled. Individual members can opt out by restricting who can see their connections or by not providing any reputation information for their connections.
[b]system > register_link[/b]
[b]system.register_link[/b]
path to direct to from the "register" link on the login form. On closed sites this will direct to 'pubsites'. For open sites it will normally redirect to 'register' but you may change this to a custom site page offering subscriptions or whatever.
[b]system > max_import_size[/b]
[b]system.max_import_size[/b]
If configured, the maximum length of an imported text message. This is normally left at 200Kbytes or more to accomodate Friendica private photos, which are embedded.
[b]system > tempdir[/b]
Place to store temporary files, default is defined in the PHP configuration
[b]system > uploaddir[/b]
Location to upload files (default is system.tempdir)
[b]system > disable_discover_tab[/b]
[b]system.tempdir[/b]
Place to store temporary files (currently unused), default is defined in the PHP configuration
[b]system.uploaddir[/b]
Location to upload files (default is system.tempdir, currently used only by js_upload plugin)
[b]system.disable_discover_tab[/b]
This allows you to completely disable the ability to discover public content from external sites.
[b]system > sys_expire_days[/b]
[b]system.sys_expire_days[/b]
How many days to keep discovered public content from other sites
[b]system > openssl_encrypt[/b]
[b]system.openssl_encrypt[/b]
Use openssl encryption engine, default is false (uses mcrypt for AES encryption)
[b]system > max_tagged_forums[/b]
[b]system.max_tagged_forums[/b]
Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery.
[b]system > openssl_conf_file[/b]
[b]system.openssl_conf_file[/b]
Needed in some Windows installations to locate the openssl configuration file on the system.
[b]system > hide_help[/b]
[b]system.hide_help[/b]
Don't display help documentation link in nav bar
[b]system > expire_delivery_reports[/b]
[b]system.expire_delivery_reports[/b]
Expiration in days for delivery reports - default 10
[b]system.platform_name[/b] *
What to report as the platform name in webpages and statistics. (*) Must be set in .htconfig.php
[b]system.hide_version[/b] *
If true, do not report the software version on webpages and tools. (*) Must be set in .htconfig.php
[b]system.hidden_version_siteinfo[/b]
If true, do not report the software version on siteinfo pages (system.hide_version also hides the version on these pages, this setting *only* hides the version on siteinfo pages).
[b]system.email_notify_icon_url[/b]
URL of image (32x32) to display in email notifications (HTML bodies).
[b]Directory config[/b]
[b]Directory search defaults[/b]
[b]directory > safemode[/b]
[b]directory.safemode[/b]
0 or 1.
[b]directory > globaldir[/b]
[b]directory.globaldir[/b]
0 or 1. Default 0. If you visit the directory on a site you'll just see the members of that site by default. You have to go through an extra step to see the people in the rest of the network; and by doing so there's a clear delineation that these people *aren't* members of that site but of a larger network.
[b]directory > pubforums[/b]
[b]directory.pubforums[/b]
0 or 1. Public forums *should* be default 0.
[b]Directory server configuration (see [zrl=[baseurl]/help/directories]help/directories[/zrl])[/b]
[b]system > directory_server[/b]
[b]system > directory_primary[/b]
[b]system > directory_realm[/b]
[b]system > realm_token[/b]
[b]system > directory_mode[/b]
[b]system.directory_server[/b]
[b]system.directory_primary[/b]
[b]system.directory_realm[/b]
[b]system.realm_token[/b]
[b]system.directory_mode[/b]

View file

@ -11,11 +11,11 @@ The channel is a typical social networking profile. By default posts and publish
**Restricted**
By default all posts and published items are sent to your 'Friends' collection and not made public. New friends are added to this collection. You can over-ride this and create a public post or published item if you desire. You are listed in the directory. Your online presence (for chat) and your connections (friends) are visible to your profile viewers.
By default all posts and published items are sent to your 'Friends' privacy group and not made public. New friends are added to this privacy group. You can over-ride this and create a public post or published item if you desire. You are listed in the directory. Your online presence (for chat) and your connections (friends) are visible to your profile viewers.
**Private**
By default all posts and published items are sent to your 'Friends' collection. New friends are added to this collection. You can over-ride this and create a public post or public item if you desire. You are NOT listed in the directory. Only your connections can see your other connections. Your online presence is hidden.
By default all posts and published items are sent to your 'Friends' privacy group. New friends are added to this privacy group. You can over-ride this and create a public post or public item if you desire. You are NOT listed in the directory. Only your connections can see your other connections. Your online presence is hidden.
##Forum
@ -27,11 +27,11 @@ The channel is a typical forum. By default posts and published items are public.
**Restricted**
By default all posts and published items are sent to the channel's 'Friends' collection. New friends are added to this collection. Members may post by @mention+ or wall-to-wall post, but posts and replies may also be seen by other receipients of the top-level post who are not members. The channel is visible in the directory. Members must be manually added by the forum owner.
By default all posts and published items are sent to the channel's 'Friends' privacy group. New friends are added to this privacy group. Members may post by @mention+ or wall-to-wall post, but posts and replies may also be seen by other receipients of the top-level post who are not members. The channel is visible in the directory. Members must be manually added by the forum owner.
**Private**
By default all posts and published items are sent to your 'Friends' collection. New friends are added to this collection. The owner can over-ride this and create a public post or public item if desired. Members cannot. You are NOT listed in the directory. Only your connections can see your other connections. Your online presence is hidden. Members must be manually added by the forum owner. Posting by @mention+ is disabled. Posts can only be made via wall-to-wall posts, and sent to members of the 'Friends' collection. They are not publicly visible.
By default all posts and published items are sent to your 'Friends' privacy group. New friends are added to this privacy group. The owner can over-ride this and create a public post or public item if desired. Members cannot. You are NOT listed in the directory. Only your connections can see your other connections. Your online presence is hidden. Members must be manually added by the forum owner. Posting by @mention+ is disabled. Posts can only be made via wall-to-wall posts, and sent to members of the 'Friends' privacy group. They are not publicly visible.
##Feed
@ -44,7 +44,7 @@ Similiar to Social - Mostly Public, but tailored for RSS feed sources. Items may
**Restricted**
Not listed in directory. Online presence is meaningless, therefore hidden. Feed is published only to members of the 'Friends' collection. New connections are automatically added to this collections. Members must be manually approved by the channel owner.
Not listed in directory. Online presence is meaningless, therefore hidden. Feed is published only to members of the 'Friends' privacy group. New connections are automatically added to this privacy group. Members must be manually approved by the channel owner.
##Special

View file

@ -31,9 +31,9 @@ Some connections in the mention auto-complete box behave differently than others
[b]Private Mentions[/b]
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or collections from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector.
If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector.
You may also tag public collections. When you create or edit a collection, there is a checkbox to allow the group members to be seen by others. If this box is checked for a collection and you tag (for instance) @!Friends - the post will be restricted to the Friends collection. Check that the collection is public before doing this - as there is no way to take back a post except to delete it. The collection name will appear in the post and will alert members of that collection that they are members of it.
You may also tag privacy groups which are "public". When you create or edit a privacy group, there is a checkbox to allow the group members to be seen by others. If this box is checked for a group and you tag (for instance) @!Friends - the post will be restricted to the Friends group. Check that the group is public before doing this - as there is no way to take back a post except to delete it. The group name will appear in the post and will alert members of that group that they are members of it.
[b]Mentions and Comments[/b]

View file

@ -8,7 +8,6 @@ We need much more than this, but here are areas where developers can help. Pleas
[li]SAML 2.0 and OpenID Connect provider functionality[/li]
[li]Create bug tracker module[/li]
[li]Filing posts - provide a dropdown menu integrated with the 'post actions menu'[/li]
[li]integrate Mozilla Persona (possibly via plugin) https://github.com/mozilla/id-specs/blob/prod/browserid/index.md and become an idP[/li]
[li]translation plugins - moses or apertium[/li]
[li]plugins - provide 'disable' which is softer than 'uninstall' for those plugins which create additional DB tables[/li]
[li]Infinite scroll improvements (i.e. embedded page links) see http://scrollsample.appspot.com/items [/li]
@ -20,7 +19,6 @@ We need much more than this, but here are areas where developers can help. Pleas
[li]Support comments on webpages[/li]
[li]implement oembed provider interface[/li]
[li]refactor the oembed client interface so that we can safely sandbox remote content[/li]
[li]Many modern social apps now have both a profile photo and a "cover photo". Add support for this. [/li]
[li]Write more webpage layouts[/li]
[li]Write more webpage widgets[/li]
[li]restricted access OAuth clients[/li]
@ -40,7 +38,6 @@ We need much more than this, but here are areas where developers can help. Pleas
[li]App taxonomy[/li]
[li]Customisable App collection pages[/li]
[li]replace the tinymce visual editor and/or make the visual editor pluggable and responsive to different output formats. We probably want library/bbedit for bbcode. This needs a fair bit of work to catch up with our &quot;enhanced bbcode&quot;, but start with images, links, bold and highlight and work from there.[/li]
[li]Photos module - turn photos into normal conversations and fix tagging[/li]
[li]Create mobile clients for the top platforms - which involves extending the API so that we can do stuff far beyond the current crop of Twitter/Statusnet clients. Ditto for mobile themes. We can probably use something like the Friendica Android app as a base to start from.[/li]
[li](in progress Habeas Codice) Implement owned and exchangeable &quot;things&quot;.[/li]
[li]Family Account creation - using service classes (an account holder can create a certain number of sub-accounts which are all tied to their subscription - if the subscription lapses they all go away).[/li]

View file

@ -331,6 +331,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
dbesc(datetime_convert()),
intval($channel_id)
);
// if this was the default channel, set another one as default
if($a->account['account_default_channel'] == $channel_id) {
$r = q("select channel_id from channel where channel_account_id = %d and channel_removed = 0 limit 1",
@ -344,12 +345,11 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
}
else {
$rr = q("update account set account_default_channel = 0 where account_id = %d",
intval($r[0]['channel_id']),
intval($a->account['account_id']));
intval($a->account['account_id'])
);
}
}
logger('deleting hublocs',LOGGER_DEBUG);
$r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s' and hubloc_url = '%s' ",

View file

@ -264,7 +264,7 @@ class Item extends BaseObject {
if($keep_reports === 0)
$keep_reports = 30;
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
if((! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
$dreport = t('Delivery Report');
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)

View file

@ -11,6 +11,7 @@ require_once('include/text.php');
require_once('include/language.php');
require_once('include/datetime.php');
require_once('include/crypto.php');
require_once('include/identity.php');
function check_account_email($email) {
@ -329,7 +330,7 @@ function send_reg_approval_email($arr) {
return($delivered ? true : false);
}
function send_verification_email($email,$password) {
function send_register_success_email($email,$password) {
$email_msg = replace_macros(get_intltext_template('register_open_eml.tpl'), array(
'$sitename' => get_config('system','sitename'),
@ -353,7 +354,7 @@ function send_verification_email($email,$password) {
* @param string $hash
* @return array|boolean
*/
function user_allow($hash) {
function account_allow($hash) {
$ret = array('success' => false);
@ -406,6 +407,9 @@ function user_allow($hash) {
pop_lang();
if(get_config('system','auto_channel_create'))
auto_channel_create($register[0]['uid']);
if ($res) {
info( t('Account approved.') . EOL );
return true;
@ -414,7 +418,7 @@ function user_allow($hash) {
/**
* @brief Denies a user registration.
* @brief Denies an account registration.
*
* This does not have to go through user_remove() and save the nickname
* permanently against re-registration, as the person was not yet
@ -423,7 +427,8 @@ function user_allow($hash) {
* @param string $hash
* @return boolean
*/
function user_deny($hash) {
function account_deny($hash) {
$register = q("SELECT * FROM register WHERE hash = '%s' LIMIT 1",
dbesc($hash)
@ -452,11 +457,14 @@ function user_deny($hash) {
}
// called from regver to activate an account from the email verification link
function user_approve($hash) {
function account_approve($hash) {
$ret = array('success' => false);
// Note: when the password in the register table is 'verify', the uid actually contains the account_id
$register = q("SELECT * FROM `register` WHERE `hash` = '%s' and password = 'verify' LIMIT 1",
dbesc($hash)
);
@ -491,6 +499,10 @@ function user_approve($hash) {
intval($register[0]['uid'])
);
if(get_config('system','auto_channel_create'))
auto_channel_create($register[0]['uid']);
info( t('Account verified. Please login.') . EOL );
return true;

View file

@ -2106,10 +2106,10 @@ require_once('include/api_auth.php');
'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl,
'shorturllength' => '30',
'hubzilla' => array(
'PLATFORM_NAME' => PLATFORM_NAME,
'RED_VERSION' => RED_VERSION,
'PLATFORM_NAME' => get_platform_name(),
'RED_VERSION' => get_project_version(),
'ZOT_REVISION' => ZOT_REVISION,
'DB_UPDATE_VERSION' => DB_UPDATE_VERSION
'DB_UPDATE_VERSION' => get_update_version()
)
));
@ -2142,12 +2142,12 @@ require_once('include/api_auth.php');
if($type === 'xml') {
header("Content-type: application/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . '<version>' . RED_VERSION . '</version>' . "\r\n";
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . '<version>' . get_project_version() . '</version>' . "\r\n";
killme();
}
elseif($type === 'json') {
header("Content-type: application/json");
echo '"' . RED_VERSION . '"';
echo '"' . get_project_version() . '"';
killme();
}
}

View file

@ -275,6 +275,7 @@ function comanche_widget($name, $text) {
$vars = array();
$matches = array();
$cnt = preg_match_all("/\[var=(.*?)\](.*?)\[\/var\]/ism", $text, $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $mtch) {

View file

@ -531,3 +531,22 @@ function del_xconfig($xchan, $family, $key) {
);
return $ret;
}
// account configuration storage is built on top of the under-utilised xconfig
function load_aconfig($account_id) {
load_xconfig('a_' . $account_id);
}
function get_aconfig($account_id, $family, $key) {
return get_xconfig('a_' . $account_id, $family, $key);
}
function set_aconfig($account_id, $family, $key, $value) {
return set_xconfig('a_' . $account_id, $family, $key, $value);
}
function del_aconfig($account_id, $family, $key) {
return del_xconfig('a_' . $account_id, $family, $key);
}

View file

@ -79,7 +79,7 @@ function network_to_name($s) {
NETWORK_MAIL => t('Email'),
NETWORK_DIASPORA => t('Diaspora'),
NETWORK_FACEBOOK => t('Facebook'),
NETWORK_ZOT => t('Zot!'),
NETWORK_ZOT => t('Zot'),
NETWORK_LINKEDIN => t('LinkedIn'),
NETWORK_XMPP => t('XMPP/IM'),
NETWORK_MYSPACE => t('MySpace'),

View file

@ -942,25 +942,35 @@ function item_photo_menu($item){
$clean_url = normalise_link($item['author-link']);
}
$menu = Array(
$poco_rating = get_config('system','poco_rating_enable');
// if unset default to enabled
if($poco_rating === false)
$poco_rating = true;
$ratings_url = (($poco_rating) ? z_root() . '/ratings/' . urlencode($item['author_xchan']) : '');
$post_menu = Array(
t("View Source") => $vsrc_link,
t("Follow Thread") => $sub_link,
t("Unfollow Thread") => $unsub_link,
t("View Status") => $status_link,
);
$author_menu = array(
t("View Profile") => $profile_link,
t("View Photos") => $photos_link,
t("Activity/Posts") => $posts_link,
t("Connect") => $follow_url,
t("Edit Connection") => $contact_url,
t("Send PM") => $pm_url,
t("Message") => $pm_url,
t('Ratings') => $ratings_url,
t("Poke") => $poke_link
);
$args = array('item' => $item, 'menu' => $menu);
$args = array('item' => $item, 'post_menu' => $post_menu, 'author_menu' => $author_menu);
call_hooks('item_photo_menu', $args);
$menu = $args['menu'];
$menu = array_merge($args['post_menu'],$args['author_menu']);
$o = "";
foreach($menu as $k=>$v){

View file

@ -273,14 +273,14 @@ function notification($params) {
$preamble = sprintf( t('%1$s, you\'ve received an new connection request from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a new connection request[/zrl] from %3$s.'),
$recip['channel_name'],
$itemlink,
$siteurl . '/connections/ifpending',
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]');
$body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']);
$sitelink = t('Please visit %s to approve or reject the connection request.');
$tsitelink = sprintf( $sitelink, $siteurl );
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
$itemlink = $params['link'];
$tsitelink = sprintf( $sitelink, $siteurl . '/connections/ifpending');
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '/connections/ifpending">' . $sitename . '</a>');
$itemlink = $params['link'];
}
if ($params['type'] == NOTIFY_SUGGEST) {
@ -529,6 +529,7 @@ function notification($params) {
$tpl = get_markup_template('email_notify_html.tpl');
$email_html_body = replace_macros($tpl,array(
'$banner' => $datarray['banner'],
'$notify_icon' => get_notify_icon(),
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],
'$sitename' => $datarray['sitename'],

View file

@ -67,7 +67,7 @@ function ical_wrapper($ev) {
$o .= "BEGIN:VCALENDAR";
$o .= "\r\nVERSION:2.0";
$o .= "\r\nMETHOD:PUBLISH";
$o .= "\r\nPRODID:-//" . get_config('system','sitename') . "//" . PLATFORM_NAME . "//" . strtoupper(get_app()->language). "\r\n";
$o .= "\r\nPRODID:-//" . get_config('system','sitename') . "//" . get_platform_name() . "//" . strtoupper(get_app()->language). "\r\n";
if(array_key_exists('start', $ev))
$o .= format_event_ical($ev);
else {

View file

@ -49,7 +49,8 @@ function get_features($filtered = true) {
array('advanced_profiles', t('Advanced Profiles'), t('Additional profile sections and selections'),false,get_config('feature_lock','advanced_profiles')),
array('profile_export', t('Profile Import/Export'), t('Save and load profile details across sites/channels'),false,get_config('feature_lock','profile_export')),
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel'),false,get_config('feature_lock','webpages')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders'),false,get_config('feature_lock','private_notes')),
array('hide_rating', t('Hide Rating'), t('Hide the rating buttons on your channel and profile pages. Note: People can still rate you somewhere else.'),false,get_config('feature_lock','hide_rating')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders (note: not encrypted)'),false,get_config('feature_lock','private_notes')),
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu'),false,get_config('feature_lock','nav_channel_select')),
array('photo_location', t('Photo Location'), t('If location data is available on uploaded photos, link this to a map.'),false,get_config('feature_lock','photo_location')),
@ -75,7 +76,7 @@ function get_features($filtered = true) {
'net_module' => array(
t('Network and Stream Filtering'),
array('archives', t('Search by Date'), t('Ability to select posts by date ranges'),false,get_config('feature_lock','archives')),
array('groups', t('Collections Filter'), t('Enable widget to display Network posts only from selected collections'),false,get_config('feature_lock','groups')),
array('groups', t('Privacy Groups'), t('Enable management and selection of privacy groups'),true,get_config('feature_lock','groups')),
array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'),false,get_config('feature_lock','savedsearch')),
array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'),false,get_config('feature_lock','personal_tab')),
array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity'),false,get_config('feature_lock','new_tab')),

View file

@ -229,7 +229,7 @@ function mini_group_select($uid,$group = '') {
logger('mini_group_select: ' . print_r($grps,true), LOGGER_DATA);
$o = replace_macros(get_markup_template('group_selection.tpl'), array(
'$label' => t('Add new connections to this collection (privacy group)'),
'$label' => t('Add new connections to this privacy group'),
'$groups' => $grps
));
return $o;
@ -292,10 +292,10 @@ function group_side($every="connections",$each="group",$edit = false, $group_id
$tpl = get_markup_template("group_side.tpl");
$o = replace_macros($tpl, array(
'$title' => t('Collections'),
'$edittext' => t('Edit collection'),
'$createtext' => t('Add new collection'),
'$ungrouped' => (($every === 'contacts') ? t('Channels not in any collection') : ''),
'$title' => t('Privacy Groups'),
'$edittext' => t('Edit group'),
'$createtext' => t('Add privacy group'),
'$ungrouped' => (($every === 'contacts') ? t('Channels not in any privacy group') : ''),
'$groups' => $groups,
'$add' => t('add'),
));

View file

@ -482,6 +482,8 @@ function identity_basic_export($channel_id, $items = false) {
$ret = array();
// use constants here as otherwise we will have no idea if we can import from a site
// with a non-standard platform and version.
$ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION);
$r = q("select * from channel where channel_id = %d limit 1",
@ -922,6 +924,13 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
$pdesc = true;
$reddress = true;
if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) {
$block = true;
}
if($block && intval(get_config('system','block_public_blackout')))
return $o;
if((! is_array($profile)) && (! count($profile)))
return $o;
@ -933,6 +942,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
$show_connect = false;
$profile['picdate'] = urlencode($profile['picdate']);
call_hooks('profile_sidebar_enter', $profile);
@ -1006,9 +1016,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
// logger('online: ' . $profile['online']);
if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) {
$block = true;
}
if(($profile['hidewall'] && (! local_channel()) && (! remote_channel())) || $block ) {
$location = $reddress = $pdesc = $gender = $marital = $homepage = False;
@ -1049,8 +1056,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
$tpl = get_markup_template('profile_vcard.tpl');
require_once('include/widgets.php');
$z = widget_rating(array('target' => $profile['channel_hash']));
if(! feature_enabled($profile['uid'],'hide_rating'))
$z = widget_rating(array('target' => $profile['channel_hash']));
$o .= replace_macros($tpl, array(
'$profile' => $profile,
'$connect' => $connect,
@ -1695,3 +1704,80 @@ function profiles_build_sync($channel_id) {
build_sync_packet($channel_id,array('profile' => $r));
}
}
function auto_channel_create($account_id) {
if(! $account_id)
return false;
$arr = array();
$arr['account_id'] = $account_id;
$arr['name'] = get_aconfig($account_id,'register','channel_name');
$arr['nickname'] = legal_webbie(get_aconfig($account_id,'register','channel_address'));
$arr['permissions_role'] = get_aconfig($account_id,'register','permissions_role');
del_aconfig($account_id,'register','channel_name');
del_aconfig($account_id,'register','channel_address');
del_aconfig($account_id,'register','permissions_role');
if((! $arr['name']) || (! $arr['nickname'])) {
$x = q("select * from account where account_id = %d limit 1",
intval($account_id)
);
if($x) {
if(! $arr['name'])
$arr['name'] = substr($x[0]['account_email'],0,strpos($x[0]['account_email'],'@'));
if(! $arr['nickname'])
$arr['nickname'] = legal_webbie(substr($x[0]['account_email'],0,strpos($x[0]['account_email'],'@')));
}
}
if(! $arr['permissions_role'])
$arr['permissions_role'] = 'social';
if(validate_channelname($arr['name']))
return false;
if($arr['nickname'] === 'sys')
$arr['nickname'] = $arr['nickname'] . mt_rand(1000,9999);
$arr['nickname'] = check_webbie(array($arr['nickname'], $arr['nickname'] . mt_rand(1000,9999)));
return create_identity($arr);
}
function get_cover_photo($channel_id,$format = 'bbcode', $res = PHOTO_RES_COVER_1200) {
$r = q("select height, width, resource_id, type from photo where uid = %d and scale = %d and photo_usage = %d",
intval($channel_id),
intval($res),
intval(PHOTO_COVER)
);
if(! $r)
return false;
$output = false;
$url = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $res ;
switch($format) {
case 'bbcode':
$output = '[zrl=' . $r[0]['width'] . 'x' . $r[0]['height'] . ']' . $url . '[/zrl]';
break;
case 'html':
$output = '<img class="zrl" width="' . $r[0]['width'] . '" height="' . $r[0]['height'] . '" src="' . $url . '" alt="' . t('cover photo') . '" />';
break;
case 'array':
default:
$output = array(
'width' => $r[0]['width'],
'height' => $r[0]['type'],
'type' => $r[0]['type'],
'url' => $url
);
break;
}
return $output;
}

View file

@ -2,7 +2,7 @@
require_once('include/menu.php');
function import_channel($channel, $account_id) {
function import_channel($channel, $account_id, $seize) {
if(! array_key_exists('channel_system',$channel)) {
$channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
@ -496,6 +496,8 @@ function import_items($channel,$items) {
}
}
$deliver = false; // Don't deliver any messages or notifications when importing
foreach($items as $i) {
$item = get_item_elements($i,$allow_code);
if(! $item)
@ -509,16 +511,15 @@ function import_items($channel,$items) {
if($item['edited'] > $r[0]['edited']) {
$item['id'] = $r[0]['id'];
$item['uid'] = $channel['channel_id'];
item_store_update($item);
item_store_update($item,$allow_code,$deliver);
continue;
}
}
else {
$item['aid'] = $channel['channel_account_id'];
$item['uid'] = $channel['channel_id'];
$item_result = item_store($item);
$item_result = item_store($item,$allow_code,$deliver);
}
}
}
}

View file

@ -159,7 +159,7 @@ function filter_insecure($channel_id, $arr) {
$ret = array();
if((! intval(get_pconfig($channel_id, 'system', 'filter_insecure_collections'))) || (! $arr))
if((! intval(get_pconfig($channel_id, 'system', 'filter_insecure_privacy_groups'))) || (! $arr))
return $arr;
$str = '';
@ -604,8 +604,8 @@ function get_feed_for($channel, $observer_hash, $params) {
$atom = '';
$atom .= replace_macros($feed_template, array(
'$version' => xmlify(RED_VERSION),
'$red' => xmlify(PLATFORM_NAME),
'$version' => xmlify(get_project_version()),
'$red' => xmlify(get_platform_name()),
'$feed_id' => xmlify($channel['xchan_url']),
'$feed_title' => xmlify($channel['channel_name']),
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) ,
@ -2160,7 +2160,7 @@ function encode_rel_links($links) {
* * \e boolean \b success
* * \e int \b item_id
*/
function item_store($arr, $allow_exec = false) {
function item_store($arr, $allow_exec = false, $deliver = true) {
$d = array('item' => $arr, 'allow_exec' => $allow_exec);
call_hooks('item_store', $d );
@ -2537,7 +2537,7 @@ function item_store($arr, $allow_exec = false) {
// so that we have an item in the DB that's marked deleted and won't store a fresh post
// that isn't aware that we were already told to delete it.
if(! intval($arr['item_deleted'])) {
if(($deliver) && (! intval($arr['item_deleted']))) {
send_status_notifications($current_post,$arr);
tag_deliver($arr['uid'],$current_post);
}
@ -2550,7 +2550,7 @@ function item_store($arr, $allow_exec = false) {
function item_store_update($arr,$allow_exec = false) {
function item_store_update($arr,$allow_exec = false, $deliver = true) {
$d = array('item' => $arr, 'allow_exec' => $allow_exec);
call_hooks('item_store_update', $d );
@ -2780,9 +2780,11 @@ function item_store_update($arr,$allow_exec = false) {
call_hooks('post_remote_update_end',$arr);
send_status_notifications($orig_post_id,$arr);
if($deliver) {
send_status_notifications($orig_post_id,$arr);
tag_deliver($uid,$orig_post_id);
}
tag_deliver($uid,$orig_post_id);
$ret['success'] = true;
$ret['item_id'] = $orig_post_id;
@ -3685,6 +3687,16 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
return;
}
$sys_expire = intval(get_config('system','default_expire_days'));
$chn_expire = intval($importer['channel_expire_days']);
$expire_days = $sys_expire;
if(($chn_expire != 0) && ($chn_expire < $sys_expire))
$expire_days = $chn_expire;
logger('expire_days: ' . $expire_days);
$feed = new SimplePie();
$feed->set_raw_data($xml);
$feed->init();
@ -3788,6 +3800,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
intval($importer['channel_id'])
);
// Update content if 'updated' changes
if($r) {
@ -3846,6 +3859,17 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
$datarray['owner_xchan'] = $contact['xchan_hash'];
if(array_key_exists('created',$datarray) && $datarray['created'] != NULL_DATE && $expire_days) {
$t1 = $datarray['created'];
$t2 = datetime_convert('UTC','UTC','now - ' . $expire_days . 'days');
if($t1 < $t2) {
logger('feed content older than expiration. Ignoring.', LOGGER_DEBUG, LOG_INFO);
continue;
}
}
$r = q("SELECT edited FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
dbesc($item_id),
intval($importer['channel_id'])
@ -4835,7 +4859,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
intval($uid)
);
if(! $r) {
$result['message'] = t('Collection not found.');
$result['message'] = t('Privacy group not found.');
return $result;
}
@ -4851,14 +4875,14 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
}
} else {
$contact_str = ' 0 ';
$result['message'] = t('Collection is empty.');
$result['message'] = t('Privacy group is empty.');
return $result;
}
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND (( author_xchan IN ( $contact_str ) OR owner_xchan in ( $contact_str)) or allow_gid like '" . protect_sprintf('%<' . dbesc($r[0]['hash']) . '>%') . "' ) and id = parent $item_normal ) ";
$x = group_rec_byhash($uid,$r[0]['hash']);
$result['headline'] = sprintf( t('Collection: %s'),$x['name']);
$result['headline'] = sprintf( t('Privacy group: %s'),$x['name']);
}
elseif($arr['cid'] && $uid) {

View file

@ -182,7 +182,7 @@ function t($s, $ctx = '') {
function translate_projectname($s) {
return str_replace(array('$projectname','$Projectname'),array(PLATFORM_NAME,ucfirst(PLATFORM_NAME)),$s);
return str_replace(array('$projectname','$Projectname'),array(get_platform_name(),ucfirst(get_platform_name())),$s);
}

View file

@ -11,6 +11,7 @@ require_once('include/attach.php');
function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='',$expires = ''){
$ret = array('success' => false);
$is_reply = false;
$a = get_app();
$observer_hash = get_observer_hash();
@ -51,6 +52,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$conv_guid = '';
if(strlen($replyto)) {
$is_reply = true;
$r = q("select conv_guid from mail where channel_id = %d and ( mid = '%s' or parent_mid = '%s' ) limit 1",
intval(local_channel()),
dbesc($replyto),
@ -187,8 +189,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires )
VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
$r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires, mail_isreply )
VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )",
intval($channel['channel_account_id']),
dbesc($conv_guid),
intval(1),
@ -201,7 +203,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
dbesc($mid),
dbesc($replyto),
dbesc(datetime_convert()),
dbescdate($expires)
dbescdate($expires),
intval($is_reply)
);
// verify the save

View file

@ -1144,6 +1144,10 @@ function discover_by_webbie($webbie) {
dbesc($addr)
);
// fix relative urls
if($vcard['photo'] && (strpos($vcard['photo'],'http') !== 0))
$vcard['photo'] = $diaspora_base . '/' . $vcard['photo'];
/**
*
* Diaspora communications are notoriously unreliable and receiving profile update messages (indeed any messages)
@ -1615,18 +1619,19 @@ function format_and_send_email($sender,$xchan,$item) {
// load the template for private message notifications
$tpl = get_markup_template('email_notify_html.tpl');
$email_html_body = replace_macros($tpl,array(
'$banner' => $banner,
'$product' => $product,
'$preamble' => '',
'$sitename' => $sitename,
'$siteurl' => $siteurl,
'$banner' => $banner,
'$notify_icon' => get_notify_icon(),
'$product' => $product,
'$preamble' => '',
'$sitename' => $sitename,
'$siteurl' => $siteurl,
'$source_name' => $sender['xchan_name'],
'$source_link' => $sender['xchan_url'],
'$source_photo' => $sender['xchan_photo_m'],
'$username' => $xchan['xchan_name'],
'$username' => $xchan['xchan_name'],
'$hsitelink' => $datarray['hsitelink'],
'$hitemlink' => $datarray['hitemlink'],
'$thanks' => $thanks,
'$thanks' => $thanks,
'$site_admin' => $site_admin,
'$title' => $title,
'$htmlversion' => $htmlversion,
@ -1635,20 +1640,20 @@ function format_and_send_email($sender,$xchan,$item) {
// load the template for private message notifications
$tpl = get_markup_template('email_notify_text.tpl');
$email_text_body = replace_macros($tpl, array(
'$banner' => $banner,
'$product' => $product,
'$preamble' => '',
'$sitename' => $sitename,
'$siteurl' => $siteurl,
'$banner' => $banner,
'$product' => $product,
'$preamble' => '',
'$sitename' => $sitename,
'$siteurl' => $siteurl,
'$source_name' => $sender['xchan_name'],
'$source_link' => $sender['xchan_url'],
'$source_photo' => $sender['xchan_photo_m'],
'$username' => $xchan['xchan_name'],
'$hsitelink' => $datarray['hsitelink'],
'$hitemlink' => $datarray['hitemlink'],
'$thanks' => $thanks,
'$username' => $xchan['xchan_name'],
'$hsitelink' => $datarray['hsitelink'],
'$hitemlink' => $datarray['hitemlink'],
'$thanks' => $thanks,
'$site_admin' => $site_admin,
'$title' => $title,
'$title' => $title,
'$textversion' => $textversion
));
@ -1662,13 +1667,13 @@ function format_and_send_email($sender,$xchan,$item) {
// use the EmailNotification library to send the message
enotify::send(array(
'fromName' => $product,
'fromEmail' => $sender_email,
'replyTo' => $sender_email,
'toEmail' => str_replace('mailto:','',$xchan['xchan_addr']),
'messageSubject' => (($title) ? $title : t('No Subject')),
'htmlVersion' => $email_html_body,
'textVersion' => $email_text_body,
'fromName' => $product,
'fromEmail' => $sender_email,
'replyTo' => $sender_email,
'toEmail' => str_replace('mailto:','',$xchan['xchan_addr']),
'messageSubject' => (($title) ? $title : t('No Subject')),
'htmlVersion' => $email_html_body,
'textVersion' => $email_text_body,
'additionalMailHeader' => '',
));
@ -1763,16 +1768,13 @@ function get_site_info() {
$site_info = get_config('system','info');
$site_name = get_config('system','sitename');
if(! get_config('system','hidden_version_siteinfo')) {
$version = RED_VERSION;
$version = get_project_version();
$tag = get_std_version();
if(@is_dir('.git') && function_exists('shell_exec')) {
$commit = trim( @shell_exec('git log -1 --format="%h"'));
// if(! get_config('system','hidden_tag_siteinfo'))
// $tag = trim( @shell_exec('git describe --tags --abbrev=0'));
// else
// $tag = '';
}
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
}
@ -1788,6 +1790,17 @@ function get_site_info() {
$hide_in_statistics = intval(get_config('system','hide_in_statistics'));
$site_expire = intval(get_config('system', 'default_expire_days'));
load_config('feature_lock');
$locked_features = array();
if(is_array($a->config['feature_lock']) && count($a->config['feature_lock'])) {
foreach($a->config['feature_lock'] as $k => $v) {
if($k === 'config_loaded')
continue;
$locked_features[$k] = intval($v);
}
}
$data = Array(
'version' => $version,
@ -1799,12 +1812,13 @@ function get_site_info() {
'invitation_only' => intval(get_config('system','invitation_only')),
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
'language' => get_config('system','language'),
'rss_connections' => get_config('system','feed_contacts'),
'rss_connections' => intval(get_config('system','feed_contacts')),
'expiration' => $site_expire,
'default_service_restrictions' => $service_class,
'locked_features' => $locked_features,
'admin' => $admin,
'site_name' => (($site_name) ? $site_name : ''),
'platform' => PLATFORM_NAME,
'platform' => get_platform_name(),
'dbdriver' => $db->getdriver(),
'lastpoll' => get_config('system','lastpoll'),
'info' => (($site_info) ? $site_info : ''),

View file

@ -578,7 +578,7 @@ function notifier_run($argv, $argc){
));
// only create delivery reports for normal undeleted items
if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted'])) {
if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted']) && (! get_config('system','disable_dreport'))) {
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan, dreport_queue ) values ( '%s','%s','%s','%s','%s','%s','%s' ) ",
dbesc($target_item['mid']),
dbesc($hub['hubloc_host']),

Some files were not shown because too many files have changed in this diff Show more