Merge remote-tracking branch 'upstream/master'
1
boot.php
@ -2009,7 +2009,6 @@ function load_pdl(&$a) {
|
|||||||
|
|
||||||
if((! $s) && (($p = theme_include($n)) != ''))
|
if((! $s) && (($p = theme_include($n)) != ''))
|
||||||
$s = @file_get_contents($p);
|
$s = @file_get_contents($p);
|
||||||
|
|
||||||
if($s) {
|
if($s) {
|
||||||
comanche_parser($a, $s);
|
comanche_parser($a, $s);
|
||||||
$a->pdl = $s;
|
$a->pdl = $s;
|
||||||
|
@ -2,26 +2,30 @@
|
|||||||
|
|
||||||
Roadmap for $Projectname V3
|
Roadmap for $Projectname V3
|
||||||
|
|
||||||
|
*HZ = Hubzilla repository
|
||||||
|
|
||||||
|
|
||||||
Crypto
|
Crypto
|
||||||
Convert E2EE to dynamic loading (on demand) using jQuery.getScript() [or other methods] to only load encryption libs when you require them. This should also support multiple encryption libraries (e.g. SJCL, others) triggered from the choice of algorithm and remain pluggable.
|
Convert E2EE to dynamic loading (on demand) using jQuery.getScript() [or other methods] to only load encryption libs when you require them. This should also support multiple encryption libraries (e.g. SJCL, others) triggered from the choice of algorithm and remain pluggable.
|
||||||
|
|
||||||
Diaspora
|
Diaspora
|
||||||
Convert core Diaspora federation code into a plugin. This presents a number of challenges since it touches and special cases a lot of core functionality.
|
Convert core Diaspora federation code into a plugin. This presents a number of challenges since it touches and special cases a lot of core functionality. (HZ - in progress)
|
||||||
|
|
||||||
Subscriptions and business models
|
Subscriptions and business models
|
||||||
Build enough into core(/addons) to generate income (or at least try and cover costs) out of the box
|
Build enough into core(/addons) to generate income (or at least try and cover costs) out of the box (in progress Habeas Codice)
|
||||||
|
|
||||||
Merge all uploads into common DAV interface
|
Merge all uploads into common DAV interface
|
||||||
Separate photo albums from photos and turn them into file directories.
|
Separate photo albums from photos and turn them into file directories. (HZ - done)
|
||||||
Upload everything direct to /store
|
Upload everything direct to /store (HZ - done)
|
||||||
If photo, generate thumbnails and image resources
|
If photo, generate thumbnails and image resources (HZ - done)
|
||||||
Provide default upload folders with %y (and other?) macros for both photos and other file resources
|
Provide default upload folders with %y (and other?) macros for both photos and other file resources (HZ - done)
|
||||||
Allow "media" (anything that we can generate a thumbnail for) in the Photos section (and show thumbnails in the Files section where possible)
|
Allow "media" (anything that we can generate a thumbnail for) in the Photos section (and show thumbnails in the Files section where possible) (HZ - done)
|
||||||
|
|
||||||
Resolve the "every photo has an item" confusion, perhaps every file should also - but only if we can explain it and separate them conceptually.
|
Resolve the "every photo has an item" confusion, perhaps every file should also - but only if we can explain it and separate them conceptually.
|
||||||
|
|
||||||
Migration tools
|
Migration tools
|
||||||
Friendica importer
|
Friendica importer
|
||||||
Diaspora importer
|
Diaspora importer (channel and connection import done, conversations and photos still in progress and waiting for support from Diaspora)
|
||||||
|
|
||||||
Webpage design UI improvements
|
Webpage design UI improvements
|
||||||
If practical, separate "conversation" sub-themes from overall themes so one can choose different conversation and content layouts within a base theme.
|
If practical, separate "conversation" sub-themes from overall themes so one can choose different conversation and content layouts within a base theme.
|
||||||
|
@ -10,8 +10,8 @@ We need much more than this, but here are areas where developers can help. Pleas
|
|||||||
[li]Infinite scroll improvements (i.e. embedded page links) see http://scrollsample.appspot.com/items
|
[li]Infinite scroll improvements (i.e. embedded page links) see http://scrollsample.appspot.com/items
|
||||||
[li]Finish the anti-spam bayesian engine[/li]
|
[li]Finish the anti-spam bayesian engine[/li]
|
||||||
[li]implement an email permission denied bounce message from the sys channel[/li]
|
[li]implement an email permission denied bounce message from the sys channel[/li]
|
||||||
[li]provide a way for xchans with a certain network type to upgrade (unknown to rss, rss to statusnet, friendica-over-diaspora to friendica, for instance) based on new knowledge and/or hubzilla ability[/li]
|
[li]provide a way for xchans with a certain network type to upgrade (unknown to rss, rss to statusnet, friendica-over-diaspora to friendica, for instance) based on new knowledge and/or redmatrix ability[/li]
|
||||||
[li]If DAV folders exist, add an option to the Settings page to set a default folder for attachment uploads.[/li]
|
[li](done - HZ) If DAV folders exist, add an option to the Settings page to set a default folder for attachment uploads.[/li]
|
||||||
[li]Integrate the "open site" list with the register page[/li]
|
[li]Integrate the "open site" list with the register page[/li]
|
||||||
[li]implement oembed provider interface[/li]
|
[li]implement oembed provider interface[/li]
|
||||||
[li]refactor the oembed client interface so that we can safely sandbox remote content[/li]
|
[li]refactor the oembed client interface so that we can safely sandbox remote content[/li]
|
||||||
@ -21,27 +21,27 @@ We need much more than this, but here are areas where developers can help. Pleas
|
|||||||
[li]restricted access OAuth clients[/li]
|
[li]restricted access OAuth clients[/li]
|
||||||
[li](Advanced) create a UI for building Comanche pages[/li]
|
[li](Advanced) create a UI for building Comanche pages[/li]
|
||||||
[li](less advanced) create a way to preview Comanche results on a preview page while editing on another page[/li]
|
[li](less advanced) create a way to preview Comanche results on a preview page while editing on another page[/li]
|
||||||
[li]Extend WebDAV to provide desktop access to photo albums[/li]
|
[li](done - HZ) Extend WebDAV to provide desktop access to photo albums[/li]
|
||||||
[li]External post connectors - create standard interface[/li]
|
[li]External post connectors - create standard interface[/li]
|
||||||
[li]External post connectors, add popular services[/li]
|
[li]External post connectors, add popular services[/li]
|
||||||
[li]service classes - provide a pluggable subscription payment gateway for premium accounts[/li]
|
[li](in progress Habeas Codice) service classes - provide a pluggable subscription payment gateway for premium accounts[/li]
|
||||||
[li]service classes - account overview page showing resources consumed by channel. With special consideration this page can also be accessed at a meta level by the site admin to drill down on problematic accounts/channels.[/li]
|
[li](in progress Habeas Codice) service classes - account overview page showing resources consumed by channel. With special consideration this page can also be accessed at a meta level by the site admin to drill down on problematic accounts/channels.[/li]
|
||||||
[li]Events module - fix permissions on events, and provide JS translation support for the calendar overview; integrate with calDAV[/li]
|
[li]Events module - fix permissions on events, and provide JS translation support for the calendar overview (done); integrate with calDAV[/li]
|
||||||
[li]Uploads - integrate #^[url=https://github.com/blueimp/jQuery-File-Upload]https://github.com/blueimp/jQuery-File-Upload[/url][/li]
|
[li]Uploads - integrate #^[url=https://github.com/blueimp/jQuery-File-Upload]https://github.com/blueimp/jQuery-File-Upload[/url][/li]
|
||||||
[li]Import/export - include events, things, etc.[/li]
|
[li]Import/export - include events, things, etc.[/li]
|
||||||
[li]API extensions, for Twitter API - search, friending, threading. For Red API, lots of stuff[/li]
|
[li]API extensions, for Twitter API - search, friending, threading. For Red API, lots of stuff[/li]
|
||||||
[li]OAuth permission extensions[/li]
|
[li]OAuth permission extensions[/li]
|
||||||
[li]Import channel from Diaspora/Friendica[/li]
|
[li]Import channel from Diaspora/Friendica (Diaspora partially done)[/li]
|
||||||
[li]MediaGoblin photo "crosspost" connector[/li]
|
[li]MediaGoblin photo "crosspost" connector[/li]
|
||||||
[li]Create management page/UI for extensible profile fields[/li]
|
[li]Create management page/UI for extensible profile fields[/li]
|
||||||
[li]Create interface to include/exclude and re-order standard profile fields[/li]
|
[li]Create interface to include/exclude and re-order standard profile fields[/li]
|
||||||
[li]Provide a mechanism to share page design elements in posts (just like apps)[/li]
|
[li]Provide a mechanism to share page design elements in posts (just like apps) (done)[/li]
|
||||||
[li]App taxonomy[/li]
|
[li]App taxonomy[/li]
|
||||||
[li]Customisable App collection pages[/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 "enhanced bbcode", but start with images, links, bold and highlight and work from there.[/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 "enhanced bbcode", 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]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]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]Implement owned and exchangeable "things".[/li]
|
[li](in progress Habeas Codice) Implement owned and exchangeable "things".[/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]
|
[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]
|
||||||
[li]Put mod_admin under Comanche[/li]
|
[li]Put mod_admin under Comanche[/li]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 910 B After Width: | Height: | Size: 910 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@ -331,6 +331,24 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
|
|||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
intval($channel_id)
|
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",
|
||||||
|
intval($a->account['account_id']),
|
||||||
|
intval(PAGE_REMOVED));
|
||||||
|
if ($r) {
|
||||||
|
$rr = q("update account set account_default_channel = %d where account_id = %d",
|
||||||
|
intval($r[0]['channel_id']),
|
||||||
|
intval($a->account['account_id']));
|
||||||
|
logger("Default channel deleted, changing default to channel_id " . $r[0]['channel_id']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$rr = q("update account set account_default_channel = 0 where account_id = %d",
|
||||||
|
intval($r[0]['channel_id']),
|
||||||
|
intval($a->account['account_id']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s' and hubloc_url = '%s' ",
|
$r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s' and hubloc_url = '%s' ",
|
||||||
dbesc($channel['channel_hash']),
|
dbesc($channel['channel_hash']),
|
||||||
|
@ -391,13 +391,18 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
$hash = (($arr && $arr['hash']) ? $arr['hash'] : null);
|
$hash = (($arr && $arr['hash']) ? $arr['hash'] : null);
|
||||||
$upload_path = (($arr && $arr['directory']) ? $arr['directory'] : '');
|
$upload_path = (($arr && $arr['directory']) ? $arr['directory'] : '');
|
||||||
|
|
||||||
// logger('arr: ' . print_r($arr,true));
|
logger('arr: ' . print_r($arr,true));
|
||||||
|
|
||||||
if(! perm_is_allowed($channel_id,get_observer_hash(), 'write_storage')) {
|
if(! perm_is_allowed($channel_id,get_observer_hash(), 'write_storage')) {
|
||||||
$ret['message'] = t('Permission denied.');
|
$ret['message'] = t('Permission denied.');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$str_group_allow = perms2str($arr['group_allow']);
|
||||||
|
$str_contact_allow = perms2str($arr['contact_allow']);
|
||||||
|
$str_group_deny = perms2str($arr['group_deny']);
|
||||||
|
$str_contact_deny = perms2str($arr['contact_deny']);
|
||||||
|
|
||||||
|
|
||||||
// The 'update' option sets db values without uploading a new attachment
|
// The 'update' option sets db values without uploading a new attachment
|
||||||
// 'replace' replaces the existing uploaded data
|
// 'replace' replaces the existing uploaded data
|
||||||
@ -473,14 +478,13 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$darr = array('pathname' => $pathname);
|
$darr = array('pathname' => $pathname);
|
||||||
if($arr && array_key_exists('allow_cid',$arr))
|
|
||||||
$darr['allow_cid'] = $arr['allow_cid'];
|
// if we need to create a directory, use the channel default permissions.
|
||||||
if($arr && array_key_exists('allow_gid',$arr))
|
|
||||||
$darr['allow_gid'] = $arr['allow_gid'];
|
$darr['allow_cid'] = $channel['allow_cid'];
|
||||||
if($arr && array_key_exists('deny_cid',$arr))
|
$darr['allow_gid'] = $channel['allow_gid'];
|
||||||
$darr['deny_cid'] = $arr['deny_cid'];
|
$darr['deny_cid'] = $channel['deny_cid'];
|
||||||
if($arr && array_key_exists('deny_gid',$arr))
|
$darr['deny_gid'] = $channel['deny_gid'];
|
||||||
$darr['deny_gid'] = $arr['deny_gid'];
|
|
||||||
|
|
||||||
|
|
||||||
if($pathname) {
|
if($pathname) {
|
||||||
@ -652,9 +656,9 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
dbesc($created),
|
dbesc($created),
|
||||||
dbesc($created),
|
dbesc($created),
|
||||||
dbesc(($arr && array_key_exists('allow_cid',$arr)) ? $arr['allow_cid'] : $str_contact_allow),
|
dbesc(($arr && array_key_exists('allow_cid',$arr)) ? $arr['allow_cid'] : $str_contact_allow),
|
||||||
dbesc(($arr && array_key_exists('allow_gid',$arr)) ? $arr['allow_gid'] : ''),
|
dbesc(($arr && array_key_exists('allow_gid',$arr)) ? $arr['allow_gid'] : $str_group_allow),
|
||||||
dbesc(($arr && array_key_exists('deny_cid',$arr)) ? $arr['deny_cid'] : ''),
|
dbesc(($arr && array_key_exists('deny_cid',$arr)) ? $arr['deny_cid'] : $str_contact_deny),
|
||||||
dbesc(($arr && array_key_exists('deny_gid',$arr)) ? $arr['deny_gid'] : '')
|
dbesc(($arr && array_key_exists('deny_gid',$arr)) ? $arr['deny_gid'] : $str_group_deny)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,6 +666,12 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
$args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis);
|
$args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis);
|
||||||
if($arr['contact_allow'])
|
if($arr['contact_allow'])
|
||||||
$args['contact_allow'] = $arr['contact_allow'];
|
$args['contact_allow'] = $arr['contact_allow'];
|
||||||
|
if($arr['group_allow'])
|
||||||
|
$args['group_allow'] = $arr['group_allow'];
|
||||||
|
if($arr['contact_deny'])
|
||||||
|
$args['contact_deny'] = $arr['contact_deny'];
|
||||||
|
if($arr['group_deny'])
|
||||||
|
$args['group_deny'] = $arr['group_deny'];
|
||||||
$p = photo_upload($channel,get_app()->get_observer(),$args);
|
$p = photo_upload($channel,get_app()->get_observer(),$args);
|
||||||
if($p['success']) {
|
if($p['success']) {
|
||||||
$ret['body'] = $p['body'];
|
$ret['body'] = $p['body'];
|
||||||
|
@ -174,10 +174,14 @@ function bb_parse_app($match) {
|
|||||||
function bb_parse_element($match) {
|
function bb_parse_element($match) {
|
||||||
$j = json_decode(base64url_decode($match[1]),true);
|
$j = json_decode(base64url_decode($match[1]),true);
|
||||||
|
|
||||||
if ($j) {
|
if ($j && local_channel()) {
|
||||||
$text = sprintf( t('Install %s element: '), translate_design_element($j['type'])) . $j['pagetitle'];
|
$text = sprintf( t('Install %s element: '), translate_design_element($j['type'])) . $j['pagetitle'];
|
||||||
$o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</a>' . EOL;
|
$o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</a>' . EOL;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$text = sprintf( t('This post contains an installable %s element, however you lack permissions to install it on this site.' ), translate_design_element($j['type'])) . $j['pagetitle'];
|
||||||
|
$o = EOL . $text . EOL;
|
||||||
|
}
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,11 @@ function comanche_widget($name, $text) {
|
|||||||
|
|
||||||
if(file_exists('widget/' . trim($name) . '.php'))
|
if(file_exists('widget/' . trim($name) . '.php'))
|
||||||
require_once('widget/' . trim($name) . '.php');
|
require_once('widget/' . trim($name) . '.php');
|
||||||
|
else {
|
||||||
|
$theme_widget = 'widget_' . trim($name) . '.php';
|
||||||
|
if(theme_include($theme_widget))
|
||||||
|
require_once(theme_include($theme_widget));
|
||||||
|
}
|
||||||
|
|
||||||
$func = 'widget_' . trim($name);
|
$func = 'widget_' . trim($name);
|
||||||
if (function_exists($func))
|
if (function_exists($func))
|
||||||
|
@ -5,7 +5,7 @@ function contact_profile_assign($current) {
|
|||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" />\r\n";
|
$o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" class=\"form-control\"/>\r\n";
|
||||||
|
|
||||||
$r = q("SELECT profile_guid, profile_name FROM `profile` WHERE `uid` = %d",
|
$r = q("SELECT profile_guid, profile_name FROM `profile` WHERE `uid` = %d",
|
||||||
intval($_SESSION['uid']));
|
intval($_SESSION['uid']));
|
||||||
|
@ -79,7 +79,8 @@ function categories_widget($baseurl,$selected = '') {
|
|||||||
where item.uid = %d
|
where item.uid = %d
|
||||||
and term.uid = item.uid
|
and term.uid = item.uid
|
||||||
and term.type = %d
|
and term.type = %d
|
||||||
and item.author_xchan = '%s'
|
and item.owner_xchan = '%s'
|
||||||
|
and item.item_wall = 1
|
||||||
$item_normal
|
$item_normal
|
||||||
order by term.term asc",
|
order by term.term asc",
|
||||||
intval($a->profile['profile_uid']),
|
intval($a->profile['profile_uid']),
|
||||||
|
@ -1168,7 +1168,7 @@ function status_editor($a, $x, $popup = false) {
|
|||||||
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
||||||
'$id_select' => $id_select,
|
'$id_select' => $id_select,
|
||||||
'$id_seltext' => t('Post as'),
|
'$id_seltext' => t('Post as'),
|
||||||
'$writefiles' => (perm_is_allowed($x['profile_uid'], get_observer_hash(), 'post_photos') || perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage')),
|
'$writefiles' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage'),
|
||||||
'$bold' => t('Bold'),
|
'$bold' => t('Bold'),
|
||||||
'$italic' => t('Italic'),
|
'$italic' => t('Italic'),
|
||||||
'$underline' => t('Underline'),
|
'$underline' => t('Underline'),
|
||||||
@ -1377,7 +1377,8 @@ function render_location_default($item) {
|
|||||||
|
|
||||||
function prepare_page($item) {
|
function prepare_page($item) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0);
|
$naked = 1;
|
||||||
|
// $naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0);
|
||||||
$observer = $a->get_observer();
|
$observer = $a->get_observer();
|
||||||
//240 chars is the longest we can have before we start hitting problems with suhosin sites
|
//240 chars is the longest we can have before we start hitting problems with suhosin sites
|
||||||
$preview = substr(urlencode($item['body']), 0, 240);
|
$preview = substr(urlencode($item['body']), 0, 240);
|
||||||
@ -1586,7 +1587,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'id' => 'profile-tab',
|
'id' => 'profile-tab',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($p['view_photos']) {
|
if ($p['view_storage']) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Photos'),
|
'label' => t('Photos'),
|
||||||
'url' => $a->get_baseurl() . '/photos/' . $nickname,
|
'url' => $a->get_baseurl() . '/photos/' . $nickname,
|
||||||
@ -1594,8 +1595,6 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'title' => t('Photo Albums'),
|
'title' => t('Photo Albums'),
|
||||||
'id' => 'photo-tab',
|
'id' => 'photo-tab',
|
||||||
);
|
);
|
||||||
}
|
|
||||||
if ($p['view_storage']) {
|
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Files'),
|
'label' => t('Files'),
|
||||||
'url' => $a->get_baseurl() . '/cloud/' . $nickname . ((get_observer_hash()) ? '' : '?f=&davguest=1'),
|
'url' => $a->get_baseurl() . '/cloud/' . $nickname . ((get_observer_hash()) ? '' : '?f=&davguest=1'),
|
||||||
|
@ -329,6 +329,7 @@ function diaspora_get_contact_by_handle($uid,$handle) {
|
|||||||
function find_diaspora_person_by_handle($handle) {
|
function find_diaspora_person_by_handle($handle) {
|
||||||
|
|
||||||
$person = false;
|
$person = false;
|
||||||
|
$refresh = false;
|
||||||
|
|
||||||
if(diaspora_is_blacklisted($handle))
|
if(diaspora_is_blacklisted($handle))
|
||||||
return false;
|
return false;
|
||||||
@ -339,9 +340,13 @@ function find_diaspora_person_by_handle($handle) {
|
|||||||
if($r) {
|
if($r) {
|
||||||
$person = $r[0];
|
$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);
|
||||||
|
if($person['xchan_name_date'] < datetime_convert('UTC','UTC', 'now - 1 month')) {
|
||||||
|
logger('Updating Diaspora cached record for ' . $handle);
|
||||||
|
$refresh = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! $person) {
|
if((! $person) || ($refresh)) {
|
||||||
|
|
||||||
// try webfinger. Make sure to distinguish between diaspora,
|
// try webfinger. Make sure to distinguish between diaspora,
|
||||||
// hubzilla w/diaspora protocol and friendica w/diaspora protocol.
|
// hubzilla w/diaspora protocol and friendica w/diaspora protocol.
|
||||||
@ -349,7 +354,7 @@ function find_diaspora_person_by_handle($handle) {
|
|||||||
$result = discover_by_webbie($handle);
|
$result = discover_by_webbie($handle);
|
||||||
if($result) {
|
if($result) {
|
||||||
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
|
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
|
||||||
dbesc($handle)
|
dbesc(str_replace('acct:','',$handle))
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
$person = $r[0];
|
$person = $r[0];
|
||||||
@ -1003,6 +1008,11 @@ function diaspora_post($importer,$xml,$msg) {
|
|||||||
return 202;
|
return 202;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! is_importable($datarray,$contact)) {
|
||||||
|
logger('diaspora_post: filtering this author.');
|
||||||
|
return 202;
|
||||||
|
}
|
||||||
|
|
||||||
$result = item_store($datarray);
|
$result = item_store($datarray);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -72,33 +72,20 @@ function check_upstream_directory() {
|
|||||||
set_config('system', 'directory_server', '');
|
set_config('system', 'directory_server', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_globaldir_setting($observer) {
|
function get_directory_setting($observer, $setting) {
|
||||||
|
|
||||||
if($observer)
|
|
||||||
$globaldir = get_xconfig($observer,'directory','globaldir');
|
|
||||||
else
|
|
||||||
$globaldir = ((array_key_exists('globaldir',$_SESSION)) ? intval($_SESSION['globaldir']) : false);
|
|
||||||
|
|
||||||
if($globaldir === false)
|
|
||||||
$globaldir = get_config('directory','globaldir');
|
|
||||||
|
|
||||||
return $globaldir;
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_safemode_setting($observer) {
|
|
||||||
|
|
||||||
if ($observer)
|
if ($observer)
|
||||||
$safe_mode = get_xconfig($observer,'directory','safe_mode');
|
$ret = get_xconfig($observer, 'directory', $setting);
|
||||||
else
|
else
|
||||||
$safe_mode = ((array_key_exists('safemode',$_SESSION)) ? intval($_SESSION['safemode']) : false);
|
$ret = ((array_key_exists($setting,$_SESSION)) ? intval($_SESSION[$setting]) : false);
|
||||||
|
|
||||||
if($safe_mode === false)
|
if($ret === false)
|
||||||
$safe_mode = get_config('directory','safe_mode');
|
$ret = get_config('directory', $setting);
|
||||||
|
|
||||||
if($safe_mode === false)
|
if($setting == 'safemode' && $ret === false)
|
||||||
$safe_mode = 1;
|
$ret = 1;
|
||||||
|
|
||||||
return $safe_mode;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,49 +97,37 @@ function dir_sort_links() {
|
|||||||
|
|
||||||
$observer = get_observer_hash();
|
$observer = get_observer_hash();
|
||||||
|
|
||||||
$safe_mode = get_safemode_setting($observer);
|
$safe_mode = get_directory_setting($observer, 'safemode');
|
||||||
$globaldir = get_globaldir_setting($observer);
|
$globaldir = get_directory_setting($observer, 'globaldir');
|
||||||
|
$pubforums = get_directory_setting($observer, 'pubforums');
|
||||||
|
|
||||||
// Build urls without order and pubforums so it's easy to tack on the changed value
|
// Build urls without order and pubforums so it's easy to tack on the changed value
|
||||||
// Probably there's an easier way to do this
|
// Probably there's an easier way to do this
|
||||||
|
|
||||||
|
|
||||||
$directory_sort_order = get_config('system','directory_sort_order');
|
$directory_sort_order = get_config('system','directory_sort_order');
|
||||||
if(! $directory_sort_order)
|
if(! $directory_sort_order)
|
||||||
$directory_sort_order = 'date';
|
$directory_sort_order = 'date';
|
||||||
|
|
||||||
|
|
||||||
$current_order = (($_REQUEST['order']) ? $_REQUEST['order'] : $directory_sort_order);
|
$current_order = (($_REQUEST['order']) ? $_REQUEST['order'] : $directory_sort_order);
|
||||||
|
$suggest = (($_REQUEST['suggest']) ? '&suggest=' . $_REQUEST['suggest'] : '');
|
||||||
|
|
||||||
$url = 'directory?f=';
|
$url = 'directory?f=';
|
||||||
|
|
||||||
$tmp = array_merge($_GET,$_POST);
|
$tmp = array_merge($_GET,$_POST);
|
||||||
unset($tmp['order']);
|
unset($tmp['suggest']);
|
||||||
unset($tmp['q']);
|
|
||||||
unset($tmp['f']);
|
|
||||||
$sorturl = $url . http_build_query($tmp);
|
|
||||||
|
|
||||||
$tmp = array_merge($_GET,$_POST);
|
|
||||||
unset($tmp['pubforums']);
|
unset($tmp['pubforums']);
|
||||||
unset($tmp['global']);
|
unset($tmp['global']);
|
||||||
unset($tmp['safe']);
|
unset($tmp['safe']);
|
||||||
unset($tmp['q']);
|
unset($tmp['q']);
|
||||||
unset($tmp['f']);
|
unset($tmp['f']);
|
||||||
$forumsurl = $url . http_build_query($tmp);
|
$forumsurl = $url . http_build_query($tmp) . $suggest;
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
|
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
|
||||||
'$header' => t('Directory Options'),
|
'$header' => t('Directory Options'),
|
||||||
'$normal' => t('Alphabetic'),
|
|
||||||
'$reverse' => t('Reverse Alphabetic'),
|
|
||||||
'$date' => t('Newest to Oldest'),
|
|
||||||
'$reversedate' => t('Oldest to Newest'),
|
|
||||||
'$sort' => t('Sort'),
|
|
||||||
'$selected_sort' => $current_order,
|
|
||||||
'$sorturl' => $sorturl,
|
|
||||||
'$forumsurl' => $forumsurl,
|
'$forumsurl' => $forumsurl,
|
||||||
'$safemode' => array('safemode', t('Safe Mode'),$safe_mode,'','',' onchange=\'window.location.href="' . $forumsurl . '&safe="+(this.checked ? 1 : 0)\''),
|
'$safemode' => array('safemode', t('Safe Mode'),$safe_mode,'',array(t('No'), t('Yes')),' onchange=\'window.location.href="' . $forumsurl . '&safe="+(this.checked ? 1 : 0)\''),
|
||||||
|
'$pubforums' => array('pubforums', t('Public Forums Only'),$pubforums,'',array(t('No'), t('Yes')),' onchange=\'window.location.href="' . $forumsurl . '&pubforums="+(this.checked ? 1 : 0)\''),
|
||||||
'$pubforums' => array('pubforums', t('Public Forums Only'),(x($_REQUEST,'pubforums') ? $_REQUEST['pubforums'] : ''),'','',' onchange=\'window.location.href="' . $forumsurl . '&pubforums="+(this.checked ? 1 : 0)\''),
|
'$globaldir' => array('globaldir', t('This Website Only'), 1-intval($globaldir),'',array(t('No'), t('Yes')),' onchange=\'window.location.href="' . $forumsurl . '&global="+(this.checked ? 0 : 1)\''),
|
||||||
'$globaldir' => array('globaldir', t('This Website Only'), 1-intval($globaldir),'','',' onchange=\'window.location.href="' . $forumsurl . '&global="+(this.checked ? 0 : 1)\''),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -90,6 +90,7 @@ function format_event_ical($ev) {
|
|||||||
$o .= "\nLOCATION:" . format_ical_text($ev['location']);
|
$o .= "\nLOCATION:" . format_ical_text($ev['location']);
|
||||||
if($ev['description'])
|
if($ev['description'])
|
||||||
$o .= "\nDESCRIPTION:" . format_ical_text($ev['description']);
|
$o .= "\nDESCRIPTION:" . format_ical_text($ev['description']);
|
||||||
|
$o .= "\nUID:" . $ev['event_hash'] ;
|
||||||
$o .= "\nEND:VEVENT\n";
|
$o .= "\nEND:VEVENT\n";
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
@ -100,7 +101,7 @@ function format_ical_text($s) {
|
|||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
|
|
||||||
return(wordwrap(html2plain(bbcode($s)),72,"\n ",true));
|
return(wordwrap(str_replace(',','\\,',html2plain(bbcode($s))),72,"\n ",true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -208,6 +209,7 @@ function event_store_event($arr) {
|
|||||||
$arr['type'] = (($arr['type']) ? $arr['type'] : 'event' );
|
$arr['type'] = (($arr['type']) ? $arr['type'] : 'event' );
|
||||||
$arr['event_xchan'] = (($arr['event_xchan']) ? $arr['event_xchan'] : '');
|
$arr['event_xchan'] = (($arr['event_xchan']) ? $arr['event_xchan'] : '');
|
||||||
|
|
||||||
|
|
||||||
// Existing event being modified
|
// Existing event being modified
|
||||||
|
|
||||||
if($arr['id'] || $arr['event_hash']) {
|
if($arr['id'] || $arr['event_hash']) {
|
||||||
@ -275,7 +277,11 @@ function event_store_event($arr) {
|
|||||||
|
|
||||||
// New event. Store it.
|
// New event. Store it.
|
||||||
|
|
||||||
$hash = random_string();
|
|
||||||
|
if(array_key_exists('external_id',$arr))
|
||||||
|
$hash = $arr['external_id'];
|
||||||
|
else
|
||||||
|
$hash = random_string();
|
||||||
|
|
||||||
$r = q("INSERT INTO event ( uid,aid,event_xchan,event_hash,created,edited,start,finish,summary,description,location,type,
|
$r = q("INSERT INTO event ( uid,aid,event_xchan,event_hash,created,edited,start,finish,summary,description,location,type,
|
||||||
adjust,nofinish,allow_cid,allow_gid,deny_cid,deny_gid)
|
adjust,nofinish,allow_cid,allow_gid,deny_cid,deny_gid)
|
||||||
@ -364,6 +370,84 @@ function event_addtocal($item_id, $uid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function parse_ical_file($f,$uid) {
|
||||||
|
require_once('library/ical.php');
|
||||||
|
$ical = new ICal($f);
|
||||||
|
if($ical) {
|
||||||
|
$events = $ical->events();
|
||||||
|
if($events) {
|
||||||
|
foreach($events as $ev) {
|
||||||
|
logger('event parsed: ' . print_r($ev,true), LOGGER_ALL);
|
||||||
|
event_import_ical($ev,$uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function event_import_ical($ical, $uid) {
|
||||||
|
|
||||||
|
$c = q("select * from channel where channel_id = %d limit 1",
|
||||||
|
intval($uid)
|
||||||
|
);
|
||||||
|
|
||||||
|
if(! $c)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$channel = $c[0];
|
||||||
|
$ev = array();
|
||||||
|
|
||||||
|
if($ical['CREATED'])
|
||||||
|
$ev['created'] = datetime_convert('UTC','UTC',$ical['CREATED']);
|
||||||
|
if($ical['LAST-MODIFIED'])
|
||||||
|
$ev['edited'] = datetime_convert('UTC','UTC',$ical['LAST-MODIFIED']);
|
||||||
|
if($ical['LOCATION'])
|
||||||
|
$ev['location'] = $ical['LOCATION'];
|
||||||
|
if($ical['DESCRIPTION'])
|
||||||
|
$ev['description'] = $ical['DESCRIPTION'];
|
||||||
|
if($ical['SUMMARY'])
|
||||||
|
$ev['summary'] = $ical['SUMMARY'];
|
||||||
|
if($ical['DTEND'])
|
||||||
|
$ev['finish'] = datetime_convert('UTC','UTC', $ical['DTEND']);
|
||||||
|
else
|
||||||
|
$ev['nofinish'] = 1;
|
||||||
|
$ev['start'] = datetime_convert('UTC','UTC',$ical['DTSTART']);
|
||||||
|
if(substr($ical['DTSTART'],-1) === 'Z')
|
||||||
|
$ev['adjust'] = 1;
|
||||||
|
|
||||||
|
if($ical['UID']) {
|
||||||
|
$r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
||||||
|
dbesc($ical['UID']),
|
||||||
|
intval($arr['uid'])
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
$ev['event_hash'] = $ical['UID'];
|
||||||
|
else
|
||||||
|
$ev['external_id'] = $ical['UID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ical['SUMMARY'] && $ical['DTSTART']) {
|
||||||
|
$ev['event_xchan'] = $channel['channel_hash'];
|
||||||
|
$ev['uid'] = $channel['channel_id'];
|
||||||
|
$ev['account'] = $channel['channel_account_id'];
|
||||||
|
$ev['private'] = 1;
|
||||||
|
|
||||||
|
logger('storing event: ' . print_r($ev,true), LOGGER_ALL);
|
||||||
|
$event = event_store_event($ev);
|
||||||
|
if($event) {
|
||||||
|
$item_id = event_store_item($ev,$event);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function event_store_item($arr, $event) {
|
function event_store_item($arr, $event) {
|
||||||
|
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
@ -583,8 +583,14 @@ function identity_basic_export($channel_id, $items = false) {
|
|||||||
|
|
||||||
/** @warning this may run into memory limits on smaller systems */
|
/** @warning this may run into memory limits on smaller systems */
|
||||||
|
|
||||||
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d",
|
/** export one year of posts. If you want to export and import all posts you have to start with
|
||||||
intval($channel_id)
|
* the first year and export/import them in ascending order.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created > %s - INTERVAL %s",
|
||||||
|
intval($channel_id),
|
||||||
|
db_utcnow(),
|
||||||
|
db_quoteinterval('1 YEAR')
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
$ret['item'] = array();
|
$ret['item'] = array();
|
||||||
@ -598,6 +604,32 @@ function identity_basic_export($channel_id, $items = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function identity_export_year($channel_id,$year) {
|
||||||
|
|
||||||
|
if(! $year)
|
||||||
|
return array();
|
||||||
|
|
||||||
|
$ret = array();
|
||||||
|
$mindate = datetime_convert('UTC','UTC',$year . '-01-01 00:00:00');
|
||||||
|
$maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00');
|
||||||
|
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' ",
|
||||||
|
intval($channel_id),
|
||||||
|
dbesc($mindate),
|
||||||
|
dbesc($maxdate)
|
||||||
|
);
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
$ret['item'] = array();
|
||||||
|
xchan_query($r);
|
||||||
|
$r = fetch_post_tags($r,true);
|
||||||
|
foreach($r as $rr)
|
||||||
|
$ret['item'][] = encode_item($rr,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Loads a profile into the App structure.
|
* @brief Loads a profile into the App structure.
|
||||||
*
|
*
|
||||||
@ -1360,10 +1392,10 @@ function get_theme_uid() {
|
|||||||
* with the specified size.
|
* with the specified size.
|
||||||
*
|
*
|
||||||
* @param int $size
|
* @param int $size
|
||||||
* one of (175, 80, 48)
|
* one of (300, 80, 48)
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
function get_default_profile_photo($size = 175) {
|
function get_default_profile_photo($size = 300) {
|
||||||
$scheme = get_config('system','default_profile_photo');
|
$scheme = get_config('system','default_profile_photo');
|
||||||
if(! $scheme)
|
if(! $scheme)
|
||||||
$scheme = 'rainbow_man';
|
$scheme = 'rainbow_man';
|
||||||
|
@ -1282,10 +1282,12 @@ function encode_item($item,$mirror = false) {
|
|||||||
if($item['diaspora_meta']) {
|
if($item['diaspora_meta']) {
|
||||||
$z = json_decode($item['diaspora_meta'],true);
|
$z = json_decode($item['diaspora_meta'],true);
|
||||||
if($z) {
|
if($z) {
|
||||||
if(array_key_exists('iv',$z))
|
if(is_array($z) && array_key_exists('iv',$z))
|
||||||
$x['diaspora_signature'] = crypto_unencapsulate($z,$key);
|
$x['diaspora_signature'] = crypto_unencapsulate($z,$key);
|
||||||
else
|
else
|
||||||
$x['diaspora_signature'] = $z;
|
$x['diaspora_signature'] = $z;
|
||||||
|
if(! is_array($z))
|
||||||
|
logger('encode_item: diaspora meta is not an array: ' . print_r($z,true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger('encode_item: ' . print_r($x,true), LOGGER_DATA);
|
logger('encode_item: ' . print_r($x,true), LOGGER_DATA);
|
||||||
@ -2685,11 +2687,12 @@ function item_store_update($arr,$allow_exec = false) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$r = q("delete from term where oid = %d and otype = %d",
|
||||||
|
intval($orig_post_id),
|
||||||
|
intval(TERM_OBJ_POST)
|
||||||
|
);
|
||||||
|
|
||||||
if(is_array($terms)) {
|
if(is_array($terms)) {
|
||||||
$r = q("delete from term where oid = %d and otype = %d",
|
|
||||||
intval($orig_post_id),
|
|
||||||
intval(TERM_OBJ_POST)
|
|
||||||
);
|
|
||||||
foreach($terms as $t) {
|
foreach($terms as $t) {
|
||||||
q("insert into term (uid,oid,otype,type,term,url)
|
q("insert into term (uid,oid,otype,type,term,url)
|
||||||
values(%d,%d,%d,%d,'%s','%s') ",
|
values(%d,%d,%d,%d,'%s','%s') ",
|
||||||
@ -2701,7 +2704,6 @@ function item_store_update($arr,$allow_exec = false) {
|
|||||||
dbesc($t['url'])
|
dbesc($t['url'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr['term'] = $terms;
|
$arr['term'] = $terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3374,14 +3376,18 @@ function post_is_importable($item,$abook) {
|
|||||||
if(! $item)
|
if(! $item)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if((! $abook['abook_incl']) && (! $abook['abook_excl']))
|
if(! ($abook['abook_incl'] || $abook['abook_excl']))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
$text = prepare_text($item['body'],$item['mimetype']);
|
$text = prepare_text($item['body'],$item['mimetype']);
|
||||||
$text = html2plain($text);
|
$text = html2plain($text);
|
||||||
|
|
||||||
|
$lang = null;
|
||||||
|
|
||||||
|
if((strpos($abook['abook_incl'],'lang=') !== false) || (strpos($abook['abook_excl'],'lang=') !== false)) {
|
||||||
|
$lang = detect_language($text);
|
||||||
|
}
|
||||||
$tags = ((count($item['term'])) ? $item['term'] : false);
|
$tags = ((count($item['term'])) ? $item['term'] : false);
|
||||||
|
|
||||||
// exclude always has priority
|
// exclude always has priority
|
||||||
@ -3398,6 +3404,8 @@ function post_is_importable($item,$abook) {
|
|||||||
}
|
}
|
||||||
elseif((strpos($word,'/') === 0) && preg_match($word,$body))
|
elseif((strpos($word,'/') === 0) && preg_match($word,$body))
|
||||||
return false;
|
return false;
|
||||||
|
elseif((strpos($word,'lang=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,5))) == 0))
|
||||||
|
return false;
|
||||||
elseif(stristr($text,$word) !== false)
|
elseif(stristr($text,$word) !== false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -3415,6 +3423,8 @@ function post_is_importable($item,$abook) {
|
|||||||
}
|
}
|
||||||
elseif((strpos($word,'/') === 0) && preg_match($word,$body))
|
elseif((strpos($word,'/') === 0) && preg_match($word,$body))
|
||||||
return true;
|
return true;
|
||||||
|
elseif((strpos($word,'lang=') === 0) && ($lang) && (strcasecmp($lang,trim(substr($word,5))) == 0))
|
||||||
|
return true;
|
||||||
elseif(stristr($text,$word) !== false)
|
elseif(stristr($text,$word) !== false)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -3755,6 +3765,10 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
|
|||||||
$author['owner_avatar'] = $contact['thumb'];
|
$author['owner_avatar'] = $contact['thumb'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! is_importable($datarray,$contact))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
logger('consume_feed: author ' . print_r($author,true),LOGGER_DEBUG);
|
logger('consume_feed: author ' . print_r($author,true),LOGGER_DEBUG);
|
||||||
|
|
||||||
logger('consume_feed: ' . print_r($datarray,true),LOGGER_DATA);
|
logger('consume_feed: ' . print_r($datarray,true),LOGGER_DATA);
|
||||||
@ -4389,7 +4403,6 @@ function first_post_date($uid,$wall = false) {
|
|||||||
$r = q("select id, created from item
|
$r = q("select id, created from item
|
||||||
where uid = %d and id = parent $item_normal $wall_sql
|
where uid = %d and id = parent $item_normal $wall_sql
|
||||||
order by created asc limit 1",
|
order by created asc limit 1",
|
||||||
intval(ITEM_VISIBLE),
|
|
||||||
intval($uid)
|
intval($uid)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -531,7 +531,7 @@ function avatar_img($email) {
|
|||||||
$avatar = array();
|
$avatar = array();
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$avatar['size'] = 175;
|
$avatar['size'] = 300;
|
||||||
$avatar['email'] = $email;
|
$avatar['email'] = $email;
|
||||||
$avatar['url'] = '';
|
$avatar['url'] = '';
|
||||||
$avatar['success'] = false;
|
$avatar['success'] = false;
|
||||||
@ -1135,9 +1135,27 @@ function discover_by_webbie($webbie) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||||
dbesc($webbie)
|
dbesc($addr)
|
||||||
);
|
);
|
||||||
if(! $r) {
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Diaspora communications are notoriously unreliable and receiving profile update messages (indeed any messages)
|
||||||
|
* are pretty much random luck. We'll check the timestamp of the xchan_name_date at a higher level and refresh
|
||||||
|
* this record once a month; because if you miss a profile update message and they update their profile photo or name
|
||||||
|
* you're otherwise stuck with stale info until they change their profile again - which could be years from now.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
$r = q("update xchan set xchan_name = '%s', xchan_network = '%s', xchan_name_date = '%s' where xchan_hash = '%s' limit 1",
|
||||||
|
dbesc($vcard['fn']),
|
||||||
|
dbesc($network),
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
dbesc($addr)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_instance_url, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
|
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_instance_url, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
|
||||||
dbesc($addr),
|
dbesc($addr),
|
||||||
|
@ -25,9 +25,8 @@ function get_perms() {
|
|||||||
// Read only permissions
|
// Read only permissions
|
||||||
'view_stream' => array('channel_r_stream', intval(PERMS_R_STREAM), true, t('Can view my normal stream and posts'), ''),
|
'view_stream' => array('channel_r_stream', intval(PERMS_R_STREAM), true, t('Can view my normal stream and posts'), ''),
|
||||||
'view_profile' => array('channel_r_profile', intval(PERMS_R_PROFILE), true, t('Can view my default channel profile'), ''),
|
'view_profile' => array('channel_r_profile', intval(PERMS_R_PROFILE), true, t('Can view my default channel profile'), ''),
|
||||||
'view_photos' => array('channel_r_photos', intval(PERMS_R_PHOTOS), true, t('Can view my photo albums'), ''),
|
|
||||||
'view_contacts' => array('channel_r_abook', intval(PERMS_R_ABOOK), true, t('Can view my connections'), ''),
|
'view_contacts' => array('channel_r_abook', intval(PERMS_R_ABOOK), true, t('Can view my connections'), ''),
|
||||||
'view_storage' => array('channel_r_storage', intval(PERMS_R_STORAGE), true, t('Can view my file storage'), ''),
|
'view_storage' => array('channel_r_storage', intval(PERMS_R_STORAGE), true, t('Can view my file storage and photos'), ''),
|
||||||
'view_pages' => array('channel_r_pages', intval(PERMS_R_PAGES), true, t('Can view my webpages'), ''),
|
'view_pages' => array('channel_r_pages', intval(PERMS_R_PAGES), true, t('Can view my webpages'), ''),
|
||||||
|
|
||||||
// Write permissions
|
// Write permissions
|
||||||
@ -35,12 +34,11 @@ function get_perms() {
|
|||||||
'post_wall' => array('channel_w_wall', intval(PERMS_W_WALL), false, t('Can post on my channel page ("wall")'), ''),
|
'post_wall' => array('channel_w_wall', intval(PERMS_W_WALL), false, t('Can post on my channel page ("wall")'), ''),
|
||||||
'post_comments' => array('channel_w_comment', intval(PERMS_W_COMMENT), false, t('Can comment on or like my posts'), ''),
|
'post_comments' => array('channel_w_comment', intval(PERMS_W_COMMENT), false, t('Can comment on or like my posts'), ''),
|
||||||
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
|
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
|
||||||
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
|
|
||||||
'post_like' => array('channel_w_like', intval(PERMS_W_LIKE), false, t('Can like/dislike stuff'), t('Profiles and things other than posts/comments')),
|
'post_like' => array('channel_w_like', intval(PERMS_W_LIKE), false, t('Can like/dislike stuff'), t('Profiles and things other than posts/comments')),
|
||||||
|
|
||||||
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
|
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
|
||||||
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('')),
|
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('')),
|
||||||
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my file storage'), ''),
|
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my file storage and photos'), ''),
|
||||||
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my webpages'), ''),
|
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my webpages'), ''),
|
||||||
|
|
||||||
'republish' => array('channel_a_republish', intval(PERMS_A_REPUBLISH), false, t('Can source my public posts in derived channels'), t('Somewhat advanced - very useful in open communities')),
|
'republish' => array('channel_a_republish', intval(PERMS_A_REPUBLISH), false, t('Can source my public posts in derived channels'), t('Somewhat advanced - very useful in open communities')),
|
||||||
@ -496,7 +494,6 @@ function site_default_perms() {
|
|||||||
$typical = array(
|
$typical = array(
|
||||||
'view_stream' => PERMS_PUBLIC,
|
'view_stream' => PERMS_PUBLIC,
|
||||||
'view_profile' => PERMS_PUBLIC,
|
'view_profile' => PERMS_PUBLIC,
|
||||||
'view_photos' => PERMS_PUBLIC,
|
|
||||||
'view_contacts' => PERMS_PUBLIC,
|
'view_contacts' => PERMS_PUBLIC,
|
||||||
'view_storage' => PERMS_PUBLIC,
|
'view_storage' => PERMS_PUBLIC,
|
||||||
'view_pages' => PERMS_PUBLIC,
|
'view_pages' => PERMS_PUBLIC,
|
||||||
@ -504,7 +501,6 @@ function site_default_perms() {
|
|||||||
'post_wall' => PERMS_SPECIFIC,
|
'post_wall' => PERMS_SPECIFIC,
|
||||||
'post_comments' => PERMS_SPECIFIC,
|
'post_comments' => PERMS_SPECIFIC,
|
||||||
'post_mail' => PERMS_SPECIFIC,
|
'post_mail' => PERMS_SPECIFIC,
|
||||||
'post_photos' => PERMS_SPECIFIC,
|
|
||||||
'tag_deliver' => PERMS_SPECIFIC,
|
'tag_deliver' => PERMS_SPECIFIC,
|
||||||
'chat' => PERMS_SPECIFIC,
|
'chat' => PERMS_SPECIFIC,
|
||||||
'write_storage' => PERMS_SPECIFIC,
|
'write_storage' => PERMS_SPECIFIC,
|
||||||
@ -554,22 +550,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = false;
|
$ret['default_collection'] = false;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = true;
|
$ret['online'] = true;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -586,22 +580,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = true;
|
$ret['default_collection'] = true;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = true;
|
$ret['online'] = true;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -618,22 +610,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = true;
|
$ret['default_collection'] = true;
|
||||||
$ret['directory_publish'] = false;
|
$ret['directory_publish'] = false;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_SPECIFIC;
|
$ret['channel_r_abook'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -650,22 +640,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = false;
|
$ret['default_collection'] = false;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -682,22 +670,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = true;
|
$ret['default_collection'] = true;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -714,22 +700,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = true;
|
$ret['default_collection'] = true;
|
||||||
$ret['directory_publish'] = false;
|
$ret['directory_publish'] = false;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILEPERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_SPECIFIC;
|
$ret['channel_r_profile'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_SPECIFIC;
|
$ret['channel_r_abook'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_SPECIFIC;
|
$ret['channel_r_storage'] = PERMS_SPECIFIC;
|
||||||
@ -746,22 +730,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = false;
|
$ret['default_collection'] = false;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -778,22 +760,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = true;
|
$ret['default_collection'] = true;
|
||||||
$ret['directory_publish'] = false;
|
$ret['directory_publish'] = false;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -810,20 +790,18 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = false;
|
$ret['default_collection'] = false;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
@ -840,22 +818,20 @@ function get_role_perms($role) {
|
|||||||
$ret['default_collection'] = false;
|
$ret['default_collection'] = false;
|
||||||
$ret['directory_publish'] = true;
|
$ret['directory_publish'] = true;
|
||||||
$ret['online'] = false;
|
$ret['online'] = false;
|
||||||
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_W_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_W_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|
$ret['perms_accept'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_ABOOK
|
||||||
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|
||||||
|PERMS_R_STORAGE|PERMS_W_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
|PERMS_R_STORAGE|PERMS_W_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
|
||||||
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
$ret['channel_r_stream'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
$ret['channel_r_profile'] = PERMS_PUBLIC;
|
||||||
$ret['channel_r_photos'] = PERMS_PUBLIC;
|
|
||||||
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
$ret['channel_r_abook'] = PERMS_PUBLIC;
|
||||||
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
$ret['channel_w_stream'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
$ret['channel_w_wall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
$ret['channel_w_tagwall'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
$ret['channel_w_comment'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
$ret['channel_w_mail'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_w_photos'] = PERMS_SPECIFIC;
|
|
||||||
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
$ret['channel_w_chat'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
$ret['channel_a_delegate'] = PERMS_SPECIFIC;
|
||||||
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
$ret['channel_r_storage'] = PERMS_PUBLIC;
|
||||||
|
@ -605,16 +605,16 @@ function import_profile_photo($photo,$xchan,$thing = false) {
|
|||||||
if(($width / $height) > 1.2) {
|
if(($width / $height) > 1.2) {
|
||||||
// crop out the sides
|
// crop out the sides
|
||||||
$margin = $width - $height;
|
$margin = $width - $height;
|
||||||
$img->cropImage(175,($margin / 2),0,$height,$height);
|
$img->cropImage(300,($margin / 2),0,$height,$height);
|
||||||
}
|
}
|
||||||
elseif(($height / $width) > 1.2) {
|
elseif(($height / $width) > 1.2) {
|
||||||
// crop out the bottom
|
// crop out the bottom
|
||||||
$margin = $height - $width;
|
$margin = $height - $width;
|
||||||
$img->cropImage(175,0,0,$width,$width);
|
$img->cropImage(300,0,0,$width,$width);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$img->scaleImageSquare(175);
|
$img->scaleImageSquare(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@ function import_channel_photo($photo,$type,$aid,$uid) {
|
|||||||
$img = photo_factory($photo, $type);
|
$img = photo_factory($photo, $type);
|
||||||
if($img->is_valid()) {
|
if($img->is_valid()) {
|
||||||
|
|
||||||
$img->scaleImageSquare(175);
|
$img->scaleImageSquare(300);
|
||||||
|
|
||||||
$p = array('aid' => $aid, 'uid' => $uid, 'resource_id' => $hash, 'filename' => $filename, 'album' => t('Profile Photos'), 'photo_usage' => PHOTO_PROFILE, 'scale' => 4);
|
$p = array('aid' => $aid, 'uid' => $uid, 'resource_id' => $hash, 'filename' => $filename, 'album' => t('Profile Photos'), 'photo_usage' => PHOTO_PROFILE, 'scale' => 4);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
$channel_id = $channel['channel_id'];
|
$channel_id = $channel['channel_id'];
|
||||||
$account_id = $channel['channel_account_id'];
|
$account_id = $channel['channel_account_id'];
|
||||||
|
|
||||||
if(! perm_is_allowed($channel_id, $observer['xchan_hash'], 'post_photos')) {
|
if(! perm_is_allowed($channel_id, $observer['xchan_hash'], 'write_storage')) {
|
||||||
$ret['message'] = t('Permission denied.');
|
$ret['message'] = t('Permission denied.');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
@ -313,7 +313,7 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
*
|
*
|
||||||
* @param array $channel
|
* @param array $channel
|
||||||
* @param array $observer
|
* @param array $observer
|
||||||
* @return bool|array false if no view_photos permission or an array
|
* @return bool|array false if no view_storage permission or an array
|
||||||
* * success (bool)
|
* * success (bool)
|
||||||
* * albums (array)
|
* * albums (array)
|
||||||
*/
|
*/
|
||||||
@ -322,7 +322,7 @@ function photos_albums_list($channel, $observer) {
|
|||||||
$channel_id = $channel['channel_id'];
|
$channel_id = $channel['channel_id'];
|
||||||
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
||||||
|
|
||||||
if(! perm_is_allowed($channel_id, $observer_xchan, 'view_photos'))
|
if(! perm_is_allowed($channel_id, $observer_xchan, 'view_storage'))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/** @FIXME create a permissions SQL which works on arbitrary observers and channels, regardless of login or web status */
|
/** @FIXME create a permissions SQL which works on arbitrary observers and channels, regardless of login or web status */
|
||||||
@ -378,7 +378,7 @@ function photos_album_widget($channelx,$observer,$albums = null) {
|
|||||||
'$title' => t('Photo Albums'),
|
'$title' => t('Photo Albums'),
|
||||||
'$albums' => $albums['albums'],
|
'$albums' => $albums['albums'],
|
||||||
'$baseurl' => z_root(),
|
'$baseurl' => z_root(),
|
||||||
'$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'post_photos'))
|
'$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'write_storage'))
|
||||||
? t('Upload New Photos') : '')
|
? t('Upload New Photos') : '')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -399,7 +399,7 @@ function photos_list_photos($channel, $observer, $album = '') {
|
|||||||
$channel_id = $channel['channel_id'];
|
$channel_id = $channel['channel_id'];
|
||||||
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
||||||
|
|
||||||
if(! perm_is_allowed($channel_id,$observer_xchan,'view_photos'))
|
if(! perm_is_allowed($channel_id,$observer_xchan,'view_storage'))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$sql_extra = permissions_sql($channel_id);
|
$sql_extra = permissions_sql($channel_id);
|
||||||
|
@ -418,6 +418,9 @@ function stream_perms_api_uids($perms = NULL, $limit = 0, $rand = 0 ) {
|
|||||||
$str .= intval($rr);
|
$str .= intval($rr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
$str = "''";
|
||||||
|
|
||||||
logger('stream_perms_api_uids: ' . $str, LOGGER_DEBUG);
|
logger('stream_perms_api_uids: ' . $str, LOGGER_DEBUG);
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
@ -448,6 +451,9 @@ function stream_perms_xchans($perms = NULL ) {
|
|||||||
$str .= "'" . dbesc($rr) . "'";
|
$str .= "'" . dbesc($rr) . "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
$str = "''";
|
||||||
|
|
||||||
logger('stream_perms_xchans: ' . $str, LOGGER_DEBUG);
|
logger('stream_perms_xchans: ' . $str, LOGGER_DEBUG);
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
|
@ -101,7 +101,7 @@ function format_term_for_display($term) {
|
|||||||
// Tag cloud functions - need to be adpated to this database format
|
// Tag cloud functions - need to be adpated to this database format
|
||||||
|
|
||||||
|
|
||||||
function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $type = TERM_HASHTAG) {
|
function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $restrict = 0, $type = TERM_HASHTAG) {
|
||||||
|
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
|
|
||||||
@ -124,6 +124,11 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $
|
|||||||
$sql_options .= " and author_xchan in (" . implode(',',$authors) . ") ";
|
$sql_options .= " and author_xchan in (" . implode(',',$authors) . ") ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($owner) {
|
||||||
|
$sql_options .= " and owner_xchan = '" . dbesc($owner) . "' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Fetch tags
|
// Fetch tags
|
||||||
$r = q("select term, count(term) as total from term left join item on term.oid = item.id
|
$r = q("select term, count(term) as total from term left join item on term.oid = item.id
|
||||||
where term.uid = %d and term.type = %d
|
where term.uid = %d and term.type = %d
|
||||||
@ -215,10 +220,10 @@ function dir_tagadelic($count = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_HASHTAG) {
|
function tagblock($link,$uid,$count = 0,$authors = '',$owner = '', $flags = 0,$restrict = 0,$type = TERM_HASHTAG) {
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$r = tagadelic($uid,$count,$authors,$flags,$restrict,$type);
|
$r = tagadelic($uid,$count,$authors,$owner, $flags,$restrict,$type);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$o = '<div class="tagblock widget"><h3>' . t('Tags') . '</h3><div class="tags" align="center">';
|
$o = '<div class="tagblock widget"><h3>' . t('Tags') . '</h3><div class="tags" align="center">';
|
||||||
@ -232,10 +237,10 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function wtagblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_HASHTAG) {
|
function wtagblock($uid,$count = 0,$authors = '',$owner = '', $flags = 0,$restrict = 0,$type = TERM_HASHTAG) {
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$r = tagadelic($uid,$count,$authors,$flags,$restrict,$type);
|
$r = tagadelic($uid,$count,$authors,$owner, $flags,$restrict,$type);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$c = q("select channel_address from channel where channel_id = %d limit 1",
|
$c = q("select channel_address from channel where channel_id = %d limit 1",
|
||||||
@ -253,10 +258,10 @@ function wtagblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function catblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_CATEGORY) {
|
function catblock($uid,$count = 0,$authors = '',$owner = '', $flags = 0,$restrict = 0,$type = TERM_CATEGORY) {
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$r = tagadelic($uid,$count,$authors,$flags,$restrict,$type);
|
$r = tagadelic($uid,$count,$authors,$owner,$flags,$restrict,$type);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$c = q("select channel_address from channel where channel_id = %d limit 1",
|
$c = q("select channel_address from channel where channel_id = %d limit 1",
|
||||||
@ -278,7 +283,7 @@ function dir_tagblock($link,$r) {
|
|||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$observer = get_observer_hash();
|
$observer = get_observer_hash();
|
||||||
if(! get_globaldir_setting($observer))
|
if(! get_directory_setting($observer, 'globaldir'))
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
|
||||||
@ -409,4 +414,4 @@ function get_things($profile_hash,$uid) {
|
|||||||
//logger('things: ' . print_r($sorted_things,true));
|
//logger('things: ' . print_r($sorted_things,true));
|
||||||
|
|
||||||
return $sorted_things;
|
return $sorted_things;
|
||||||
}
|
}
|
||||||
|
@ -807,7 +807,7 @@ function contact_block() {
|
|||||||
$shown = get_pconfig($a->profile['uid'],'system','display_friend_count');
|
$shown = get_pconfig($a->profile['uid'],'system','display_friend_count');
|
||||||
|
|
||||||
if($shown === false)
|
if($shown === false)
|
||||||
$shown = 24;
|
$shown = 25;
|
||||||
if($shown == 0)
|
if($shown == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1448,7 +1448,7 @@ function prepare_body(&$item,$attach = false) {
|
|||||||
// else {
|
// else {
|
||||||
call_hooks('prepare_body_init', $item);
|
call_hooks('prepare_body_init', $item);
|
||||||
// unobscure($item);
|
// unobscure($item);
|
||||||
$s = prepare_text($item['body'],$item['mimetype'], true);
|
$s = prepare_text($item['body'],$item['mimetype'], false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$prep_arr = array('item' => $item, 'html' => $s);
|
$prep_arr = array('item' => $item, 'html' => $s);
|
||||||
|
@ -29,7 +29,7 @@ function widget_tagcloud($args) {
|
|||||||
$type = TERM_CATEGORY;
|
$type = TERM_CATEGORY;
|
||||||
|
|
||||||
// FIXME there exists no $authors variable
|
// FIXME there exists no $authors variable
|
||||||
$r = tagadelic($uid, $count, $authors, $flags, ITEM_TYPE_WEBPAGE, $type);
|
$r = tagadelic($uid, $count, $authors, $owner, $flags, ITEM_TYPE_WEBPAGE, $type);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$o = '<div class="tagblock widget"><h3>' . t('Categories') . '</h3><div class="tags" align="center">';
|
$o = '<div class="tagblock widget"><h3>' . t('Categories') . '</h3><div class="tags" align="center">';
|
||||||
@ -132,7 +132,7 @@ function widget_suggestions($arr) {
|
|||||||
'profile' => $rr['xchan_url'],
|
'profile' => $rr['xchan_url'],
|
||||||
'name' => $rr['xchan_name'],
|
'name' => $rr['xchan_name'],
|
||||||
'photo' => $rr['xchan_photo_m'],
|
'photo' => $rr['xchan_photo_m'],
|
||||||
'ignlnk' => z_root() . '/suggest?ignore=' . $rr['xchan_hash'],
|
'ignlnk' => z_root() . '/directory?ignore=' . $rr['xchan_hash'],
|
||||||
'conntxt' => t('Connect'),
|
'conntxt' => t('Connect'),
|
||||||
'connlnk' => $connlnk,
|
'connlnk' => $connlnk,
|
||||||
'ignore' => t('Ignore/Hide')
|
'ignore' => t('Ignore/Hide')
|
||||||
@ -380,6 +380,7 @@ function widget_categories($arr) {
|
|||||||
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
||||||
|
|
||||||
return categories_widget($srchurl, $cat);
|
return categories_widget($srchurl, $cat);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function widget_tagcloud_wall($arr) {
|
function widget_tagcloud_wall($arr) {
|
||||||
@ -392,7 +393,7 @@ function widget_tagcloud_wall($arr) {
|
|||||||
|
|
||||||
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
|
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
|
||||||
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
|
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
|
||||||
return wtagblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
|
return wtagblock($a->profile['profile_uid'], $limit, '', $a->profile['channel_hash'], 'wall');
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -407,7 +408,7 @@ function widget_catcloud_wall($arr) {
|
|||||||
|
|
||||||
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
|
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
|
||||||
|
|
||||||
return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
|
return catblock($a->profile['profile_uid'], $limit, '', $a->profile['channel_hash'], 'wall');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -604,7 +605,7 @@ function widget_photo_albums($arr) {
|
|||||||
if(! $a->profile['profile_uid'])
|
if(! $a->profile['profile_uid'])
|
||||||
return '';
|
return '';
|
||||||
$channelx = channelx_by_n($a->profile['profile_uid']);
|
$channelx = channelx_by_n($a->profile['profile_uid']);
|
||||||
if((! $channelx) || (! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_photos')))
|
if((! $channelx) || (! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_storage')))
|
||||||
return '';
|
return '';
|
||||||
require_once('include/photos.php');
|
require_once('include/photos.php');
|
||||||
|
|
||||||
@ -903,7 +904,7 @@ function widget_random_block($arr) {
|
|||||||
item_type = %d $sql_options order by $randfunc limit 1",
|
item_type = %d $sql_options order by $randfunc limit 1",
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
dbesc('%' . $contains . '%'),
|
dbesc('%' . $contains . '%'),
|
||||||
intval(ITEM_TYPE_BUILDBLOCK)
|
intval(ITEM_TYPE_BLOCK)
|
||||||
);
|
);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
|
@ -566,7 +566,7 @@ function zot_gethub($arr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Registers an unknown hup.
|
* @brief Registers an unknown hub.
|
||||||
*
|
*
|
||||||
* A communication has been received which has an unknown (to us) sender.
|
* A communication has been received which has an unknown (to us) sender.
|
||||||
* Perform discovery based on our calculated hash of the sender at the
|
* Perform discovery based on our calculated hash of the sender at the
|
||||||
@ -1088,11 +1088,19 @@ function zot_import($arr, $sender_url) {
|
|||||||
logger('specific recipients');
|
logger('specific recipients');
|
||||||
$recip_arr = array();
|
$recip_arr = array();
|
||||||
foreach($i['notify']['recipients'] as $recip) {
|
foreach($i['notify']['recipients'] as $recip) {
|
||||||
$recip_arr[] = make_xchan_hash($recip['guid'],$recip['guid_sig']);
|
if(is_array($recip)) {
|
||||||
|
$recip_arr[] = make_xchan_hash($recip['guid'],$recip['guid_sig']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stringify_array_elms($recip_arr);
|
|
||||||
$recips = implode(',',$recip_arr);
|
$r = false;
|
||||||
$r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and channel_removed = 0 ");
|
if($recip_arr) {
|
||||||
|
stringify_array_elms($recip_arr);
|
||||||
|
$recips = implode(',',$recip_arr);
|
||||||
|
$r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " )
|
||||||
|
and channel_removed = 0 ");
|
||||||
|
}
|
||||||
|
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
logger('recips: no recipients on this site');
|
logger('recips: no recipients on this site');
|
||||||
continue;
|
continue;
|
||||||
@ -1248,7 +1256,8 @@ function public_recips($msg) {
|
|||||||
$include_sys = false;
|
$include_sys = false;
|
||||||
|
|
||||||
if($msg['message']['type'] === 'activity') {
|
if($msg['message']['type'] === 'activity') {
|
||||||
$include_sys = true;
|
if(! get_config('system','disable_discover_tab'))
|
||||||
|
$include_sys = true;
|
||||||
$col = 'channel_w_stream';
|
$col = 'channel_w_stream';
|
||||||
$field = PERMS_W_STREAM;
|
$field = PERMS_W_STREAM;
|
||||||
if(array_key_exists('flags',$msg['message']) && in_array('thread_parent', $msg['message']['flags'])) {
|
if(array_key_exists('flags',$msg['message']) && in_array('thread_parent', $msg['message']['flags'])) {
|
||||||
@ -2852,6 +2861,11 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
|
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
|
||||||
|
if(array_key_exists('channel_page_flags',$arr['channel']) && intval($arr['channel']['channel_pageflags'])) {
|
||||||
|
$arr['channel']['channel_removed'] = (($arr['channel']['channel_pageflags'] & 0x8000) ? 1 : 0);
|
||||||
|
$arr['channel']['channel_system'] = (($arr['channel']['channel_pageflags'] & 0x1000) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
$disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey', 'channel_address', 'channel_notifyflags');
|
$disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey', 'channel_address', 'channel_notifyflags');
|
||||||
|
|
||||||
$clean = array();
|
$clean = array();
|
||||||
@ -2883,28 +2897,20 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
$total_feeds ++;
|
$total_feeds ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$disallowed = array('abook_id','abook_account','abook_channel');
|
$disallowed = array('abook_id','abook_account','abook_channel','abook_rating','abook_rating_text');
|
||||||
|
|
||||||
foreach($arr['abook'] as $abook) {
|
foreach($arr['abook'] as $abook) {
|
||||||
|
|
||||||
if(! array_key_exists('abook_blocked',$abook)) {
|
if(! array_key_exists('abook_blocked',$abook)) {
|
||||||
// convert from redmatrix
|
// convert from redmatrix
|
||||||
if($abook['abook_flags'] & 0x0001)
|
$abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001) ? 1 : 0);
|
||||||
$abook['abook_blocked'] = 1;
|
$abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002) ? 1 : 0);
|
||||||
if($abook['abook_flags'] & 0x0002)
|
$abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004) ? 1 : 0);
|
||||||
$abook['abook_ignored'] = 1;
|
$abook['abook_archived'] = (($abook['abook_flags'] & 0x0008) ? 1 : 0);
|
||||||
if($abook['abook_flags'] & 0x0004)
|
$abook['abook_pending'] = (($abook['abook_flags'] & 0x0010) ? 1 : 0);
|
||||||
$abook['abook_hidden'] = 1;
|
$abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020) ? 1 : 0);
|
||||||
if($abook['abook_flags'] & 0x0008)
|
$abook['abook_self'] = (($abook['abook_flags'] & 0x0080) ? 1 : 0);
|
||||||
$abook['abook_archived'] = 1;
|
$abook['abook_feed'] = (($abook['abook_flags'] & 0x0100) ? 1 : 0);
|
||||||
if($abook['abook_flags'] & 0x0010)
|
|
||||||
$abook['abook_pending'] = 1;
|
|
||||||
if($abook['abook_flags'] & 0x0020)
|
|
||||||
$abook['abook_unconnected'] = 1;
|
|
||||||
if($abook['abook_flags'] & 0x0080)
|
|
||||||
$abook['abook_self'] = 1;
|
|
||||||
if($abook['abook_flags'] & 0x0100)
|
|
||||||
$abook['abook_feed'] = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$clean = array();
|
$clean = array();
|
||||||
@ -3165,7 +3171,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
}
|
}
|
||||||
if(count($clean)) {
|
if(count($clean)) {
|
||||||
foreach($clean as $k => $v) {
|
foreach($clean as $k => $v) {
|
||||||
$r = dbq("UPDATE profile set " . dbesc($k) . " = '" . dbesc($v)
|
$r = dbq("UPDATE profile set `" . dbesc($k) . "` = '" . dbesc($v)
|
||||||
. "' where profile_guid = '" . dbesc($profile['profile_guid']) . "' and uid = " . intval($channel['channel_id']));
|
. "' where profile_guid = '" . dbesc($profile['profile_guid']) . "' and uid = " . intval($channel['channel_id']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
index.php
@ -195,6 +195,17 @@ if(strlen($a->module)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This provides a place for plugins to register module handlers which don't otherwise exist on the system.
|
||||||
|
* If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
|
||||||
|
* there is no specific module file or matching plugin name.
|
||||||
|
* The plugin should catch at least one of the module hooks for this URL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$x = array('module' => $a->module, 'installed' => false);
|
||||||
|
call_hooks('module_loaded', $x);
|
||||||
|
if($x['installed'])
|
||||||
|
$a->module_loaded = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL provided does not resolve to a valid module.
|
* The URL provided does not resolve to a valid module.
|
||||||
|
@ -53,7 +53,7 @@ function block_content(&$a) {
|
|||||||
item_type = %d $sql_options $revision limit 1",
|
item_type = %d $sql_options $revision limit 1",
|
||||||
intval($u[0]['channel_id']),
|
intval($u[0]['channel_id']),
|
||||||
dbesc($page_id),
|
dbesc($page_id),
|
||||||
intval(ITEM_TYPE_BUILDBLOCK)
|
intval(ITEM_TYPE_BLOCK)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
@ -65,7 +65,7 @@ function block_content(&$a) {
|
|||||||
item_type = %d $revision limit 1",
|
item_type = %d $revision limit 1",
|
||||||
intval($u[0]['channel_id']),
|
intval($u[0]['channel_id']),
|
||||||
dbesc($page_id),
|
dbesc($page_id),
|
||||||
intval(ITEM_TYPE_BUILDBLOCK)
|
intval(ITEM_TYPE_BLOCK)
|
||||||
);
|
);
|
||||||
if($x) {
|
if($x) {
|
||||||
// Yes, it's there. You just aren't allowed to see it.
|
// Yes, it's there. You just aren't allowed to see it.
|
||||||
|
@ -84,7 +84,7 @@ function blocks_content(&$a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'webpage' => ITEM_TYPE_BUILDBLOCK,
|
'webpage' => ITEM_TYPE_BLOCK,
|
||||||
'is_owner' => true,
|
'is_owner' => true,
|
||||||
'nickname' => $a->profile['channel_address'],
|
'nickname' => $a->profile['channel_address'],
|
||||||
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
|
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
|
||||||
@ -110,7 +110,7 @@ function blocks_content(&$a) {
|
|||||||
$r = q("select iid, sid, mid, title, body, mimetype, created, edited from item_id left join item on item_id.iid = item.id
|
$r = q("select iid, sid, mid, title, body, mimetype, created, edited from item_id left join item on item_id.iid = item.id
|
||||||
where item_id.uid = %d and service = 'BUILDBLOCK' and item_type = %d order by item.created desc",
|
where item_id.uid = %d and service = 'BUILDBLOCK' and item_type = %d order by item.created desc",
|
||||||
intval($owner),
|
intval($owner),
|
||||||
intval(ITEM_TYPE_BUILDBLOCK)
|
intval(ITEM_TYPE_BLOCK)
|
||||||
);
|
);
|
||||||
|
|
||||||
$pages = null;
|
$pages = null;
|
||||||
|
@ -175,7 +175,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
|
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
|
||||||
WHERE uid = %d $item_normal
|
WHERE uid = %d $item_normal
|
||||||
AND item_wall = 1 AND item_unseen = 1
|
AND item_wall = 1 AND item_unseen = 1
|
||||||
AND (abook.blocked = 0 or abook.abook_flags is null)
|
AND (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||||
$sql_extra
|
$sql_extra
|
||||||
ORDER BY created DESC",
|
ORDER BY created DESC",
|
||||||
intval($a->profile['profile_uid'])
|
intval($a->profile['profile_uid'])
|
||||||
|
154
mod/connedit.php
@ -130,7 +130,6 @@ function connedit_post(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$abook_flags = $orig_record[0]['abook_flags'];
|
|
||||||
$new_friend = false;
|
$new_friend = false;
|
||||||
|
|
||||||
if(! $is_self) {
|
if(! $is_self) {
|
||||||
@ -144,7 +143,6 @@ function connedit_post(&$a) {
|
|||||||
dbesc($orig_record[0]['abook_xchan'])
|
dbesc($orig_record[0]['abook_xchan'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if($z) {
|
if($z) {
|
||||||
$record = $z[0]['xlink_id'];
|
$record = $z[0]['xlink_id'];
|
||||||
$w = q("update xlink set xlink_rating = '%d', xlink_rating_text = '%s', xlink_sig = '%s', xlink_updated = '%s'
|
$w = q("update xlink set xlink_rating = '%d', xlink_rating_text = '%s', xlink_sig = '%s', xlink_updated = '%s'
|
||||||
@ -192,6 +190,7 @@ function connedit_post(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$abook_pending = $new_friend ? 0 : $orig_record[0]['abook_pending'];
|
||||||
|
|
||||||
$r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_pending = %d,
|
$r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_pending = %d,
|
||||||
abook_incl = '%s', abook_excl = '%s'
|
abook_incl = '%s', abook_excl = '%s'
|
||||||
@ -199,7 +198,7 @@ function connedit_post(&$a) {
|
|||||||
dbesc($profile_id),
|
dbesc($profile_id),
|
||||||
intval($abook_my_perms),
|
intval($abook_my_perms),
|
||||||
intval($closeness),
|
intval($closeness),
|
||||||
intval(1 - intval($new_friend)),
|
intval($abook_pending),
|
||||||
dbesc($abook_incl),
|
dbesc($abook_incl),
|
||||||
dbesc($abook_excl),
|
dbesc($abook_excl),
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
@ -398,9 +397,6 @@ function connedit_content(&$a) {
|
|||||||
|
|
||||||
if($cmd === 'block') {
|
if($cmd === 'block') {
|
||||||
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_BLOCKED)) {
|
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_BLOCKED)) {
|
||||||
info((intval($orig_record[0]['abook_blocked'])
|
|
||||||
? t('Channel has been unblocked')
|
|
||||||
: t('Channel has been blocked')) . EOL );
|
|
||||||
connedit_clone($a);
|
connedit_clone($a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -410,9 +406,6 @@ function connedit_content(&$a) {
|
|||||||
|
|
||||||
if($cmd === 'ignore') {
|
if($cmd === 'ignore') {
|
||||||
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_IGNORED)) {
|
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_IGNORED)) {
|
||||||
info((intval($orig_record[0]['abook_ignored'])
|
|
||||||
? t('Channel has been unignored')
|
|
||||||
: t('Channel has been ignored')) . EOL );
|
|
||||||
connedit_clone($a);
|
connedit_clone($a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -422,9 +415,6 @@ function connedit_content(&$a) {
|
|||||||
|
|
||||||
if($cmd === 'archive') {
|
if($cmd === 'archive') {
|
||||||
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_ARCHIVED)) {
|
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_ARCHIVED)) {
|
||||||
info((intval($orig_record[0]['abook_archived'])
|
|
||||||
? t('Channel has been unarchived')
|
|
||||||
: t('Channel has been archived')) . EOL );
|
|
||||||
connedit_clone($a);
|
connedit_clone($a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -434,9 +424,6 @@ function connedit_content(&$a) {
|
|||||||
|
|
||||||
if($cmd === 'hide') {
|
if($cmd === 'hide') {
|
||||||
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_HIDDEN)) {
|
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_HIDDEN)) {
|
||||||
info((intval($orig_record[0]['abook_hidden'])
|
|
||||||
? t('Channel has been unhidden')
|
|
||||||
: t('Channel has been hidden')) . EOL );
|
|
||||||
connedit_clone($a);
|
connedit_clone($a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -450,9 +437,6 @@ function connedit_content(&$a) {
|
|||||||
if($cmd === 'approve') {
|
if($cmd === 'approve') {
|
||||||
if(intval($orig_record[0]['abook_pending'])) {
|
if(intval($orig_record[0]['abook_pending'])) {
|
||||||
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_PENDING)) {
|
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_PENDING)) {
|
||||||
info((intval($orig_record[0]['abook_pending'])
|
|
||||||
? t('Channel has been approved')
|
|
||||||
: t('Channel has been unapproved')) . EOL );
|
|
||||||
connedit_clone($a);
|
connedit_clone($a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -493,59 +477,62 @@ function connedit_content(&$a) {
|
|||||||
$contact_id = $a->poi['abook_id'];
|
$contact_id = $a->poi['abook_id'];
|
||||||
$contact = $a->poi;
|
$contact = $a->poi;
|
||||||
|
|
||||||
|
$buttons = array(
|
||||||
|
|
||||||
$tabs = array(
|
'view' => array(
|
||||||
|
|
||||||
array(
|
|
||||||
'label' => t('View Profile'),
|
'label' => t('View Profile'),
|
||||||
'url' => chanlink_cid($contact['abook_id']),
|
'url' => chanlink_cid($contact['abook_id']),
|
||||||
'sel' => '',
|
'sel' => '',
|
||||||
'title' => sprintf( t('View %s\'s profile'), $contact['xchan_name']),
|
'title' => sprintf( t('View %s\'s profile'), $contact['xchan_name']),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
'refresh' => array(
|
||||||
'label' => t('Refresh Permissions'),
|
'label' => t('Refresh Permissions'),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/refresh',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/refresh',
|
||||||
'sel' => '',
|
'sel' => '',
|
||||||
'title' => t('Fetch updated permissions'),
|
'title' => t('Fetch updated permissions'),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
'recent' => array(
|
||||||
'label' => t('Recent Activity'),
|
'label' => t('Recent Activity'),
|
||||||
'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
|
'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
|
||||||
'sel' => '',
|
'sel' => '',
|
||||||
'title' => t('View recent posts and comments'),
|
'title' => t('View recent posts and comments'),
|
||||||
)
|
),
|
||||||
);
|
|
||||||
|
|
||||||
$buttons = array(
|
'block' => array(
|
||||||
array(
|
|
||||||
'label' => (intval($contact['abook_blocked']) ? t('Unblock') : t('Block')),
|
'label' => (intval($contact['abook_blocked']) ? t('Unblock') : t('Block')),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/block',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/block',
|
||||||
'sel' => (intval($contact['abook_blocked']) ? 'active' : ''),
|
'sel' => (intval($contact['abook_blocked']) ? 'active' : ''),
|
||||||
'title' => t('Block (or Unblock) all communications with this connection'),
|
'title' => t('Block (or Unblock) all communications with this connection'),
|
||||||
|
'info' => (intval($contact['abook_blocked']) ? t('This connection is blocked!') : ''),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
'ignore' => array(
|
||||||
'label' => (intval($contact['abook_ignored']) ? t('Unignore') : t('Ignore')),
|
'label' => (intval($contact['abook_ignored']) ? t('Unignore') : t('Ignore')),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/ignore',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/ignore',
|
||||||
'sel' => (intval($contact['abook_ignored']) ? 'active' : ''),
|
'sel' => (intval($contact['abook_ignored']) ? 'active' : ''),
|
||||||
'title' => t('Ignore (or Unignore) all inbound communications from this connection'),
|
'title' => t('Ignore (or Unignore) all inbound communications from this connection'),
|
||||||
|
'info' => (intval($contact['abook_ignored']) ? t('This connection is ignored!') : ''),
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
|
'archive' => array(
|
||||||
'label' => (intval($contact['abook_archived']) ? t('Unarchive') : t('Archive')),
|
'label' => (intval($contact['abook_archived']) ? t('Unarchive') : t('Archive')),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/archive',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/archive',
|
||||||
'sel' => (intval($contact['abook_archived']) ? 'active' : ''),
|
'sel' => (intval($contact['abook_archived']) ? 'active' : ''),
|
||||||
'title' => t('Archive (or Unarchive) this connection - mark channel dead but keep content'),
|
'title' => t('Archive (or Unarchive) this connection - mark channel dead but keep content'),
|
||||||
|
'info' => (intval($contact['abook_archived']) ? t('This connection is archived!') : ''),
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
|
'hide' => array(
|
||||||
'label' => (intval($contact['abook_hidden']) ? t('Unhide') : t('Hide')),
|
'label' => (intval($contact['abook_hidden']) ? t('Unhide') : t('Hide')),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/hide',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/hide',
|
||||||
'sel' => (intval($contact['abook_hidden']) ? 'active' : ''),
|
'sel' => (intval($contact['abook_hidden']) ? 'active' : ''),
|
||||||
'title' => t('Hide or Unhide this connection from your other connections'),
|
'title' => t('Hide or Unhide this connection from your other connections'),
|
||||||
|
'info' => (intval($contact['abook_hidden']) ? t('This connection is hidden!') : ''),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
'delete' => array(
|
||||||
'label' => t('Delete'),
|
'label' => t('Delete'),
|
||||||
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/drop',
|
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/drop',
|
||||||
'sel' => '',
|
'sel' => '',
|
||||||
@ -556,18 +543,9 @@ function connedit_content(&$a) {
|
|||||||
|
|
||||||
$self = false;
|
$self = false;
|
||||||
|
|
||||||
if(! intval($contact['abook_self'])) {
|
if(intval($contact['abook_self']))
|
||||||
$tab_tpl = get_markup_template('common_tabs.tpl');
|
|
||||||
$t = replace_macros($tab_tpl, array('$tabs'=>$tabs));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$self = true;
|
$self = true;
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
|
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
|
||||||
'$editselect' => $editselect
|
|
||||||
));
|
|
||||||
|
|
||||||
require_once('include/contact_selectors.php');
|
require_once('include/contact_selectors.php');
|
||||||
|
|
||||||
$tpl = get_markup_template("abook_edit.tpl");
|
$tpl = get_markup_template("abook_edit.tpl");
|
||||||
@ -616,7 +594,6 @@ function connedit_content(&$a) {
|
|||||||
$rating_text = $xl[0]['xlink_rating_text'];
|
$rating_text = $xl[0]['xlink_rating_text'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$poco_rating = get_config('system','poco_rating_enable');
|
$poco_rating = get_config('system','poco_rating_enable');
|
||||||
|
|
||||||
// if unset default to enabled
|
// if unset default to enabled
|
||||||
@ -640,101 +617,78 @@ function connedit_content(&$a) {
|
|||||||
$global_perms = get_perms();
|
$global_perms = get_perms();
|
||||||
$existing = get_all_perms(local_channel(),$contact['abook_xchan']);
|
$existing = get_all_perms(local_channel(),$contact['abook_xchan']);
|
||||||
|
|
||||||
$unapproved = array('pending', t('Approve this connection'), '', t('Accept connection to allow communication'));
|
$unapproved = array('pending', t('Approve this connection'), '', t('Accept connection to allow communication'), array(t('No'),('Yes')));
|
||||||
|
|
||||||
|
$multiprofs = ((feature_enabled(local_channel(),'multi_profiles')) ? true : false);
|
||||||
|
|
||||||
|
if($slide && !$multiprofs)
|
||||||
|
$affinity = t('Set Affinity');
|
||||||
|
|
||||||
|
if(!$slide && $multiprofs)
|
||||||
|
$affinity = t('Set Profile');
|
||||||
|
|
||||||
|
if($slide && $multiprofs)
|
||||||
|
$affinity = t('Set Affinity & Profile');
|
||||||
|
|
||||||
foreach($global_perms as $k => $v) {
|
foreach($global_perms as $k => $v) {
|
||||||
$thisperm = (($contact['abook_my_perms'] & $v[1]) ? "1" : '');
|
$thisperm = (($contact['abook_my_perms'] & $v[1]) ? "1" : '');
|
||||||
|
$checkinherited = ((($channel[$v[0]]) && ($channel[$v[0]] != PERMS_SPECIFIC)) ? "1" : '');
|
||||||
|
|
||||||
// For auto permissions (when $self is true) we don't want to look at existing
|
// For auto permissions (when $self is true) we don't want to look at existing
|
||||||
// permissions because they are enabled for the channel owner
|
// permissions because they are enabled for the channel owner
|
||||||
|
|
||||||
if((! $self) && ($existing[$k]))
|
if((! $self) && ($existing[$k]))
|
||||||
$thisperm = "1";
|
$thisperm = "1";
|
||||||
|
|
||||||
$perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC || $self) ? '' : '1'), $v[4]);
|
$perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4], $checkinherited);
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
|
|
||||||
'$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connections: settings for %s'),$contact['xchan_name'])),
|
'$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])),
|
||||||
'$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), ''),
|
'$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), 'Connection requests will be approved without your interaction', array(t('No'),('Yes'))),
|
||||||
'$addr' => $contact['xchan_addr'],
|
'$addr' => $contact['xchan_addr'],
|
||||||
|
'$addr_text' => t('This connection\'s address is'),
|
||||||
'$notself' => (($self) ? '' : '1'),
|
'$notself' => (($self) ? '' : '1'),
|
||||||
'$self' => (($self) ? '1' : ''),
|
'$self' => (($self) ? '1' : ''),
|
||||||
'$autolbl' => t('Apply the permissions indicated on this page to all new connections.'),
|
'$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),
|
||||||
'$buttons' => (($self) ? '' : $buttons),
|
'$buttons' => (($self) ? '' : $buttons),
|
||||||
'$viewprof' => t('View Profile'),
|
|
||||||
'$clickme' => t('Click to open/close'),
|
|
||||||
'$lbl_slider' => t('Slide to adjust your degree of friendship'),
|
'$lbl_slider' => t('Slide to adjust your degree of friendship'),
|
||||||
'$lbl_rating' => t('Rating (this information is public)'),
|
'$lbl_rating' => t('Rating'),
|
||||||
'$lbl_rating_txt' => t('Optionally explain your rating (this information is public)'),
|
'$lbl_rating_label' => t('Slide to adjust your rating'),
|
||||||
|
'$lbl_rating_txt' => t('Optionally explain your rating'),
|
||||||
'$connfilter' => feature_enabled(local_channel(),'connfilter'),
|
'$connfilter' => feature_enabled(local_channel(),'connfilter'),
|
||||||
|
'$connfilter_label' => t('Custom Filter'),
|
||||||
'$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
|
'$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
|
||||||
'$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
|
'$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
|
||||||
'$rating_text' => array('rating_text', t('Optionally explain your rating (this information is public)'),$rating_text,''),
|
'$rating_text' => array('rating_text', t('Optionally explain your rating'),$rating_text,''),
|
||||||
|
'$rating_info' => t('This information is public!'),
|
||||||
'$rating' => $rating,
|
'$rating' => $rating,
|
||||||
'$rating_val' => $rating_val,
|
'$rating_val' => $rating_val,
|
||||||
'$slide' => $slide,
|
'$slide' => $slide,
|
||||||
'$tabs' => $t,
|
'$affinity' => $affinity,
|
||||||
'$tab_str' => $tab_str,
|
'$pending_label' => t('Connection Pending Approval'),
|
||||||
'$perms_step1' => t('Default permissions for your channel type have (just) been applied. They have not yet been submitted. Please review the permissions on this page and make any desired changes at this time. This new connection may <em>not</em> be able to communicate with you until you submit this page, which will install and apply the selected permissions.'),
|
'$pending_modal_title' => t('Connection Request'),
|
||||||
|
'$pending_modal_body' => sprintf(t('(%s) would like to connect with you. Please approve this connection to allow communication.'), $contact['xchan_addr']),
|
||||||
|
'$pending_modal_approve' => t('Approve'),
|
||||||
|
'$pending_modal_dismiss' => t('Approve Later'),
|
||||||
'$is_pending' => (intval($contact['abook_pending']) ? 1 : ''),
|
'$is_pending' => (intval($contact['abook_pending']) ? 1 : ''),
|
||||||
'$unapproved' => $unapproved,
|
'$unapproved' => $unapproved,
|
||||||
'$inherited' => t('inherited'),
|
'$inherited' => t('inherited'),
|
||||||
'$approve' => t('Approve this connection'),
|
|
||||||
'$noperms' => (($contact['abook_my_perms']) ? false : true),
|
|
||||||
'$no_perms' => (((! $self) && (! $contact['abook_my_perms'])) ? t('Connection has no individual permissions!') : ''),
|
|
||||||
'$noperm_desc' => (((! $self) && (! $contact['abook_my_perms'])) ? t('This may be appropriate based on your <a href="settings">privacy settings</a>, though you may wish to review the "Advanced Permissions".') : ''),
|
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$lbl_vis1' => t('Profile Visibility'),
|
|
||||||
'$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['xchan_name']),
|
'$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['xchan_name']),
|
||||||
'$lbl_info1' => t('Contact Information / Notes'),
|
|
||||||
'$infedit' => t('Edit contact notes'),
|
|
||||||
'$close' => $contact['abook_closeness'],
|
'$close' => $contact['abook_closeness'],
|
||||||
'$them' => t('Their Settings'),
|
'$them' => t('Their Settings'),
|
||||||
'$me' => t('My Settings'),
|
'$me' => t('My Settings'),
|
||||||
'$perms' => $perms,
|
'$perms' => $perms,
|
||||||
'$perms_new' => t('Default permissions for this channel type have (just) been applied. They have <em>not</em> been saved and there are currently no stored default permissions. Please review/edit the applied settings and click [Submit] to finalize.'),
|
|
||||||
'$clear' => t('Clear/Disable Automatic Permissions'),
|
|
||||||
'$forum' => t('Forum Members'),
|
|
||||||
'$soapbox' => t('Soapbox'),
|
|
||||||
'$full' => t('Full Sharing (typical social network permissions)'),
|
|
||||||
'$cautious' => t('Cautious Sharing '),
|
|
||||||
'$follow' => t('Follow Only'),
|
|
||||||
'$permlbl' => t('Individual Permissions'),
|
'$permlbl' => t('Individual Permissions'),
|
||||||
'$permnote' => t('Some permissions may be inherited from your channel <a href="settings">privacy settings</a>, which have higher priority than individual settings. Changing those inherited settings on this page will have no effect.'),
|
'$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'),
|
||||||
'$advanced' => t('Advanced Permissions'),
|
'$permnote_self' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can change those settings here but they wont have any impact unless the inherited setting changes.'),
|
||||||
'$quick' => t('Simple Permissions (select one and submit)'),
|
|
||||||
'$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_channel() . '/' . $contact['id'],
|
|
||||||
'$all_friends' => $all_friends,
|
|
||||||
'$relation_text' => $relation_text,
|
|
||||||
'$visit' => sprintf( t('Visit %s\'s profile - %s'),$contact['xchan_name'],$contact['xchan_url']),
|
|
||||||
'$blockunblock' => t('Block/Unblock contact'),
|
|
||||||
'$ignorecont' => t('Ignore contact'),
|
|
||||||
'$lblcrepair' => t("Repair URL settings"),
|
|
||||||
'$lblrecent' => t('View conversations'),
|
|
||||||
'$lblsuggest' => $lblsuggest,
|
|
||||||
'$delete' => t('Delete contact'),
|
|
||||||
|
|
||||||
'$poll_interval' => contact_poll_interval($contact['priority'],(! $poll_enabled)),
|
|
||||||
'$poll_enabled' => $poll_enabled,
|
|
||||||
'$lastupdtext' => t('Last update:'),
|
'$lastupdtext' => t('Last update:'),
|
||||||
'$lost_contact' => $lost_contact,
|
|
||||||
'$updpub' => t('Update public posts'),
|
|
||||||
'$last_update' => relative_date($contact['abook_connected']),
|
'$last_update' => relative_date($contact['abook_connected']),
|
||||||
'$udnow' => t('Update now'),
|
|
||||||
'$profile_select' => contact_profile_assign($contact['abook_profile']),
|
'$profile_select' => contact_profile_assign($contact['abook_profile']),
|
||||||
'$multiprofs' => feature_enabled(local_channel(),'multi_profiles'),
|
'$multiprofs' => $multiprofs,
|
||||||
'$contact_id' => $contact['abook_id'],
|
'$contact_id' => $contact['abook_id'],
|
||||||
'$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ),
|
'$name' => $contact['xchan_name'],
|
||||||
'$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),
|
|
||||||
'$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''),
|
|
||||||
'$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''),
|
|
||||||
'$archived' => (($contact['archive']) ? t('Currently archived') : ''),
|
|
||||||
'$pending' => (($contact['archive']) ? t('Currently pending') : ''),
|
|
||||||
'$name' => $contact['name'],
|
|
||||||
'$alt_text' => $alt_text,
|
|
||||||
'$url' => $url
|
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ function directory_init(&$a) {
|
|||||||
$observer = get_observer_hash();
|
$observer = get_observer_hash();
|
||||||
$global_changed = false;
|
$global_changed = false;
|
||||||
$safe_changed = false;
|
$safe_changed = false;
|
||||||
|
$pubforums_changed = false;
|
||||||
|
|
||||||
if(array_key_exists('global',$_REQUEST)) {
|
if(array_key_exists('global',$_REQUEST)) {
|
||||||
$globaldir = intval($_REQUEST['global']);
|
$globaldir = intval($_REQUEST['global']);
|
||||||
@ -28,7 +29,7 @@ function directory_init(&$a) {
|
|||||||
$_SESSION['globaldir'] = $globaldir;
|
$_SESSION['globaldir'] = $globaldir;
|
||||||
if($observer)
|
if($observer)
|
||||||
set_xconfig($observer,'directory','globaldir',$globaldir);
|
set_xconfig($observer,'directory','globaldir',$globaldir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(array_key_exists('safe',$_REQUEST)) {
|
if(array_key_exists('safe',$_REQUEST)) {
|
||||||
$safemode = intval($_REQUEST['safe']);
|
$safemode = intval($_REQUEST['safe']);
|
||||||
@ -37,9 +38,19 @@ function directory_init(&$a) {
|
|||||||
if($safe_changed) {
|
if($safe_changed) {
|
||||||
$_SESSION['safemode'] = $safemode;
|
$_SESSION['safemode'] = $safemode;
|
||||||
if($observer)
|
if($observer)
|
||||||
set_xconfig($observer,'directory','safe_mode',$safemode);
|
set_xconfig($observer,'directory','safemode',$safemode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(array_key_exists('pubforums',$_REQUEST)) {
|
||||||
|
$pubforums = intval($_REQUEST['pubforums']);
|
||||||
|
$pubforums_changed = true;
|
||||||
|
}
|
||||||
|
if($pubforums_changed) {
|
||||||
|
$_SESSION['pubforums'] = $pubforums;
|
||||||
|
if($observer)
|
||||||
|
set_xconfig($observer,'directory','pubforums',$pubforums);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function directory_content(&$a) {
|
function directory_content(&$a) {
|
||||||
@ -51,18 +62,14 @@ function directory_content(&$a) {
|
|||||||
|
|
||||||
$observer = get_observer_hash();
|
$observer = get_observer_hash();
|
||||||
|
|
||||||
$globaldir = get_globaldir_setting($observer);
|
$globaldir = get_directory_setting($observer, 'globaldir');
|
||||||
// override your personal global search pref if we're doing a navbar search of the directory
|
// override your personal global search pref if we're doing a navbar search of the directory
|
||||||
if(intval($_REQUEST['navsearch']))
|
if(intval($_REQUEST['navsearch']))
|
||||||
$globaldir = 1;
|
$globaldir = 1;
|
||||||
|
|
||||||
$safe_mode = get_safemode_setting($observer);
|
$safe_mode = get_directory_setting($observer, 'safemode');
|
||||||
|
|
||||||
$pubforums = null;
|
$pubforums = get_directory_setting($observer, 'pubforums');
|
||||||
if(array_key_exists('pubforums',$_REQUEST))
|
|
||||||
$pubforums = intval($_REQUEST['pubforums']);
|
|
||||||
if(! $pubforums)
|
|
||||||
$pubforums = null;
|
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
nav_set_selected('directory');
|
nav_set_selected('directory');
|
||||||
@ -375,7 +382,13 @@ function directory_content(&$a) {
|
|||||||
'$entries' => $entries,
|
'$entries' => $entries,
|
||||||
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
|
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
|
||||||
'$submit' => t('Find'),
|
'$submit' => t('Find'),
|
||||||
'$next' => alt_pager($a,$j['records'], t('next page'), t('previous page'))
|
'$next' => alt_pager($a,$j['records'], t('next page'), t('previous page')),
|
||||||
|
'$sort' => t('Sort options'),
|
||||||
|
'$normal' => t('Alphabetic'),
|
||||||
|
'$reverse' => t('Reverse Alphabetic'),
|
||||||
|
'$date' => t('Newest to Oldest'),
|
||||||
|
'$reversedate' => t('Oldest to Newest'),
|
||||||
|
'$suggest' => $suggest ? '&suggest=1' : ''
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ function display_content(&$a, $update = 0, $load = false) {
|
|||||||
'deny_gid' => $channel['channel_deny_gid']
|
'deny_gid' => $channel['channel_deny_gid']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => true,
|
'is_owner' => true,
|
||||||
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
|
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
|
||||||
@ -63,10 +64,13 @@ function display_content(&$a, $update = 0, $load = false) {
|
|||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => true,
|
'visitor' => true,
|
||||||
'profile_uid' => local_channel(),
|
'profile_uid' => local_channel(),
|
||||||
'return_path' => 'channel/' . $channel['channel_address']
|
'return_path' => 'channel/' . $channel['channel_address'],
|
||||||
|
'expanded' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$o = '<div id="jot-popup">';
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a,$x);
|
||||||
|
$o .= '</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,12 +108,6 @@ function editblock_content(&$a) {
|
|||||||
else
|
else
|
||||||
$mimeselect = mimetype_select($itm[0]['uid'],$mimetype);
|
$mimeselect = mimetype_select($itm[0]['uid'],$mimetype);
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
|
||||||
'$title' => t('Edit Block'),
|
|
||||||
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
|
|
||||||
'$id' => $itm[0]['id']
|
|
||||||
));
|
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
@ -133,17 +127,17 @@ function editblock_content(&$a) {
|
|||||||
|
|
||||||
$rp = 'blocks/' . $channel['channel_address'];
|
$rp = 'blocks/' . $channel['channel_address'];
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$editor = replace_macros($tpl,array(
|
||||||
'$return_path' => $rp,
|
'$return_path' => $rp,
|
||||||
'$action' => 'item',
|
'$action' => 'item',
|
||||||
'$webpage' => ITEM_TYPE_BUILDBLOCK,
|
'$webpage' => ITEM_TYPE_BLOCK,
|
||||||
'$share' => t('Edit'),
|
'$share' => t('Edit'),
|
||||||
'$bold' => t('Bold'),
|
'$bold' => t('Bold'),
|
||||||
'$italic' => t('Italic'),
|
'$italic' => t('Italic'),
|
||||||
'$underline' => t('Underline'),
|
'$underline' => t('Underline'),
|
||||||
'$quote' => t('Quote'),
|
'$quote' => t('Quote'),
|
||||||
'$code' => t('Code'),
|
'$code' => t('Code'),
|
||||||
'$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
|
'$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
|
||||||
'$upload' => t('Upload photo'),
|
'$upload' => t('Upload photo'),
|
||||||
'$attach' => t('Attach file'),
|
'$attach' => t('Attach file'),
|
||||||
'$weblink' => t('Insert web link'),
|
'$weblink' => t('Insert web link'),
|
||||||
@ -181,6 +175,13 @@ function editblock_content(&$a) {
|
|||||||
'$expires' => t('Set expiration date'),
|
'$expires' => t('Set expiration date'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
|
'$title' => t('Edit Block'),
|
||||||
|
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
|
||||||
|
'$id' => $itm[0]['id'],
|
||||||
|
'$editor' => $editor
|
||||||
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -101,12 +101,6 @@ function editlayout_content(&$a) {
|
|||||||
$layout_title = $item_id[0]['sid'];
|
$layout_title = $item_id[0]['sid'];
|
||||||
|
|
||||||
$plaintext = true;
|
$plaintext = true;
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
|
||||||
'$title' => t('Edit Layout'),
|
|
||||||
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
|
|
||||||
'$id' => $itm[0]['id']
|
|
||||||
));
|
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
@ -132,7 +126,7 @@ function editlayout_content(&$a) {
|
|||||||
|
|
||||||
$rp = 'layouts/' . $which;
|
$rp = 'layouts/' . $which;
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$editor = replace_macros($tpl,array(
|
||||||
'$return_path' => $rp,
|
'$return_path' => $rp,
|
||||||
'$action' => 'item',
|
'$action' => 'item',
|
||||||
'$webpage' => ITEM_TYPE_PDL,
|
'$webpage' => ITEM_TYPE_PDL,
|
||||||
@ -178,6 +172,14 @@ function editlayout_content(&$a) {
|
|||||||
'$expires' => t('Set expiration date'),
|
'$expires' => t('Set expiration date'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
|
'$title' => t('Edit Layout'),
|
||||||
|
'$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
|
||||||
|
'$id' => $itm[0]['id'],
|
||||||
|
'$editor' => $editor
|
||||||
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,6 @@ function editpost_content(&$a) {
|
|||||||
|
|
||||||
$channel = $a->get_channel();
|
$channel = $a->get_channel();
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
|
||||||
'$title' => t('Edit post')
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
@ -53,8 +48,6 @@ function editpost_content(&$a) {
|
|||||||
'$confirmdelete' => t('Delete item?'),
|
'$confirmdelete' => t('Delete item?'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(intval($itm[0]['item_obscured'])) {
|
if(intval($itm[0]['item_obscured'])) {
|
||||||
$key = get_config('system','prvkey');
|
$key = get_config('system','prvkey');
|
||||||
if($itm[0]['title'])
|
if($itm[0]['title'])
|
||||||
@ -107,7 +100,7 @@ function editpost_content(&$a) {
|
|||||||
$cipher = 'aes256';
|
$cipher = 'aes256';
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$editor = replace_macros($tpl,array(
|
||||||
'$return_path' => $_SESSION['return_url'],
|
'$return_path' => $_SESSION['return_url'],
|
||||||
'$action' => 'item',
|
'$action' => 'item',
|
||||||
'$share' => t('Edit'),
|
'$share' => t('Edit'),
|
||||||
@ -161,6 +154,11 @@ function editpost_content(&$a) {
|
|||||||
'$expiryModalCANCEL' => t('Cancel'),
|
'$expiryModalCANCEL' => t('Cancel'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
|
'$title' => t('Edit post'),
|
||||||
|
'$editor' => $editor
|
||||||
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -165,15 +165,12 @@ function editwebpage_content(&$a) {
|
|||||||
|
|
||||||
$rp = 'webpages/' . $which;
|
$rp = 'webpages/' . $which;
|
||||||
|
|
||||||
logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')));
|
|
||||||
|
|
||||||
$editor = replace_macros($tpl,array(
|
$editor = replace_macros($tpl,array(
|
||||||
'$return_path' => $rp,
|
'$return_path' => $rp,
|
||||||
'$webpage' => ITEM_TYPE_WEBPAGE,
|
'$webpage' => ITEM_TYPE_WEBPAGE,
|
||||||
'$placeholdpagetitle' => t('Page link title'),
|
'$placeholdpagetitle' => t('Page link title'),
|
||||||
'$pagetitle' => $page_title,
|
'$pagetitle' => $page_title,
|
||||||
'$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
|
'$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
|
||||||
|
|
||||||
'$action' => 'item',
|
'$action' => 'item',
|
||||||
'$share' => t('Edit'),
|
'$share' => t('Edit'),
|
||||||
'$bold' => t('Bold'),
|
'$bold' => t('Bold'),
|
||||||
|
@ -13,6 +13,20 @@ function events_post(&$a) {
|
|||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(($_FILES) && array_key_exists('userfile',$_FILES) && intval($_FILES['userfile']['size'])) {
|
||||||
|
$src = $_FILES['userfile']['tmp_name'];
|
||||||
|
if($src) {
|
||||||
|
$result = parse_ical_file($src,local_channel());
|
||||||
|
if($result)
|
||||||
|
info( t('Calendar entries imported.') . EOL);
|
||||||
|
else
|
||||||
|
notice( t('No calendar entries found.') . EOL);
|
||||||
|
@unlink($src);
|
||||||
|
}
|
||||||
|
goaway(z_root() . '/events');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$event_id = ((x($_POST,'event_id')) ? intval($_POST['event_id']) : 0);
|
$event_id = ((x($_POST,'event_id')) ? intval($_POST['event_id']) : 0);
|
||||||
$event_hash = ((x($_POST,'event_hash')) ? $_POST['event_hash'] : '');
|
$event_hash = ((x($_POST,'event_hash')) ? $_POST['event_hash'] : '');
|
||||||
|
|
||||||
@ -148,10 +162,9 @@ function events_post(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Note: do not set `private` field for self-only events. It will
|
|
||||||
// keep even you from seeing them!
|
|
||||||
$str_contact_allow = '<' . $channel['channel_hash'] . '>';
|
$str_contact_allow = '<' . $channel['channel_hash'] . '>';
|
||||||
$str_group_allow = $str_contact_deny = $str_group_deny = '';
|
$str_group_allow = $str_contact_deny = $str_group_deny = '';
|
||||||
|
$private_event = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,6 +464,7 @@ function events_content(&$a) {
|
|||||||
|
|
||||||
if($export) {
|
if($export) {
|
||||||
header('Content-type: text/calendar');
|
header('Content-type: text/calendar');
|
||||||
|
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||||
echo ical_wrapper($r);
|
echo ical_wrapper($r);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
@ -477,8 +491,8 @@ function events_content(&$a) {
|
|||||||
'$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
|
'$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
|
||||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||||
'$events' => $events,
|
'$events' => $events,
|
||||||
|
'$upload' => t('Upload'),
|
||||||
|
'$submit' => t('Submit')
|
||||||
));
|
));
|
||||||
|
|
||||||
if (x($_GET,'id')){ echo $o; killme(); }
|
if (x($_GET,'id')){ echo $o; killme(); }
|
||||||
|
680
mod/import.php
@ -36,6 +36,9 @@ function import_post(&$a) {
|
|||||||
$filesize = intval($_FILES['filename']['size']);
|
$filesize = intval($_FILES['filename']['size']);
|
||||||
$filetype = $_FILES['filename']['type'];
|
$filetype = $_FILES['filename']['type'];
|
||||||
|
|
||||||
|
$completed = ((array_key_exists('import_step',$_SESSION)) ? intval($_SESSION['import_step']) : 0);
|
||||||
|
if($completed)
|
||||||
|
logger('saved import step: ' . $_SESSION['import_step']);
|
||||||
|
|
||||||
if($src) {
|
if($src) {
|
||||||
|
|
||||||
@ -114,360 +117,430 @@ function import_post(&$a) {
|
|||||||
|
|
||||||
// import channel
|
// import channel
|
||||||
|
|
||||||
$channel = $data['channel'];
|
if(array_key_exists('channel',$data)) {
|
||||||
|
$channel = $data['channel'];
|
||||||
|
|
||||||
if(! array_key_exists('channel_system',$channel)) {
|
if($completed < 1) {
|
||||||
$channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
|
|
||||||
$channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
$r = q("select * from channel where (channel_guid = '%s' or channel_hash = '%s' or channel_address = '%s' ) limit 1",
|
if(! array_key_exists('channel_system',$channel)) {
|
||||||
dbesc($channel['channel_guid']),
|
$channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
|
||||||
dbesc($channel['channel_hash']),
|
$channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
|
||||||
dbesc($channel['channel_address'])
|
}
|
||||||
);
|
|
||||||
|
|
||||||
// We should probably also verify the hash
|
$r = q("select * from channel where (channel_guid = '%s' or channel_hash = '%s' or channel_address = '%s' ) limit 1",
|
||||||
|
dbesc($channel['channel_guid']),
|
||||||
|
dbesc($channel['channel_hash']),
|
||||||
|
dbesc($channel['channel_address'])
|
||||||
|
);
|
||||||
|
|
||||||
if($r) {
|
// We should probably also verify the hash
|
||||||
if($r[0]['channel_guid'] === $channel['channel_guid'] || $r[0]['channel_hash'] === $channel['channel_hash']) {
|
|
||||||
logger('mod_import: duplicate channel. ', print_r($channel,true));
|
if($r) {
|
||||||
notice( t('Cannot create a duplicate channel identifier on this system. Import failed.') . EOL);
|
if($r[0]['channel_guid'] === $channel['channel_guid'] || $r[0]['channel_hash'] === $channel['channel_hash']) {
|
||||||
return;
|
logger('mod_import: duplicate channel. ', print_r($channel,true));
|
||||||
}
|
notice( t('Cannot create a duplicate channel identifier on this system. Import failed.') . EOL);
|
||||||
else {
|
return;
|
||||||
// try at most ten times to generate a unique address.
|
|
||||||
$x = 0;
|
|
||||||
$found_unique = false;
|
|
||||||
do {
|
|
||||||
$tmp = $channel['channel_address'] . mt_rand(1000,9999);
|
|
||||||
$r = q("select * from channel where channel_address = '%s' limit 1",
|
|
||||||
dbesc($tmp)
|
|
||||||
);
|
|
||||||
if(! $r) {
|
|
||||||
$channel['channel_address'] = $tmp;
|
|
||||||
$found_unique = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
$x ++;
|
else {
|
||||||
} while ($x < 10);
|
// try at most ten times to generate a unique address.
|
||||||
if(! $found_unique) {
|
$x = 0;
|
||||||
logger('mod_import: duplicate channel. randomisation failed.', print_r($channel,true));
|
$found_unique = false;
|
||||||
notice( t('Unable to create a unique channel address. Import failed.') . EOL);
|
do {
|
||||||
|
$tmp = $channel['channel_address'] . mt_rand(1000,9999);
|
||||||
|
$r = q("select * from channel where channel_address = '%s' limit 1",
|
||||||
|
dbesc($tmp)
|
||||||
|
);
|
||||||
|
if(! $r) {
|
||||||
|
$channel['channel_address'] = $tmp;
|
||||||
|
$found_unique = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$x ++;
|
||||||
|
} while ($x < 10);
|
||||||
|
if(! $found_unique) {
|
||||||
|
logger('mod_import: duplicate channel. randomisation failed.', print_r($channel,true));
|
||||||
|
notice( t('Unable to create a unique channel address. Import failed.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($channel['channel_id']);
|
||||||
|
$channel['channel_account_id'] = get_account_id();
|
||||||
|
$channel['channel_primary'] = (($seize) ? 1 : 0);
|
||||||
|
|
||||||
|
dbesc_array($channel);
|
||||||
|
|
||||||
|
$r = dbq("INSERT INTO channel (`"
|
||||||
|
. implode("`, `", array_keys($channel))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($channel))
|
||||||
|
. "')" );
|
||||||
|
|
||||||
|
if(! $r) {
|
||||||
|
logger('mod_import: channel clone failed. ', print_r($channel,true));
|
||||||
|
notice( t('Channel clone failed. Import failed.') . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($channel['channel_id']);
|
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
|
||||||
$channel['channel_account_id'] = get_account_id();
|
intval(get_account_id()),
|
||||||
$channel['channel_primary'] = (($seize) ? 1 : 0);
|
$channel['channel_guid'] // Already dbesc'd
|
||||||
|
|
||||||
dbesc_array($channel);
|
|
||||||
|
|
||||||
$r = dbq("INSERT INTO channel (`"
|
|
||||||
. implode("`, `", array_keys($channel))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($channel))
|
|
||||||
. "')" );
|
|
||||||
|
|
||||||
if(! $r) {
|
|
||||||
logger('mod_import: channel clone failed. ', print_r($channel,true));
|
|
||||||
notice( t('Channel clone failed. Import failed.') . EOL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
|
|
||||||
intval(get_account_id()),
|
|
||||||
$channel['channel_guid'] // Already dbesc'd
|
|
||||||
);
|
|
||||||
if(! $r) {
|
|
||||||
logger('mod_import: channel not found. ', print_r($channel,true));
|
|
||||||
notice( t('Cloned channel not found. Import failed.') . EOL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// reset
|
|
||||||
$channel = $r[0];
|
|
||||||
|
|
||||||
set_default_login_identity(get_account_id(),$channel['channel_id'],false);
|
|
||||||
|
|
||||||
|
|
||||||
$configs = $data['config'];
|
|
||||||
if($configs) {
|
|
||||||
foreach($configs as $config) {
|
|
||||||
unset($config['id']);
|
|
||||||
$config['uid'] = $channel['channel_id'];
|
|
||||||
dbesc_array($config);
|
|
||||||
$r = dbq("INSERT INTO pconfig (`"
|
|
||||||
. implode("`, `", array_keys($config))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($config))
|
|
||||||
. "')" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if($data['photo']) {
|
|
||||||
require_once('include/photo/photo_driver.php');
|
|
||||||
import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$profiles = $data['profile'];
|
|
||||||
if($profiles) {
|
|
||||||
foreach($profiles as $profile) {
|
|
||||||
unset($profile['id']);
|
|
||||||
$profile['aid'] = get_account_id();
|
|
||||||
$profile['uid'] = $channel['channel_id'];
|
|
||||||
|
|
||||||
// we are going to reset all profile photos to the original
|
|
||||||
// somebody will have to fix this later and put all the applicable photos into the export
|
|
||||||
|
|
||||||
$profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
|
|
||||||
$profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
|
|
||||||
|
|
||||||
|
|
||||||
dbesc_array($profile);
|
|
||||||
$r = dbq("INSERT INTO profile (`"
|
|
||||||
. implode("`, `", array_keys($profile))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($profile))
|
|
||||||
. "')" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$hublocs = $data['hubloc'];
|
|
||||||
if($hublocs) {
|
|
||||||
foreach($hublocs as $hubloc) {
|
|
||||||
|
|
||||||
if(! array_key_exists('hubloc_primary',$hublocs)) {
|
|
||||||
$hubloc['hubloc_primary'] = (($hubloc['hubloc_flags'] & 0x0001) ? 1 : 0);
|
|
||||||
$hubloc['hubloc_orphancheck'] = (($hubloc['hubloc_flags'] & 0x0004) ? 1 : 0);
|
|
||||||
$hubloc['hubloc_error'] = (($hubloc['hubloc_status'] & 0x0003) ? 1 : 0);
|
|
||||||
$hubloc['hubloc_deleted'] = (($hubloc['hubloc_flags'] & 0x1000) ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
$arr = array(
|
|
||||||
'guid' => $hubloc['hubloc_guid'],
|
|
||||||
'guid_sig' => $hubloc['guid_sig'],
|
|
||||||
'url' => $hubloc['hubloc_url'],
|
|
||||||
'url_sig' => $hubloc['hubloc_url_sig']
|
|
||||||
);
|
);
|
||||||
if(($hubloc['hubloc_hash'] === $channel['channel_hash']) && intval($hubloc['hubloc_primary']) && ($seize))
|
if(! $r) {
|
||||||
$hubloc['hubloc_primary'] = 0;
|
logger('mod_import: channel not found. ', print_r($channel,true));
|
||||||
|
notice( t('Cloned channel not found. Import failed.') . EOL);
|
||||||
if(! zot_gethub($arr)) {
|
return;
|
||||||
unset($hubloc['hubloc_id']);
|
|
||||||
dbesc_array($hubloc);
|
|
||||||
|
|
||||||
$r = dbq("INSERT INTO hubloc (`"
|
|
||||||
. implode("`, `", array_keys($hubloc))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($hubloc))
|
|
||||||
. "')" );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// reset
|
||||||
|
$channel = $r[0];
|
||||||
|
|
||||||
|
set_default_login_identity(get_account_id(),$channel['channel_id'],false);
|
||||||
|
logger('import step 1');
|
||||||
|
$_SESSION['import_step'] = 1;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
|
||||||
|
intval(get_account_id()),
|
||||||
|
dbesc($channel['channel_guid'])
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
$channel = $r[0];
|
||||||
|
else {
|
||||||
|
logger('mod_import: channel not found. ', print_r($channel,true));
|
||||||
|
notice( t('Cloned channel not found. Import failed.') . EOL);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create new hubloc for the new channel at this site
|
if($completed < 2) {
|
||||||
|
|
||||||
$r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_network, hubloc_primary,
|
$configs = $data['config'];
|
||||||
hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
|
if($configs) {
|
||||||
values ( '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
|
foreach($configs as $config) {
|
||||||
dbesc($channel['channel_guid']),
|
unset($config['id']);
|
||||||
dbesc($channel['channel_guid_sig']),
|
$config['uid'] = $channel['channel_id'];
|
||||||
dbesc($channel['channel_hash']),
|
dbesc_array($config);
|
||||||
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
|
$r = dbq("INSERT INTO pconfig (`"
|
||||||
dbesc('zot'),
|
. implode("`, `", array_keys($config))
|
||||||
intval(($seize) ? 1 : 0),
|
. "`) VALUES ('"
|
||||||
dbesc(z_root()),
|
. implode("', '", array_values($config))
|
||||||
dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))),
|
. "')" );
|
||||||
dbesc(get_app()->get_hostname()),
|
}
|
||||||
dbesc(z_root() . '/post'),
|
}
|
||||||
dbesc(get_config('system','pubkey'))
|
logger('import step 2');
|
||||||
);
|
$_SESSION['import_step'] = 2;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
|
||||||
// reset the original primary hubloc if it is being seized
|
|
||||||
|
|
||||||
if($seize)
|
|
||||||
$r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
|
|
||||||
dbesc($channel['channel_hash']),
|
|
||||||
dbesc(z_root())
|
|
||||||
);
|
|
||||||
|
|
||||||
// import xchans and contact photos
|
|
||||||
|
|
||||||
if($seize) {
|
if($completed < 3) {
|
||||||
|
|
||||||
// replace any existing xchan we may have on this site if we're seizing control
|
if($data['photo']) {
|
||||||
|
require_once('include/photo/photo_driver.php');
|
||||||
|
import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']);
|
||||||
|
}
|
||||||
|
|
||||||
$r = q("delete from xchan where xchan_hash = '%s'",
|
$profiles = $data['profile'];
|
||||||
dbesc($channel['channel_hash'])
|
if($profiles) {
|
||||||
);
|
foreach($profiles as $profile) {
|
||||||
|
unset($profile['id']);
|
||||||
|
$profile['aid'] = get_account_id();
|
||||||
|
$profile['uid'] = $channel['channel_id'];
|
||||||
|
|
||||||
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_follow, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_orphan, xchan_censored, xchan_selfcensored, xchan_system, xchan_pubforum, xchan_deleted ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d, %d )",
|
// we are going to reset all profile photos to the original
|
||||||
dbesc($channel['channel_hash']),
|
// somebody will have to fix this later and put all the applicable photos into the export
|
||||||
|
|
||||||
|
$profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
|
||||||
|
$profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
|
||||||
|
|
||||||
|
|
||||||
|
dbesc_array($profile);
|
||||||
|
$r = dbq("INSERT INTO profile (`"
|
||||||
|
. implode("`, `", array_keys($profile))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($profile))
|
||||||
|
. "')" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger('import step 3');
|
||||||
|
$_SESSION['import_step'] = 3;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($completed < 4) {
|
||||||
|
$hublocs = $data['hubloc'];
|
||||||
|
if($hublocs) {
|
||||||
|
foreach($hublocs as $hubloc) {
|
||||||
|
|
||||||
|
if(! array_key_exists('hubloc_primary',$hublocs)) {
|
||||||
|
$hubloc['hubloc_primary'] = (($hubloc['hubloc_flags'] & 0x0001) ? 1 : 0);
|
||||||
|
$hubloc['hubloc_orphancheck'] = (($hubloc['hubloc_flags'] & 0x0004) ? 1 : 0);
|
||||||
|
$hubloc['hubloc_error'] = (($hubloc['hubloc_status'] & 0x0003) ? 1 : 0);
|
||||||
|
$hubloc['hubloc_deleted'] = (($hubloc['hubloc_flags'] & 0x1000) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$arr = array(
|
||||||
|
'guid' => $hubloc['hubloc_guid'],
|
||||||
|
'guid_sig' => $hubloc['guid_sig'],
|
||||||
|
'url' => $hubloc['hubloc_url'],
|
||||||
|
'url_sig' => $hubloc['hubloc_url_sig']
|
||||||
|
);
|
||||||
|
if(($hubloc['hubloc_hash'] === $channel['channel_hash']) && intval($hubloc['hubloc_primary']) && ($seize))
|
||||||
|
$hubloc['hubloc_primary'] = 0;
|
||||||
|
|
||||||
|
if(! zot_gethub($arr)) {
|
||||||
|
unset($hubloc['hubloc_id']);
|
||||||
|
dbesc_array($hubloc);
|
||||||
|
|
||||||
|
$r = dbq("INSERT INTO hubloc (`"
|
||||||
|
. implode("`, `", array_keys($hubloc))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($hubloc))
|
||||||
|
. "')" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger('import step 4');
|
||||||
|
$_SESSION['import_step'] = 4;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($completed < 5) {
|
||||||
|
// create new hubloc for the new channel at this site
|
||||||
|
|
||||||
|
$r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_network, hubloc_primary,
|
||||||
|
hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
|
||||||
|
values ( '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
|
||||||
dbesc($channel['channel_guid']),
|
dbesc($channel['channel_guid']),
|
||||||
dbesc($channel['channel_guid_sig']),
|
dbesc($channel['channel_guid_sig']),
|
||||||
dbesc($channel['channel_pubkey']),
|
dbesc($channel['channel_hash']),
|
||||||
dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
|
|
||||||
dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
|
|
||||||
dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
|
|
||||||
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
|
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
|
||||||
dbesc(z_root() . '/channel/' . $channel['channel_address']),
|
|
||||||
dbesc(z_root() . '/follow?f=&url=%s'),
|
|
||||||
dbesc(z_root() . '/poco/' . $channel['channel_address']),
|
|
||||||
dbesc($channel['channel_name']),
|
|
||||||
dbesc('zot'),
|
dbesc('zot'),
|
||||||
dbesc(datetime_convert()),
|
intval(($seize) ? 1 : 0),
|
||||||
dbesc(datetime_convert()),
|
dbesc(z_root()),
|
||||||
0,0,0,0,0,0,0
|
dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))),
|
||||||
|
dbesc(get_app()->get_hostname()),
|
||||||
|
dbesc(z_root() . '/post'),
|
||||||
|
dbesc(get_config('system','pubkey'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// reset the original primary hubloc if it is being seized
|
||||||
|
|
||||||
|
if($seize) {
|
||||||
|
$r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
|
||||||
|
dbesc($channel['channel_hash']),
|
||||||
|
dbesc(z_root())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
logger('import step 5');
|
||||||
|
$_SESSION['import_step'] = 5;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($completed < 6) {
|
||||||
|
|
||||||
|
// import xchans and contact photos
|
||||||
|
|
||||||
|
if($seize) {
|
||||||
|
|
||||||
|
// replace any existing xchan we may have on this site if we're seizing control
|
||||||
|
|
||||||
|
$r = q("delete from xchan where xchan_hash = '%s'",
|
||||||
|
dbesc($channel['channel_hash'])
|
||||||
|
);
|
||||||
|
|
||||||
|
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_follow, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_orphan, xchan_censored, xchan_selfcensored, xchan_system, xchan_pubforum, xchan_deleted ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d, %d )",
|
||||||
|
dbesc($channel['channel_hash']),
|
||||||
|
dbesc($channel['channel_guid']),
|
||||||
|
dbesc($channel['channel_guid_sig']),
|
||||||
|
dbesc($channel['channel_pubkey']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
|
||||||
|
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
|
||||||
|
dbesc(z_root() . '/channel/' . $channel['channel_address']),
|
||||||
|
dbesc(z_root() . '/follow?f=&url=%s'),
|
||||||
|
dbesc(z_root() . '/poco/' . $channel['channel_address']),
|
||||||
|
dbesc($channel['channel_name']),
|
||||||
|
dbesc('zot'),
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
0,0,0,0,0,0,0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
logger('import step 6');
|
||||||
|
$_SESSION['import_step'] = 6;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
}
|
}
|
||||||
|
|
||||||
$xchans = $data['xchan'];
|
if($completed < 7) {
|
||||||
if($xchans) {
|
|
||||||
foreach($xchans as $xchan) {
|
|
||||||
if(! array_key_exists('xchan_hidden',$xchan)) {
|
|
||||||
$xchan['xchan_hidden'] = (($xchan['xchan_flags'] & 0x0001) ? 1 : 0);
|
|
||||||
$xchan['xchan_orphan'] = (($xchan['xchan_flags'] & 0x0002) ? 1 : 0);
|
|
||||||
$xchan['xchan_censored'] = (($xchan['xchan_flags'] & 0x0004) ? 1 : 0);
|
|
||||||
$xchan['xchan_selfcensored'] = (($xchan['xchan_flags'] & 0x0008) ? 1 : 0);
|
|
||||||
$xchan['xchan_system'] = (($xchan['xchan_flags'] & 0x0010) ? 1 : 0);
|
|
||||||
$xchan['xchan_pubforum'] = (($xchan['xchan_flags'] & 0x0020) ? 1 : 0);
|
|
||||||
$xchan['xchan_deleted'] = (($xchan['xchan_flags'] & 0x1000) ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
$r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
|
$xchans = $data['xchan'];
|
||||||
dbesc($xchan['xchan_hash'])
|
if($xchans) {
|
||||||
);
|
foreach($xchans as $xchan) {
|
||||||
if($r)
|
if(! array_key_exists('xchan_hidden',$xchan)) {
|
||||||
continue;
|
$xchan['xchan_hidden'] = (($xchan['xchan_flags'] & 0x0001) ? 1 : 0);
|
||||||
|
$xchan['xchan_orphan'] = (($xchan['xchan_flags'] & 0x0002) ? 1 : 0);
|
||||||
|
$xchan['xchan_censored'] = (($xchan['xchan_flags'] & 0x0004) ? 1 : 0);
|
||||||
|
$xchan['xchan_selfcensored'] = (($xchan['xchan_flags'] & 0x0008) ? 1 : 0);
|
||||||
|
$xchan['xchan_system'] = (($xchan['xchan_flags'] & 0x0010) ? 1 : 0);
|
||||||
|
$xchan['xchan_pubforum'] = (($xchan['xchan_flags'] & 0x0020) ? 1 : 0);
|
||||||
|
$xchan['xchan_deleted'] = (($xchan['xchan_flags'] & 0x1000) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
dbesc_array($xchan);
|
$r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
|
||||||
|
dbesc($xchan['xchan_hash'])
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
dbesc_array($xchan);
|
||||||
|
|
||||||
$r = dbq("INSERT INTO xchan (`"
|
$r = dbq("INSERT INTO xchan (`"
|
||||||
. implode("`, `", array_keys($xchan))
|
. implode("`, `", array_keys($xchan))
|
||||||
. "`) VALUES ('"
|
. "`) VALUES ('"
|
||||||
. implode("', '", array_values($xchan))
|
. implode("', '", array_values($xchan))
|
||||||
. "')" );
|
. "')" );
|
||||||
|
|
||||||
|
|
||||||
require_once('include/photo/photo_driver.php');
|
require_once('include/photo/photo_driver.php');
|
||||||
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
||||||
if($photos[4])
|
if($photos[4])
|
||||||
$photodate = NULL_DATE;
|
$photodate = NULL_DATE;
|
||||||
else
|
else
|
||||||
$photodate = $xchan['xchan_photo_date'];
|
$photodate = $xchan['xchan_photo_date'];
|
||||||
|
|
||||||
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
|
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
|
||||||
where xchan_hash = '%s'",
|
where xchan_hash = '%s'",
|
||||||
dbesc($photos[0]),
|
dbesc($photos[0]),
|
||||||
dbesc($photos[1]),
|
dbesc($photos[1]),
|
||||||
dbesc($photos[2]),
|
dbesc($photos[2]),
|
||||||
dbesc($photos[3]),
|
dbesc($photos[3]),
|
||||||
dbesc($photodate),
|
dbesc($photodate),
|
||||||
dbesc($xchan['xchan_hash'])
|
dbesc($xchan['xchan_hash'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
logger('import step 7');
|
||||||
|
$_SESSION['import_step'] = 7;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FIXME - ensure we have an xchan if somebody is trying to pull a fast one
|
// FIXME - ensure we have an xchan if somebody is trying to pull a fast one
|
||||||
|
|
||||||
|
|
||||||
$friends = 0;
|
|
||||||
$feeds = 0;
|
|
||||||
|
|
||||||
// import contacts
|
if($completed < 8) {
|
||||||
$abooks = $data['abook'];
|
$friends = 0;
|
||||||
if($abooks) {
|
$feeds = 0;
|
||||||
foreach($abooks as $abook) {
|
|
||||||
if($max_friends !== false && $friends > $max_friends)
|
|
||||||
continue;
|
|
||||||
if($max_feeds !== false && intval($abook['abook_feed']) && ($feeds > $max_feeds))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
unset($abook['abook_id']);
|
// import contacts
|
||||||
$abook['abook_account'] = get_account_id();
|
$abooks = $data['abook'];
|
||||||
$abook['abook_channel'] = $channel['channel_id'];
|
if($abooks) {
|
||||||
if(! array_key_exists('abook_blocked',$abook)) {
|
foreach($abooks as $abook) {
|
||||||
$abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0);
|
if($max_friends !== false && $friends > $max_friends)
|
||||||
$abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002 ) ? 1 : 0);
|
continue;
|
||||||
$abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004 ) ? 1 : 0);
|
if($max_feeds !== false && intval($abook['abook_feed']) && ($feeds > $max_feeds))
|
||||||
$abook['abook_archived'] = (($abook['abook_flags'] & 0x0008 ) ? 1 : 0);
|
continue;
|
||||||
$abook['abook_pending'] = (($abook['abook_flags'] & 0x0010 ) ? 1 : 0);
|
|
||||||
$abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020 ) ? 1 : 0);
|
unset($abook['abook_id']);
|
||||||
$abook['abook_self'] = (($abook['abook_flags'] & 0x0080 ) ? 1 : 0);
|
unset($abook['abook_rating']);
|
||||||
$abook['abook_feed'] = (($abook['abook_flags'] & 0x0100 ) ? 1 : 0);
|
unset($abook['abook_rating_text']);
|
||||||
|
$abook['abook_account'] = get_account_id();
|
||||||
|
$abook['abook_channel'] = $channel['channel_id'];
|
||||||
|
if(! array_key_exists('abook_blocked',$abook)) {
|
||||||
|
$abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0);
|
||||||
|
$abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002 ) ? 1 : 0);
|
||||||
|
$abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004 ) ? 1 : 0);
|
||||||
|
$abook['abook_archived'] = (($abook['abook_flags'] & 0x0008 ) ? 1 : 0);
|
||||||
|
$abook['abook_pending'] = (($abook['abook_flags'] & 0x0010 ) ? 1 : 0);
|
||||||
|
$abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020 ) ? 1 : 0);
|
||||||
|
$abook['abook_self'] = (($abook['abook_flags'] & 0x0080 ) ? 1 : 0);
|
||||||
|
$abook['abook_feed'] = (($abook['abook_flags'] & 0x0100 ) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($abook['abook_self']) {
|
||||||
|
$role = get_pconfig($channel['channel_id'],'system','permissions_role');
|
||||||
|
if(($role === 'forum') || ($abook['abook_my_perms'] & PERMS_W_TAGWALL)) {
|
||||||
|
q("update xchan set xchan_pubforum = 1 where xchan_hash = '%s' ",
|
||||||
|
dbesc($abook['abook_xchan'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dbesc_array($abook);
|
||||||
|
$r = dbq("INSERT INTO abook (`"
|
||||||
|
. implode("`, `", array_keys($abook))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($abook))
|
||||||
|
. "')" );
|
||||||
|
|
||||||
|
$friends ++;
|
||||||
|
if(intval($abook['abook_feed']))
|
||||||
|
$feeds ++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
logger('import step 8');
|
||||||
|
$_SESSION['import_step'] = 8;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
|
}
|
||||||
|
|
||||||
if($abook['abook_self']) {
|
|
||||||
$role = get_pconfig($channel['channel_id'],'system','permissions_role');
|
|
||||||
if(($role === 'forum') || ($abook['abook_my_perms'] & PERMS_W_TAGWALL)) {
|
if($completed < 9) {
|
||||||
q("update xchan set xchan_pubforum = 1 where xchan_hash = '%s' ",
|
$groups = $data['group'];
|
||||||
dbesc($abook['abook_xchan'])
|
if($groups) {
|
||||||
);
|
$saved = array();
|
||||||
|
foreach($groups as $group) {
|
||||||
|
$saved[$group['hash']] = array('old' => $group['id']);
|
||||||
|
unset($group['id']);
|
||||||
|
$group['uid'] = $channel['channel_id'];
|
||||||
|
dbesc_array($group);
|
||||||
|
$r = dbq("INSERT INTO groups (`"
|
||||||
|
. implode("`, `", array_keys($group))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($group))
|
||||||
|
. "')" );
|
||||||
|
}
|
||||||
|
$r = q("select * from `groups` where uid = %d",
|
||||||
|
intval($channel['channel_id'])
|
||||||
|
);
|
||||||
|
if($r) {
|
||||||
|
foreach($r as $rr) {
|
||||||
|
$saved[$rr['hash']]['new'] = $rr['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dbesc_array($abook);
|
|
||||||
$r = dbq("INSERT INTO abook (`"
|
|
||||||
. implode("`, `", array_keys($abook))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($abook))
|
|
||||||
. "')" );
|
|
||||||
|
|
||||||
$friends ++;
|
|
||||||
if(intval($abook['abook_feed']))
|
|
||||||
$feeds ++;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
$group_members = $data['group_member'];
|
||||||
$groups = $data['group'];
|
if($group_members) {
|
||||||
if($groups) {
|
foreach($group_members as $group_member) {
|
||||||
$saved = array();
|
unset($group_member['id']);
|
||||||
foreach($groups as $group) {
|
$group_member['uid'] = $channel['channel_id'];
|
||||||
$saved[$group['hash']] = array('old' => $group['id']);
|
foreach($saved as $x) {
|
||||||
unset($group['id']);
|
if($x['old'] == $group_member['gid'])
|
||||||
$group['uid'] = $channel['channel_id'];
|
$group_member['gid'] = $x['new'];
|
||||||
dbesc_array($group);
|
}
|
||||||
$r = dbq("INSERT INTO groups (`"
|
dbesc_array($group_member);
|
||||||
. implode("`, `", array_keys($group))
|
$r = dbq("INSERT INTO group_member (`"
|
||||||
. "`) VALUES ('"
|
. implode("`, `", array_keys($group_member))
|
||||||
. implode("', '", array_values($group))
|
. "`) VALUES ('"
|
||||||
. "')" );
|
. implode("', '", array_values($group_member))
|
||||||
}
|
. "')" );
|
||||||
$r = q("select * from `groups` where uid = %d",
|
|
||||||
intval($channel['channel_id'])
|
|
||||||
);
|
|
||||||
if($r) {
|
|
||||||
foreach($r as $rr) {
|
|
||||||
$saved[$rr['hash']]['new'] = $rr['id'];
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$group_members = $data['group_member'];
|
|
||||||
if($groups_members) {
|
|
||||||
foreach($group_members as $group_member) {
|
|
||||||
unset($group_member['id']);
|
|
||||||
$group_member['uid'] = $channel['channel_id'];
|
|
||||||
foreach($saved as $x) {
|
|
||||||
if($x['old'] == $group_member['gid'])
|
|
||||||
$group_member['gid'] = $x['new'];
|
|
||||||
}
|
|
||||||
dbesc_array($group_member);
|
|
||||||
$r = dbq("INSERT INTO group_member (`"
|
|
||||||
. implode("`, `", array_keys($group_member))
|
|
||||||
. "`) VALUES ('"
|
|
||||||
. implode("', '", array_values($group_member))
|
|
||||||
. "')" );
|
|
||||||
}
|
}
|
||||||
|
logger('import step 9');
|
||||||
|
$_SESSION['import_step'] = 9;
|
||||||
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
}
|
}
|
||||||
|
|
||||||
$saved_notification_flags = notifications_off($channel['channel_id']);
|
$saved_notification_flags = notifications_off($channel['channel_id']);
|
||||||
@ -544,6 +617,7 @@ function import_post(&$a) {
|
|||||||
|
|
||||||
change_channel($channel['channel_id']);
|
change_channel($channel['channel_id']);
|
||||||
|
|
||||||
|
unset($_SESSION['import_step']);
|
||||||
goaway(z_root() . '/network' );
|
goaway(z_root() . '/network' );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,8 @@ function like_content(&$a) {
|
|||||||
// get the item. Allow linked photos (which are normally hidden) to be liked
|
// get the item. Allow linked photos (which are normally hidden) to be liked
|
||||||
|
|
||||||
$r = q("SELECT * FROM item WHERE id = %d
|
$r = q("SELECT * FROM item WHERE id = %d
|
||||||
and item_blocked = 0 and item_moderated = 0 and item_spam = 0
|
and item_type = 0 and item_deleted = 0 and item_unpublished = 0
|
||||||
and item_deleted = 0 and item_unpublished = 0 and item_delayed_publish = 0 LIMIT 1",
|
and item_delayed = 0 and item_pending_remove = 0 and item_blocked = 0 LIMIT 1",
|
||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -137,7 +137,9 @@ function menu_content(&$a) {
|
|||||||
|
|
||||||
$o = replace_macros(get_markup_template('menuedit.tpl'), array(
|
$o = replace_macros(get_markup_template('menuedit.tpl'), array(
|
||||||
'$header' => t('Edit Menu'),
|
'$header' => t('Edit Menu'),
|
||||||
|
'$sys' => $a->is_sys,
|
||||||
'$menu_id' => intval(argv(1)),
|
'$menu_id' => intval(argv(1)),
|
||||||
|
'$menu_edit_link' => 'mitem/' . intval(argv(1)) . (($a->is_sys) ? '?f=&sys=1' : ''),
|
||||||
'$hintedit' => t('Add or remove entries to this menu'),
|
'$hintedit' => t('Add or remove entries to this menu'),
|
||||||
'$editcontents' => t('Edit menu contents'),
|
'$editcontents' => t('Edit menu contents'),
|
||||||
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
|
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
|
||||||
|
@ -44,9 +44,6 @@ function mitem_post(&$a) {
|
|||||||
if(! $a->data['menu'])
|
if(! $a->data['menu'])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
$channel = $a->get_channel();
|
|
||||||
|
|
||||||
if(!$_REQUEST['mitem_desc'] || !$_REQUEST['mitem_link']) {
|
if(!$_REQUEST['mitem_desc'] || !$_REQUEST['mitem_link']) {
|
||||||
notice( t('Unable to create element.') . EOL);
|
notice( t('Unable to create element.') . EOL);
|
||||||
return;
|
return;
|
||||||
@ -90,9 +87,6 @@ function mitem_post(&$a) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -167,7 +161,8 @@ function mitem_content(&$a) {
|
|||||||
'$submit_more' => t('Submit and continue'),
|
'$submit_more' => t('Submit and continue'),
|
||||||
'$display' => $display,
|
'$display' => $display,
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$menu_names' => $menu_names
|
'$menu_names' => $menu_names,
|
||||||
|
'$sys' => $a->is_sys
|
||||||
));
|
));
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('mitemlist.tpl'),array(
|
$o .= replace_macros(get_markup_template('mitemlist.tpl'),array(
|
||||||
|
@ -123,7 +123,7 @@ function photo_init(&$a) {
|
|||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
$allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_photos') : true);
|
$allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true);
|
||||||
|
|
||||||
$sql_extra = permissions_sql($r[0]['uid']);
|
$sql_extra = permissions_sql($r[0]['uid']);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ function photos_post(&$a) {
|
|||||||
|
|
||||||
$page_owner_uid = $a->data['channel']['channel_id'];
|
$page_owner_uid = $a->data['channel']['channel_id'];
|
||||||
|
|
||||||
if(perm_is_allowed($page_owner_uid,get_observer_hash(),'post_photos'))
|
if(perm_is_allowed($page_owner_uid,get_observer_hash(),'write_storage'))
|
||||||
$can_post = true;
|
$can_post = true;
|
||||||
|
|
||||||
if(! $can_post) {
|
if(! $can_post) {
|
||||||
@ -495,8 +495,8 @@ function photos_content(&$a) {
|
|||||||
|
|
||||||
$observer = $a->get_observer();
|
$observer = $a->get_observer();
|
||||||
|
|
||||||
$can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_photos');
|
$can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'write_storage');
|
||||||
$can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_photos');
|
$can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_storage');
|
||||||
|
|
||||||
if(! $can_view) {
|
if(! $can_view) {
|
||||||
notice( t('Access to this item is restricted.') . EOL);
|
notice( t('Access to this item is restricted.') . EOL);
|
||||||
|
@ -135,7 +135,7 @@ function profile_photo_post(&$a) {
|
|||||||
$im = photo_factory($base_image['data'], $base_image['type']);
|
$im = photo_factory($base_image['data'], $base_image['type']);
|
||||||
if($im->is_valid()) {
|
if($im->is_valid()) {
|
||||||
|
|
||||||
$im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
|
$im->cropImage(300,$srcX,$srcY,$srcW,$srcH);
|
||||||
|
|
||||||
$aid = get_account_id();
|
$aid = get_account_id();
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ function profile_photo_crop_ui_head(&$a, $ph, $hash, $smallest){
|
|||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
|
||||||
if($width < 175 || $height < 175) {
|
if($width < 300 || $height < 300) {
|
||||||
$ph->scaleImageUp(200);
|
$ph->scaleImageUp(200);
|
||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
@ -729,6 +729,6 @@ function what_next() {
|
|||||||
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
|
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
|
||||||
.t('Please see the file "install/INSTALL.txt".')
|
.t('Please see the file "install/INSTALL.txt".')
|
||||||
."</p><p>"
|
."</p><p>"
|
||||||
.t("Go to your new Red node <a href='$baseurl/register'>registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
|
.t("Go to your new hub <a href='$baseurl/register'>registration page</a> and register as new member. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
|
||||||
."</p>";
|
."</p>";
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,17 @@ function uexport_init(&$a) {
|
|||||||
|
|
||||||
require_once('include/identity.php');
|
require_once('include/identity.php');
|
||||||
|
|
||||||
header('content-type: application/octet_stream');
|
if(argc() > 1 && intval(argv(1)) > 1900) {
|
||||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . '.json"' );
|
$year = intval(argv(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
header('content-type: application/octet_stream');
|
||||||
|
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . '.json"' );
|
||||||
|
|
||||||
|
if($year) {
|
||||||
|
echo json_encode(identity_export_year(local_channel(),$year));
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
if(argc() > 1 && argv(1) === 'basic') {
|
if(argc() > 1 && argv(1) === 'basic') {
|
||||||
echo json_encode(identity_basic_export(local_channel()));
|
echo json_encode(identity_basic_export(local_channel()));
|
||||||
@ -34,7 +42,9 @@ function uexport_content(&$a) {
|
|||||||
'$basictitle' => t('Export Channel'),
|
'$basictitle' => t('Export Channel'),
|
||||||
'$basic' => t('Export your basic channel information to a small file. This acts as a backup of your connections, permissions, profile and basic data, which can be used to import your data to a new hub, but does not contain your content.'),
|
'$basic' => t('Export your basic channel information to a small file. This acts as a backup of your connections, permissions, profile and basic data, which can be used to import your data to a new hub, but does not contain your content.'),
|
||||||
'$fulltitle' => t('Export Content'),
|
'$fulltitle' => t('Export Content'),
|
||||||
'$full' => t('Export your channel information and all the content to a JSON backup. This backs up all of your connections, permissions, profile data and all of your content, but is generally not suitable for importing a channel to a new hub as this file may be VERY large. Please be patient - it may take several minutes for this download to begin.')
|
'$full' => t('Export your channel information and all the content to a JSON backup. This backs up all of your connections, permissions, profile data and the last year of posts. This file may be VERY large. Please be patient - it may take several minutes for this download to begin.'),
|
||||||
|
'$by_year' => t('Export your posts from a given year.'),
|
||||||
|
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
echo usage: $0 repo_url nickname
|
echo usage: $0 repo_url nickname
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
echo usage: $0 repo_url nickname
|
echo usage: $0 repo_url nickname
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo usage: $0 repository
|
echo usage: $0 repository
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/bash -f
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo usage: $0 repository
|
echo usage: $0 repository
|
||||||
|
@ -1 +1 @@
|
|||||||
2015-07-06.1085
|
2015-07-27.1106
|
||||||
|
@ -196,10 +196,6 @@ a.wall-item-name-link {
|
|||||||
filter:alpha(opacity=100);
|
filter:alpha(opacity=100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wall-item-wrapper-end {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shared_header {
|
.shared_header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,25 @@ main {
|
|||||||
aside {
|
aside {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 65px 7px 0px 7px;
|
padding: 80px 7px 0px 7px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 65px 7px 200px 7px;
|
padding: 80px 7px 200px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 65px 7px 200px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside#region_1 {
|
||||||
|
padding: 65px 7px 0px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,188 +1,18 @@
|
|||||||
|
.abook-them,
|
||||||
.field_abook_help {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
.abook-them {
|
|
||||||
padding: 5px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.abook-me {
|
.abook-me {
|
||||||
padding: 5px 5px 5px 15px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.acheckbox {
|
|
||||||
margin-bottom: 5px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.abook-pending-contact, .abook-autotext {
|
|
||||||
background: orange;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 10px;
|
|
||||||
padding: 20px 5px 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.abook-perms-msg {
|
.slider {
|
||||||
background: orange;
|
position: relative;
|
||||||
font-weight: bold;
|
left: 1%;
|
||||||
margin: 10px;
|
padding-bottom: 15px;
|
||||||
padding: 20px 5px 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.abook-permschange {
|
#perms-tool-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.abook-perms-steps {
|
#perms-tool-table td {
|
||||||
float: left;
|
vertical-align: top;
|
||||||
width: 200px;
|
|
||||||
height: 210px;
|
|
||||||
background: orange;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 10px;
|
|
||||||
padding: 20px 5px 10px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.abook-permssave {
|
|
||||||
margin-left: 10px;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-slider {
|
|
||||||
width: 600px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rating-slider {
|
|
||||||
width: 600px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rating-text {
|
|
||||||
width: 400px;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.abook-edit-them, .abook-edit-me {
|
|
||||||
float: left;
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.field_abook_help {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contacts-main {
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#contact-edit-wrapper {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-banner-name {
|
|
||||||
font-size: 1.4em;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-poll-wrapper {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-poll-text {
|
|
||||||
margin-top: 15px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-update-now {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-links{
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-links ul {
|
|
||||||
list-style: none;
|
|
||||||
list-style-type: none;
|
|
||||||
margin-left: 0px;
|
|
||||||
padding-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-links li {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-drop-link {
|
|
||||||
float: right;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-nav-end {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-edit-end {
|
|
||||||
clear: both;
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-profile-selector {
|
|
||||||
width: 175px;
|
|
||||||
margin-left: 175px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-edit-submit {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-entry-wrapper {
|
|
||||||
float: left;
|
|
||||||
width: 120px;
|
|
||||||
height: 120px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contacts-search {
|
|
||||||
font-size: 1em;
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contacts-search-end {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-entry-photo-end {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-entry-name {
|
|
||||||
float: left;
|
|
||||||
margin-left: 0px;
|
|
||||||
margin-right: 10px;
|
|
||||||
width: 120px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-entry-end {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#abook-advanced-panel, #abook-advanced {
|
|
||||||
opacity: 0.3;
|
|
||||||
filter:alpha(opacity=30);
|
|
||||||
}
|
|
||||||
|
|
||||||
#abook-advanced-panel:hover, #abook-advanced:hover {
|
|
||||||
opacity: 1.0;
|
|
||||||
filter:alpha(opacity=100);
|
|
||||||
}
|
|
||||||
|
|
||||||
#abook-advanced {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
}
|
||||||
|
3
view/css/mod_display.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#jot-popup {
|
||||||
|
display: none;
|
||||||
|
}
|
@ -39,7 +39,7 @@
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
height: 150px;
|
height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* saved searches */
|
/* saved searches */
|
||||||
|
@ -1,23 +1,12 @@
|
|||||||
|
|
||||||
function abook_perms_msg() {
|
|
||||||
// $('.abook-permsmsg').show();
|
|
||||||
// $('.abook-permschange').html(aStr['permschange']);
|
|
||||||
// $('.abook-permssave').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function abook_perms_new() {
|
|
||||||
// $('.abook-permsnew').show();
|
|
||||||
// $('.abook-permssave').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings
|
||||||
|
|
||||||
if(typeof(after_following) !== 'undefined' && after_following) {
|
if(typeof(after_following) !== 'undefined' && after_following) {
|
||||||
if(typeof(connectDefaultShare) !== 'undefined')
|
if(typeof(connectDefaultShare) !== 'undefined')
|
||||||
connectDefaultShare();
|
connectDefaultShare();
|
||||||
else
|
else
|
||||||
connectFullShare();
|
connectFullShare();
|
||||||
abook_perms_new();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#id_pending').click(function() {
|
$('#id_pending').click(function() {
|
||||||
@ -25,16 +14,10 @@ $(document).ready(function() {
|
|||||||
connectDefaultShare();
|
connectDefaultShare();
|
||||||
else
|
else
|
||||||
connectFullShare();
|
connectFullShare();
|
||||||
abook_perms_new();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// $('.abook-edit-me').click(function() {
|
|
||||||
// abook_perms_msg();
|
|
||||||
// });
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function connectFullShare() {
|
function connectFullShare() {
|
||||||
$('.abook-edit-me').each(function() {
|
$('.abook-edit-me').each(function() {
|
||||||
if(! $(this).is(':disabled'))
|
if(! $(this).is(':disabled'))
|
||||||
@ -42,7 +25,6 @@ function connectFullShare() {
|
|||||||
});
|
});
|
||||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
$('#me_id_perms_view_stream').attr('checked','checked');
|
||||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
$('#me_id_perms_view_profile').attr('checked','checked');
|
||||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_contacts').attr('checked','checked');
|
$('#me_id_perms_view_contacts').attr('checked','checked');
|
||||||
$('#me_id_perms_view_storage').attr('checked','checked');
|
$('#me_id_perms_view_storage').attr('checked','checked');
|
||||||
$('#me_id_perms_view_pages').attr('checked','checked');
|
$('#me_id_perms_view_pages').attr('checked','checked');
|
||||||
@ -54,85 +36,4 @@ function connectFullShare() {
|
|||||||
$('#me_id_perms_view_storage').attr('checked','checked');
|
$('#me_id_perms_view_storage').attr('checked','checked');
|
||||||
$('#me_id_perms_republish').attr('checked','checked');
|
$('#me_id_perms_republish').attr('checked','checked');
|
||||||
$('#me_id_perms_post_like').attr('checked','checked');
|
$('#me_id_perms_post_like').attr('checked','checked');
|
||||||
// abook_perms_msg();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function connectCautiousShare() {
|
|
||||||
$('.abook-edit-me').each(function() {
|
|
||||||
if(! $(this).is(':disabled'))
|
|
||||||
$(this).removeAttr('checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_storage').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_pages').attr('checked','checked');
|
|
||||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_comments').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_mail').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_like').attr('checked','checked');
|
|
||||||
// abook_perms_msg();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function connectForum() {
|
|
||||||
$('.abook-edit-me').each(function() {
|
|
||||||
if(! $(this).is(':disabled'))
|
|
||||||
$(this).removeAttr('checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_contacts').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_storage').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_pages').attr('checked','checked');
|
|
||||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_wall').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_comments').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_mail').attr('checked','checked');
|
|
||||||
$('#me_id_perms_tag_deliver').attr('checked','checked');
|
|
||||||
$('#me_id_perms_republish').attr('checked','checked');
|
|
||||||
$('#me_id_perms_post_like').attr('checked','checked');
|
|
||||||
// abook_perms_msg();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function connectClear() {
|
|
||||||
$('.abook-edit-me').each(function() {
|
|
||||||
if(! $(this).is(':disabled'))
|
|
||||||
$(this).removeAttr('checked');
|
|
||||||
});
|
|
||||||
// abook_perms_msg();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function connectSoapBox() {
|
|
||||||
$('.abook-edit-me').each(function() {
|
|
||||||
if(! $(this).is(':disabled'))
|
|
||||||
$(this).removeAttr('checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_contacts').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_storage').attr('checked','checked');
|
|
||||||
$('#me_id_perms_view_pages').attr('checked','checked');
|
|
||||||
// abook_perms_msg();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function connectFollowOnly() {
|
|
||||||
$('.abook-edit-me').each(function() {
|
|
||||||
if(! $(this).is(':disabled'))
|
|
||||||
$(this).removeAttr('checked');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
|
||||||
// abook_perms_msg();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ function channel_privacy_macro(n) {
|
|||||||
if(n == 0) {
|
if(n == 0) {
|
||||||
$('#id_view_stream option').eq(0).attr('selected','selected');
|
$('#id_view_stream option').eq(0).attr('selected','selected');
|
||||||
$('#id_view_profile option').eq(0).attr('selected','selected');
|
$('#id_view_profile option').eq(0).attr('selected','selected');
|
||||||
$('#id_view_photos option').eq(0).attr('selected','selected');
|
|
||||||
$('#id_view_contacts option').eq(0).attr('selected','selected');
|
$('#id_view_contacts option').eq(0).attr('selected','selected');
|
||||||
$('#id_view_storage option').eq(0).attr('selected','selected');
|
$('#id_view_storage option').eq(0).attr('selected','selected');
|
||||||
$('#id_view_pages option').eq(0).attr('selected','selected');
|
$('#id_view_pages option').eq(0).attr('selected','selected');
|
||||||
@ -54,7 +53,6 @@ function channel_privacy_macro(n) {
|
|||||||
$('#id_post_wall option').eq(0).attr('selected','selected');
|
$('#id_post_wall option').eq(0).attr('selected','selected');
|
||||||
$('#id_post_comments option').eq(0).attr('selected','selected');
|
$('#id_post_comments option').eq(0).attr('selected','selected');
|
||||||
$('#id_post_mail option').eq(0).attr('selected','selected');
|
$('#id_post_mail option').eq(0).attr('selected','selected');
|
||||||
$('#id_post_photos option').eq(0).attr('selected','selected');
|
|
||||||
$('#id_tag_deliver option').eq(0).attr('selected','selected');
|
$('#id_tag_deliver option').eq(0).attr('selected','selected');
|
||||||
$('#id_chat option').eq(0).attr('selected','selected');
|
$('#id_chat option').eq(0).attr('selected','selected');
|
||||||
$('#id_write_storage option').eq(0).attr('selected','selected');
|
$('#id_write_storage option').eq(0).attr('selected','selected');
|
||||||
@ -69,7 +67,6 @@ function channel_privacy_macro(n) {
|
|||||||
if(n == 1) {
|
if(n == 1) {
|
||||||
$('#id_view_stream option').eq(1).attr('selected','selected');
|
$('#id_view_stream option').eq(1).attr('selected','selected');
|
||||||
$('#id_view_profile option').eq(1).attr('selected','selected');
|
$('#id_view_profile option').eq(1).attr('selected','selected');
|
||||||
$('#id_view_photos option').eq(1).attr('selected','selected');
|
|
||||||
$('#id_view_contacts option').eq(1).attr('selected','selected');
|
$('#id_view_contacts option').eq(1).attr('selected','selected');
|
||||||
$('#id_view_storage option').eq(1).attr('selected','selected');
|
$('#id_view_storage option').eq(1).attr('selected','selected');
|
||||||
$('#id_view_pages option').eq(1).attr('selected','selected');
|
$('#id_view_pages option').eq(1).attr('selected','selected');
|
||||||
@ -77,7 +74,6 @@ function channel_privacy_macro(n) {
|
|||||||
$('#id_post_wall option').eq(1).attr('selected','selected');
|
$('#id_post_wall option').eq(1).attr('selected','selected');
|
||||||
$('#id_post_comments option').eq(1).attr('selected','selected');
|
$('#id_post_comments option').eq(1).attr('selected','selected');
|
||||||
$('#id_post_mail option').eq(1).attr('selected','selected');
|
$('#id_post_mail option').eq(1).attr('selected','selected');
|
||||||
$('#id_post_photos option').eq(1).attr('selected','selected');
|
|
||||||
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
||||||
$('#id_chat option').eq(1).attr('selected','selected');
|
$('#id_chat option').eq(1).attr('selected','selected');
|
||||||
$('#id_write_storage option').eq(1).attr('selected','selected');
|
$('#id_write_storage option').eq(1).attr('selected','selected');
|
||||||
@ -92,7 +88,6 @@ function channel_privacy_macro(n) {
|
|||||||
if(n == 2) {
|
if(n == 2) {
|
||||||
$('#id_view_stream option').eq(7).attr('selected','selected');
|
$('#id_view_stream option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_profile option').eq(7).attr('selected','selected');
|
$('#id_view_profile option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_photos option').eq(7).attr('selected','selected');
|
|
||||||
$('#id_view_contacts option').eq(7).attr('selected','selected');
|
$('#id_view_contacts option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_storage option').eq(7).attr('selected','selected');
|
$('#id_view_storage option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_pages option').eq(7).attr('selected','selected');
|
$('#id_view_pages option').eq(7).attr('selected','selected');
|
||||||
@ -100,7 +95,6 @@ function channel_privacy_macro(n) {
|
|||||||
$('#id_post_wall option').eq(1).attr('selected','selected');
|
$('#id_post_wall option').eq(1).attr('selected','selected');
|
||||||
$('#id_post_comments option').eq(2).attr('selected','selected');
|
$('#id_post_comments option').eq(2).attr('selected','selected');
|
||||||
$('#id_post_mail option').eq(1).attr('selected','selected');
|
$('#id_post_mail option').eq(1).attr('selected','selected');
|
||||||
$('#id_post_photos option').eq(0).attr('selected','selected');
|
|
||||||
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
||||||
$('#id_chat option').eq(1).attr('selected','selected');
|
$('#id_chat option').eq(1).attr('selected','selected');
|
||||||
$('#id_write_storage option').eq(0).attr('selected','selected');
|
$('#id_write_storage option').eq(0).attr('selected','selected');
|
||||||
@ -115,7 +109,6 @@ function channel_privacy_macro(n) {
|
|||||||
if(n == 3) {
|
if(n == 3) {
|
||||||
$('#id_view_stream option').eq(7).attr('selected','selected');
|
$('#id_view_stream option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_profile option').eq(7).attr('selected','selected');
|
$('#id_view_profile option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_photos option').eq(7).attr('selected','selected');
|
|
||||||
$('#id_view_contacts option').eq(7).attr('selected','selected');
|
$('#id_view_contacts option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_storage option').eq(7).attr('selected','selected');
|
$('#id_view_storage option').eq(7).attr('selected','selected');
|
||||||
$('#id_view_pages option').eq(7).attr('selected','selected');
|
$('#id_view_pages option').eq(7).attr('selected','selected');
|
||||||
@ -123,7 +116,6 @@ function channel_privacy_macro(n) {
|
|||||||
$('#id_post_wall option').eq(5).attr('selected','selected');
|
$('#id_post_wall option').eq(5).attr('selected','selected');
|
||||||
$('#id_post_comments option').eq(5).attr('selected','selected');
|
$('#id_post_comments option').eq(5).attr('selected','selected');
|
||||||
$('#id_post_mail option').eq(5).attr('selected','selected');
|
$('#id_post_mail option').eq(5).attr('selected','selected');
|
||||||
$('#id_post_photos option').eq(2).attr('selected','selected');
|
|
||||||
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
$('#id_tag_deliver option').eq(1).attr('selected','selected');
|
||||||
$('#id_chat option').eq(5).attr('selected','selected');
|
$('#id_chat option').eq(5).attr('selected','selected');
|
||||||
$('#id_write_storage option').eq(2).attr('selected','selected');
|
$('#id_write_storage option').eq(2).attr('selected','selected');
|
||||||
|
@ -264,12 +264,20 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*TODO: we should use one class for all this. */
|
/*TODO: we should use one class for all this. */
|
||||||
/*
|
|
||||||
.group-selected, .fileas-selected, .categories-selected, .search-selected, .active {
|
.group-selected,
|
||||||
color: #444 !important;
|
.fileas-selected,
|
||||||
text-decoration: none !important;
|
.categories-selected,
|
||||||
|
.search-selected,
|
||||||
|
.active,
|
||||||
|
.group-selected:hover,
|
||||||
|
.fileas-selected:hover,
|
||||||
|
.categories-selected:hover,
|
||||||
|
.search-selected:hover,
|
||||||
|
.active:hover {
|
||||||
|
color: $font_colour;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.fileas-all {
|
.fileas-all {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
@ -347,7 +355,8 @@ footer {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vcard dl {
|
.vcard dl,
|
||||||
|
.vcard .title {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
@ -406,13 +415,19 @@ footer {
|
|||||||
|
|
||||||
|
|
||||||
#profile-photo-wrapper img {
|
#profile-photo-wrapper img {
|
||||||
padding: 10px;
|
width: 100%;
|
||||||
width: 197px;
|
height: 100%;
|
||||||
height: 197px;
|
max-width: 300px;
|
||||||
|
max-height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#profile-photo-wrapper {
|
#profile-photo-wrapper {
|
||||||
margin-top: 10px;
|
width: 251px;
|
||||||
|
height: 251px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: $radiuspx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -504,7 +519,6 @@ footer {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.pager {
|
.pager {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -570,10 +584,6 @@ footer {
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photo {
|
|
||||||
border: 1px solid #AAAAAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photo-top-photo, .photo-album-photo {
|
.photo-top-photo, .photo-album-photo {
|
||||||
/* padding: 10px;
|
/* padding: 10px;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
@ -704,8 +714,8 @@ a.rateme, div.rateme {
|
|||||||
|
|
||||||
.contact-block-div {
|
.contact-block-div {
|
||||||
float: left;
|
float: left;
|
||||||
width: 49px;
|
width: 50px;
|
||||||
height: 49px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
.contact-block-textdiv {
|
.contact-block-textdiv {
|
||||||
float: left;
|
float: left;
|
||||||
@ -720,8 +730,8 @@ a.rateme, div.rateme {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.contact-block-img {
|
.contact-block-img {
|
||||||
width:47px;
|
width:48px;
|
||||||
height:47px;
|
height:48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tag-remove {
|
#tag-remove {
|
||||||
@ -741,8 +751,8 @@ a.rateme, div.rateme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wall-item-conv {
|
.wall-item-conv {
|
||||||
margin-top: 5px;
|
padding-top: 5px;
|
||||||
margin-bottom: 25px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1274,12 +1284,6 @@ div.jGrowl div.jGrowl-notification {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#contact-slider {
|
|
||||||
position: relative;
|
|
||||||
left: 5%;
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.rconnect, a.rateme, div.rateme {
|
a.rconnect, a.rateme, div.rateme {
|
||||||
color: $nav_active_icon_colour;
|
color: $nav_active_icon_colour;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -1587,8 +1591,8 @@ img.mail-list-sender-photo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jothidden > input {
|
.jothidden > input {
|
||||||
border: 1px solid $bgcolour;
|
border: 1px solid transparent;
|
||||||
background-color: $bgcolour;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
.jothidden > input:hover,
|
.jothidden > input:hover,
|
||||||
.jothidden > input:focus {
|
.jothidden > input:focus {
|
||||||
@ -1922,7 +1926,7 @@ nav .dropdown-menu {
|
|||||||
.section-content-wrapper .section-content-warning-wrapper,
|
.section-content-wrapper .section-content-warning-wrapper,
|
||||||
.section-content-tools-wrapper .section-content-danger-wrapper,
|
.section-content-tools-wrapper .section-content-danger-wrapper,
|
||||||
.section-content-wrapper .section-content-danger-wrapper {
|
.section-content-wrapper .section-content-danger-wrapper {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 10px;
|
||||||
border-radius: $radiuspx;
|
border-radius: $radiuspx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1932,12 +1936,14 @@ nav .dropdown-menu {
|
|||||||
background-color: $comment_item_colour;
|
background-color: $comment_item_colour;
|
||||||
border-bottom-left-radius: $radiuspx;
|
border-bottom-left-radius: $radiuspx;
|
||||||
border-bottom-right-radius: $radiuspx;
|
border-bottom-right-radius: $radiuspx;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-content-wrapper-np {
|
.section-content-wrapper-np {
|
||||||
background-color: $comment_item_colour;
|
background-color: $comment_item_colour;
|
||||||
border-bottom-left-radius: $radiuspx;
|
border-bottom-left-radius: $radiuspx;
|
||||||
border-bottom-right-radius: $radiuspx;
|
border-bottom-right-radius: $radiuspx;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
[id^="cloud-index-"]:hover td,
|
[id^="cloud-index-"]:hover td,
|
||||||
@ -1953,6 +1959,10 @@ nav .dropdown-menu {
|
|||||||
background-color: $item_colour;
|
background-color: $item_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#perms-tool-table .highlight:hover {
|
||||||
|
background-color: $item_colour;
|
||||||
|
}
|
||||||
|
|
||||||
nav ul li .undefined,
|
nav ul li .undefined,
|
||||||
nav ul li .notify-seen,
|
nav ul li .notify-seen,
|
||||||
nav ul li .notify-unseen
|
nav ul li .notify-unseen
|
||||||
@ -2107,6 +2117,7 @@ nav .badge.mail-update:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
|
|
||||||
aside#region_1 {
|
aside#region_1 {
|
||||||
background: rgba(0, 0, 0, .1);
|
background: rgba(0, 0, 0, .1);
|
||||||
border-right: 1px solid $nav_bd;
|
border-right: 1px solid $nav_bd;
|
||||||
@ -2285,4 +2296,3 @@ nav .badge.mail-update:hover {
|
|||||||
.channels_ckbx, .pending_ckbx, .users_ckbx {
|
.channels_ckbx, .pending_ckbx, .users_ckbx {
|
||||||
margin-top: -5px !important;
|
margin-top: -5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ $(document).ready(function() {
|
|||||||
if( $('#css3-calc').width() == 10) {
|
if( $('#css3-calc').width() == 10) {
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
if($(window).width() < 767) {
|
if($(window).width() < 767) {
|
||||||
$('main').css('width', $(window).width() + 231 );
|
$('main').css('width', $(window).width() + 285 );
|
||||||
} else {
|
} else {
|
||||||
$('main').css('width', '100%' );
|
$('main').css('width', '100%' );
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
|
|||||||
|
|
||||||
$x = file_get_contents('view/theme/redbasic/css/style.css');
|
$x = file_get_contents('view/theme/redbasic/css/style.css');
|
||||||
|
|
||||||
$aside_width = 231;
|
$aside_width = 285;
|
||||||
|
|
||||||
// left aside and right aside are is 231px + converse width
|
// left aside and right aside are is 231px + converse width
|
||||||
if($converse_center) {
|
if($converse_center) {
|
||||||
|
@ -16,12 +16,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#redbasic_converse_center_container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wall-item-conv {
|
.wall-item-conv {
|
||||||
margin-bottom: 10px;
|
padding-top: 10px;
|
||||||
margin-top: 10px;
|
padding-left: 10px;
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ if (! $radius)
|
|||||||
if (! $shadow)
|
if (! $shadow)
|
||||||
$shadow = "0";
|
$shadow = "0";
|
||||||
if (! $converse_width)
|
if (! $converse_width)
|
||||||
$converse_width = "676";
|
$converse_width = "790";
|
||||||
if(! $top_photo)
|
if(! $top_photo)
|
||||||
$top_photo = '48px';
|
$top_photo = '48px';
|
||||||
if(! $comment_indent)
|
if(! $comment_indent)
|
||||||
@ -61,5 +61,3 @@ else {
|
|||||||
$nav_float_min_opacity = (float) $nav_min_opacity;
|
$nav_float_min_opacity = (float) $nav_min_opacity;
|
||||||
$nav_percent_min_opacity = (int) 100 * $nav_min_opacity;
|
$nav_percent_min_opacity = (int) 100 * $nav_min_opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
$converse_center = "1";
|
|
||||||
|
@ -1,140 +1,223 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div class="generic-content-wrapper">
|
||||||
<h2>{{$header}}</h2>
|
<div class="section-title-wrapper">
|
||||||
|
{{if $notself}}
|
||||||
|
<div class="dropdown pull-right">
|
||||||
|
<button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="icon-caret-down"></i>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="dLabel">
|
||||||
|
<li><a href="{{$buttons.view.url}}" title="{{$buttons.view.title}}">{{$buttons.view.label}}</a></li>
|
||||||
|
<li><a href="{{$buttons.recent.url}}" title="{{$buttons.recent.title}}">{{$buttons.recent.label}}</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li><a href="#" title="{{$buttons.refresh.title}}" onclick="window.location.href='{{$buttons.refresh.url}}'; return false;">{{$buttons.refresh.label}}</a></li>
|
||||||
|
<li><a href="#" title="{{$buttons.block.title}}" onclick="window.location.href='{{$buttons.block.url}}'; return false;">{{$buttons.block.label}}</a></li>
|
||||||
|
<li><a href="#" title="{{$buttons.ignore.title}}" onclick="window.location.href='{{$buttons.ignore.url}}'; return false;">{{$buttons.ignore.label}}</a></li>
|
||||||
|
<li><a href="#" title="{{$buttons.archive.title}}" onclick="window.location.href='{{$buttons.archive.url}}'; return false;">{{$buttons.archive.label}}</a></li>
|
||||||
|
<li><a href="#" title="{{$buttons.hide.title}}" onclick="window.location.href='{{$buttons.hide.url}}'; return false;">{{$buttons.hide.label}}</a></li>
|
||||||
|
<li><a href="#" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<h2>{{$header}}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper-np">
|
||||||
|
{{if $notself}}
|
||||||
|
{{foreach $buttons as $b}}
|
||||||
|
{{if $b.info}}
|
||||||
|
<div class="section-content-danger-wrapper">
|
||||||
|
<div>
|
||||||
|
{{$b.info}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
<div class="section-content-info-wrapper">
|
||||||
|
<div>
|
||||||
|
{{$addr_text}} <strong>'{{$addr}}'</strong>
|
||||||
|
</div>
|
||||||
|
{{if $last_update}}
|
||||||
|
<div>
|
||||||
|
{{$lastupdtext}} {{$last_update}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<h3>{{$addr}}</h3>
|
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
|
||||||
|
|
||||||
{{if $notself}}
|
<input type="hidden" name="contact_id" value="{{$contact_id}}">
|
||||||
<div id="connection-flag-tabs">
|
|
||||||
{{$tabs}}
|
<div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true">
|
||||||
</div>
|
{{if $notself}}
|
||||||
<div id="connection-edit-buttons">
|
|
||||||
{{foreach $buttons as $b }}
|
{{if $is_pending}}
|
||||||
<button class="btn btn-sm btn-default" title="{{$b.title}}" onclick="window.location.href='{{$b.url}}'; return false;">{{$b.label}}</button>
|
<div class="panel">
|
||||||
{{/foreach}}
|
<div class="section-subtitle-wrapper" role="tab" id="pending-tool">
|
||||||
{{/if}}
|
<h3>
|
||||||
|
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#pending-tool-collapse" aria-expanded="true" aria-controls="pending-tool-collapse">
|
||||||
|
{{$pending_label}}
|
||||||
<div id="contact-edit-wrapper">
|
</a>
|
||||||
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
|
</h3>
|
||||||
|
</div>
|
||||||
<div class="abook-permsnew" style="display: none;">
|
<div id="pending-tool-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="pending-tool">
|
||||||
<div class="abook-perms-msg">{{$perms_step1}}</div>
|
<div class="section-content-tools-wrapper">
|
||||||
</div>
|
{{include file="field_checkbox.tpl" field=$unapproved}}
|
||||||
|
<div class="settings-submit-wrapper" >
|
||||||
<div class="abook-permsmsg" style="display: none;">
|
<button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
|
||||||
<div class="abook-perms-msg">{{$perms_new}}</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="abook-permssave" style="display: none;">
|
<div class="modal" id="abook-pending-modal" tabindex="-1" role="dialog">
|
||||||
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
|
<div class="modal-dialog" role="document">
|
||||||
</div>
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
{{if $last_update}}
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
{{$lastupdtext}} {{$last_update}}
|
<h4 class="modal-title" id="myModalLabel">{{$pending_modal_title}}</h4>
|
||||||
{{/if}}
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<strong>{{$name}}</strong> {{$pending_modal_body}}
|
||||||
{{if $is_pending}}
|
</div>
|
||||||
<div class="abook-pending-contact">
|
<div class="modal-footer">
|
||||||
{{include file="field_checkbox.tpl" field=$unapproved}}
|
<button class="btn btn-sm btn-danger pull-left" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</button>
|
||||||
</div>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{$pending_modal_dismiss}}</button>
|
||||||
{{/if}}
|
<button type="submit" class="btn btn-primary" name="pending" value="1">{{$pending_modal_approve}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{if $notself}}
|
</div>
|
||||||
{{if $slide}}
|
</div>
|
||||||
<h3>{{$lbl_slider}}</h3>
|
<script>$('#abook-pending-modal').modal('show');</script>
|
||||||
|
{{/if}}
|
||||||
{{$slide}}
|
|
||||||
|
{{if $affinity }}
|
||||||
{{/if}}
|
<div class="panel">
|
||||||
|
<div class="section-subtitle-wrapper" role="tab" id="affinity-tool">
|
||||||
{{if $connfilter}}
|
<h3>
|
||||||
{{include file="field_textarea.tpl" field=$incl}}
|
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#affinity-tool-collapse" aria-expanded="true" aria-controls="affinity-tool-collapse">
|
||||||
{{include file="field_textarea.tpl" field=$excl}}
|
{{$affinity }}
|
||||||
{{else}}
|
</a>
|
||||||
<input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" />
|
</h3>
|
||||||
<input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" />
|
</div>
|
||||||
{{/if}}
|
<div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
|
||||||
|
<div class="section-content-tools-wrapper">
|
||||||
{{if $rating}}
|
{{if $slide}}
|
||||||
<h3>{{$lbl_rating}}</h3>
|
<div class="form-group"><strong>{{$lbl_slider}}</strong></div>
|
||||||
|
{{$slide}}
|
||||||
{{$rating}}
|
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{/if}}
|
{{if $multiprofs }}
|
||||||
|
<div class="form-group">
|
||||||
|
<strong>{{$lbl_vis2}}</strong>
|
||||||
|
{{$profile_select}}
|
||||||
{{/if}}
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div class="settings-submit-wrapper" >
|
||||||
{{if $self}}
|
<button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
|
||||||
<div class="abook-autotext">
|
</div>
|
||||||
<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
|
</div>
|
||||||
{{include file="field_checkbox.tpl" field=$autoperms}}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<input type="hidden" name="contact_id" value="{{$contact_id}}">
|
{{if $connfilter}}
|
||||||
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
|
<div class="panel">
|
||||||
<input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" />
|
<div class="section-subtitle-wrapper" role="tab" id="fitert-tool">
|
||||||
|
<h3>
|
||||||
|
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#fitert-tool-collapse" aria-expanded="true" aria-controls="fitert-tool-collapse">
|
||||||
{{if $rating}}
|
{{$connfilter_label}}
|
||||||
{{if $notself}}
|
</a>
|
||||||
{{include file="field_textarea.tpl" field=$rating_text}}
|
</h3>
|
||||||
{{/if}}
|
</div>
|
||||||
{{/if}}
|
<div id="fitert-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs)}} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
|
||||||
|
<div class="section-content-tools-wrapper">
|
||||||
{{if $notself}}
|
{{include file="field_textarea.tpl" field=$incl}}
|
||||||
{{if $multiprofs }}
|
{{include file="field_textarea.tpl" field=$excl}}
|
||||||
<div>
|
<div class="settings-submit-wrapper" >
|
||||||
<h3>{{$lbl_vis1}}</h3>
|
<button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
|
||||||
<div>{{$lbl_vis2}}</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{$profile_select}}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{else}}
|
||||||
{{/if}}
|
<input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" />
|
||||||
|
<input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" />
|
||||||
<h3>{{$permlbl}}</h3>
|
{{/if}}
|
||||||
|
|
||||||
{{if $notself}}
|
{{if $rating}}
|
||||||
<div id="connedit-perms-wrap" class="fakelink" onclick="openClose('connedit-perms');">{{$clickme}}</div>
|
<div class="panel">
|
||||||
<div id="connedit-perms" style="display: none;" >
|
<div class="section-subtitle-wrapper" role="tab" id="rating-tool">
|
||||||
{{/if}}
|
<h3>
|
||||||
|
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#rating-tool-collapse" aria-expanded="true" aria-controls="rating-tool-collapse">
|
||||||
<div id="perm-desc" class="descriptive-text">{{$permnote}}</div>
|
{{$lbl_rating}}
|
||||||
<table>
|
</a>
|
||||||
<tr><td></td><td class="abook-them">{{$them}}</td><td colspan="2" class="abook-me">{{$me}}</td><td></td></tr>
|
</h3>
|
||||||
<tr><td colspan="5"><hr /></td></tr>
|
</div>
|
||||||
{{foreach $perms as $prm}}
|
<div id="rating-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs) && !$connfilter}} in{{/if}}" role="tabpanel" aria-labelledby="rating-tool">
|
||||||
{{include file="field_acheckbox.tpl" field=$prm}}
|
<div class="section-content-tools-wrapper">
|
||||||
{{/foreach}}
|
<div class="section-content-warning-wrapper">
|
||||||
<tr><td colspan="5"><hr /></td></tr>
|
{{$rating_info}}
|
||||||
</table>
|
</div>
|
||||||
|
<div class="form-group"><strong>{{$lbl_rating_label}}</strong></div>
|
||||||
</div>
|
{{$rating}}
|
||||||
|
{{include file="field_textarea.tpl" field=$rating_text}}
|
||||||
{{if $notself}}
|
<input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" />
|
||||||
</div>
|
<div class="settings-submit-wrapper" >
|
||||||
{{/if}}
|
<button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
|
</div>
|
||||||
|
</div>
|
||||||
{{if $self && $noperms}}
|
</div>
|
||||||
<script>
|
{{/if}}
|
||||||
if(typeof(connectDefaultShare) !== 'undefined')
|
|
||||||
connectDefaultShare();
|
{{/if}}
|
||||||
else
|
|
||||||
connectFullShare();
|
<div class="panel">
|
||||||
abook_perms_msg();
|
{{if $notself}}
|
||||||
</script>
|
<div class="section-subtitle-wrapper" role="tab" id="perms-tool">
|
||||||
{{/if}}
|
<h3>
|
||||||
|
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse">
|
||||||
</form>
|
{{$permlbl}}
|
||||||
</div>
|
</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div id="perms-tool-collapse" class="panel-collapse collapse{{if $self}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
|
||||||
|
<div class="section-content-tools-wrapper">
|
||||||
|
<div class="section-content-warning-wrapper">
|
||||||
|
{{if $notself}}{{$permnote}}{{/if}}
|
||||||
|
{{if $self}}{{$permnote_self}}{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table id="perms-tool-table" class=form-group>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
{{if $notself}}
|
||||||
|
<td class="abook-them">{{$them}}</td>
|
||||||
|
{{/if}}
|
||||||
|
<td colspan="2" class="abook-me">{{$me}}</td>
|
||||||
|
</tr>
|
||||||
|
{{foreach $perms as $prm}}
|
||||||
|
{{include file="field_acheckbox.tpl" field=$prm}}
|
||||||
|
{{/foreach}}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{{if $self}}
|
||||||
|
<div>
|
||||||
|
<div class="section-content-info-wrapper">
|
||||||
|
{{$autolbl}}
|
||||||
|
</div>
|
||||||
|
{{include file="field_checkbox.tpl" field=$autoperms}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="settings-submit-wrapper" >
|
||||||
|
<button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
<div id="contact-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 90%;"><input id="contact-range" type="text" name="fake-closeness" value="{{$val}}" /></div>
|
<div id="contact-slider" class="slider form-group"><input id="contact-range" type="text" name="fake-closeness" value="{{$val}}" /></div>
|
||||||
<script>
|
<script>
|
||||||
$("#contact-range").jRange({ from: {{$min|default:'0'}}, to: 99, step: 1, scale: [{{$labels}}], width:'100%', showLabels: false, onstatechange: function(v) { $("#contact-closeness-mirror").val(v); } });
|
$(document).ready(function() {
|
||||||
|
// The slider does not render correct if width is given in % and
|
||||||
|
// the slider container is hidden (display: none) during rendering.
|
||||||
|
// So let's unhide it to render and hide again afterwards.
|
||||||
|
if(!$("#affinity-tool-collapse").hasClass("in")) {
|
||||||
|
$("#affinity-tool-collapse").addClass("in");
|
||||||
|
makeContactSlider();
|
||||||
|
$("#affinity-tool-collapse").removeClass("in");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
makeContactSlider();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function makeContactSlider() {
|
||||||
|
$("#contact-range").jRange({ from: {{$min|default:'0'}}, to: 99, step: 1, scale: [{{$labels}}], width:'98%', showLabels: false, onstatechange: function(v) { $("#contact-closeness-mirror").val(v); } });
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -165,8 +165,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-wrapper-end"></div>
|
<div class="clear{{if $indent}} {{$indent}}{{/if}}"></div>
|
||||||
<div class="wall-item-outside-wrapper-end {{$item.indent}}" ></div>
|
|
||||||
</div>
|
</div>
|
||||||
{{if $item.toplevel}}
|
{{if $item.toplevel}}
|
||||||
{{foreach $item.children as $child}}
|
{{foreach $item.children as $child}}
|
||||||
|
@ -179,8 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-wrapper-end"></div>
|
<div class="clear{{if $indent}} {{$indent}}{{/if}}"></div>
|
||||||
<div class="wall-item-outside-wrapper-end {{$item.indent}}" ></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if $item.comment_lastcollapsed}}
|
{{if $item.comment_lastcollapsed}}
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
'croppa',
|
'croppa',
|
||||||
{
|
{
|
||||||
previewWrap: 'previewWrap',
|
previewWrap: 'previewWrap',
|
||||||
minWidth: 175,
|
minWidth: 300,
|
||||||
minHeight: 175,
|
minHeight: 300,
|
||||||
maxWidth: 640,
|
maxWidth: 640,
|
||||||
maxHeight: 640,
|
maxHeight: 640,
|
||||||
ratioDim: { x: 100, y:100 },
|
ratioDim: { x: 100, y:100 },
|
||||||
|
@ -5,11 +5,4 @@
|
|||||||
{{include file="field_checkbox.tpl" field=$globaldir}}
|
{{include file="field_checkbox.tpl" field=$globaldir}}
|
||||||
{{include file="field_checkbox.tpl" field=$pubforums}}
|
{{include file="field_checkbox.tpl" field=$pubforums}}
|
||||||
|
|
||||||
{{$sort}}: <select onchange='window.location.href="{{$sorturl}}&order="+this.value'>
|
|
||||||
<option value='normal' {{if $selected_sort == 'normal'}}selected='selected'{{/if}}>{{$normal}}</option>
|
|
||||||
<option value='reverse' {{if $selected_sort == 'reverse'}}selected='selected'{{/if}}>{{$reverse}}</option>
|
|
||||||
<option value='date' {{if $selected_sort == 'date'}}selected='selected'{{/if}}>{{$date}}</option>
|
|
||||||
<option value='reversedate' {{if $selected_sort == 'reversedate'}}selected='selected'{{/if}}>{{$reversedate}}</option>
|
|
||||||
</select><br />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$sort}}">
|
||||||
|
<i class="icon-sort"></i>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="directory?f=&order=date{{$suggest}}">{{$date}}</a></li>
|
||||||
|
<li><a href="directory?f=&order=normal{{$suggest}}">{{$normal}}</a></li>
|
||||||
|
<li><a href="directory?f=&order=reversedate{{$suggest}}">{{$reversedate}}</a></li>
|
||||||
|
<li><a href="directory?f=&order=reverse{{$suggest}}">{{$reverse}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<h2>{{$dirlbl}}{{if $search}}: {{$safetxt}}{{/if}}</h2>
|
<h2>{{$dirlbl}}{{if $search}}: {{$safetxt}}{{/if}}</h2>
|
||||||
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
{{foreach $entries as $entry}}
|
{{foreach $entries as $entry}}
|
||||||
{{include file="direntry.tpl"}}
|
{{include file="direntry.tpl"}}
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<div class="section-title-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
{{if $delete}}
|
<div class="section-title-wrapper">
|
||||||
<div class="pull-right">
|
{{if $delete}}
|
||||||
<a href="item/drop/{{$id}}" id="delete-btn" class="btn btn-xs btn-danger" onclick="return confirmDelete();"><i class="icon-trash"></i> {{$delete}}</a>
|
<div class="pull-right">
|
||||||
|
<a href="item/drop/{{$id}}" id="delete-btn" class="btn btn-xs btn-danger" onclick="return confirmDelete();"><i class="icon-trash"></i> {{$delete}}</a>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<h2>{{$title}}</h2>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<div id="webpage-editor" class="section-content-tools-wrapper">
|
||||||
|
{{$editor}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
|
||||||
<h2>{{$title}}</h2>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
<div id="webpage-editor" class="section-content-tools-wrapper">
|
|
||||||
{{$editor}}
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,9 +2,20 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div class="generic-content-wrapper-styled">
|
||||||
<h2>{{$title}}</h2>
|
<h2>{{$title}}</h2>
|
||||||
|
|
||||||
|
<div class="pull-right">
|
||||||
|
<button class="btn btn-xs" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button> <button class="btn btn-xs" onclick="exportDate(); return false;" >{{$export.1}}</button> <button class="btn btn-xs btn-success" onclick="openClose('event-upload-form');"><i class="icon-upload"></i> {{$upload}}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="export-event-link"><button class="btn btn-default btn-sm" onclick="exportDate(); return false;" >{{$export.1}}</button></div>
|
<div id="event-upload-form" style="display:none;">
|
||||||
<div id="new-event-link"><button class="btn btn-default btn-sm" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button></div>
|
<div class="section-content-tools-wrapper">
|
||||||
|
<form action="events" enctype="multipart/form-data" method="post" name="event-upload-form" id="event-upload-form">
|
||||||
|
<div class="form-group">
|
||||||
|
<input id="event-upload-choose" type="file" name="userfile" />
|
||||||
|
</div>
|
||||||
|
<button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="submit" >{{$submit}}</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function exportDate() {
|
function exportDate() {
|
||||||
@ -13,6 +24,7 @@ function exportDate() {
|
|||||||
window.location.href=sT;
|
window.location.href=sT;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<br />
|
||||||
<div id="events-calendar"></div>
|
<div id="events-calendar"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,17 +1,22 @@
|
|||||||
<tr>
|
<tr class="highlight">
|
||||||
<td>
|
|
||||||
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
|
|
||||||
</td>
|
|
||||||
<td class="abook-them">
|
|
||||||
<input type="checkbox" name='them_{{$field.0}}' id='them_id_{{$field.0}}' value="1" disabled="disabled" {{if $field.2}}checked="checked"{{/if}} />
|
|
||||||
</td>
|
|
||||||
<td class="abook-me">
|
|
||||||
<input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{if $field.5}}<span class="permission-inherited">{{$inherited}}</span> {{/if}}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<label class="mainlabel" for='me_id_{{$field.0}}'>{{$field.1}}</label><br>
|
||||||
<span class='field_abook_help'>{{$field.6}}</span>
|
<span class='field_abook_help'>{{$field.6}}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
{{if $notself}}
|
||||||
|
<td class="abook-them">
|
||||||
|
{{if $field.2}}<i class="icon-check"></i>{{else}}<i class="icon-check-empty"></i>{{/if}}
|
||||||
|
</td>
|
||||||
|
{{/if}}
|
||||||
|
<td class="abook-me">
|
||||||
|
{{if $self || !$field.5}}
|
||||||
|
<input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
|
||||||
|
{{/if}}
|
||||||
|
{{if $notself && $field.5}}
|
||||||
|
{{if $field.3}}<i class="icon-check"></i>{{else}}<i class="icon-check-empty"></i>{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{if $field.5}}<span class="permission-inherited">{{$inherited}}{{if $self}}{{if $field.7}} <i class="icon-check"></i>{{else}} <i class="icon-check-empty"></i>{{/if}}{{/if}}</span>{{/if}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{{if $header}}
|
{{if $header}}
|
||||||
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
{{if $menu_id}}
|
{{if $menu_edit_link}}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="mitem/{{$menu_id}}" title="{{$hintedit}}" class="btn btn-xs btn-success"><i class="icon-edit"></i> {{$editcontents}}</a>
|
<a href="{{$menu_edit_link}}" title="{{$hintedit}}" class="btn btn-xs btn-success"><i class="icon-edit"></i> {{$editcontents}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<h2>{{$header}}</h2>
|
<h2>{{$header}}</h2>
|
||||||
@ -27,3 +28,6 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{{if $header}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
@ -1,37 +1,42 @@
|
|||||||
{{if $header}}
|
{{if $header}}
|
||||||
<div class="section-title-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<h2>{{$header}}</h2>
|
<div class="section-title-wrapper">
|
||||||
|
<h2>{{$header}}</h2>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
|
||||||
|
<form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" >
|
||||||
|
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
|
||||||
|
{{if $mitem_id}}
|
||||||
|
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
|
||||||
|
{{/if}}
|
||||||
|
{{include file="field_input.tpl" field=$mitem_desc}}
|
||||||
|
{{include file="field_input.tpl" field=$mitem_link}}
|
||||||
|
{{if $menu_names}}
|
||||||
|
<datalist id="menu-names">
|
||||||
|
{{foreach $menu_names as $menu_name}}
|
||||||
|
<option value="{{$menu_name}}">
|
||||||
|
{{/foreach}}
|
||||||
|
</datalist>
|
||||||
|
{{/if}}
|
||||||
|
{{include file="field_input.tpl" field=$mitem_order}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$usezid}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$newwin}}
|
||||||
|
<div class="pull-right form-group">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
||||||
|
<i id="jot-perms-icon" class="icon-{{$lockstate}}"></i>
|
||||||
|
</button>
|
||||||
|
{{if $submit_more}}
|
||||||
|
<button class="btn btn-primary btn-sm" type="submit" name="submit-more" value="{{$submit_more}}">{{$submit_more}} <i class="icon-caret-right"></i></button>
|
||||||
|
{{/if}}
|
||||||
|
<button class="btn btn-primary btn-sm" type="submit" name="submit" value="{{$submit}}">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
|
{{$aclselect}}
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{if $header}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
|
|
||||||
<form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}" method="post" >
|
|
||||||
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
|
|
||||||
{{if $mitem_id}}
|
|
||||||
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
|
|
||||||
{{/if}}
|
|
||||||
{{include file="field_input.tpl" field=$mitem_desc}}
|
|
||||||
{{include file="field_input.tpl" field=$mitem_link}}
|
|
||||||
{{if $menu_names}}
|
|
||||||
<datalist id="menu-names">
|
|
||||||
{{foreach $menu_names as $menu_name}}
|
|
||||||
<option value="{{$menu_name}}">
|
|
||||||
{{/foreach}}
|
|
||||||
</datalist>
|
|
||||||
{{/if}}
|
|
||||||
{{include file="field_input.tpl" field=$mitem_order}}
|
|
||||||
{{include file="field_checkbox.tpl" field=$usezid}}
|
|
||||||
{{include file="field_checkbox.tpl" field=$newwin}}
|
|
||||||
<div class="pull-right form-group">
|
|
||||||
<div class="btn-group">
|
|
||||||
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
|
||||||
<i id="jot-perms-icon" class="icon-{{$lockstate}}"></i>
|
|
||||||
</button>
|
|
||||||
{{if $submit_more}}
|
|
||||||
<button class="btn btn-primary btn-sm" type="submit" name="submit-more" value="{{$submit_more}}">{{$submit_more}} <i class="icon-caret-right"></i></button>
|
|
||||||
{{/if}}
|
|
||||||
<button class="btn btn-primary btn-sm" type="submit" name="submit" value="{{$submit}}">{{$submit}}</button>
|
|
||||||
</div>
|
|
||||||
{{$aclselect}}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
@ -1,35 +1,34 @@
|
|||||||
<div class="section-title-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="pull-right">
|
<div class="section-title-wrapper">
|
||||||
<button id="webpage-create-btn" class="btn btn-xs btn-success" onclick="openClose('menu-element-creator');"><i class="icon-edit"></i> {{$hintnew}}</button>
|
<div class="pull-right">
|
||||||
|
<button id="webpage-create-btn" class="btn btn-xs btn-success" onclick="openClose('menu-element-creator');"><i class="icon-edit"></i> {{$hintnew}}</button>
|
||||||
|
</div>
|
||||||
|
<h2>{{$title}} {{if $menudesc}}{{$menudesc}}{{else}}{{$menuname}}{{/if}}</h2>
|
||||||
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<h2>{{$title}} {{if $menudesc}}{{$menudesc}}{{else}}{{$menuname}}{{/if}}</h2>
|
|
||||||
<div class="clear"></div>
|
{{$create}}
|
||||||
|
|
||||||
|
{{if $mlist }}
|
||||||
|
<div id="mitemlist-content-wrapper" class="section-content-wrapper-np">
|
||||||
|
<table id="mitem-list-table">
|
||||||
|
<tr>
|
||||||
|
<th width="1%">{{$nametitle}}</th>
|
||||||
|
<th width="96%">{{$targettitle}}</th>
|
||||||
|
<th width="1%"></th>
|
||||||
|
<th width="1%"></th>
|
||||||
|
<th width="1%"></th>
|
||||||
|
</tr>
|
||||||
|
{{foreach $mlist as $m }}
|
||||||
|
<tr id="mitem-list-item-{{$m.mitem_id}}">
|
||||||
|
<td width="1%">{{$m.mitem_desc}}</td>
|
||||||
|
<td width="96%"><a href="{{$m.mitem_link}}">{{$m.mitem_link}}</a></td>
|
||||||
|
<td width="1%" class="mitem-list-tool dropdown">{{if $m.allow_cid || $m.allow_gid || $m.deny_cid || $m.deny_gid}}<i class="icon-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('menu_item',{{$m.mitem_id}});" ></i><ul id="panel-{{$m.mitem_id}}" class="lockview-panel dropdown-menu"></ul>{{/if}}</td>
|
||||||
|
<td width="1%" class="mitem-list-tool"><a href="mitem/{{$menu_id}}/{{$m.mitem_id}}" title="{{$hintedit}}"><i class="icon-pencil"></i></a></td>
|
||||||
|
<td width="1%" class="mitem-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('mitem/{{$menu_id}}/{{$m.mitem_id}}/drop', '#mitem-list-item-{{$m.mitem_id}}, #pmenu-item-{{$m.mitem_id}}'); return false;"><i class="icon-trash drop-icons"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
{{/foreach}}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$create}}
|
|
||||||
|
|
||||||
{{if $mlist }}
|
|
||||||
<div id="mitemlist-content-wrapper" class="section-content-wrapper-np">
|
|
||||||
<table id="mitem-list-table">
|
|
||||||
<tr>
|
|
||||||
<th width="1%">{{$nametitle}}</th>
|
|
||||||
<th width="96%">{{$targettitle}}</th>
|
|
||||||
<th width="1%"></th>
|
|
||||||
<th width="1%"></th>
|
|
||||||
<th width="1%"></th>
|
|
||||||
</tr>
|
|
||||||
{{foreach $mlist as $m }}
|
|
||||||
<tr id="mitem-list-item-{{$m.mitem_id}}">
|
|
||||||
<td width="1%">{{$m.mitem_desc}}</td>
|
|
||||||
<td width="96%"><a href="{{$m.mitem_link}}">{{$m.mitem_link}}</a></td>
|
|
||||||
<td width="1%" class="mitem-list-tool dropdown">{{if $m.allow_cid || $m.allow_gid || $m.deny_cid || $m.deny_gid}}<i class="icon-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('menu_item',{{$m.mitem_id}});" ></i><ul id="panel-{{$m.mitem_id}}" class="lockview-panel dropdown-menu"></ul>{{/if}}</td>
|
|
||||||
<td width="1%" class="mitem-list-tool"><a href="mitem/{{$menu_id}}/{{$m.mitem_id}}" title="{{$hintedit}}"><i class="icon-pencil"></i></a></td>
|
|
||||||
<td width="1%" class="mitem-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('mitem/{{$menu_id}}/{{$m.mitem_id}}/drop', '#mitem-list-item-{{$m.mitem_id}}, #pmenu-item-{{$m.mitem_id}}'); return false;"><i class="icon-trash drop-icons"></i></a></td>
|
|
||||||
</tr>
|
|
||||||
{{/foreach}}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
|
<div class="generic-content-wrapper" id="page-content-wrapper" >
|
||||||
<div class="generic-content-wrapper" id="page-content-wrapper" >
|
{{if $title}}
|
||||||
{{if $title}}<h2 class="page-title">{{$title}}</h2>{{/if}}
|
<div class="section-title-wrapper">
|
||||||
<div class="page-author"><a class="page-author-link" href="{{$auth_url}}">{{$author}}</a></div>
|
<h2 class="page-title">{{$title}}</h2>
|
||||||
<div class="page-date">{{$date}}</div>
|
</div>
|
||||||
<div class="page-body">{{$body}}</div>
|
{{/if}}
|
||||||
</div>
|
<div class="section-content-wrapper">
|
||||||
|
<div class="page-author"><a class="page-author-link" href="{{$auth_url}}">{{$author}}</a></div>
|
||||||
|
<div class="page-date">{{$date}}</div>
|
||||||
|
<div class="page-body">{{$body}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
{{$comment}}
|
{{$comment}}
|
||||||
|
|
||||||
<div class="wall-item-outside-wrapper-end{{$indent}}" ></div>
|
<div class="clear{{if $indent}} {{$indent}}{{/if}}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
||||||
{{if $tools}}
|
{{if $tools}}
|
||||||
<a class="btn btn-default btn-xs" title="{{$tools.profile.1}}" href="{{$tools.profile.0}}"><i class="icon-user"></i></a>
|
<a class="btn btn-default btn-xs" title="{{$tools.profile.1}}" href="{{$tools.profile.0}}"><i class="icon-user"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -11,7 +10,6 @@
|
|||||||
<i class="icon-globe btn btn-default btn-xs" title="{{$map_text}}" onclick="var pos = $('#photo-map').css('position'); if(pos === 'absolute') { $('#photo-map').css( { position: 'relative', left: 'auto', top: 'auto' }); } else { $('#photo-map').css( { position: 'absolute', left: '-9999px', top: '-9999px' }); }" ></i>
|
<i class="icon-globe btn btn-default btn-xs" title="{{$map_text}}" onclick="var pos = $('#photo-map').css('position'); if(pos === 'absolute') { $('#photo-map').css( { position: 'relative', left: 'auto', top: 'auto' }); } else { $('#photo-map').css( { position: 'absolute', left: '-9999px', top: '-9999px' }); }" ></i>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="btn-group btn-group dropdown">
|
<div class="btn-group btn-group dropdown">
|
||||||
{{if $edit}}
|
{{if $edit}}
|
||||||
<i class="icon-pencil btn btn-default btn-xs" title="{{$edit.edit}}" onclick="openClose('photo-edit');"></i>
|
<i class="icon-pencil btn btn-default btn-xs" title="{{$edit.edit}}" onclick="openClose('photo-edit');"></i>
|
||||||
@ -29,11 +27,8 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{if $desc}}{{$desc}}{{elseif $filename}}{{$filename}}{{else}}{{$unknown}}{{/if}}</h2>
|
<h2>{{if $desc}}{{$desc}}{{elseif $filename}}{{$filename}}{{else}}{{$unknown}}{{/if}}</h2>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="photo-map">
|
<div id="photo-map">
|
||||||
{{$map}}
|
{{$map}}
|
||||||
@ -88,12 +83,9 @@
|
|||||||
</form>
|
</form>
|
||||||
<div id="photo-edit-end" class="clear"></div>
|
<div id="photo-edit-end" class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="photo-view-wrapper">
|
<div id="photo-view-wrapper">
|
||||||
|
|
||||||
<div id="photo-photo"><a href="{{$photo.href}}" title="{{$photo.title}}" onclick="$.colorbox({href: '{{$photo.href}}'}); return false;"><img style="width: 100%;" src="{{$photo.src}}"></a></div>
|
<div id="photo-photo"><a href="{{$photo.href}}" title="{{$photo.title}}" onclick="$.colorbox({href: '{{$photo.href}}'}); return false;"><img style="width: 100%;" src="{{$photo.src}}"></a></div>
|
||||||
<div id="photo-photo-end" class="clear"></div>
|
<div id="photo-photo-end" class="clear"></div>
|
||||||
|
|
||||||
{{if $tags}}
|
{{if $tags}}
|
||||||
<div class="photo-item-tools-left" id="in-this-photo">
|
<div class="photo-item-tools-left" id="in-this-photo">
|
||||||
<span id="in-this-photo-text">{{$tag_hdr}}</span>
|
<span id="in-this-photo-text">{{$tag_hdr}}</span>
|
||||||
@ -102,31 +94,29 @@
|
|||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="photo-item-tools">
|
<div class="photo-item-tools">
|
||||||
|
{{if $responses.count }}
|
||||||
{{if $responses.count }}
|
<div class="photo-item-tools-left pull-left">
|
||||||
<div class="photo-item-tools-left pull-left">
|
<div class="{{if $responses.count > 1}}btn-group{{/if}}">
|
||||||
<div class="{{if $responses.count > 1}}btn-group{{/if}}">
|
{{foreach $responses as $verb=>$response}}
|
||||||
{{foreach $responses as $verb=>$response}}
|
{{if $response.count}}
|
||||||
{{if $response.count}}
|
<div class="btn-group">
|
||||||
<div class="btn-group">
|
<button type="button" class="btn btn-default btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="wall-item-{{$verb}}-{{$id}}">{{$response.count}} {{$response.button}}</button>
|
||||||
<button type="button" class="btn btn-default btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="wall-item-{{$verb}}-{{$id}}">{{$response.count}} {{$response.button}}</button>
|
{{if $response.list_part}}
|
||||||
{{if $response.list_part}}
|
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$id}}">{{foreach $response.list_part as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$id}}">{{foreach $response.list_part as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
{{else}}
|
||||||
{{else}}
|
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$id}}">{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$id}}">{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
{{/if}}
|
||||||
{{/if}}
|
{{if $response.list_part}}
|
||||||
{{if $response.list_part}}
|
|
||||||
<div class="modal" id="{{$verb}}Modal-{{$id}}">
|
<div class="modal" id="{{$verb}}Modal-{{$id}}">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title">{{$response.title}}</h4>
|
<h4 class="modal-title">{{$response.title}}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
<ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer clear">
|
<div class="modal-footer clear">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{$modal_dismiss}}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{$modal_dismiss}}</button>
|
||||||
@ -134,37 +124,34 @@
|
|||||||
</div><!-- /.modal-content -->
|
</div><!-- /.modal-content -->
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
</div>
|
||||||
{{/foreach}}
|
{{/if}}
|
||||||
|
{{if $likebuttons}}
|
||||||
|
<div class="photo-item-tools-right btn-group pull-right">
|
||||||
|
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'like'); return false">
|
||||||
|
<i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'dislike'); return false">
|
||||||
|
<i class="icon-thumbs-down-alt" title="{{$nolike}}"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="like-rotator-{{$id}}" class="photo-like-rotator pull-right"></div>
|
||||||
|
{{/if}}
|
||||||
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{if $likebuttons}}
|
|
||||||
<div class="photo-item-tools-right btn-group pull-right">
|
|
||||||
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'like'); return false">
|
|
||||||
<i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'dislike'); return false">
|
|
||||||
<i class="icon-thumbs-down-alt" title="{{$nolike}}"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div id="like-rotator-{{$id}}" class="photo-like-rotator pull-right"></div>
|
|
||||||
{{/if}}
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$comments}}
|
{{$comments}}
|
||||||
|
|
||||||
{{if $commentbox}}
|
{{if $commentbox}}
|
||||||
<div class="wall-item-comment-wrapper{{if $comments}} wall-item-comment-wrapper-wc{{/if}}" >
|
<div class="wall-item-comment-wrapper{{if $comments}} wall-item-comment-wrapper-wc{{/if}}" >
|
||||||
{{$commentbox}}
|
{{$commentbox}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$paginate}}
|
{{$paginate}}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="vcard">
|
<div class="vcard">
|
||||||
|
<div id="profile-photo-wrapper"><img class="photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
|
||||||
{{if $profile.edit}}
|
{{if $profile.edit}}
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="profile-edit-side-link dropdown-toggle" data-toggle="dropdown" title="{{$profile.edit.3}}" href="#" ><i class="icon-pencil" title="{{$profile.edit.1}}" ></i></a>
|
<a class="profile-edit-side-link dropdown-toggle" data-toggle="dropdown" title="{{$profile.edit.3}}" href="#" ><i class="icon-pencil" title="{{$profile.edit.1}}" ></i></a>
|
||||||
@ -18,7 +18,6 @@
|
|||||||
<div class="fn">{{$profile.name}}{{if $profile.online}} <i class="icon-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div>
|
<div class="fn">{{$profile.name}}{{if $profile.online}} <i class="icon-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div>
|
||||||
{{if $reddress}}<div class="reddress" oncopy="return false;">{{$profile.reddress}}</div>{{/if}}
|
{{if $reddress}}<div class="reddress" oncopy="return false;">{{$profile.reddress}}</div>{{/if}}
|
||||||
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
|
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
|
||||||
<div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
<div id="rating-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 90%;"><input id="rating-range" type="text" name="fake-rating" value="{{$val}}" /></div>
|
<div id="rating-slider" class="slider form-group"><input id="rating-range" type="text" name="fake-rating" value="{{$val}}" /></div>
|
||||||
<script>
|
<script>
|
||||||
$("#rating-range").jRange({ from: -10, to: 10, step: 1, width:'100%', showLabels: false, showScale: true, scale : [ '-10','-8','-6','-4','-2','0','2','4','6','8','10' ], onstatechange: function(v) { $("#contact-rating-mirror").val(v); } });
|
$(document).ready(function() {
|
||||||
|
// The slider does not render correct if width is given in % and
|
||||||
|
// the slider container is hidden (display: none) during rendering.
|
||||||
|
// So let's unhide it to render and hide again afterwards.
|
||||||
|
if(!$("#rating-tool-collapse").hasClass("in")) {
|
||||||
|
$("#rating-tool-collapse").addClass("in");
|
||||||
|
makeRatingSlider();
|
||||||
|
$("#rating-tool-collapse").removeClass("in");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
makeRatingSlider();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function makeRatingSlider() {
|
||||||
|
$("#rating-range").jRange({ from: -10, to: 10, step: 1, width:'98%', showLabels: false, showScale: true, scale : [ '-10','-8','-6','-4','-2','0','2','4','6','8','10' ], onstatechange: function(v) { $("#contact-rating-mirror").val(v); } });
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
<a href='{{$item.conv.href}}' id='context-{{$item.id}}' title='{{$item.conv.title}}'>{{$item.conv.title}}</a>
|
<a href='{{$item.conv.href}}' id='context-{{$item.id}}' title='{{$item.conv.title}}'>{{$item.conv.title}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="wall-item-outside-wrapper-end {{$item.indent}}" ></div>
|
<div class="clear{{if $indent}} {{$indent}}{{/if}}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="vcard">
|
<div class="vcard">
|
||||||
<div class="fn">{{$name}}</div>
|
|
||||||
<div id="profile-photo-wrapper"><a href="{{$link}}"><img class="vcard-photo photo" src="{{$photo}}" alt="{{$name}}" /></a></div>
|
<div id="profile-photo-wrapper"><a href="{{$link}}"><img class="vcard-photo photo" src="{{$photo}}" alt="{{$name}}" /></a></div>
|
||||||
|
<div class="fn">{{$name}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|