aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php191
-rw-r--r--doc/AdvancedSearch.md1
-rw-r--r--doc/Comanche.md2
-rw-r--r--doc/Creating-Templates.md4
-rw-r--r--doc/DerivedTheme1.md3
-rw-r--r--doc/Developers.md2
-rw-r--r--doc/Features.md1
-rw-r--r--doc/Hooks.md1
-rw-r--r--doc/Plugins.md1
-rw-r--r--doc/Remove-Account.md1
-rw-r--r--doc/Schema-development.md2
-rw-r--r--doc/Tags-and-Mentions.md4
-rw-r--r--doc/Translations.md2
-rw-r--r--doc/Webpages.md4
-rw-r--r--doc/Widgets.md1
-rw-r--r--doc/Zot---A-High-Level-Overview.md4
-rw-r--r--doc/connecting_to_channels.md1
-rw-r--r--doc/dev-function-overview.md1
-rw-r--r--doc/diaspora_compat.md10
-rw-r--r--doc/doco.bb25
-rw-r--r--doc/history.md3
-rw-r--r--doc/html/namespaceRedMatrix.html8
-rw-r--r--doc/html/namespaceRedMatrix.js4
-rw-r--r--doc/html/namespaceRedmatrix.html120
-rw-r--r--doc/html/namespaceRedmatrix.js4
-rw-r--r--doc/main.bb5
-rw-r--r--doc/roles.md4
-rw-r--r--doc/to_do_doco.md2
-rw-r--r--doc/zot.md2
-rw-r--r--doc/zot_structures.md3
-rw-r--r--include/Contact.php36
-rw-r--r--include/Import/Importer.php38
-rw-r--r--include/Import/refimport.php2
-rw-r--r--include/conversation.php19
-rw-r--r--include/dir_fns.php17
-rw-r--r--include/identity.php17
-rw-r--r--include/permissions.php166
-rw-r--r--include/security.php117
-rw-r--r--include/text.php256
-rw-r--r--include/widgets.php161
-rw-r--r--mod/connedit.php2
-rw-r--r--mod/directory.php48
-rw-r--r--mod/dirsearch.php6
-rw-r--r--mod/editblock.php4
-rw-r--r--mod/editlayout.php4
-rw-r--r--mod/editpost.php4
-rw-r--r--mod/editwebpage.php4
-rw-r--r--mod/item.php262
-rw-r--r--mod/settings.php14
-rw-r--r--view/css/bootstrap-red.css6
-rw-r--r--view/css/default.css4
-rw-r--r--view/css/widgets.css1
-rw-r--r--view/fr/lostpass_eml.tpl16
-rw-r--r--view/fr/messages.po98
-rw-r--r--view/fr/passchanged_eml.tpl8
-rw-r--r--view/fr/register_open_eml.tpl15
-rw-r--r--view/fr/register_verify_eml.tpl8
-rw-r--r--view/fr/register_verify_member.tpl8
-rw-r--r--view/fr/strings.php106
-rw-r--r--view/fr/update_fail_eml.tpl8
-rwxr-xr-xview/tpl/comment_item.tpl62
-rw-r--r--view/tpl/dir_sort_links.tpl13
-rwxr-xr-xview/tpl/direntry.tpl3
-rwxr-xr-xview/tpl/jot-header.tpl2
-rwxr-xr-xview/tpl/jot.tpl64
-rwxr-xr-xview/tpl/jot_geotag.tpl2
-rwxr-xr-xview/tpl/peoplefind.tpl2
-rwxr-xr-xview/tpl/profile_advanced.tpl460
68 files changed, 1313 insertions, 1166 deletions
diff --git a/boot.php b/boot.php
index b2c8fa9ea..8a212a11d 100755
--- a/boot.php
+++ b/boot.php
@@ -27,7 +27,6 @@
* documented.
*/
-
require_once('include/config.php');
require_once('include/network.php');
require_once('include/plugin.php');
@@ -75,7 +74,8 @@ $DIRECTORY_FALLBACK_SERVERS = array(
'https://zotid.net',
'https://redmatrix.nl',
'https://red.zottel.red',
- 'https://red.pixelbits.de'
+ 'https://red.pixelbits.de',
+ 'https://whogotzot.com'
);
@@ -569,7 +569,7 @@ define ( 'ITEM_RSS', 0x8000); // Item comes from a feed. Use this t
define ( 'DBTYPE_MYSQL', 0 );
define ( 'DBTYPE_POSTGRES', 1 );
-
+
/**
*
* Reverse the effect of magic_quotes_gpc if it is enabled.
@@ -613,10 +613,10 @@ function startup() {
}
/**
- *
* class: App
*
- * Our main application structure for the life of this page
+ * @brief Our main application structure for the life of this page.
+ *
* Primarily deals with the URL that got us here
* and tries to make some sense of it, and
* stores our page contents and config storage
@@ -682,11 +682,15 @@ class App {
public $force_max_items = 0;
public $theme_thread_allow = true;
- // An array for all theme-controllable parameters
- // Mostly unimplemented yet. Only options 'template_engine' and
- // beyond are used.
-
- private $theme = array(
+ /**
+ * @brief An array for all theme-controllable parameters
+ *
+ * Mostly unimplemented yet. Only options 'template_engine' and
+ * beyond are used.
+ *
+ * @var array
+ */
+ private $theme = array(
'sourcename' => '',
'videowidth' => 425,
'videoheight' => 350,
@@ -696,9 +700,17 @@ class App {
'template_engine' => 'smarty3',
);
- // array of registered template engines ('name'=>'class name')
+ /**
+ * array of registered template engines ('name'=>'class name')
+ *
+ * @var array
+ */
public $template_engines = array();
- // array of instanced template engines ('name'=>'instance')
+ /**
+ * array of instanced template engines ('name'=>'instance')
+ *
+ * @var array
+ */
public $template_engine_instance = array();
private $ldelim = array(
@@ -715,7 +727,9 @@ class App {
private $baseurl;
private $path;
-
+ /**
+ * App constructor.
+ */
function __construct() {
// we'll reset this after we read our config file
date_default_timezone_set('UTC');
@@ -758,8 +772,8 @@ class App {
set_include_path("include/$this->hostname" . PATH_SEPARATOR . get_include_path());
- if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=") {
- $this->query_string = substr($_SERVER['QUERY_STRING'],2);
+ if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 2) === "q=") {
+ $this->query_string = substr($_SERVER['QUERY_STRING'], 2);
// removing trailing / - maybe a nginx problem
if (substr($this->query_string, 0, 1) == "/")
$this->query_string = substr($this->query_string, 1);
@@ -769,8 +783,8 @@ class App {
// unix style "homedir"
- if(substr($this->cmd,0,1) === '~')
- $this->cmd = 'channel/' . substr($this->cmd,1);
+ if(substr($this->cmd, 0, 1) === '~')
+ $this->cmd = 'channel/' . substr($this->cmd, 1);
/**
@@ -854,7 +868,6 @@ class App {
}
function set_baseurl($url) {
-
if(is_array($this->config)
&& array_key_exists('system',$this->config)
&& is_array($this->config['system'])
@@ -887,7 +900,7 @@ class App {
}
function set_path($p) {
- $this->path = trim(trim($p),'/');
+ $this->path = trim(trim($p), '/');
}
function get_path() {
@@ -1029,6 +1042,7 @@ class App {
* return engine defined by theme, or default
*
* @param string $name Template engine name
+ *
* @return object Template Engine instance
*/
function template_engine($name = ''){
@@ -1055,6 +1069,11 @@ class App {
echo "template engine <tt>$template_engine</tt> is not registered!\n"; killme();
}
+ /**
+ * @brief Returns the active template engine.
+ *
+ * @return string
+ */
function get_template_engine() {
return $this->theme['template_engine'];
}
@@ -1096,9 +1115,13 @@ class App {
} // End App class
-// retrieve the App structure
-// useful in functions which require it but don't get it passed to them
-
+/**
+ * @brief Retrieve the App structure.
+ *
+ * Useful in functions which require it but don't get it passed to them
+ *
+ * @return App
+ */
function get_app() {
global $a;
return $a;
@@ -1116,7 +1139,8 @@ function get_app() {
*
* @param string|array $s variable to check
* @param string $k key inside the array to check
- * @return bool
+ *
+ * @return bool|int
*/
function x($s, $k = null) {
if($k != null) {
@@ -1166,24 +1190,43 @@ function z_path() {
return $base;
}
+/**
+ * @brief Returns the baseurl.
+ *
+ * @see App::get_baseurl()
+ *
+ * @return string
+ */
function z_root() {
global $a;
return $a->get_baseurl();
}
+/**
+ * @brief Return absolut URL for given $path.
+ *
+ * @param string $path
+ *
+ * @return string
+ */
function absurl($path) {
- if(strpos($path,'/') === 0)
+ if(strpos($path, '/') === 0)
return z_path() . $path;
return $path;
}
-function os_mkdir($path,$mode = 0777,$recursive = false) {
+function os_mkdir($path, $mode = 0777, $recursive = false) {
$oldumask = @umask(0);
@mkdir($path, $mode, $recursive);
@umask($oldumask);
}
+/**
+ * @brief Function to check if request was an AJAX (xmlhttprequest) request.
+ *
+ * @return boolean
+ */
function is_ajax() {
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
}
@@ -1331,11 +1374,11 @@ function check_config(&$a) {
else
$installed = array();
- $plugins = get_config('system','addon');
+ $plugins = get_config('system', 'addon');
$plugins_arr = array();
if($plugins)
- $plugins_arr = explode(',',str_replace(' ', '',$plugins));
+ $plugins_arr = explode(',', str_replace(' ', '', $plugins));
$a->plugins = $plugins_arr;
@@ -1343,7 +1386,7 @@ function check_config(&$a) {
if(count($installed)) {
foreach($installed as $i) {
- if(! in_array($i['name'],$plugins_arr)) {
+ if(! in_array($i['name'], $plugins_arr)) {
unload_plugin($i['name']);
}
else {
@@ -1354,7 +1397,7 @@ function check_config(&$a) {
if(count($plugins_arr)) {
foreach($plugins_arr as $p) {
- if(! in_array($p,$installed_arr)) {
+ if(! in_array($p, $installed_arr)) {
load_plugin($p);
}
}
@@ -1364,7 +1407,7 @@ function check_config(&$a) {
}
-function fix_system_urls($oldurl,$newurl) {
+function fix_system_urls($oldurl, $newurl) {
require_once('include/crypto.php');
@@ -1455,7 +1498,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
$a = get_app();
$o = '';
$reg = false;
- $reglink = get_config('system','register_link');
+ $reglink = get_config('system', 'register_link');
if(! strlen($reglink))
$reglink = 'register';
@@ -1471,7 +1514,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
$tpl = get_markup_template("logout.tpl");
}
else {
- $a->page['htmlhead'] .= replace_macros(get_markup_template("login_head.tpl"),array(
+ $a->page['htmlhead'] .= replace_macros(get_markup_template("login_head.tpl"), array(
'$baseurl' => $a->get_baseurl(true)
));
@@ -1500,16 +1543,17 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
}
-// Used to end the current process, after saving session state.
-
+/**
+ * @brief Used to end the current process, after saving session state.
+ */
function killme() {
session_write_close();
exit;
}
-
-// redirect to another URL and terminate this process.
-
+/**
+ * @brief Redirect to another URL and terminate this process.
+ */
function goaway($s) {
header("Location: $s");
killme();
@@ -1531,7 +1575,7 @@ function get_account_id() {
}
/**
- * @brief Returns the entity id of locally logged in user or false.
+ * @brief Returns the entity id (channel_id) of locally logged in user or false.
*
* Returns authenticated numeric channel_id if authenticated and connected to
* a channel or 0. Sometimes referred to as $uid in the code.
@@ -1545,22 +1589,28 @@ function local_user() {
return false;
}
-
-// Returns contact id of authenticated site visitor or false
-
+/**
+ * @brief Returns contact id (visitor_id) of authenticated site visitor or false.
+ *
+ * @return int|bool visitor_id or false
+ */
function remote_user() {
- if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
+ if((x($_SESSION, 'authenticated')) && (x($_SESSION, 'visitor_id')))
return $_SESSION['visitor_id'];
+
return false;
}
-
-// contents of $s are displayed prominently on the page the next time
-// a page is loaded. Usually used for errors or alerts.
-
+/**
+ * Contents of $s are displayed prominently on the page the next time
+ * a page is loaded. Usually used for errors or alerts.
+ *
+ * @param string $s Text to display
+ */
function notice($s) {
$a = get_app();
if(! x($_SESSION, 'sysmsg')) $_SESSION['sysmsg'] = array();
+
if($a->interactive) {
// shameless plug, permission is denied and they have no identity.
// There's a fairly good chance that they've not got zot.
@@ -1571,7 +1621,13 @@ function notice($s) {
}
}
-
+/**
+ * Contents of $s are displayed prominently on the page the next time a page is
+ * loaded. Usually used for information.
+ * For error and alerts use notice().
+ *
+ * @param string $s Text to display
+ */
function info($s) {
$a = get_app();
if(! x($_SESSION, 'sysmsg_info')) $_SESSION['sysmsg_info'] = array();
@@ -1735,13 +1791,19 @@ function current_theme(){
/**
- * Return full URL to theme which is currently in effect.
+ * @brief Return full URL to theme which is currently in effect.
+ *
* Provide a sane default if nothing is chosen or the specified theme does not exist.
+ *
+ * @param bool $installing default false
+ *
+ * @return string
*/
-
function current_theme_url($installing = false) {
global $a;
+
$t = current_theme();
+
$opts = '';
$opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : '');
$opts .= ((x($a->layout,'schema')) ? '&schema=' . $a->layout['schema'] : '');
@@ -1760,10 +1822,12 @@ function current_theme_url($installing = false) {
*/
function is_site_admin() {
$a = get_app();
+
if((intval($_SESSION['authenticated']))
&& (is_array($a->account))
&& ($a->account['account_roles'] & ACCOUNT_ROLE_ADMIN))
return true;
+
return false;
}
@@ -1815,6 +1879,7 @@ function load_contact_links($uid) {
*
* @param array $params mapped array with query parameters
* @param string $name of parameter, default null
+ *
* @return string
*/
function build_querystring($params, $name = null) {
@@ -1856,6 +1921,11 @@ function dba_timer() {
return microtime(true);
}
+/**
+ * @brief Returns xchan_hash from the observer.
+ *
+ * @return string Empty if no observer, otherwise xchan_hash from observer
+ */
function get_observer_hash() {
$observer = get_app()->get_observer();
if(is_array($observer))
@@ -1891,6 +1961,7 @@ function curPageURL() {
*
* @param App $a global application object
* @param string $navname
+ *
* @return mixed
*/
function get_custom_nav(&$a, $navname) {
@@ -2042,12 +2113,20 @@ function construct_page(&$a) {
);
}
-
+/**
+ * @brief Returns RedMatrix's root directory.
+ *
+ * @return string
+ */
function appdirpath() {
return dirname(__FILE__);
}
-
+/**
+ * @brief Set a pageicon.
+ *
+ * @param string $icon
+ */
function head_set_icon($icon) {
global $a;
@@ -2055,6 +2134,11 @@ function head_set_icon($icon) {
// logger('head_set_icon: ' . $icon);
}
+/**
+ * @brief Get the pageicon.
+ *
+ * @return string absolut path to pageicon
+ */
function head_get_icon() {
global $a;
@@ -2065,6 +2149,11 @@ function head_get_icon() {
return $icon;
}
+/**
+ * @brief Return the Realm of the directory.
+ *
+ * @return string
+ */
function get_directory_realm() {
if($x = get_config('system', 'directory_realm'))
return $x;
diff --git a/doc/AdvancedSearch.md b/doc/AdvancedSearch.md
index df4a87482..a67c1fc1f 100644
--- a/doc/AdvancedSearch.md
+++ b/doc/AdvancedSearch.md
@@ -50,5 +50,4 @@ Example:
name="charlie brown" and country=canada and not gender=female
-
#include doc/macros/main_footer.bb;
diff --git a/doc/Comanche.md b/doc/Comanche.md
index 7374e8406..56bf68457 100644
--- a/doc/Comanche.md
+++ b/doc/Comanche.md
@@ -166,4 +166,4 @@ Please note that pasting this example into a layout page is not likely to do any
[/region]
-
+#include doc/macros/main_footer.bb;
diff --git a/doc/Creating-Templates.md b/doc/Creating-Templates.md
index 35003cb1a..6de627f39 100644
--- a/doc/Creating-Templates.md
+++ b/doc/Creating-Templates.md
@@ -88,4 +88,6 @@ and this would place a profile widget into the "foo" region you created.
Use the CSS file to position the region on the page where desired and optionally control its size.
-[To be continued] \ No newline at end of file
+[To be continued]
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/DerivedTheme1.md b/doc/DerivedTheme1.md
index d20a958f2..d4a7ee148 100644
--- a/doc/DerivedTheme1.md
+++ b/doc/DerivedTheme1.md
@@ -74,5 +74,4 @@ Now create the actual CSS file for your theme. Put it in view/theme/mytheme/css
You've just successfully created a derived theme. This needs to be enabled in the admin "themes" panel, and then anybody on the site can use it by selecting it in Settings->Display Settings as their default theme.
-
- \ No newline at end of file
+#include doc/macros/main_footer.bb;
diff --git a/doc/Developers.md b/doc/Developers.md
index baadd1a2e..8252fa91d 100644
--- a/doc/Developers.md
+++ b/doc/Developers.md
@@ -52,4 +52,4 @@ In the interests of consistency we adopt the following code styling. We may acce
* Generally speaking, opening braces go on the same line as the thing which opens the brace. They are the last character on the line. Closing braces are on a line by themselves.
-
+#include doc/macros/main_footer.bb;
diff --git a/doc/Features.md b/doc/Features.md
index 184652742..78c77c9bd 100644
--- a/doc/Features.md
+++ b/doc/Features.md
@@ -105,3 +105,4 @@ Ability to mark special posts with a star indicator
Provide a personal tag cloud on your channel page
+#include doc/macros/main_footer.bb;
diff --git a/doc/Hooks.md b/doc/Hooks.md
index d7998a8e7..90edff623 100644
--- a/doc/Hooks.md
+++ b/doc/Hooks.md
@@ -134,4 +134,3 @@ Hooks - Complete List
* $a->module . '_pre_' . $selname
#include doc/macros/main_footer.bb;
-
diff --git a/doc/Plugins.md b/doc/Plugins.md
index 0db7c9ebc..b657f5ceb 100644
--- a/doc/Plugins.md
+++ b/doc/Plugins.md
@@ -258,3 +258,4 @@ The Red Matrix has _install and _uninstall functions but these are used differen
Changing these will often allow your plugin to function, but please double check all your permission and identity code because the concepts behind it are completely different in the Red Matrix. Many structured data names (especially DB schema columns) are also quite different.
+#include doc/macros/main_footer.bb;
diff --git a/doc/Remove-Account.md b/doc/Remove-Account.md
index bc1301b16..322b95578 100644
--- a/doc/Remove-Account.md
+++ b/doc/Remove-Account.md
@@ -21,3 +21,4 @@ If you have identity clones on other sites this only removes the channel instanc
on this site.
+#include doc/macros/main_footer.bb;
diff --git a/doc/Schema-development.md b/doc/Schema-development.md
index 481792fcc..e800479f6 100644
--- a/doc/Schema-development.md
+++ b/doc/Schema-development.md
@@ -74,3 +74,5 @@ theme are as follows:
* reply_photo
* sloppy_photos
Determins whether photos are "sloppy" or aligned. Set or unset (1 or '')
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md
index cdee73167..84442dd7a 100644
--- a/doc/Tags-and-Mentions.md
+++ b/doc/Tags-and-Mentions.md
@@ -21,4 +21,6 @@ You may also tag public collections. When you create or edit a collection, there
Topical tags are indicated by preceding the tag name with the # character. This will create a link in the post to a generalised site search for the term provided. For example, #cars will provide a search link for all posts mentioning 'cars' on your site. Topical tags are generally a minimum of three characters in length. Shorter search terms are not likely to yield any search results, although this depends on the database configuration. The same rules apply as with names that spaces within tags are represented by the underscore character. It is therefore not possible to create a tag whose target contains an underscore.
-Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections. \ No newline at end of file
+Topical tags are also not linked if they are purely numeric, e.g. #1. If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/Translations.md b/doc/Translations.md
index 724286052..7435a28bf 100644
--- a/doc/Translations.md
+++ b/doc/Translations.md
@@ -89,3 +89,5 @@ Links
------
[1]: http://www.transifex.com/projects/p/red-matrix/
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/Webpages.md b/doc/Webpages.md
index e9943fda8..dafd3661d 100644
--- a/doc/Webpages.md
+++ b/doc/Webpages.md
@@ -11,4 +11,6 @@ The "page link title" box allows a user to specify the "pagelinktitle" of this U
Beneath the page creation box, a list of existing pages will appear with an "edit" link. Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages.
-If you are the admin of a site, you can specify a channel whose webpages we will use at key points around the site. Presently, the only place this is implemented is the home page. If you specify the channel "admin" and then the channel called "admin" creates a webpage called "home", we will display it's content on your websites home page. We expect this functionality to be extended to other areas in future. \ No newline at end of file
+If you are the admin of a site, you can specify a channel whose webpages we will use at key points around the site. Presently, the only place this is implemented is the home page. If you specify the channel "admin" and then the channel called "admin" creates a webpage called "home", we will display it's content on your websites home page. We expect this functionality to be extended to other areas in future.
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/Widgets.md b/doc/Widgets.md
index 68f9e4cea..d45f719d9 100644
--- a/doc/Widgets.md
+++ b/doc/Widgets.md
@@ -99,3 +99,4 @@ Some/many of these widgets have restrictions which may restrict the type of page
* channel_id - if not your own
<br />&nbsp;<br />
+#include doc/macros/main_footer.bb;
diff --git a/doc/Zot---A-High-Level-Overview.md b/doc/Zot---A-High-Level-Overview.md
index 07f353552..990ea037b 100644
--- a/doc/Zot---A-High-Level-Overview.md
+++ b/doc/Zot---A-High-Level-Overview.md
@@ -104,4 +104,6 @@ Good enough. Podunk.edu checks out the story and indeed, it is example.com, and
-And that's the package (the original message). Example.com converts this into a form suitable for viewing by Nickordo and notifies Nickordo that there's a new message. Podunk.edu **might** discover that there are other packages waiting for example.com. If this happens it may also send any and all other waiting packages at this time. Each has the original tracking number attached. \ No newline at end of file
+And that's the package (the original message). Example.com converts this into a form suitable for viewing by Nickordo and notifies Nickordo that there's a new message. Podunk.edu **might** discover that there are other packages waiting for example.com. If this happens it may also send any and all other waiting packages at this time. Each has the original tracking number attached.
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/connecting_to_channels.md b/doc/connecting_to_channels.md
index 8a7b0bdde..1e0d4d3fc 100644
--- a/doc/connecting_to_channels.md
+++ b/doc/connecting_to_channels.md
@@ -31,3 +31,4 @@ Here's their meaning:
Some channels are designated "Premium Channels" and **may** require some action on your part before a connection can be established. The Connect button will for these channels will take you to a page which lists in detail what terms the channel owner has set. If the terms are accepted, the connection will then proceed normally. In some cases, such as with celebrities and world-reknowned publishers, this **may** involve payment. If you do not agree to the terms, the connection will not proceed, or it may proceed but with reduced permissions allowed on your interactions with that channel.
+#include doc/macros/main_footer.bb;
diff --git a/doc/dev-function-overview.md b/doc/dev-function-overview.md
index ecf9186ca..5e382201f 100644
--- a/doc/dev-function-overview.md
+++ b/doc/dev-function-overview.md
@@ -49,4 +49,3 @@ Shorthand test to see if variable $var is set and is not empty. Tests vary by ty
If variable is set, returns 1 if has 'non-zero' value, otherwise returns 0. -- e.g. x('') or x(0) returns 0;
#include doc/macros/main_footer.bb;
-
diff --git a/doc/diaspora_compat.md b/doc/diaspora_compat.md
index 3be53c839..3829a9c64 100644
--- a/doc/diaspora_compat.md
+++ b/doc/diaspora_compat.md
@@ -54,12 +54,4 @@ Diaspora members will not appear in the directory.
There are differences in oembed compatibility between the networks. Some embedded resources will turn into a link on one side or the other.
-
-
-
-
-
-
-
-
- \ No newline at end of file
+#include doc/macros/main_footer.bb;
diff --git a/doc/doco.bb b/doc/doco.bb
new file mode 100644
index 000000000..3fd0ee94f
--- /dev/null
+++ b/doc/doco.bb
@@ -0,0 +1,25 @@
+[b]Creating Documentation[/b]
+
+To contribute documentation, simply put some words in a cunning order, and make their existence known to a developer. You can do this literally anywhere as long as a developer can see it. Once made aware, somebody will check it in for you. You should try to avoid proprietary formats, or locations that require authentication with methods other than Zot in order to make it easy for a developer to access, but even this is not a strict requirement.
+
+If you wish to contribute directly, that's fine too. To contribute directly, documentation should be in one of the following formats:
+
+[li]Markdown[/li]
+[li]BBCode[/li]
+[li]HTML[/li]
+[li]Plain Text[/li]
+
+Other formats are also allowed, but support for the format must be added to mod/help.php first.
+
+If editing a plain text file, please keep column width to 80. This is because plain text is used in instances where we may not have a working installation - the installation documentation, for example - and it should be easy to read these from a CLI text editor.
+
+The advantage of Markdown is that it is human readable.
+
+The advantage of BBCode is that it is identity aware.
+
+Therefore, if using BBCode, try to make the most of it:
+[li]Use ZRL links where appropriate to ensure a link to another site retains authentication and keeps identity based documentation working[/li]
+[li]Use baseurl or observer.baseurl tags where appropriate instead of example.com for authenticated viewers.[/li]
+[li]Support non-authenticated users with observer=0 tags. We presently do not do this due to historical oversights. This needs adding everywhere[/li]
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/history.md b/doc/history.md
index b626d376e..12091d205 100644
--- a/doc/history.md
+++ b/doc/history.md
@@ -46,5 +46,4 @@ Over time a few federation components re-emerged. The ability to view RSS feeds
That brings us up to the present. Where will RedMatrix go from here? I don't know. That's up to you.
-
-
+#include doc/macros/main_footer.bb;
diff --git a/doc/html/namespaceRedMatrix.html b/doc/html/namespaceRedMatrix.html
index b28ba8dc6..2861c646a 100644
--- a/doc/html/namespaceRedMatrix.html
+++ b/doc/html/namespaceRedMatrix.html
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
-<title>The Red Matrix: RedMatrix Namespace Reference</title>
+<title>The Red Matrix: Redmatrix Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
@@ -85,7 +85,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
</div>
</div>
<script type="text/javascript">
-$(document).ready(function(){initNavTree('namespaceRedMatrix.html','');});
+$(document).ready(function(){initNavTree('namespaceRedmatrix.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
@@ -106,13 +106,13 @@ $(document).ready(function(){initNavTree('namespaceRedMatrix.html','');});
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle">
-<div class="title">RedMatrix Namespace Reference</div> </div>
+<div class="title">Redmatrix Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
-<tr class="memitem:namespaceRedMatrix_1_1RedDAV"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceRedMatrix_1_1RedDAV.html">RedDAV</a></td></tr>
+<tr class="memitem:namespaceRedmatrix_1_1Import"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceRedmatrix_1_1Import.html">Import</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
diff --git a/doc/html/namespaceRedMatrix.js b/doc/html/namespaceRedMatrix.js
index 930158787..161035822 100644
--- a/doc/html/namespaceRedMatrix.js
+++ b/doc/html/namespaceRedMatrix.js
@@ -1,4 +1,4 @@
-var namespaceRedMatrix =
+var namespaceRedmatrix =
[
- [ "RedDAV", "namespaceRedMatrix_1_1RedDAV.html", "namespaceRedMatrix_1_1RedDAV" ]
+ [ "Import", "namespaceRedmatrix_1_1Import.html", "namespaceRedmatrix_1_1Import" ]
]; \ No newline at end of file
diff --git a/doc/html/namespaceRedmatrix.html b/doc/html/namespaceRedmatrix.html
deleted file mode 100644
index 2861c646a..000000000
--- a/doc/html/namespaceRedmatrix.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.3.1"/>
-<title>The Red Matrix: Redmatrix Namespace Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
- $(document).ready(initResizable);
- $(window).load(resizeHeight);
-</script>
-<link href="search/search.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="search/search.js"></script>
-<script type="text/javascript">
- $(document).ready(function() { searchBox.OnSelectItem(0); });
-</script>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectlogo"><img alt="Logo" src="rm-64.png"/></td>
- <td style="padding-left: 0.5em;">
- <div id="projectname">The Red Matrix
- </div>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.3.1 -->
-<script type="text/javascript">
-var searchBox = new SearchBox("searchBox", "search",false,'Search');
-</script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main&#160;Page</span></a></li>
- <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
- <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
- <li><a href="annotated.html"><span>Classes</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
- <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
- </ul>
- </div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('namespaceRedmatrix.html','');});
-</script>
-<div id="doc-content">
-<!-- window showing the filter options -->
-<div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
-<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>
-
-<!-- iframe showing the search results (closed by default) -->
-<div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
-</iframe>
-</div>
-
-<div class="header">
- <div class="summary">
-<a href="#namespaces">Namespaces</a> </div>
- <div class="headertitle">
-<div class="title">Redmatrix Namespace Reference</div> </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
-Namespaces</h2></td></tr>
-<tr class="memitem:namespaceRedmatrix_1_1Import"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceRedmatrix_1_1Import.html">Import</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
-</div><!-- doc-content -->
-
diff --git a/doc/html/namespaceRedmatrix.js b/doc/html/namespaceRedmatrix.js
deleted file mode 100644
index 161035822..000000000
--- a/doc/html/namespaceRedmatrix.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var namespaceRedmatrix =
-[
- [ "Import", "namespaceRedmatrix_1_1Import.html", "namespaceRedmatrix_1_1Import" ]
-]; \ No newline at end of file
diff --git a/doc/main.bb b/doc/main.bb
index b4b74dcc1..4f1852642 100644
--- a/doc/main.bb
+++ b/doc/main.bb
@@ -53,6 +53,7 @@ Zot is the great new communicaton protocol invented especially for the RedMatrix
[zrl=[baseurl]/help/Creating-Templates]Creating Comanche Templates[/zrl]
[zrl=[baseurl]/help/Widgets]Core Widgets[/zrl]
[zrl=[baseurl]/help/plugins]Plugins[/zrl]
+[zrl=[baseurl]/help/doco]Contributing Documentation[/zrl]
[zrl=[baseurl]/help/DerivedTheme1]Creating Derivative Themes[/zrl]
[zrl=[baseurl]/help/schema_development]Schemas[/zrl]
[zrl=[baseurl]/help/Translations]Translations[/zrl]
@@ -77,7 +78,7 @@ Zot is the great new communicaton protocol invented especially for the RedMatrix
[url=https://zothub.com/channel/one]Development Channel[/url]
[url=[baseurl]/help/credits]RedMatrix Credits[/url]
-
+
[size=large][b]About This RedMatrix Hub[/b][/size]
-[zrl=[baseurl]/help/TermsOfService]Terms of Service For This Hub[/zrl]
+[zrl=[baseurl]/help/TermsOfService]Terms of Service For This Hub[/zrl]
[zrl=[baseurl]/siteinfo]Hub Information (/siteinfo)[/zrl]
diff --git a/doc/roles.md b/doc/roles.md
index 0d906b5b5..5d8d07113 100644
--- a/doc/roles.md
+++ b/doc/roles.md
@@ -63,6 +63,4 @@ A public forum which allows members to post files/photos/webpages.
Set all the privacy and permissions manually to suit your specific needs.
-
-
-
+#include doc/macros/main_footer.bb;
diff --git a/doc/to_do_doco.md b/doc/to_do_doco.md
index 6e4f17724..018b9efa2 100644
--- a/doc/to_do_doco.md
+++ b/doc/to_do_doco.md
@@ -27,3 +27,5 @@ For translating documentation, create a directory in */doc* named by the languag
* Administration Guide (post-install)
* Administration Guide (pre-install)
+
+#include doc/macros/main_footer.bb;
diff --git a/doc/zot.md b/doc/zot.md
index f514fb3f8..54af44161 100644
--- a/doc/zot.md
+++ b/doc/zot.md
@@ -397,4 +397,4 @@ auth_check messages MUST be encrypted with AES256CBC. This message is sent to th
'confirm' in this case is the base64url encoded RSA signature of the concatenation of 'secret' with the base64url encoded whirlpool hash of the source guid and guid_sig; signed with the source channel private key. This prevents a man-in-the-middle from inserting a rogue success packet. Upon receipt and successful verification of this packet, the destination site will redirect to the original destination URL and indicate a successful remote login.
-Return to the [url=[baseurl]/help/main]Main documentation page[/url]
+#include doc/macros/main_footer.bb;
diff --git a/doc/zot_structures.md b/doc/zot_structures.md
index 44fc63c41..e8a65ff1f 100644
--- a/doc/zot_structures.md
+++ b/doc/zot_structures.md
@@ -59,5 +59,4 @@ secret is a 64-char string which is randomly generated by the sending site.
secret_sig is the RSA signature of the secret, signed with the sender's private key.
-
-
+#include doc/macros/main_footer.bb;
diff --git a/include/Contact.php b/include/Contact.php
index 64779d45f..4fd43db44 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -207,6 +207,7 @@ function account_remove($account_id,$local = true,$unset_session=true) {
intval($account_id)
);
+
if ($unset_session) {
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
@@ -216,6 +217,28 @@ function account_remove($account_id,$local = true,$unset_session=true) {
return $r;
}
+// recursively delete a directory
+function rrmdir($path)
+{
+ if (is_dir($path) === true)
+ {
+ $files = array_diff(scandir($path), array('.', '..'));
+
+ foreach ($files as $file)
+ {
+ rrmdir(realpath($path) . '/' . $file);
+ }
+
+ return rmdir($path);
+ }
+
+ else if (is_file($path) === true)
+ {
+ return unlink($path);
+ }
+
+ return false;
+}
function channel_remove($channel_id, $local = true, $unset_session=true) {
@@ -311,6 +334,19 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
dbesc($channel['channel_hash'])
);
}
+
+ //remove from file system
+ $r = q("select channel_address from channel where channel_id = %d limit 1",
+ intval($channel_id)
+ );
+ if($r)
+ $channel_address = $r[0]['channel_address'] ;
+ if ($channel_address !== '') {
+ $f = 'store/' . $channel_address.'/';
+ logger ('delete '. $f);
+ if(is_dir($f))
+ @rrmdir($f);
+ }
proc_run('php','include/directory.php',$channel_id);
diff --git a/include/Import/Importer.php b/include/Import/Importer.php
index c42344236..5e684cd8e 100644
--- a/include/Import/Importer.php
+++ b/include/Import/Importer.php
@@ -1,26 +1,28 @@
<?php /** @file */
-namespace Redmatrix\Import;
-
+namespace RedMatrix\Import;
+/**
+ * @brief Class Import
+ *
+ * @package RedMatrix\Import
+ */
class Import {
- $credentials = null;
- $itemlist = null;
- $src_items = null;
+ private $credentials = null;
- $items = null;
+ protected $itemlist = null;
+ protected $src_items = null;
+ protected $items = null;
function get_credentials() {
-
+ return $this->credentials;
}
function get_itemlist() {
-
-
+ return $this->itemlist;
}
-
function get_item_ident($item) {
}
@@ -43,19 +45,17 @@ class Import {
function convert_taxonomy($item_ident) {
-
}
function convert_child($child) {
}
- function store($item,$update = false) {
+ function store($item, $update = false) {
}
function run() {
-
$this->credentials = $this->get_credentials();
$this->itemlist = $this->get_itemlist();
if($this->itemlist) {
@@ -77,18 +77,6 @@ class Import {
}
$cnt ++;
}
-
-
-
-
}
-
-
-
-
-
-
}
-
-
} \ No newline at end of file
diff --git a/include/Import/refimport.php b/include/Import/refimport.php
index 4f2572660..181b2b398 100644
--- a/include/Import/refimport.php
+++ b/include/Import/refimport.php
@@ -13,8 +13,6 @@ require_once('include/hubloc.php');
// with a browser until all the posts had been imported.
-
-
define('REDMATRIX_IMPORTCHANNEL','mike');
define('REFLECT_EXPORTUSERNAME','mike');
define('REFLECT_BLOGNAME','Diary and Other Rantings');
diff --git a/include/conversation.php b/include/conversation.php
index 6b3e278f0..b9419acde 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -431,13 +431,18 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
$arr_blocked = null;
- if(local_user()) {
+ if(local_user())
$str_blocked = get_pconfig(local_user(),'system','blocked');
- if($str_blocked) {
+ if(! local_user() && ($mode == 'network')) {
+ $sys = get_sys_channel();
+ $id = $sys['channel_id'];
+ $str_blocked = get_pconfig($id,'system','blocked');
+ }
+
+ if($str_blocked) {
$arr_blocked = explode(',',$str_blocked);
for($x = 0; $x < count($arr_blocked); $x ++)
- $arr_blocked[$x] = trim($arr_blocked[$x]);
- }
+ $arr_blocked[$x] = trim($arr_blocked[$x]);
}
@@ -1128,13 +1133,13 @@ function status_editor($a,$x,$popup=false) {
'$shortaudio' => t('audio link'),
'$setloc' => t('Set your location'),
'$shortsetloc' => t('set location'),
- '$noloc' => t('Clear browser location'),
+ '$noloc' => ((get_pconfig($x['profile_uid'],'system','use_browser_location')) ? t('Clear browser location') : ''),
'$shortnoloc' => t('clear location'),
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
- '$placeholdertitle' => t('Set title'),
+ '$placeholdertitle' => t('Title (optional)'),
'$catsenabled' => ((feature_enabled($x['profile_uid'],'categories') && (! $webpage)) ? 'categories' : ''),
'$category' => "",
- '$placeholdercategory' => t('Categories (comma-separated list)'),
+ '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$shortpermset' => t('permissions'),
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 909005bbb..8bec974fb 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -51,13 +51,30 @@ function check_upstream_directory() {
}
function dir_sort_links() {
+ // 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
+ $url = 'directory?';
+ $tmp = $_REQUEST;
+ unset($tmp['order']);
+ $sorturl = $url . http_build_query($tmp);
+ $tmp = $_REQUEST;
+
+ unset($tmp['pubforums']);
+ $forumsurl = $url . http_build_query($tmp);
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
'$header' => t('Directory Options'),
'$normal' => t('Alphabetic'),
'$reverse' => t('Reverse Alphabetic'),
'$date' => t('Newest to Oldest'),
+ '$reversedate' => t('Oldest to Newest'),
'$pubforums' => t('Public Forums Only'),
+ '$pubforumsonly' => x($_REQUEST,'pubforums') ? $_REQUEST['pubforums'] : '',
+ '$sort' => t('Sort'),
+ '$selected_sort' => x($_REQUEST,'order') ? $_REQUEST['order'] : 'normal',
+ '$sorturl' => $sorturl,
+ '$forumsurl' => $forumsurl,
+
));
return $o;
}
diff --git a/include/identity.php b/include/identity.php
index 11da745da..7ae8e48f6 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1113,7 +1113,7 @@ logger('online: ' . $profile['online']);
function advanced_profile(&$a) {
-
+ require_once('include/text.php');
if(! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_profile'))
return '';
@@ -1205,7 +1205,18 @@ function advanced_profile(&$a) {
if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
- if($txt = prepare_text($a->profile['channels'])) $profile['channels'] = array( t('My other channels:'), $txt);
+ // Support tags in the other channels field (probably want to restrict it to channels only?)
+ $txt = $a->profile['channels'];
+ $matches = get_tags($txt);
+ $access_tag = '';
+ $str_tags = '';
+ foreach($matches as $m) {
+ $success = handle_tag($a, $txt, $access_tag, $str_tags, $a->profile_uid, $m); // Use uid of the profile maker
+ }
+
+ if($txt = prepare_text($txt)) {
+ $profile['channels'] = array( t('My other channels:'), $txt);
+ }
if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
@@ -1580,4 +1591,4 @@ function get_channel_default_perms($uid) {
if($r)
return $r[0]['abook_my_perms'];
return 0;
-} \ No newline at end of file
+}
diff --git a/include/permissions.php b/include/permissions.php
index b078de4d5..563d574db 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -1,6 +1,19 @@
-<?php /** @file */
-
+<?php
+/**
+ * @file incldue/permissions.php
+ *
+ * This file conntains functions to check and work with permissions.
+ */
+/**
+ * @brief Return an array with all available permissions.
+ *
+ * These are channel specific permissions.
+ * The list of available permissions can get manipulated by the <i>hook</i>
+ * <b>global_permissions</b>.
+ *
+ * @return array associative array containing all permissions
+ */
function get_perms() {
// thinking about making element[2] a bitmask instead of boolean so that we can provide a list of applicable selections
@@ -14,8 +27,8 @@ function get_perms() {
'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_storage' => array('channel_r_storage', intval(PERMS_R_STORAGE), true, t('Can view my file storage'), ''),
- 'view_pages' => array('channel_r_pages', intval(PERMS_R_PAGES), true, t('Can view my webpages'), ''),
+ 'view_storage' => array('channel_r_storage', intval(PERMS_R_STORAGE), true, t('Can view my file storage'), ''),
+ 'view_pages' => array('channel_r_pages', intval(PERMS_R_PAGES), true, t('Can view my webpages'), ''),
// Write permissions
'send_stream' => array('channel_w_stream', intval(PERMS_W_STREAM), false, t('Can send me their channel stream and posts'), ''),
@@ -23,19 +36,20 @@ function get_perms() {
'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_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')),
'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_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my webpages'), ''),
+ 'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my file storage'), ''),
+ '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')),
- 'delegate' => array('channel_a_delegate', intval(PERMS_A_DELEGATE), false, t('Can administer my channel resources'), t('Extremely advanced. Leave this alone unless you know what you are doing')),
+ 'delegate' => array('channel_a_delegate', intval(PERMS_A_DELEGATE), false, t('Can administer my channel resources'), t('Extremely advanced. Leave this alone unless you know what you are doing')),
);
$ret = array('global_permissions' => $global_perms);
- call_hooks('global_permissions',$ret);
+ call_hooks('global_permissions', $ret);
+
return $ret['global_permissions'];
}
@@ -43,13 +57,13 @@ function get_perms() {
/**
* get_all_perms($uid,$observer_xchan)
*
- * @param $uid : The channel_id associated with the resource owner
- * @param $observer_xchan: The xchan_hash representing the observer
+ * @param int $uid The channel_id associated with the resource owner
+ * @param string $observer_xchan The xchan_hash representing the observer
+ * @param bool $internal_use (default true)
*
- * @returns: array of all permissions, key is permission name, value is true or false
+ * @returns array of all permissions, key is permission name, value is true or false
*/
-
-function get_all_perms($uid,$observer_xchan,$internal_use = true) {
+function get_all_perms($uid, $observer_xchan, $internal_use = true) {
$global_perms = get_perms();
@@ -85,7 +99,6 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
continue;
}
-
// Next we're going to check for blocked or ignored contacts.
// These take priority over all other settings.
@@ -94,7 +107,7 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
$ret[$perm_name] = true;
continue;
}
-
+
if(! $abook_checked) {
$x = q("select abook_my_perms, abook_flags, xchan_network from abook left join xchan on abook_xchan = xchan_hash
where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d )>0 limit 1",
@@ -105,7 +118,7 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
if(! $x) {
// not in address book, see if they've got an xchan
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
- dbesc($observer_xchan)
+ dbesc($observer_xchan)
);
}
@@ -113,7 +126,7 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
}
// If they're blocked - they can't read or write
-
+
if(($x) && ($x[0]['abook_flags'] & ABOOK_FLAG_BLOCKED)) {
$ret[$perm_name] = false;
continue;
@@ -130,7 +143,7 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
// system is blocked to anybody who is not authenticated
- if((! $observer_xchan) && intval(get_config('system','block_public'))) {
+ if((! $observer_xchan) && intval(get_config('system', 'block_public'))) {
$ret[$perm_name] = false;
continue;
}
@@ -177,14 +190,14 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
$onsite_checked = true;
}
-
+
if($c)
$ret[$perm_name] = true;
else
$ret[$perm_name] = false;
continue;
- }
+ }
// From here on we require that the observer be a connection and
// handle whether we're allowing any, approved or specific ones
@@ -226,7 +239,6 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
$ret[$perm_name] = false;
continue;
-
}
$arr = array(
@@ -235,11 +247,23 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
'permissions' => $ret);
call_hooks('get_all_perms',$arr);
+
return $arr['permissions'];
}
-
-function perm_is_allowed($uid,$observer_xchan,$permission) {
+/**
+ * @brief Checks if given permission is allowed for given observer on a channel.
+ *
+ * Checks if the given observer with the hash $observer_xchan has permission
+ * $permission on channel_id $uid.
+ * $permission is one defined in get_perms();
+ *
+ * @param int $uid The channel_id associated with the resource owner
+ * @param string $observer_xchan The xchan_hash representing the observer
+ * @param string $permission
+ * @return bool true if permission is allowed for observer on channel
+ */
+function perm_is_allowed($uid, $observer_xchan, $permission) {
$arr = array(
'channel_id' => $uid,
@@ -247,7 +271,7 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
'permission' => $permission,
'result' => false);
- call_hooks('perm_is_allowed',$arr);
+ call_hooks('perm_is_allowed', $arr);
if($arr['result'])
return true;
@@ -279,21 +303,21 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
if(($x) && ($x[0]['abook_flags'] & ABOOK_FLAG_BLOCKED))
return false;
-
+
if(($x) && (! $global_perms[$permission][2]) && ($x[0]['abook_flags'] & ABOOK_FLAG_IGNORED))
return false;
if(! $x) {
// not in address book, see if they've got an xchan
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
- dbesc($observer_xchan)
+ dbesc($observer_xchan)
);
}
}
// system is blocked to anybody who is not authenticated
- if((! $observer_xchan) && intval(get_config('system','block_public')))
+ if((! $observer_xchan) && intval(get_config('system', 'block_public')))
return false;
// Check if this $uid is actually the $observer_xchan
@@ -301,7 +325,6 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
if($r[0]['channel_hash'] === $observer_xchan)
return true;
-
if($r[0][$channel_perm] & PERMS_PUBLIC)
return true;
@@ -326,6 +349,7 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
);
if($c)
return true;
+
return false;
}
@@ -361,25 +385,32 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
// No permissions allowed.
- return false;
+ return false;
}
// Check a simple array of observers against a permissions
// return a simple array of those with permission
-function check_list_permissions($uid,$arr,$perm) {
+function check_list_permissions($uid, $arr, $perm) {
$result = array();
if($arr)
foreach($arr as $x)
- if(perm_is_allowed($uid,$x,$perm))
+ if(perm_is_allowed($uid, $x, $perm))
$result[] = $x;
+
return($result);
}
-
+/**
+ * @brief Sets site wide default permissions.
+ *
+ * @return array
+ */
function site_default_perms() {
+ $ret = array();
+
$typical = array(
'view_stream' => PERMS_PUBLIC,
'view_profile' => PERMS_PUBLIC,
@@ -401,14 +432,14 @@ function site_default_perms() {
);
$global_perms = get_perms();
- $ret = array();
foreach($global_perms as $perm => $v) {
- $x = get_config('default_perms',$perm);
+ $x = get_config('default_perms', $perm);
if($x === false)
$x = $typical[$perm];
$ret[$perm] = $x;
}
+
return $ret;
}
@@ -449,7 +480,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = PERMS_CONTACTS;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -465,9 +496,8 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_NETWORK;
-
- break;
+ break;
case 'social_restricted':
$ret['perms_auto'] = false;
@@ -482,7 +512,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = PERMS_CONTACTS;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -498,9 +528,8 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_CONTACTS;
-
- break;
+ break;
case 'social_private':
$ret['perms_auto'] = false;
@@ -515,7 +544,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_CONTACTS;
$ret['channel_w_stream'] = PERMS_CONTACTS;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -531,7 +560,7 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_CONTACTS;
-
+
break;
case 'forum':
@@ -547,7 +576,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE|PERMS_W_TAGWALL;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = 0;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -563,7 +592,7 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_NETWORK;
-
+
break;
case 'forum_restricted':
@@ -579,7 +608,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE|PERMS_W_TAGWALL;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = 0;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -595,9 +624,8 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_CONTACTS;
-
- break;
+ break;
case 'forum_private':
$ret['perms_auto'] = false;
@@ -612,7 +640,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_CONTACTS;
- $ret['channel_r_photos'] = PERMS_CONTACTS;
+ $ret['channel_r_photos'] = PERMS_CONTACTS;
$ret['channel_r_abook'] = PERMS_CONTACTS;
$ret['channel_w_stream'] = 0;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -628,7 +656,7 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_CONTACTS;
-
+
break;
case 'feed':
@@ -644,7 +672,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = PERMS_CONTACTS;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -660,11 +688,10 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_NETWORK;
$ret['channel_w_like'] = PERMS_NETWORK;
-
+
break;
case 'feed_restricted':
-
$ret['perms_auto'] = false;
$ret['default_collection'] = true;
$ret['directory_publish'] = false;
@@ -677,7 +704,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = PERMS_CONTACTS;
$ret['channel_w_wall'] = PERMS_CONTACTS;
@@ -693,7 +720,7 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_NETWORK;
-
+
break;
case 'soapbox':
@@ -707,7 +734,7 @@ function get_role_perms($role) {
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;
$ret['channel_r_stream'] = PERMS_PUBLIC;
$ret['channel_r_profile'] = PERMS_PUBLIC;
- $ret['channel_r_photos'] = PERMS_PUBLIC;
+ $ret['channel_r_photos'] = PERMS_PUBLIC;
$ret['channel_r_abook'] = PERMS_PUBLIC;
$ret['channel_w_stream'] = 0;
$ret['channel_w_wall'] = 0;
@@ -723,7 +750,7 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = 0;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_NETWORK;
-
+
break;
case 'repository':
@@ -755,14 +782,11 @@ function get_role_perms($role) {
$ret['channel_w_pages'] = PERMS_CONTACTS;
$ret['channel_a_republish'] = PERMS_SPECIFIC;
$ret['channel_w_like'] = PERMS_NETWORK;
-
- break;
-
+ break;
default:
break;
-
}
$x = get_config('system','role_perms');
@@ -775,7 +799,12 @@ function get_role_perms($role) {
return $ret;
}
-
+/**
+ * @brief Creates a HTML select field with all available roles.
+ *
+ * @param string $current The current role
+ * @return string Returns the complete HTML code for this privacy-role-select field.
+ */
function role_selector($current) {
if(! $current)
@@ -792,16 +821,17 @@ function role_selector($current) {
array('soapbox' => t('Celebrity/Soapbox'), 'repository' => t('Group Repository'))),
'other' => array( t('Other'),
array('custom' => t('Custom/Expert Mode'))));
+
$o = '<select name="permissions_role" id="privacy-role-select">';
foreach($roles as $k => $v) {
- $o .= '<optgroup label="'. htmlspecialchars($v[0]) . '" >';
+ $o .= '<optgroup label="'. htmlspecialchars($v[0]) . '">';
foreach($v[1] as $kk => $vv) {
- $selected = (($kk === $current) ? ' selected="selected" ' : '');
- $o .= '<option value="' . $kk . '" ' . $selected . '>' . htmlspecialchars($vv) . '</option>';
+ $selected = (($kk === $current) ? ' selected="selected"' : '');
+ $o .= '<option value="' . $kk . '"' . $selected . '>' . htmlspecialchars($vv) . '</option>';
}
$o .= '</optgroup>';
}
$o .= '</select>';
- return $o;
-}
+ return $o;
+}
diff --git a/include/security.php b/include/security.php
index e3915f4a8..07b6a96aa 100644
--- a/include/security.php
+++ b/include/security.php
@@ -1,12 +1,24 @@
-<?php /** @file */
-
-function authenticate_success($user_record, $login_initial = false, $interactive = false,$return = false,$update_lastlog = false) {
+<?php
+/**
+ * @file include/security.php
+ *
+ * Some security related functions.
+ */
+
+/**
+ * @param int $user_record The account_id
+ * @param bool $login_initial default false
+ * @param bool $interactive default false
+ * @param bool $return
+ * @param bool $update_lastlog
+ */
+function authenticate_success($user_record, $login_initial = false, $interactive = false, $return = false, $update_lastlog = false) {
$a = get_app();
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
- if(x($user_record,'account_id')) {
+ if(x($user_record, 'account_id')) {
$a->account = $user_record;
$_SESSION['account_id'] = $user_record['account_id'];
$_SESSION['authenticated'] = 1;
@@ -39,7 +51,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
// might want to log success here
}
- if($return || x($_SESSION,'workflow')) {
+ if($return || x($_SESSION, 'workflow')) {
unset($_SESSION['workflow']);
return;
}
@@ -70,7 +82,13 @@ function authenticate_success($user_record, $login_initial = false, $interactive
/* else just return */
}
-
+/**
+ * @brief Change to another channel with current logged-in account.
+ *
+ * @param int $change_channel The channel_id of the channel you want to change to
+ *
+ * @return bool|array false or channel record of the new channel
+ */
function change_channel($change_channel) {
$ret = false;
@@ -83,17 +101,17 @@ function change_channel($change_channel) {
);
// It's not there. Is this an administrator, and is this the sys channel?
- if (is_developer()) {
- if (! $r) {
- if (is_site_admin()) {
- $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel_id = %d and ( channel_pageflags & %d) and not (channel_pageflags & %d )>0 limit 1",
- intval($change_channel),
- intval(PAGE_SYSTEM),
- intval(PAGE_REMOVED)
- );
+ if (is_developer()) {
+ if (! $r) {
+ if (is_site_admin()) {
+ $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel_id = %d and ( channel_pageflags & %d) and not (channel_pageflags & %d )>0 limit 1",
+ intval($change_channel),
+ intval(PAGE_SYSTEM),
+ intval(PAGE_REMOVED)
+ );
+ }
}
}
- }
if($r) {
$hash = $r[0]['channel_hash'];
@@ -109,23 +127,28 @@ function change_channel($change_channel) {
);
if($x) {
$_SESSION['my_url'] = $x[0]['xchan_url'];
- $_SESSION['my_address'] = $r[0]['channel_address'] . '@' . substr(get_app()->get_baseurl(),strpos(get_app()->get_baseurl(),'://')+3);
+ $_SESSION['my_address'] = $r[0]['channel_address'] . '@' . substr(get_app()->get_baseurl(), strpos(get_app()->get_baseurl(), '://') + 3);
get_app()->set_observer($x[0]);
- get_app()->set_perms(get_all_perms(local_user(),$hash));
+ get_app()->set_perms(get_all_perms(local_user(), $hash));
}
if(! is_dir('store/' . $r[0]['channel_address']))
@os_mkdir('store/' . $r[0]['channel_address'], STORAGE_DEFAULT_PERMISSIONS,true);
-
}
return $ret;
-
}
-
-
-function permissions_sql($owner_id,$remote_verified = false,$groups = null) {
+/**
+ * @brief Creates an addiontal SQL where statement to check permissions.
+ *
+ * @param int $owner_id
+ * @param bool $remote_verified default false, not used at all
+ * @param string $groups this param is not used at all
+ *
+ * @return string additional SQL where statement
+ */
+function permissions_sql($owner_id, $remote_verified = false, $groups = null) {
if(defined('STATUSNET_PRIVACY_COMPATIBILITY'))
return '';
@@ -142,8 +165,7 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) {
$sql = " AND allow_cid = ''
AND allow_gid = ''
AND deny_cid = ''
- AND deny_gid = ''
-
+ AND deny_gid = ''
";
/**
@@ -162,7 +184,6 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) {
* done this and passed the groups into this function.
*/
-
else {
$observer = get_observer_hash();
if($observer) {
@@ -191,7 +212,16 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) {
return $sql;
}
-function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) {
+/**
+ * @brief Creates an addiontal SQL where statement to check permissions for an item.
+ *
+ * @param int $owner_id
+ * @param bool $remote_verified default false, not used at all
+ * @param string $groups this param is not used at all
+ *
+ * @return string additional SQL where statement
+ */
+function item_permissions_sql($owner_id, $remote_verified = false, $groups = null) {
if(defined('STATUSNET_PRIVACY_COMPATIBILITY'))
return '';
@@ -206,7 +236,6 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null)
*/
$sql = " AND item_private=0 ";
-
/**
* Profile owner - everything is visible
@@ -224,7 +253,6 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null)
* done this and passed the groups into this function.
*/
-
else {
$observer = get_observer_hash();
@@ -250,12 +278,18 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null)
);
}
}
+
return $sql;
}
+/**
+ * @param string $observer_hash
+ *
+ * @return string additional SQL where statement
+ */
function public_permissions_sql($observer_hash) {
- $observer = get_app()->get_observer();
+ //$observer = get_app()->get_observer();
$groups = init_groups_visitor($observer_hash);
$gs = '<<>>'; // should be impossible to match
@@ -263,7 +297,7 @@ function public_permissions_sql($observer_hash) {
if(is_array($groups) && count($groups)) {
foreach($groups as $g)
$gs .= '|<' . $g . '>';
- }
+ }
$sql = '';
if($observer_hash) {
$regexop = db_getfunc('REGEXP');
@@ -341,11 +375,11 @@ function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'f
}
}
+
// Returns an array of group id's this contact is a member of.
// This array will only contain group id's related to the uid of this
// DFRN contact. They are *not* neccessarily unique across the entire site.
-
if(! function_exists('init_groups_visitor')) {
function init_groups_visitor($contact_id) {
$groups = array();
@@ -361,8 +395,6 @@ function init_groups_visitor($contact_id) {
-
-
// This is used to determine which uid have posts which are visible to the logged in user (from the API) for the
// public_timeline, and we can use this in a community page by making
// $perms = (PERMS_NETWORK|PERMS_PUBLIC) unless logged in.
@@ -382,19 +414,22 @@ function stream_perms_api_uids($perms = NULL ) {
intval($perms),
intval(PAGE_ADULT|PAGE_CENSORED|PAGE_SYSTEM|PAGE_REMOVED)
);
- if($r)
+ if($r) {
foreach($r as $rr)
- if(! in_array($rr['channel_id'],$ret))
+ if(! in_array($rr['channel_id'], $ret))
$ret[] = $rr['channel_id'];
+ }
$str = '';
- if($ret)
+ if($ret) {
foreach($ret as $rr) {
if($str)
$str .= ',';
$str .= intval($rr);
}
+ }
logger('stream_perms_api_uids: ' . $str, LOGGER_DEBUG);
+
return $str;
}
@@ -409,19 +444,21 @@ function stream_perms_xchans($perms = NULL ) {
intval($perms),
intval(PAGE_ADULT|PAGE_CENSORED|PAGE_SYSTEM|PAGE_REMOVED)
);
- if($r)
+ if($r) {
foreach($r as $rr)
- if(! in_array($rr['channel_hash'],$ret))
+ if(! in_array($rr['channel_hash'], $ret))
$ret[] = $rr['channel_hash'];
+ }
$str = '';
- if($ret)
+ if($ret) {
foreach($ret as $rr) {
if($str)
$str .= ',';
$str .= "'" . dbesc($rr) . "'";
}
+ }
logger('stream_perms_xchans: ' . $str, LOGGER_DEBUG);
+
return $str;
}
-
diff --git a/include/text.php b/include/text.php
index ce729ac1b..70a8f1179 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2087,3 +2087,259 @@ function extra_query_args() {
}
return $s;
}
+
+/**
+ * This function removes the tag $tag from the text $body and replaces it with
+ * the appropiate link.
+ *
+ * @param unknown_type $body the text to replace the tag in
+ * @param unknown_type $access_tag - used to return tag ACL exclusions e.g. @!foo
+ * @param unknown_type $str_tags string to add the tag to
+ * @param unknown_type $profile_uid
+ * @param unknown_type $tag the tag to replace
+ *
+ * @return boolean true if replaced, false if not replaced
+ */
+function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) {
+
+ $replaced = false;
+ $r = null;
+
+
+ $termtype = ((strpos($tag,'#') === 0) ? TERM_HASHTAG : TERM_UNKNOWN);
+ $termtype = ((strpos($tag,'@') === 0) ? TERM_MENTION : $termtype);
+ $termtype = ((strpos($tag,'#^[') === 0) ? TERM_BOOKMARK : $termtype);
+
+
+ //is it a hash tag?
+ if(strpos($tag,'#') === 0) {
+ if(strpos($tag,'#^[') === 0) {
+ if(preg_match('/#\^\[(url|zrl)(.*?)\](.*?)\[\/(url|zrl)\]/',$tag,$match)) {
+ $basetag = $match[3];
+ $url = ((substr($match[2],0,1) === '=') ? substr($match[2],1) : $match[3]);
+ $replaced = true;
+
+ }
+ }
+ // if the tag is already replaced...
+ elseif((strpos($tag,'[zrl=')) || (strpos($tag,'[url='))) {
+ //...do nothing
+ return $replaced;
+ }
+ if($tag == '#getzot') {
+ $basetag = 'getzot';
+ $url = 'https://redmatrix.me';
+ $newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]';
+ $body = str_replace($tag,$newtag,$body);
+ $replaced = true;
+ }
+ if(! $replaced) {
+
+ //base tag has the tags name only
+
+ if((substr($tag,0,7) === '#&quot;') && (substr($tag,-6,6) === '&quot;')) {
+ $basetag = substr($tag,7);
+ $basetag = substr($basetag,0,-6);
+ }
+ else
+ $basetag = str_replace('_',' ',substr($tag,1));
+
+ //create text for link
+ $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag);
+ $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]';
+ //replace tag by the link
+ $body = str_replace($tag, $newtag, $body);
+ $replaced = true;
+ }
+ //is the link already in str_tags?
+ if(! stristr($str_tags,$newtag)) {
+ //append or set str_tags
+ if(strlen($str_tags))
+ $str_tags .= ',';
+ $str_tags .= $newtag;
+ }
+ return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $basetag, 'url' => $url, 'contact' => $r[0]);
+ }
+
+ //is it a person tag?
+
+ if(strpos($tag,'@') === 0) {
+
+ // The @! tag will alter permissions
+ $exclusive = ((strpos($tag,'!') === 1) ? true : false);
+
+ //is it already replaced?
+ if(strpos($tag,'[zrl='))
+ return $replaced;
+
+ //get the person's name
+
+ $name = substr($tag,(($exclusive) ? 2 : 1)); // The name or name fragment we are going to replace
+ $newname = $name; // a copy that we can mess with
+ $tagcid = 0;
+
+ $r = null;
+
+ // is it some generated name?
+
+ $forum = false;
+ $trailing_plus_name = false;
+
+ // @channel+ is a forum or network delivery tag
+
+ if(substr($newname,-1,1) === '+') {
+ $forum = true;
+ $newname = substr($newname,0,-1);
+ }
+
+ // Here we're looking for an address book entry as provided by the auto-completer
+ // of the form something+nnn where nnn is an abook_id or the first chars of xchan_hash
+
+ if(strrpos($newname,'+')) {
+ //get the id
+
+ if(strrpos($tagcid,' '))
+ $tagcid = substr($tagcid,0,strrpos($tagcid,' '));
+
+ $tagcid = substr($newname,strrpos($newname,'+') + 1);
+
+ if(strlen($tagcid) < 16)
+ $abook_id = intval($tagcid);
+ //remove the next word from tag's name
+ if(strpos($name,' ')) {
+ $name = substr($name,0,strpos($name,' '));
+ }
+
+ if($abook_id) { // if there was an id
+ // select channel with that id from the logged in user's address book
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
+ WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
+ intval($abook_id),
+ intval($profile_uid)
+ );
+ }
+ else {
+ $r = q("SELECT * FROM xchan
+ WHERE xchan_hash like '%s%%' LIMIT 1",
+ dbesc($tagcid)
+ );
+ }
+ }
+
+ if(! $r) {
+
+ // look for matching names in the address book
+
+ // Two ways to deal with spaces - double quote the name or use underscores
+ // we see this after input filtering so quotes have been html entity encoded
+
+ if((substr($name,0,6) === '&quot;') && (substr($name,-6,6) === '&quot;')) {
+ $newname = substr($name,6);
+ $newname = substr($newname,0,-6);
+ }
+ else
+ $newname = str_replace('_',' ',$name);
+
+ // do this bit over since we started over with $name
+
+ if(substr($newname,-1,1) === '+') {
+ $forum = true;
+ $newname = substr($newname,0,-1);
+ }
+
+ //select someone from this user's contacts by name
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
+ WHERE xchan_name = '%s' AND abook_channel = %d LIMIT 1",
+ dbesc($newname),
+ intval($profile_uid)
+ );
+
+ if(! $r) {
+ //select someone by attag or nick and the name passed in
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
+ WHERE xchan_addr like ('%s') AND abook_channel = %d LIMIT 1",
+ dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')),
+ intval($profile_uid)
+ );
+ }
+
+ if(! $r) {
+
+ // it's possible somebody has a name ending with '+', which we stripped off as a forum indicator
+ // This is very rare but we want to get it right.
+
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
+ WHERE xchan_name = '%s' AND abook_channel = %d LIMIT 1",
+ dbesc($newname . '+'),
+ intval($profile_uid)
+ );
+ if($r)
+ $trailing_plus_name = true;
+ }
+ }
+
+ // $r is set if we found something
+
+ $channel = get_app()->get_channel();
+
+ if($r) {
+ $profile = $r[0]['xchan_url'];
+ $newname = $r[0]['xchan_name'];
+ // add the channel's xchan_hash to $access_tag if exclusive
+ if($exclusive) {
+ $access_tag .= 'cid:' . $r[0]['xchan_hash'];
+ }
+ }
+ else {
+ // check for a group/collection exclusion tag
+
+ // note that we aren't setting $replaced even though we're replacing text.
+ // This tag isn't going to get a term attached to it. It's only used for
+ // access control. The link points to out own channel just so it doesn't look
+ // weird - as all the other tags are linked to something.
+
+ if(local_user() && local_user() == $profile_uid) {
+ require_once('include/group.php');
+ $grp = group_byname($profile_uid,$name);
+
+ if($grp) {
+ $g = q("select hash from groups where id = %d and visible = 1 limit 1",
+ intval($grp)
+ );
+ if($g && $exclusive) {
+ $access_tag .= 'gid:' . $g[0]['hash'];
+ }
+ $channel = get_app()->get_channel();
+ if($channel) {
+ $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . z_root() . '/channel/' . $channel['channel_address'] . ']' . $newname . '[/zrl]';
+ $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body);
+ }
+ }
+ }
+ }
+
+ if(($exclusive) && (! $access_tag)) {
+ $access_tag .= 'cid:' . $channel['channel_hash'];
+ }
+
+ // if there is an url for this channel
+
+ if(isset($profile)) {
+ $replaced = true;
+ //create profile link
+ $profile = str_replace(',','%2c',$profile);
+ $url = $profile;
+ $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . (($forum && ! $trailing_plus_name) ? '+' : '') . '[/zrl]';
+ $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body);
+ //append tag to str_tags
+ if(! stristr($str_tags,$newtag)) {
+ if(strlen($str_tags))
+ $str_tags .= ',';
+ $str_tags .= $newtag;
+ }
+ }
+ }
+
+
+ return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $newname, 'url' => $url, 'contact' => $r[0]);
+}
diff --git a/include/widgets.php b/include/widgets.php
index f7b8a20bd..b13be4922 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1,4 +1,9 @@
-<?php /** @file */
+<?php
+/**
+ * @file include/widgets.php
+ *
+ * @brief This file contains the widgets.
+ */
require_once('include/dir_fns.php');
require_once('include/contact_widgets.php');
@@ -6,7 +11,7 @@ require_once('include/contact_widgets.php');
function widget_profile($args) {
$a = get_app();
- $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
+ $block = (((get_config('system', 'block_public')) && (! local_user()) && (! remote_user())) ? true : false);
return profile_sidebar($a->profile, $block, true);
}
@@ -16,14 +21,15 @@ function widget_profile($args) {
function widget_tagcloud($args) {
$o = '';
- $tab = 0;
+ //$tab = 0;
$a = get_app();
$uid = $a->profile_uid;
$count = ((x($args,'count')) ? intval($args['count']) : 24);
$flags = 0;
$type = TERM_CATEGORY;
- $r = tagadelic($uid,$count,$authors,$flags,ITEM_WEBPAGE,$type);
+ // FIXME there exists no $authors variable
+ $r = tagadelic($uid, $count, $authors, $flags, ITEM_WEBPAGE, $type);
if($r) {
$o = '<div class="tagblock widget"><h3>' . t('Categories') . '</h3><div class="tags" align="center">';
@@ -75,9 +81,8 @@ function widget_collections($args) {
return '';
break;
}
-
- return group_side($every, $each, $edit, $current, $abook_id, $wmode);
+ return group_side($every, $each, $edit, $current, $abook_id, $wmode);
}
@@ -93,7 +98,6 @@ function widget_appselect($arr) {
}
-
function widget_suggestions($arr) {
if((! local_user()) || (! feature_enabled(local_user(),'suggest')))
@@ -114,16 +118,13 @@ function widget_suggestions($arr) {
// This will throw some entropy intot he situation so you won't
// be looking at the same two mug shots every time the widget runs
-
$index = ((count($r) > 2) ? mt_rand(0,count($r) - 2) : 0);
-
for($x = $index; $x <= ($index+1); $x ++) {
-
$rr = $r[$x];
if(! $rr['xchan_url'])
break;
-
+
$connlnk = z_root() . '/follow/?url=' . $rr['xchan_addr'];
$arr[] = array(
@@ -138,7 +139,6 @@ function widget_suggestions($arr) {
);
}
-
$o = replace_macros(get_markup_template('suggest_widget.tpl'),array(
'$title' => t('Suggestions'),
'$more' => t('See more...'),
@@ -146,13 +146,13 @@ function widget_suggestions($arr) {
));
return $o;
-
}
function widget_follow($args) {
if(! local_user())
return '';
+
$a = get_app();
$uid =$a->channel['channel_id'];
$r = q("select count(*) as total from abook where abook_channel = %d and not (abook_flags & %d)>0 ",
@@ -163,10 +163,10 @@ function widget_follow($args) {
$total_channels = $r[0]['total'];
$limit = service_class_fetch($uid,'total_channels');
if($limit !== false) {
- $abook_usage_message = sprintf( t("You have %1$.0f of %2$.0f allowed connections."), $total_channels, $limit);
+ $abook_usage_message = sprintf( t("You have %1$.0f of %2$.0f allowed connections."), $total_channels, $limit);
}
else {
- $abook_usage_message = '';
+ $abook_usage_message = '';
}
return replace_macros(get_markup_template('follow.tpl'),array(
'$connect' => t('Add New Connection'),
@@ -175,7 +175,6 @@ function widget_follow($args) {
'$follow' => t('Connect'),
'$abook_usage_message' => $abook_usage_message
));
-
}
@@ -192,6 +191,7 @@ function widget_notes($arr) {
'$text' => $text,
'$save' => t('Save'),
));
+
return $o;
}
@@ -228,8 +228,6 @@ function widget_savedsearch($arr) {
$search = '';
}
-
-
$srchurl = $a->query_string;
$srchurl = rtrim(preg_replace('/searchsave\=[^\&].*?(\&|$)/is','',$srchurl),'&');
@@ -240,7 +238,7 @@ function widget_savedsearch($arr) {
$srchurl = rtrim(preg_replace('/search\=[^\&].*?(\&|$)/is','',$srchurl),'&');
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
-
+
$o = '';
$r = q("select `tid`,`term` from `term` WHERE `uid` = %d and `type` = %d ",
@@ -252,31 +250,28 @@ function widget_savedsearch($arr) {
if(count($r)) {
foreach($r as $rr) {
-
$saved[] = array(
'id' => $rr['tid'],
- 'term' => $rr['term'],
+ 'term' => $rr['term'],
'dellink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&amp;searchremove=1&amp;search=' . urlencode($rr['term']),
'srchlink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&amp;search=' . urlencode($rr['term']),
'displayterm' => htmlspecialchars($rr['term'], ENT_COMPAT,'UTF-8'),
- 'encodedterm' => urlencode($rr['term']),
- 'delete' => t('Remove term'),
- 'selected' => ($search==$rr['term']),
+ 'encodedterm' => urlencode($rr['term']),
+ 'delete' => t('Remove term'),
+ 'selected' => ($search==$rr['term']),
);
}
- }
+ }
-
$tpl = get_markup_template("saved_searches.tpl");
$o = replace_macros($tpl, array(
'$title' => t('Saved Searches'),
'$add' => t('add'),
- '$searchbox' => searchbox($search,'netsearch-box',$srchurl . (($hasq) ? '' : '?f='),true),
+ '$searchbox' => searchbox($search, 'netsearch-box', $srchurl . (($hasq) ? '' : '?f='), true),
'$saved' => $saved,
));
return $o;
-
}
@@ -306,7 +301,6 @@ function widget_filer($arr) {
'$all' => t('Everything'),
'$terms' => $terms,
'$base' => z_root() . '/' . $a->cmd
-
));
}
@@ -327,7 +321,6 @@ function widget_archive($arr) {
if(! perm_is_allowed($uid,get_observer_hash(),'view_stream'))
return '';
-
$wall = ((array_key_exists('wall', $arr)) ? intval($arr['wall']) : 0);
$style = ((array_key_exists('style', $arr)) ? $arr['style'] : 'select');
$showend = ((get_pconfig($uid,'system','archive_show_end_date')) ? true : false);
@@ -336,10 +329,8 @@ function widget_archive($arr) {
if(! $visible_years)
$visible_years = 5;
-
$url = z_root() . '/' . $a->cmd;
-
$ret = list_post_dates($uid,$wall,$mindate);
if(! count($ret))
@@ -367,7 +358,7 @@ function widget_fullprofile($arr) {
if(! $a->profile['profile_uid'])
return;
- $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
+ $block = (((get_config('system', 'block_public')) && (! local_user()) && (! remote_user())) ? true : false);
return profile_sidebar($a->profile, $block);
}
@@ -375,41 +366,43 @@ function widget_fullprofile($arr) {
function widget_categories($arr) {
$a = get_app();
-
if($a->profile['profile_uid'] && (! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_stream')))
return '';
-
$cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
$srchurl = $a->query_string;
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
- return categories_widget($srchurl,$cat);
+ return categories_widget($srchurl, $cat);
}
function widget_tagcloud_wall($arr) {
$a = get_app();
+
if((! $a->profile['profile_uid']) || (! $a->profile['channel_hash']))
return '';
- if(! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_stream'))
+ if(! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_stream'))
return '';
- $limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
- if(feature_enabled($a->profile['profile_uid'],'tagadelic'))
- return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
+ $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
+ if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
+ return tagblock('search', $a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
+
return '';
}
+
function widget_catcloud_wall($arr) {
$a = get_app();
+
if((! $a->profile['profile_uid']) || (! $a->profile['channel_hash']))
return '';
- if(! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_stream'))
+ if(! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_stream'))
return '';
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
- return catblock($a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
- return '';
+
+ return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
}
@@ -438,6 +431,7 @@ function widget_affinity($arr) {
call_hooks('main_slider',$arr);
return $arr['html'];
}
+
return '';
}
@@ -463,20 +457,19 @@ function widget_settings_menu($arr) {
if($abk)
$abook_self_id = $abk[0]['abook_id'];
-
$tabs = array(
array(
'label' => t('Account settings'),
'url' => $a->get_baseurl(true).'/settings/account',
'selected' => ((argv(1) === 'account') ? 'active' : ''),
),
-
+
array(
'label' => t('Channel settings'),
'url' => $a->get_baseurl(true).'/settings/channel',
'selected' => ((argv(1) === 'channel') ? 'active' : ''),
),
-
+
array(
'label' => t('Additional features'),
'url' => $a->get_baseurl(true).'/settings/features',
@@ -494,7 +487,7 @@ function widget_settings_menu($arr) {
'url' => $a->get_baseurl(true).'/settings/display',
'selected' => ((argv(1) === 'display') ? 'active' : ''),
),
-
+
array(
'label' => t('Connected apps'),
'url' => $a->get_baseurl(true) . '/settings/oauth',
@@ -512,7 +505,6 @@ function widget_settings_menu($arr) {
'url' => $a->get_baseurl(true) . '/uexport/complete',
'selected' => ''
),
-
);
if($role === false || $role === 'custom') {
@@ -529,7 +521,6 @@ function widget_settings_menu($arr) {
'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'],
'selected' => ''
);
-
}
if(feature_enabled(local_user(),'channel_sources')) {
@@ -538,18 +529,14 @@ function widget_settings_menu($arr) {
'url' => $a->get_baseurl(true) . '/sources',
'selected' => ''
);
-
}
-
-
$tabtpl = get_markup_template("generic_links_widget.tpl");
return replace_macros($tabtpl, array(
'$title' => t('Settings'),
'$class' => 'settings-widget',
'$items' => $tabs,
));
-
}
@@ -560,9 +547,7 @@ function widget_mailmenu($arr) {
$a = get_app();
return replace_macros(get_markup_template('message_side.tpl'), array(
'$title' => t('Messages'),
-
'$tabs'=> array(),
-
'$check'=>array(
'label' => t('Check Mail'),
'url' => $a->get_baseurl(true) . '/message',
@@ -573,9 +558,7 @@ function widget_mailmenu($arr) {
'url' => $a->get_baseurl(true) . '/mail/new',
'sel'=> (argv(1) == 'new'),
)
-
));
-
}
function widget_design_tools($arr) {
@@ -586,7 +569,7 @@ function widget_design_tools($arr) {
if($a->profile['profile_uid'])
if(($a->profile['profile_uid'] != local_user()) && (! $a->is_sys))
- return '';
+ return '';
if(! local_user())
return '';
@@ -601,23 +584,25 @@ function widget_findpeople($arr) {
function widget_photo_albums($arr) {
$a = get_app();
+
if(! $a->profile['profile_uid'])
return '';
$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_photos')))
return '';
- return photos_album_widget($channelx,$a->get_observer());
+ require_once('include/photos.php');
+ return photos_album_widget($channelx, $a->get_observer());
}
function widget_vcard($arr) {
require_once ('include/Contact.php');
- return vcard_from_xchan('',get_app()->get_observer());
+ return vcard_from_xchan('', get_app()->get_observer());
}
-/**
+/*
* The following directory widgets are only useful on the directory page
*/
@@ -630,21 +615,23 @@ function widget_dirsort($arr) {
}
function widget_dirtags($arr) {
- return dir_tagblock(z_root() . '/directory',null);
+ return dir_tagblock(z_root() . '/directory', null);
}
function widget_menu_preview($arr) {
if(! get_app()->data['menu_item'])
return;
require_once('include/menu.php');
+
return menu_render(get_app()->data['menu_item']);
}
function widget_chatroom_list($arr) {
$a = get_app();
+
require_once("include/chat.php");
$r = chatroom_list($a->profile['profile_uid']);
- return replace_macros(get_markup_template('chatroomlist.tpl'),array(
+ return replace_macros(get_markup_template('chatroomlist.tpl'), array(
'$header' => t('Chat Rooms'),
'$baseurl' => z_root(),
'$nickname' => $a->profile['channel_address'],
@@ -657,7 +644,7 @@ function widget_bookmarkedchats($arr) {
if(! $h)
return;
$r = q("select * from xchat where xchat_xchan = '%s' group by xchat_url order by xchat_desc",
- dbesc($h)
+ dbesc($h)
);
if($r) {
for($x = 0; $x < count($r); $x ++) {
@@ -691,17 +678,17 @@ function widget_suggestedchats($arr) {
}
function widget_item($arr) {
+ // FIXME there is no $a here
$uid = $a->profile['profile_uid'];
if((! $uid) || (! $arr['mid']))
return '';
- if(! perm_is_allowed($uid,get_observer_hash(),'view_pages'))
+ if(! perm_is_allowed($uid, get_observer_hash(), 'view_pages'))
return '';
require_once('include/security.php');
$sql_extra = item_permissions_sql($uid);
-
$r = q("select * from item where mid = '%s' and uid = %d and item_restrict = " . intval(ITEM_WEBPAGE) . " $sql_extra limit 1",
dbesc($arr['mid']),
intval($uid)
@@ -711,11 +698,10 @@ function widget_item($arr) {
return '';
xchan_query($r);
- $r = fetch_post_tags($r,true);
+ $r = fetch_post_tags($r, true);
- $o .= prepare_page($r[0]);
+ $o = prepare_page($r[0]);
return $o;
-
}
function widget_clock($arr) {
@@ -785,18 +771,17 @@ return $o;
* URL must be an http or https URL
*/
-
function widget_photo($arr) {
$style = $zrl = false;
- $params = '';
- if(array_key_exists('src',$arr) && isset($arr['src']))
+
+ if(array_key_exists('src', $arr) && isset($arr['src']))
$url = $arr['src'];
if(strpos($url,'http') !== 0)
return '';
- if(array_key_exists('style',$arr) && isset($arr['style']))
+ if(array_key_exists('style', $arr) && isset($arr['style']))
$style = $arr['style'];
// ensure they can't sneak in an eval(js) function
@@ -804,7 +789,7 @@ function widget_photo($arr) {
if(strpos($style,'(') !== false)
return '';
- if(array_key_exists('zrl',$arr) && isset($arr['zrl']))
+ if(array_key_exists('zrl', $arr) && isset($arr['zrl']))
$zrl = (($arr['zrl']) ? true : false);
if($zrl)
@@ -814,7 +799,7 @@ function widget_photo($arr) {
$o .= '<img ' . (($zrl) ? ' class="zrl" ' : '')
. (($style) ? ' style="' . $style . '"' : '')
- . ' src="' . $url . '" alt="' . t('photo/image') . '" />';
+ . ' src="' . $url . '" alt="' . t('photo/image') . '">';
$o .= '</div>';
@@ -825,15 +810,15 @@ function widget_photo($arr) {
function widget_photo_rand($arr) {
require_once('include/photos.php');
- $style = $zrl = false;
- $params = '';
- if(array_key_exists('album',$arr) && isset($arr['album']))
+ $style = false;
+
+ if(array_key_exists('album', $arr) && isset($arr['album']))
$album = $arr['album'];
else
$album = '';
$channel_id = 0;
- if(array_key_exists('channel_id',$arr) && intval($arr['channel_id']))
+ if(array_key_exists('channel_id', $arr) && intval($arr['channel_id']))
$channel_id = intval($arr['channel_id']);
if(! $channel_id)
$channel_id = get_app()->profile_uid;
@@ -843,7 +828,7 @@ function widget_photo_rand($arr) {
$scale = ((array_key_exists('scale',$arr)) ? intval($arr['scale']) : 0);
$ret = photos_list_photos(array('channel_id' => $channel_id),get_app()->get_observer(),$album);
-
+
$filtered = array();
if($ret['success'] && $ret['photos'])
foreach($ret['photos'] as $p)
@@ -851,14 +836,14 @@ function widget_photo_rand($arr) {
$filtered[] = $p['src'];
if($filtered) {
- $e = mt_rand(0,count($filtered)-1);
+ $e = mt_rand(0, count($filtered) - 1);
$url = $filtered[$e];
}
- if(strpos($url,'http') !== 0)
+ if(strpos($url, 'http') !== 0)
return '';
- if(array_key_exists('style',$arr) && isset($arr['style']))
+ if(array_key_exists('style', $arr) && isset($arr['style']))
$style = $arr['style'];
// ensure they can't sneak in an eval(js) function
@@ -872,7 +857,7 @@ function widget_photo_rand($arr) {
$o .= '<img class="zrl" '
. (($style) ? ' style="' . $style . '"' : '')
- . ' src="' . $url . '" alt="' . t('photo/image') . '" />';
+ . ' src="' . $url . '" alt="' . t('photo/image') . '">';
$o .= '</div>';
@@ -912,10 +897,10 @@ function widget_random_block($arr) {
$o = '<div class="widget bblock">';
if($r[0]['title'])
$o .= '<h3>' . $r[0]['title'] . '</h3>';
+
$o .= prepare_text($r[0]['body'],$r[0]['mimetype']);
$o .= '</div>';
-
}
- return $o;
-} \ No newline at end of file
+ return $o;
+}
diff --git a/mod/connedit.php b/mod/connedit.php
index fbc2c8c33..5bf9c130b 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -504,7 +504,7 @@ function connedit_content(&$a) {
$slider_tpl = get_markup_template('contact_slider.tpl');
$slide = replace_macros($slider_tpl,array(
'$me' => t('Me'),
- '$min' => 1,
+ '$min' => 1,
'$val' => (($contact['abook_closeness']) ? $contact['abook_closeness'] : 99),
'$intimate' => t('Best Friends'),
'$friends' => t('Friends'),
diff --git a/mod/directory.php b/mod/directory.php
index c06a14d9e..85c2d4c84 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -1,5 +1,6 @@
<?php
+require_once('include/socgraph.php');
require_once('include/dir_fns.php');
require_once('include/widgets.php');
require_once('include/bbcode.php');
@@ -7,6 +8,12 @@ require_once('include/bbcode.php');
function directory_init(&$a) {
$a->set_pager_itemspage(60);
+ if(x($_GET,'ignore')) {
+ q("insert into xign ( uid, xchan ) values ( %d, '%s' ) ",
+ intval(local_user()),
+ dbesc($_GET['ignore'])
+ );
+ }
}
function directory_content(&$a) {
@@ -43,14 +50,38 @@ function directory_content(&$a) {
else
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
+
if(strpos($search,'=') && local_user() && get_pconfig(local_user(),'feature','expert'))
$advanced = $search;
+
$keywords = (($_GET['keywords']) ? $_GET['keywords'] : '');
+ // Suggest channels if no search terms or keywords are given
+ $suggest = (local_user() && x($_REQUEST,'suggest')) ? $_REQUEST['suggest'] : '';
+
+ if($suggest) {
+ $r = suggestion_query(local_user(),get_observer_hash());
+
+ // Remember in which order the suggestions were
+ $addresses = array();
+ $index = 0;
+ foreach($r as $rr) {
+ $addresses[$rr['xchan_addr']] = $index++;
+ }
+
+ // Build query to get info about suggested people
+ $advanced = '';
+ foreach(array_keys($addresses) as $address) {
+ $advanced .= "address=\"$address\" ";
+ }
+ // Remove last space in the advanced query
+ $advanced = rtrim($advanced);
+
+ }
+
$tpl = get_markup_template('directory_header.tpl');
-
$dirmode = intval(get_config('system','directory_mode'));
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
@@ -100,8 +131,6 @@ function directory_content(&$a) {
$query .= '&pubforums=' . intval($pubforums);
$sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : '');
- if($pubforums)
- $sort_order = 'normal';
if($sort_order)
$query .= '&order=' . urlencode($sort_order);
@@ -238,19 +267,28 @@ function directory_content(&$a) {
'online' => $online,
'kw' => (($out) ? t('Keywords: ') : ''),
'keywords' => $out,
+ 'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '',
+ 'ignore_label' => "Don't suggest",
);
$arr = array('contact' => $rr, 'entry' => $entry);
call_hooks('directory_item', $arr);
- $entries[] = $arr['entry'];
+ if($sort_order == '' && $suggest) {
+ $entries[$addresses[$rr['address']]] = $arr['entry']; // Use the same indexes as originally to get the best suggestion first
+ }
+ else {
+ $entries[] = $arr['entry'];
+ }
unset($profile);
unset($location);
}
+ ksort($entries); // Sort array by key so that foreach-constructs work as expected
+
if($j['keywords']) {
$a->data['directory_keywords'] = $j['keywords'];
}
@@ -279,7 +317,7 @@ function directory_content(&$a) {
'$finddsc' => t('Finding:'),
'$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'),
'$entries' => $entries,
- '$dirlbl' => t('Directory'),
+ '$dirlbl' => $suggest ? t('Channel Suggestions') : t('Directory'),
'$submit' => t('Find'),
'$next' => alt_pager($a,$j['records'], t('next page'), t('previous page'))
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 1ecf33393..a88db0a2c 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -64,7 +64,7 @@ function dirsearch_content(&$a) {
$agege = ((x($_REQUEST,'agege')) ? intval($_REQUEST['agege']) : 0 );
$agele = ((x($_REQUEST,'agele')) ? intval($_REQUEST['agele']) : 0 );
$kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 );
- $forums = ((array_key_exists('pubforums',$_REQUEST)) ? intval($_REQUEST['pubforums']) : null);
+ $forums = ((array_key_exists('pubforums',$_REQUEST)) ? intval($_REQUEST['pubforums']) : 0);
@@ -111,7 +111,7 @@ function dirsearch_content(&$a) {
if($keywords)
$sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords);
- if(! is_null($forums))
+ if($forums)
$sql_extra .= dir_flag_build($joiner,'xprof_flags',XCHAN_FLAGS_PUBFORUM, $forums);
@@ -183,6 +183,8 @@ function dirsearch_content(&$a) {
$order = " order by xchan_name asc ";
elseif($sort_order == 'reverse')
$order = " order by xchan_name desc ";
+ elseif($sort_order == 'reversedate')
+ $order = " order by xchan_name_date asc ";
else
$order = " order by xchan_name_date desc ";
diff --git a/mod/editblock.php b/mod/editblock.php
index c58a93410..33d4c8b1a 100644
--- a/mod/editblock.php
+++ b/mod/editblock.php
@@ -161,10 +161,10 @@ function editblock_content(&$a) {
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
- '$placeholdertitle' => t('Set title'),
+ '$placeholdertitle' => t('Title (optional)'),
'$pagetitle' => $block_title,
'$category' => '',
- '$placeholdercategory' => t('Categories (comma-separated list)'),
+ '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate,
'$acl' => '',
diff --git a/mod/editlayout.php b/mod/editlayout.php
index 94e2e628c..01f439cb2 100644
--- a/mod/editlayout.php
+++ b/mod/editlayout.php
@@ -156,10 +156,10 @@ function editlayout_content(&$a) {
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
- '$placeholdertitle' => t('Set title'),
+ '$placeholdertitle' => t('Title (optional)'),
'$pagetitle' => $layout_title,
'$category' => '',
- '$placeholdercategory' => t('Categories (comma-separated list)'),
+ '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate,
'$acl' => '',
diff --git a/mod/editpost.php b/mod/editpost.php
index ed7fcff8a..26e3c7139 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -129,9 +129,9 @@ function editpost_content(&$a) {
'$public' => t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
- '$placeholdertitle' => t('Set title'),
+ '$placeholdertitle' => t('Title (optional)'),
'$category' => $category,
- '$placeholdercategory' => t('Categories (comma-separated list)'),
+ '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate,
'$acl' => '',
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 2acb3bd84..1b1268914 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -195,9 +195,9 @@ function editwebpage_content(&$a) {
'$mimeselect' => $mimeselect,
'$layoutselect' => $layoutselect,
'$title' => htmlspecialchars($itm[0]['title'],ENT_COMPAT,'UTF-8'),
- '$placeholdertitle' => t('Set title'),
+ '$placeholdertitle' => t('Title (optional)'),
'$category' => '',
- '$placeholdercategory' => t('Categories (comma-separated list)'),
+ '$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'lockstate' => (((strlen($itm[0]['allow_cid'])) || (strlen($itm[0]['allow_gid'])) || (strlen($itm[0]['deny_cid'])) || (strlen($itm[0]['deny_gid']))) ? 'lock' : 'unlock'),
'$bang' => '',
diff --git a/mod/item.php b/mod/item.php
index 94ff32750..9ffcc7de2 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -85,7 +85,7 @@ function item_post(&$a) {
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
$categories = ((x($_REQUEST,'category')) ? escape_tags($_REQUEST['category']) : '');
$webpage = ((x($_REQUEST,'webpage')) ? intval($_REQUEST['webpage']) : 0);
- $pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags(urlencode($_REQUEST['pagetitle'])) : '');
+ $pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags(urlencode($_REQUEST['pagetitle'])) : '');
$layout_mid = ((x($_REQUEST,'layout_mid')) ? escape_tags($_REQUEST['layout_mid']): '');
$plink = ((x($_REQUEST,'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
@@ -468,6 +468,7 @@ function item_post(&$a) {
if($mimetype === 'text/bbcode') {
+ require_once('include/text.php');
if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) {
require_once('include/bb2diaspora.php');
$body = diaspora2bb(escape_tags($body),true);
@@ -602,7 +603,7 @@ function item_post(&$a) {
continue;
$success = handle_tag($a, $body, $access_tag, $str_tags, ($uid) ? $uid : $profile_uid , $tag);
- logger('handle_tag: ' . print_r($success,tue), LOGGER_DATA);
+ logger('handle_tag: ' . print_r($success,true), LOGGER_DATA);
if(($access_tag) && (! $parent_item)) {
logger('access_tag: ' . $tag . ' ' . print_r($access_tag,true), LOGGER_DATA);
if ($first_access_tag && (! get_pconfig($profile_uid,'system','no_private_mention_acl_override'))) {
@@ -987,263 +988,6 @@ function item_content(&$a) {
}
}
-/**
- * This function removes the tag $tag from the text $body and replaces it with
- * the appropiate link.
- *
- * @param unknown_type $body the text to replace the tag in
- * @param unknown_type $access_tag - used to return tag ACL exclusions e.g. @!foo
- * @param unknown_type $str_tags string to add the tag to
- * @param unknown_type $profile_uid
- * @param unknown_type $tag the tag to replace
- *
- * @return boolean true if replaced, false if not replaced
- */
-function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) {
-
- $replaced = false;
- $r = null;
-
-
- $termtype = ((strpos($tag,'#') === 0) ? TERM_HASHTAG : TERM_UNKNOWN);
- $termtype = ((strpos($tag,'@') === 0) ? TERM_MENTION : $termtype);
- $termtype = ((strpos($tag,'#^[') === 0) ? TERM_BOOKMARK : $termtype);
-
-
- //is it a hash tag?
- if(strpos($tag,'#') === 0) {
- if(strpos($tag,'#^[') === 0) {
- if(preg_match('/#\^\[(url|zrl)(.*?)\](.*?)\[\/(url|zrl)\]/',$tag,$match)) {
- $basetag = $match[3];
- $url = ((substr($match[2],0,1) === '=') ? substr($match[2],1) : $match[3]);
- $replaced = true;
-
- }
- }
- // if the tag is already replaced...
- elseif((strpos($tag,'[zrl=')) || (strpos($tag,'[url='))) {
- //...do nothing
- return $replaced;
- }
- if($tag == '#getzot') {
- $basetag = 'getzot';
- $url = 'https://redmatrix.me';
- $newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]';
- $body = str_replace($tag,$newtag,$body);
- $replaced = true;
- }
- if(! $replaced) {
-
- //base tag has the tags name only
-
- if((substr($tag,0,7) === '#&quot;') && (substr($tag,-6,6) === '&quot;')) {
- $basetag = substr($tag,7);
- $basetag = substr($basetag,0,-6);
- }
- else
- $basetag = str_replace('_',' ',substr($tag,1));
-
- //create text for link
- $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag);
- $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]';
- //replace tag by the link
- $body = str_replace($tag, $newtag, $body);
- $replaced = true;
- }
- //is the link already in str_tags?
- if(! stristr($str_tags,$newtag)) {
- //append or set str_tags
- if(strlen($str_tags))
- $str_tags .= ',';
- $str_tags .= $newtag;
- }
- return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $basetag, 'url' => $url, 'contact' => $r[0]);
- }
-
- //is it a person tag?
-
- if(strpos($tag,'@') === 0) {
-
- // The @! tag will alter permissions
- $exclusive = ((strpos($tag,'!') === 1) ? true : false);
-
- //is it already replaced?
- if(strpos($tag,'[zrl='))
- return $replaced;
-
- //get the person's name
-
- $name = substr($tag,(($exclusive) ? 2 : 1)); // The name or name fragment we are going to replace
- $newname = $name; // a copy that we can mess with
- $tagcid = 0;
-
- $r = null;
-
- // is it some generated name?
-
- $forum = false;
- $trailing_plus_name = false;
-
- // @channel+ is a forum or network delivery tag
-
- if(substr($newname,-1,1) === '+') {
- $forum = true;
- $newname = substr($newname,0,-1);
- }
-
- // Here we're looking for an address book entry as provided by the auto-completer
- // of the form something+nnn where nnn is an abook_id or the first chars of xchan_hash
-
- if(strrpos($newname,'+')) {
- //get the id
-
- if(strrpos($tagcid,' '))
- $tagcid = substr($tagcid,0,strrpos($tagcid,' '));
-
- $tagcid = substr($newname,strrpos($newname,'+') + 1);
-
- if(strlen($tagcid) < 16)
- $abook_id = intval($tagcid);
- //remove the next word from tag's name
- if(strpos($name,' ')) {
- $name = substr($name,0,strpos($name,' '));
- }
-
- if($abook_id) { // if there was an id
- // select channel with that id from the logged in user's address book
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
- intval($abook_id),
- intval($profile_uid)
- );
- }
- else {
- $r = q("SELECT * FROM xchan
- WHERE xchan_hash like '%s%%' LIMIT 1",
- dbesc($tagcid)
- );
- }
- }
-
- if(! $r) {
-
- // look for matching names in the address book
-
- // Two ways to deal with spaces - doube quote the name or use underscores
- // we see this after input filtering so quotes have been html entity encoded
-
- if((substr($name,0,6) === '&quot;') && (substr($name,-6,6) === '&quot;')) {
- $newname = substr($name,6);
- $newname = substr($newname,0,-6);
- }
- else
- $newname = str_replace('_',' ',$name);
-
- // do this bit over since we started over with $name
-
- if(substr($newname,-1,1) === '+') {
- $forum = true;
- $newname = substr($newname,0,-1);
- }
-
- //select someone from this user's contacts by name
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE xchan_name = '%s' AND abook_channel = %d LIMIT 1",
- dbesc($newname),
- intval($profile_uid)
- );
-
- if(! $r) {
- //select someone by attag or nick and the name passed in
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE xchan_addr like ('%s') AND abook_channel = %d LIMIT 1",
- dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')),
- intval($profile_uid)
- );
- }
-
- if(! $r) {
-
- // it's possible somebody has a name ending with '+', which we stripped off as a forum indicator
- // This is very rare but we want to get it right.
-
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE xchan_name = '%s' AND abook_channel = %d LIMIT 1",
- dbesc($newname . '+'),
- intval($profile_uid)
- );
- if($r)
- $trailing_plus_name = true;
- }
- }
-
- // $r is set if we found something
-
- $channel = get_app()->get_channel();
-
- if($r) {
- $profile = $r[0]['xchan_url'];
- $newname = $r[0]['xchan_name'];
- // add the channel's xchan_hash to $access_tag if exclusive
- if($exclusive) {
- $access_tag .= 'cid:' . $r[0]['xchan_hash'];
- }
- }
- else {
- // check for a group/collection exclusion tag
-
- // note that we aren't setting $replaced even though we're replacing text.
- // This tag isn't going to get a term attached to it. It's only used for
- // access control. The link points to out own channel just so it doesn't look
- // weird - as all the other tags are linked to something.
-
- if(local_user() && local_user() == $profile_uid) {
- require_once('include/group.php');
- $grp = group_byname($profile_uid,$name);
-
- if($grp) {
- $g = q("select hash from groups where id = %d and visible = 1 limit 1",
- intval($grp)
- );
- if($g && $exclusive) {
- $access_tag .= 'gid:' . $g[0]['hash'];
- }
- $channel = get_app()->get_channel();
- if($channel) {
- $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . z_root() . '/channel/' . $channel['channel_address'] . ']' . $newname . '[/zrl]';
- $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body);
- }
- }
- }
- }
-
- if(($exclusive) && (! $access_tag)) {
- $access_tag .= 'cid:' . $channel['channel_hash'];
- }
-
- // if there is an url for this channel
-
- if(isset($profile)) {
- $replaced = true;
- //create profile link
- $profile = str_replace(',','%2c',$profile);
- $url = $profile;
- $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . (($forum && ! $trailing_plus_name) ? '+' : '') . '[/zrl]';
- $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body);
- //append tag to str_tags
- if(! stristr($str_tags,$newtag)) {
- if(strlen($str_tags))
- $str_tags .= ',';
- $str_tags .= $newtag;
- }
- }
- }
-
-
- return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $newname, 'url' => $url, 'contact' => $r[0]);
-}
-
-
function fix_attached_photo_permissions($uid,$xchan_hash,$body,
$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny) {
diff --git a/mod/settings.php b/mod/settings.php
index 1643387ea..ea7b2ba06 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -160,7 +160,9 @@ function settings_post(&$a) {
$itemspage = 100;
- if($mobile_theme !== '') {
+ if ($mobile_theme == "---")
+ del_pconfig(local_user(),'system','mobile_theme');
+ else {
set_pconfig(local_user(),'system','mobile_theme',$mobile_theme);
}
@@ -755,7 +757,6 @@ function settings_content(&$a) {
$themes = array();
- $mobile_themes = array("---" => t('No special theme for mobile devices'));
$files = glob('view/theme/*');
if($allowed_themes) {
foreach($allowed_themes as $th) {
@@ -764,19 +765,20 @@ function settings_content(&$a) {
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
$is_mobile = file_exists('view/theme/' . $th . '/mobile');
$is_library = file_exists('view/theme/'. $th . '/library');
+ $mobile_themes["---"] = t("No special theme for mobile devices");
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f);
-
if (! $is_library) {
if($is_mobile) {
- $themes[$f]=$theme_name . ' (' . t('mobile') . ')';
+ $mobile_themes[$f] = $themes[$f] = $theme_name . ' (' . t('mobile') . ')';
}
else {
- $themes[$f]=$theme_name;
+ $mobile_themes[$f] = $themes[$f] = $theme_name;
}
}
}
+
}
}
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
@@ -812,7 +814,7 @@ function settings_content(&$a) {
'$uid' => local_user(),
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'),
- '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $themes, ''),
+ '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''),
'$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, ''),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css
index 9f93395c9..587ea7b8f 100644
--- a/view/css/bootstrap-red.css
+++ b/view/css/bootstrap-red.css
@@ -1,11 +1,5 @@
/* override some bootstrap settings */
-/* this might be a bug in bootstrap */
-.input-group-addon,
-.input-group-btn {
- width: unset;
-}
-
/* nav overrides */
nav .badge {
diff --git a/view/css/default.css b/view/css/default.css
index 40d5cfc59..56173f932 100644
--- a/view/css/default.css
+++ b/view/css/default.css
@@ -23,10 +23,6 @@ aside#region_1 {
padding: 65px 7px 0px 7px;
}
-aside input[type='text'] {
- width: 100%;
-}
-
section {
width: 100%;
display: table-cell;
diff --git a/view/css/widgets.css b/view/css/widgets.css
index a24f5fb29..4db87e633 100644
--- a/view/css/widgets.css
+++ b/view/css/widgets.css
@@ -13,6 +13,7 @@
}
.widget-input {
+ width: 100%;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
diff --git a/view/fr/lostpass_eml.tpl b/view/fr/lostpass_eml.tpl
index 04292dca8..0421d41a8 100644
--- a/view/fr/lostpass_eml.tpl
+++ b/view/fr/lostpass_eml.tpl
@@ -1,30 +1,30 @@
Cher {{$username}},
- Une demande pour réinitialiser votre mot de passe a récemment été reçu de {{$sitename}}
+ Une demande pour réinitialiser votre mot de passe a récemment été reçue par {{$sitename}}
Pour confirmer cette requête, veuillez suivre le lien de vérification
-suivant ou copier-coller le dans la barre d'adresse de votre navigateur.
+ci-dessous ou en faire un copier-coller dans la barre d'adresse de votre navigateur.
-Si vous N'AVEZ PAS demander ce changement, NE SUIVEZ PAS ce lien, ignorez simplement et/ou supprimer ce courriel.
+Si vous N'AVEZ PAS demandé ce changement, NE SUIVEZ PAS ce lien, ignorez-le simplement et/ou supprimez ce courriel.
Votre mot de passe ne sera pas changé à moins que nous puissions vérifier vos intentions.
-Suivez ce lien pour vérifier votre identité:
+Suivez ce lien pour confirmer votre identité:
{{$reset_link}}
Vous recevrez ensuite un second courriel avec votre nouveau mot de passe.
-Vous pouvez changez ce mot de passe à partir de la page des configurations de votre profil.
+Vous pouvez changer ce mot de passe à partir des réglages du profil après vous être connecté.
-Voici les détails de connections:
+Voici les détails de connexion:
Emplacement du site:⇥{{$siteurl}}
-Usager:⇥{{$email}}
+Utilisateur:⇥{{$email}}
Sincèrement,
- Administrateur {{$sitename}}
+ L'administrateur {{$sitename}}
\ No newline at end of file
diff --git a/view/fr/messages.po b/view/fr/messages.po
index d818c67ec..dfff156a2 100644
--- a/view/fr/messages.po
+++ b/view/fr/messages.po
@@ -23,7 +23,7 @@ msgstr ""
#: ../../include/dba/dba_driver.php:50
#, php-format
msgid "Cannot locate DNS info for database server '%s'"
-msgstr "Impossible de trouver les infos DNS du serveur de BD '%s'"
+msgstr "Impossible de trouver les infos DNS du serveur de base de données '%s'"
#: ../../include/photo/photo_driver.php:653 ../../include/photos.php:51
#: ../../mod/profile_photo.php:142 ../../mod/profile_photo.php:301
@@ -91,7 +91,7 @@ msgstr "Favoris"
#: ../../include/apps.php:125
msgid "Address Book"
-msgstr "Carnet d'adresse"
+msgstr "Carnet d'adresses"
#: ../../include/apps.php:126 ../../include/nav.php:106 ../../boot.php:1498
msgid "Login"
@@ -183,7 +183,7 @@ msgstr "Suggérer"
#: ../../include/apps.php:145
msgid "Random Channel"
-msgstr "Un Canal au Hasard"
+msgstr "Un canal au hasard"
#: ../../include/apps.php:146
msgid "Invite"
@@ -203,12 +203,12 @@ msgstr "Envoyer"
#: ../../include/apps.php:150
msgid "Profile Photo"
-msgstr "Photo du Profil"
+msgstr "Photo du profil"
#: ../../include/apps.php:239 ../../mod/settings.php:79
#: ../../mod/settings.php:543
msgid "Update"
-msgstr "Mise-à-jour"
+msgstr "Mise à jour"
#: ../../include/apps.php:239
msgid "Install"
@@ -289,11 +289,11 @@ msgstr "Sauver"
#: ../../include/text.php:897
msgid "poke"
-msgstr "cogne"
+msgstr "cogner"
#: ../../include/text.php:897 ../../include/conversation.php:243
msgid "poked"
-msgstr "C'est fait cogner"
+msgstr "a cogné"
#: ../../include/text.php:898
msgid "ping"
@@ -301,23 +301,23 @@ msgstr "solliciter"
#: ../../include/text.php:898
msgid "pinged"
-msgstr "sollicité"
+msgstr "a sollicité"
#: ../../include/text.php:899
msgid "prod"
-msgstr "aiguillonner"
+msgstr "encourager"
#: ../../include/text.php:899
msgid "prodded"
-msgstr "aiguillonné"
+msgstr "a encouragé"
#: ../../include/text.php:900
msgid "slap"
-msgstr "giffle"
+msgstr "gifler"
#: ../../include/text.php:900
msgid "slapped"
-msgstr "gifflé"
+msgstr "a giflé"
#: ../../include/text.php:901
msgid "finger"
@@ -325,15 +325,15 @@ msgstr "pointer"
#: ../../include/text.php:901
msgid "fingered"
-msgstr "pointé"
+msgstr "a pointé"
#: ../../include/text.php:902
msgid "rebuff"
-msgstr "rejetter"
+msgstr "rejeter"
#: ../../include/text.php:902
msgid "rebuffed"
-msgstr "rejetté"
+msgstr "a rejeté"
#: ../../include/text.php:911
msgid "happy"
@@ -357,7 +357,7 @@ msgstr "impertinent"
#: ../../include/text.php:916
msgid "angry"
-msgstr "colèrique"
+msgstr "colérique"
#: ../../include/text.php:917
msgid "stupified"
@@ -377,7 +377,7 @@ msgstr "amer"
#: ../../include/text.php:921
msgid "cheerful"
-msgstr "entrain"
+msgstr "joyeux"
#: ../../include/text.php:922
msgid "alive"
@@ -385,7 +385,7 @@ msgstr "énergique"
#: ../../include/text.php:923
msgid "annoyed"
-msgstr "agaçé"
+msgstr "agacé"
#: ../../include/text.php:924
msgid "anxious"
@@ -517,7 +517,7 @@ msgstr "Cliquer pour ouvrir/fermer"
#: ../../include/text.php:1512 ../../mod/events.php:374
msgid "Link to Source"
-msgstr "Lien vers la Source"
+msgstr "Lien vers la source"
#: ../../include/text.php:1531
msgid "Select a page layout: "
@@ -563,7 +563,7 @@ msgstr "Menus"
#: ../../include/text.php:2008
msgid "Layouts"
-msgstr "Mises-en-page"
+msgstr "Mises en page"
#: ../../include/text.php:2009
msgid "Pages"
@@ -766,7 +766,7 @@ msgstr "Fermer"
#: ../../include/activities.php:39
msgid " and "
-msgstr "et"
+msgstr " et "
#: ../../include/activities.php:47
msgid "public profile"
@@ -780,12 +780,12 @@ msgstr "%1$s a changé %2$s en &ldquo;%3$s&rdquo;"
#: ../../include/activities.php:53
#, php-format
msgid "Visit %1$s's %2$s"
-msgstr "Visiter %1$s de %2$s"
+msgstr "Visiter %1$s sur %2$s"
#: ../../include/activities.php:56
#, php-format
msgid "%1$s has an updated %2$s, changing %3$s."
-msgstr "%1$s a mis-à-jour %2$s, modifiant %3$s."
+msgstr "%1$s a mis à jour %2$s, modifiant %3$s."
#: ../../include/api.php:1036
msgid "Public Timeline"
@@ -805,7 +805,7 @@ msgstr "Impossible de trouver le fichier à remplacer."
#: ../../include/attach.php:370
msgid "Cannot locate file to revise/update"
-msgstr "Impossible de trouver le fichier à corriger/mettre-à-jour"
+msgstr "Impossible de trouver le fichier à corriger/mettre à jour"
#: ../../include/attach.php:381
#, php-format
@@ -1490,7 +1490,7 @@ msgstr "Merci de visiter %s pour voir et/ou répondre sur cette conversation."
#: ../../include/enotify.php:182
#, php-format
msgid "[Red:Notify] %s posted to your profile wall"
-msgstr "[Matrice Rouge:Notification] %s a publié sur votre profil"
+msgstr "[Red:Notification] %s a publié sur votre profil"
#: ../../include/enotify.php:184
#, php-format
@@ -1525,7 +1525,7 @@ msgstr "[Red:Notification] %1$s vous a cogné"
#: ../../include/enotify.php:226
#, php-format
msgid "%1$s, %2$s poked you at %3$s"
-msgstr "%1$s, vous avez été cogné/pointé/sollicité par %2$s sur %3$s"
+msgstr "%1$s, %2$s vous a cogné sur %3$s
#: ../../include/enotify.php:227
#, php-format
@@ -1535,7 +1535,7 @@ msgstr "%1$s, %2$s [zrl=%2$s]vous a cogné[/zrl]."
#: ../../include/enotify.php:243
#, php-format
msgid "[Red:Notify] %s tagged your post"
-msgstr "[Matrice Rouge:Notification] %s a étiqueté votre publication"
+msgstr "[Red:Notification] %s a étiqueté votre publication"
#: ../../include/enotify.php:244
#, php-format
@@ -1574,7 +1574,7 @@ msgstr "Merci de visiter %s avant d'approuver (ou non) cette demande de relation
#: ../../include/enotify.php:272
msgid "[Red:Notify] Friend suggestion received"
-msgstr "[Matrice Rouge:Notification] Nouvelle suggestion d'amitié"
+msgstr "[Red:Notification] Nouvelle suggestion d'amitié"
#: ../../include/enotify.php:273
#, php-format
@@ -2408,7 +2408,7 @@ msgstr "Visible sur toute la Matrice."
#: ../../include/items.php:965
msgid "Visible to anybody authenticated."
-msgstr "Visible aux usagers authentifiés."
+msgstr "Visible aux utilisateurs authentifiés."
#: ../../include/items.php:967
#, php-format
@@ -3126,7 +3126,7 @@ msgstr "Indice pour la phrase de passe"
#: ../../include/js_strings.php:16
msgid "Notice: Permissions have changed but have not yet been submitted."
-msgstr "Note&nbsp;: Les permissions ont changées, mais n'ont pas encore été sauvées."
+msgstr "Note&nbsp;: Les permissions ont changé, mais n'ont pas encore été soumises."
#: ../../include/js_strings.php:17
msgid "close all"
@@ -3134,7 +3134,7 @@ msgstr "fermer tout"
#: ../../include/js_strings.php:19
msgid "timeago.prefixAgo"
-msgstr "timeago.prefixAgo"
+msgstr "Il y a"
#: ../../include/js_strings.php:20
msgid "timeago.prefixFromNow"
@@ -3142,7 +3142,7 @@ msgstr "timeago.prefixFromNow"
#: ../../include/js_strings.php:21
msgid "ago"
-msgstr "auparavant"
+msgstr " "
#: ../../include/js_strings.php:22
msgid "from now"
@@ -3567,7 +3567,7 @@ msgstr "Menu introuvable."
#: ../../mod/mitem.php:47
msgid "Menu element updated."
-msgstr "Entrée de menu mis-à-jour."
+msgstr "Entrée de menu mis à jour."
#: ../../mod/mitem.php:51
msgid "Unable to update menu element."
@@ -3716,7 +3716,7 @@ msgstr "Le mot de passe a été changé."
#: ../../mod/settings.php:216
msgid "Password update failed. Please try again."
-msgstr "La mise-à-jour du mot de passe a échoué. Merci de recommencer."
+msgstr "La mise à jour du mot de passe a échoué. Merci de recommencer."
#: ../../mod/settings.php:230
msgid "Not valid email."
@@ -3872,7 +3872,7 @@ msgstr "Thème mobile&nbsp;:"
#: ../../mod/settings.php:760
msgid "Enable user zoom on mobile devices"
-msgstr "Permettre à l'usager d'un mobile d'agrandir le contenu"
+msgstr "Permettre à l'utilisateur d'un mobile d'agrandir le contenu"
#: ../../mod/settings.php:761
msgid "Update browser every xx seconds"
@@ -4122,7 +4122,7 @@ msgstr "Vous êtes étiqueté dans une publication"
#: ../../mod/settings.php:994
msgid "You are poked/prodded/etc. in a post"
-msgstr "Vous êtes cogné/pointé/etc. dans une publication"
+msgstr "Vous êtes cogné/encouragé/etc. dans une publication"
#: ../../mod/settings.php:997
msgid "Advanced Account/Page Type Settings"
@@ -4152,11 +4152,11 @@ msgstr "Supprimer ce canal"
#: ../../mod/poke.php:159
msgid "Poke/Prod"
-msgstr "Cogner/Solliciter"
+msgstr "Cogner/Encourager"
#: ../../mod/poke.php:160
msgid "poke, prod or do other things to somebody"
-msgstr "Cogner, pointer, et autres choses à faire à quelqu'un"
+msgstr "Cogner, encourager, et autres choses à faire à quelqu'un"
#: ../../mod/poke.php:161
msgid "Recipient"
@@ -4776,7 +4776,7 @@ msgstr "Merci de vous connecter."
#: ../../mod/cloud.php:126
msgid "Red Matrix - Guests: Username: {your email address}, Password: +++"
-msgstr "Matrice Rouge - Pour les invités: Usager = {votre courriel}, Mot de passe = +++"
+msgstr "Matrice Rouge - Pour les invités: Nom d'utilisateur = {votre courriel}, Mot de passe = +++"
#: ../../mod/removeme.php:29
msgid ""
@@ -4822,7 +4822,7 @@ msgstr "Relations communes"
#: ../../mod/common.php:44
msgid "No connections in common."
-msgstr "Pas de relations en commun."
+msgstr "Pas de relation en commun."
#: ../../mod/rmagic.php:38
msgid ""
@@ -5292,7 +5292,7 @@ msgstr "Supprimer le contact"
#: ../../mod/connedit.php:549
msgid "Last update:"
-msgstr "Dernière mise-à-jour&nbsp;:"
+msgstr "Dernière mise à jour&nbsp;:"
#: ../../mod/connedit.php:551
msgid "Update public posts"
@@ -5549,7 +5549,7 @@ msgstr "Impossible de trouver une version CLI de PHP dans le PATH du serveur web
msgid ""
"If you don't have a command line version of PHP installed on server, you "
"will not be able to run background polling via cron."
-msgstr "En l'absence de version CLI de PHP sur votre serveur, vous ne pourrez pas utiliser la mise-à-jour en arrière-plan via cron."
+msgstr "En l'absence de version CLI de PHP sur votre serveur, vous ne pourrez pas utiliser la mise à jour en arrière-plan via cron."
#: ../../mod/setup.php:392
msgid "PHP executable path"
@@ -5802,7 +5802,7 @@ msgstr "<h1>Et maintenant</h1>"
msgid ""
"IMPORTANT: You will need to [manually] setup a scheduled task for the "
"poller."
-msgstr "IMPORTANT&nbsp;: Vous devez créer [manuellement] une tâche planifiée pour les mises-à-jour."
+msgstr "IMPORTANT&nbsp;: Vous devez créer [manuellement] une tâche planifiée pour les mises à jour."
#: ../../mod/editblock.php:8 ../../mod/editblock.php:27
#: ../../mod/editblock.php:53 ../../mod/editlayout.php:36
@@ -6279,7 +6279,7 @@ msgstr "Impossible de créer la collection."
#: ../../mod/group.php:54
msgid "Collection updated."
-msgstr "Collection mise-à-jour."
+msgstr "Collection mise à jour."
#: ../../mod/group.php:86
msgid "Create a collection of channels."
@@ -6936,7 +6936,7 @@ msgstr "Niveau de journalisation"
#: ../../mod/thing.php:98
msgid "Thing updated"
-msgstr "Chose mise-à-jour"
+msgstr "Chose mise à jour"
#: ../../mod/thing.php:158
msgid "Object store: failed"
@@ -7224,7 +7224,7 @@ msgstr "Visible par&nbsp;:"
#: ../../mod/viewconnections.php:58
msgid "No connections."
-msgstr "Pas de relations."
+msgstr "Pas de relation."
#: ../../mod/viewconnections.php:71
#, php-format
@@ -7675,7 +7675,7 @@ msgstr "URL vers le serveur Friendica"
#: ../../mod/frphotos.php:82
msgid "Friendica Login Username"
-msgstr "Nom d'usager Friendica"
+msgstr "Nom d'utilisateur Friendica"
#: ../../mod/frphotos.php:83
msgid "Friendica Login Password"
@@ -7997,12 +7997,12 @@ msgstr "Vous êtes plutôt \"bureau bien rangé\" ou \"gros foutoir\"?"
#: ../../boot.php:1296
#, php-format
msgid "Update %s failed. See error logs."
-msgstr "La mise-à-jour %s a échoué. Merci de consulter les journaux d'erreur."
+msgstr "La mise à jour %s a échoué. Merci de consulter les journaux d'erreur."
#: ../../boot.php:1299
#, php-format
msgid "Update Error at %s"
-msgstr "Erreur de mise-à-jour sur %s"
+msgstr "Erreur de mise à jour sur %s"
#: ../../boot.php:1473
msgid ""
diff --git a/view/fr/passchanged_eml.tpl b/view/fr/passchanged_eml.tpl
index bfbd7c5ef..7c4e3d7bb 100644
--- a/view/fr/passchanged_eml.tpl
+++ b/view/fr/passchanged_eml.tpl
@@ -4,16 +4,16 @@ Cher {{$username}},
Veuillez conserver cette information (ou changer immédiatement ce mot de passe temporaire).
-Voici les détails de connections:
+Voici les détails de connexion:
Emplacement du site:⇥{{$siteurl}}
-Usager:⇥{{$email}}
+Utilisateur:⇥{{$email}}
Mot de passe:⇥{{$new_password}}
-Vous pouvez changez ce mot de passe à partir des réglages du profil après vous être connecté.
+Vous pouvez changer ce mot de passe à partir des réglages du profil après vous être connecté.
Sincèrement,
- Administrateur {{$sitename}}
+ L'administrateur {{$sitename}}
\ No newline at end of file
diff --git a/view/fr/register_open_eml.tpl b/view/fr/register_open_eml.tpl
index 7bf52a261..46390bc9d 100644
--- a/view/fr/register_open_eml.tpl
+++ b/view/fr/register_open_eml.tpl
@@ -1,19 +1,18 @@
Un compte a été créé sur {{$sitename}} avec cette adresse de courriel.
-Voici les détails de connections:
+Voici les détails de connexion:
Emplacement du site:⇥{{$siteurl}}
-Usager:⇥{{$email}}
-Mot de passe: (le mot de passe tel qu'il a été spécifier lors de l'enregistrement)
+Utilisateur:⇥{{$email}}
+Mot de passe: (le mot de passe qui a été spécifié lors de l'enregistrement)
-Si ce compte a été créé sans votre accord, vous pouvez
-visiter ce site et réinitialiser le mot de passe.
+Si ce compte a été créé sans votre accord, vous pouvez visiter ce site et réinitialiser le mot de passe.
Ceci vous permettra de supprimer le compte à partir de la page des réglages du profil.
-Veuillez accepter nos excuses pour tous les inconvénients que cela a pu engendrer.
+Veuillez accepter nos excuses pour tous les désagréments engendrés.
-Merci et Bienvenu sur {{$sitename}}.
+Merci et bienvenue sur {{$sitename}}.
Sincèrement,
- Administrateur {{$sitename}}
+ L'administrateur {{$sitename}}
\ No newline at end of file
diff --git a/view/fr/register_verify_eml.tpl b/view/fr/register_verify_eml.tpl
index 09170079c..9d2be027c 100644
--- a/view/fr/register_verify_eml.tpl
+++ b/view/fr/register_verify_eml.tpl
@@ -1,15 +1,15 @@
-Une demande d'enregistrement pour un nouvel usager a été reçue de {{$sitename}} laquelle requiert
+Une demande d'enregistrement pour un nouvel utilisateur a été reçue par {{$sitename}} qui requiert
votre accord.
-Voici les détails de connections:
+Voici les détails de connexion:
Emplacement du site:⇥{{$siteurl}}
-Usager:⇥{{$email}}
+Utilisateur:⇥{{$email}}
Adresse IP: {{$details}}
-Pour confirmer votre accord, veuillez visiter le lien suivant:
+Pour confirmer votre accord, veuillez suivre le lien suivant:
{{$siteurl}}/regmod/allow/{{$hash}}
diff --git a/view/fr/register_verify_member.tpl b/view/fr/register_verify_member.tpl
index c7641d4f7..3461c56a0 100644
--- a/view/fr/register_verify_member.tpl
+++ b/view/fr/register_verify_member.tpl
@@ -1,16 +1,16 @@
Merci de vous être enregistré sur {{$sitename}}.
-Voici les détails de connections:
+Voici les détails de connexion:
Emplacement du site:⇥{{$siteurl}}
-Usager:⇥{{$email}}
+Utilisateur:⇥{{$email}}
Connectez-vous avec le mot de passe que vous avez choisi au moment de l'enregistrement.
-Nous avons besoin de vérifier votre adresse de courriel avant d’autoriser votre accès sur le réseau.
+Nous avons besoin de vérifier votre adresse de courriel avant d’autoriser votre accès au réseau.
-Si vous avez enregistré ce compte, veuillez visiter ce lien:
+Si vous avez enregistré ce compte, suivre ce lien:
{{$siteurl}}/regver/allow/{{$hash}}
diff --git a/view/fr/strings.php b/view/fr/strings.php
index 24efb1744..03a6a0fee 100644
--- a/view/fr/strings.php
+++ b/view/fr/strings.php
@@ -5,7 +5,7 @@ function string_plural_select_fr($n){
return ($n > 1);;
}}
;
-$a->strings["Cannot locate DNS info for database server '%s'"] = "Impossible de trouver les infos DNS du serveur de BD '%s'";
+$a->strings["Cannot locate DNS info for database server '%s'"] = "Impossible de trouver les infos DNS du serveur de base de données '%s'";
$a->strings["Profile Photos"] = "Photos du profil";
$a->strings["%1\$s is now friends with %2\$s"] = "%1\$s et %2\$s sont maintenant amis.";
$a->strings["Sharing notification from Diaspora network"] = "Partage de vos notifications du réseau Diaspora";
@@ -19,7 +19,7 @@ $a->strings["created a new post"] = "a publié";
$a->strings["commented on %s's post"] = "a commenté la publication de %s";
$a->strings["Site Admin"] = "Administrateur";
$a->strings["Bookmarks"] = "Favoris";
-$a->strings["Address Book"] = "Carnet d'adresse";
+$a->strings["Address Book"] = "Carnet d'adresses";
$a->strings["Login"] = "Connexion";
$a->strings["Channel Select"] = "Changer de canal";
$a->strings["Matrix"] = "Matrice";
@@ -39,13 +39,13 @@ $a->strings["Chat"] = "Clavardage";
$a->strings["Search"] = "Recherche";
$a->strings["Probe"] = "Sonder";
$a->strings["Suggest"] = "Suggérer";
-$a->strings["Random Channel"] = "Un Canal au Hasard";
+$a->strings["Random Channel"] = "Un canal au hasard";
$a->strings["Invite"] = "Invitation";
$a->strings["Features"] = "Fonctionalités";
$a->strings["Language"] = "Langue";
$a->strings["Post"] = "Envoyer";
-$a->strings["Profile Photo"] = "Photo du Profil";
-$a->strings["Update"] = "Mise-à-jour";
+$a->strings["Profile Photo"] = "Photo du profil";
+$a->strings["Update"] = "Mise à jour";
$a->strings["Install"] = "Installer";
$a->strings["Purchase"] = "Acheter";
$a->strings["Edit"] = "Éditer";
@@ -64,31 +64,31 @@ $a->strings["%d Connection"] = array(
);
$a->strings["View Connections"] = "Voir les relations";
$a->strings["Save"] = "Sauver";
-$a->strings["poke"] = "cogne";
-$a->strings["poked"] = "C'est fait cogner";
+$a->strings["poke"] = "cogner";
+$a->strings["poked"] = "a cogné";
$a->strings["ping"] = "solliciter";
-$a->strings["pinged"] = "sollicité";
-$a->strings["prod"] = "aiguillonner";
-$a->strings["prodded"] = "aiguillonné";
-$a->strings["slap"] = "giffle";
-$a->strings["slapped"] = "gifflé";
+$a->strings["pinged"] = "a sollicité";
+$a->strings["prod"] = "encourager";
+$a->strings["prodded"] = "a encouragé";
+$a->strings["slap"] = "gifler";
+$a->strings["slapped"] = "a giflé";
$a->strings["finger"] = "pointer";
-$a->strings["fingered"] = "pointé";
-$a->strings["rebuff"] = "rejetter";
-$a->strings["rebuffed"] = "rejetté";
+$a->strings["fingered"] = "a pointé";
+$a->strings["rebuff"] = "rejeter";
+$a->strings["rebuffed"] = "a rejeté";
$a->strings["happy"] = "heureux";
$a->strings["sad"] = "triste";
$a->strings["mellow"] = "mélancolique";
$a->strings["tired"] = "fatigué";
$a->strings["perky"] = "impertinent";
-$a->strings["angry"] = "colèrique";
+$a->strings["angry"] = "colérique";
$a->strings["stupified"] = "stupéfié";
$a->strings["puzzled"] = "perplexe";
$a->strings["interested"] = "intéressé";
$a->strings["bitter"] = "amer";
-$a->strings["cheerful"] = "entrain";
+$a->strings["cheerful"] = "joyeux";
$a->strings["alive"] = "énergique";
-$a->strings["annoyed"] = "agaçé";
+$a->strings["annoyed"] = "agacé";
$a->strings["anxious"] = "anxieux";
$a->strings["cranky"] = "énervé";
$a->strings["disturbed"] = "perturbé";
@@ -121,7 +121,7 @@ $a->strings["bytes"] = "octets";
$a->strings["remove category"] = "supprimer la catégorie";
$a->strings["remove from file"] = "retirer du fichier";
$a->strings["Click to open/close"] = "Cliquer pour ouvrir/fermer";
-$a->strings["Link to Source"] = "Lien vers la Source";
+$a->strings["Link to Source"] = "Lien vers la source";
$a->strings["Select a page layout: "] = "Choisir une mise en page&nbsp;:";
$a->strings["default"] = "défaut";
$a->strings["Page content type: "] = "Type de contenu&nbsp;:";
@@ -170,16 +170,16 @@ $a->strings["Show"] = "Voir plus";
$a->strings["Don't show"] = "Cacher";
$a->strings["Permissions"] = "Permissions";
$a->strings["Close"] = "Fermer";
-$a->strings[" and "] = "et";
+$a->strings[" and "] = " et ";
$a->strings["public profile"] = "profil public";
$a->strings["%1\$s changed %2\$s to &ldquo;%3\$s&rdquo;"] = "%1\$s a changé %2\$s en &ldquo;%3\$s&rdquo;";
-$a->strings["Visit %1\$s's %2\$s"] = "Visiter %1\$s de %2\$s";
-$a->strings["%1\$s has an updated %2\$s, changing %3\$s."] = "%1\$s a mis-à-jour %2\$s, modifiant %3\$s.";
+$a->strings["Visit %1\$s's %2\$s"] = "Visiter %1\$s sur %2\$s";
+$a->strings["%1\$s has an updated %2\$s, changing %3\$s."] = "%1\$s a mis à jour %2\$s, modifiant %3\$s.";
$a->strings["Public Timeline"] = "Fil public";
$a->strings["Item was not found."] = "Élément introuvable.";
$a->strings["No source file."] = "Pas de fichier source.";
$a->strings["Cannot locate file to replace"] = "Impossible de trouver le fichier à remplacer.";
-$a->strings["Cannot locate file to revise/update"] = "Impossible de trouver le fichier à corriger/mettre-à-jour";
+$a->strings["Cannot locate file to revise/update"] = "Impossible de trouver le fichier à corriger/mettre à jour";
$a->strings["File exceeds size limit of %d"] = "Le fichier dépasse la taille limite de %d";
$a->strings["You have reached your limit of %1$.0f Mbytes attachment storage."] = "Vous avez atteint votre limite de %1$.0f méga-octets autorisés pour le stockage des pièces-jointes";
$a->strings["File upload failed. Possible system limit or action terminated."] = "Envoi du fichier impossible. Limite système ou action avortée.";
@@ -349,16 +349,16 @@ $a->strings["%1\$s, %2\$s commented on [zrl=%3\$s]your %4\$s[/zrl]"] = "%1\$s, %
$a->strings["[Red:Notify] Comment to conversation #%1\$d by %2\$s"] = "[Red:Notification] Commentaire de %2\$s sur conversation #%1\$d";
$a->strings["%1\$s, %2\$s commented on an item/conversation you have been following."] = "%1\$s, %2\$s a commenté un élément de conversation que vous suivez.";
$a->strings["Please visit %s to view and/or reply to the conversation."] = "Merci de visiter %s pour voir et/ou répondre sur cette conversation.";
-$a->strings["[Red:Notify] %s posted to your profile wall"] = "[Matrice Rouge:Notification] %s a publié sur votre profil";
+$a->strings["[Red:Notify] %s posted to your profile wall"] = "[Red:Notification] %s a publié sur votre profil";
$a->strings["%1\$s, %2\$s posted to your profile wall at %3\$s"] = "%1\$s, %2\$s a publié sur votre profil à %3\$s";
$a->strings["%1\$s, %2\$s posted to [zrl=%3\$s]your wall[/zrl]"] = "%1\$s, %2\$s a publié sur [zrl=%3\$s]votre profil[/zrl]";
$a->strings["[Red:Notify] %s tagged you"] = "[Red:Notification] %s vous a étiqueté";
$a->strings["%1\$s, %2\$s tagged you at %3\$s"] = "%1\$s, vous avez été étiqueté sur %3\$s par %2\$s";
$a->strings["%1\$s, %2\$s [zrl=%3\$s]tagged you[/zrl]."] = "%1\$s, %2\$s [zrl=%3\$s]vous a étiqueté[/zrl].";
$a->strings["[Red:Notify] %1\$s poked you"] = "[Red:Notification] %1\$s vous a cogné";
-$a->strings["%1\$s, %2\$s poked you at %3\$s"] = "%1\$s, vous avez été cogné/pointé/sollicité par %2\$s sur %3\$s";
+$a->strings["%1\$s, %2\$s poked you at %3\$s"] = "%1\$s, %2\$s vous a cogné sur %3\$s";
$a->strings["%1\$s, %2\$s [zrl=%2\$s]poked you[/zrl]."] = "%1\$s, %2\$s [zrl=%2\$s]vous a cogné[/zrl].";
-$a->strings["[Red:Notify] %s tagged your post"] = "[Matrice Rouge:Notification] %s a étiqueté votre publication";
+$a->strings["[Red:Notify] %s tagged your post"] = "[Red:Notification] %s a étiqueté votre publication";
$a->strings["%1\$s, %2\$s tagged your post at %3\$s"] = "%1\$s, %2\$s a étiqueté votre publication sur %3\$s";
$a->strings["%1\$s, %2\$s tagged [zrl=%3\$s]your post[/zrl]"] = "%1\$s, %2\$s a étiqueté [zrl=%3\$s]votre publication[/zrl]";
$a->strings["[Red:Notify] Introduction received"] = "[Red:Notification] Nouvelle introduction";
@@ -366,7 +366,7 @@ $a->strings["%1\$s, you've received an new connection request from '%2\$s' at %3
$a->strings["%1\$s, you've received [zrl=%2\$s]a new connection request[/zrl] from %3\$s."] = "%1\$s, vous avez reçu [zrl=%2\$s]une demande de mise en relation[/zrl] de %3\$s.";
$a->strings["You may visit their profile at %s"] = "Vous pouvez visiter leur profil sur %s";
$a->strings["Please visit %s to approve or reject the connection request."] = "Merci de visiter %s avant d'approuver (ou non) cette demande de relation.";
-$a->strings["[Red:Notify] Friend suggestion received"] = "[Matrice Rouge:Notification] Nouvelle suggestion d'amitié";
+$a->strings["[Red:Notify] Friend suggestion received"] = "[Red:Notification] Nouvelle suggestion d'amitié";
$a->strings["%1\$s, you've received a friend suggestion from '%2\$s' at %3\$s"] = "%1\$s, vous avez reçu une suggestion de relation de '%2\$s' à %3\$s";
$a->strings["%1\$s, you've received [zrl=%2\$s]a friend suggestion[/zrl] for %3\$s from %4\$s."] = "%1\$s, avez reçu %3\$s comme [zrl=%2\$s]une suggestion de relation[/zrl] de %4\$s.";
$a->strings["Name:"] = "Nom&nbsp;:";
@@ -565,7 +565,7 @@ $a->strings["(Unknown)"] = "(Inconnu)";
$a->strings["Visible to anybody on the internet."] = "Visible à tout le monde sur internet.";
$a->strings["Visible to you only."] = "Visible pour vous seulement.";
$a->strings["Visible to anybody in this network."] = "Visible sur toute la Matrice.";
-$a->strings["Visible to anybody authenticated."] = "Visible aux usagers authentifiés.";
+$a->strings["Visible to anybody authenticated."] = "Visible aux utilisateurs authentifiés.";
$a->strings["Visible to anybody on %s."] = "Visible pour tous sur %s.";
$a->strings["Visible to all connections."] = "Visible pour tous les contacts.";
$a->strings["Visible to approved connections."] = "Visible aux contacts approuvés.";
@@ -735,11 +735,11 @@ $a->strings["Passwords do not match"] = "Les mots de passe ne correspondent pas"
$a->strings["everybody"] = "tout le monde";
$a->strings["Secret Passphrase"] = "Phrase de passe secrète";
$a->strings["Passphrase hint"] = "Indice pour la phrase de passe";
-$a->strings["Notice: Permissions have changed but have not yet been submitted."] = "Note&nbsp;: Les permissions ont changées, mais n'ont pas encore été sauvées.";
+$a->strings["Notice: Permissions have changed but have not yet been submitted."] = "Note&nbsp;: Les permissions ont changé, mais n'ont pas encore été soumises.";
$a->strings["close all"] = "fermer tout";
-$a->strings["timeago.prefixAgo"] = "timeago.prefixAgo";
+$a->strings["timeago.prefixAgo"] = "Il y a";
$a->strings["timeago.prefixFromNow"] = "timeago.prefixFromNow";
-$a->strings["ago"] = "auparavant";
+$a->strings["ago"] = " ";
$a->strings["from now"] = "de maintenant";
$a->strings["less than a minute"] = "moins d'une minute";
$a->strings["about a minute"] = "environ une minute";
@@ -840,7 +840,7 @@ $a->strings["Can administer my channel resources"] = "Peut administrer les resso
$a->strings["Extremely advanced. Leave this alone unless you know what you are doing"] = "Très avancé. Ne pas toucher, sauf si vous savez VRAIMENT ce que vous faites";
$a->strings["Set your current mood and tell your friends"] = "Indiquez votre humeur du moment à vos amis";
$a->strings["Menu not found."] = "Menu introuvable.";
-$a->strings["Menu element updated."] = "Entrée de menu mis-à-jour.";
+$a->strings["Menu element updated."] = "Entrée de menu mis à jour.";
$a->strings["Unable to update menu element."] = "Impossible de mettre l'entrée de menu à jour.";
$a->strings["Menu element added."] = "Entrée de menu ajouté.";
$a->strings["Unable to add menu element."] = "Impossible d'ajouter l'entrée de menu.";
@@ -877,7 +877,7 @@ $a->strings["Key and Secret are required"] = "Clef et secret sont requis";
$a->strings["Passwords do not match. Password unchanged."] = "Les deux saisies du mot de passe ne correspondent pas. Il n'a donc pas été changé.";
$a->strings["Empty passwords are not allowed. Password unchanged."] = "Le mot de passe ne peut pas être vide. Il n'a donc pas été changé.";
$a->strings["Password changed."] = "Le mot de passe a été changé.";
-$a->strings["Password update failed. Please try again."] = "La mise-à-jour du mot de passe a échoué. Merci de recommencer.";
+$a->strings["Password update failed. Please try again."] = "La mise à jour du mot de passe a échoué. Merci de recommencer.";
$a->strings["Not valid email."] = "Adresse de courriel non-valide.";
$a->strings["Protected email address. Cannot change to that email."] = "Adresse de courriel protégée. Impossible de l'utiliser.";
$a->strings["System failure storing new email. Please try again."] = "Défaillance système lors du stockage de la nouvelle adresse de courriel. Merci de ré-essayer.";
@@ -915,7 +915,7 @@ $a->strings["%s - (Experimental)"] = "%s - (Expérimental)";
$a->strings["Display Settings"] = "Affichage";
$a->strings["Display Theme:"] = "Thème&nbsp;:";
$a->strings["Mobile Theme:"] = "Thème mobile&nbsp;:";
-$a->strings["Enable user zoom on mobile devices"] = "Permettre à l'usager d'un mobile d'agrandir le contenu";
+$a->strings["Enable user zoom on mobile devices"] = "Permettre à l'utilisateur d'un mobile d'agrandir le contenu";
$a->strings["Update browser every xx seconds"] = "Rafraîchir le navigateur toutes les xx secondes";
$a->strings["Minimum of 10 seconds, no maximum"] = "Minimum 10 secondes, pas de maximum";
$a->strings["Maximum number of conversations to load at any time:"] = "Nombre maximal de conversations pouvant être chargées en même temps&nbsp;:";
@@ -938,13 +938,13 @@ $a->strings["or"] = "ou";
$a->strings["Your channel address is"] = "Voici l'adresse de votre canal";
$a->strings["Channel Settings"] = "Canal";
$a->strings["Basic Settings"] = "Basique";
-$a->strings["Your Timezone:"] = "Fureau Horaire&nbsp;:";
+$a->strings["Your Timezone:"] = "Fuseau horaire&nbsp;:";
$a->strings["Default Post Location:"] = "Emplacement géographique par défaut&nbsp;:";
$a->strings["Geographical location to display on your posts"] = "Emplacement géographique à afficher sur vos publications";
$a->strings["Use Browser Location:"] = "Utiliser la géolocalisation fournie par le navigateur&nbsp;:";
$a->strings["Adult Content"] = "Contenu \"adulte\"";
$a->strings["This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)"] = "Ce canal publie plus ou moins fréquemment du contenu pour adultes. (Merci d'indiquer tout contenu pour adulte ou potentiellement choquant avec l'étiquette <em>#NSFW</em> - Not Safe For Work)";
-$a->strings["Security and Privacy Settings"] = "Réglages de Sécurité et vie privée";
+$a->strings["Security and Privacy Settings"] = "Réglages de sécurité et vie privée";
$a->strings["Hide my online presence"] = "Cacher ma présence en ligne";
$a->strings["Prevents displaying in your profile that you are online"] = "Cacher votre statut (en ligne/hors ligne) sur votre profil";
$a->strings["Simple Privacy Settings:"] = "Réglages simples&nbsp;:";
@@ -952,7 +952,7 @@ $a->strings["Very Public - <em>extremely permissive (should be used with caution
$a->strings["Typical - <em>default public, privacy when desired (similar to social network permissions but with improved privacy)</em>"] = "Classique - <em>public par défaut, privé en cas de besoin (comparable dans le principe aux réseaux sociaux centralisés, avec un mode privé plus efficace)</em>";
$a->strings["Private - <em>default private, never open or public</em>"] = "Privé - <em>privé par défaut, jamais ouvert ni public</em>";
$a->strings["Blocked - <em>default blocked to/from everybody</em>"] = "Bloqué - <em>par défaut, bloqué de/vers tout le monde</em>";
-$a->strings["Allow others to tag your posts"] = "Autoriser les autres à \"étiqueté\" vos publications";
+$a->strings["Allow others to tag your posts"] = "Autoriser les autres à \"étiqueter\" vos publications";
$a->strings["Often used by the community to retro-actively flag inappropriate content"] = "Souvent utilisé par la communauté pour distinguer le contenu innaproprié";
$a->strings["Advanced Privacy Settings"] = "Réglages avancés";
$a->strings["Expire other channel content after this many days"] = "Faire expirer le contenu des autres canaux après n jours";
@@ -975,15 +975,15 @@ $a->strings["Someone writes a followup comment"] = "Quelqu'un a commenté sur vo
$a->strings["You receive a private message"] = "Vous recevez un message privé";
$a->strings["You receive a friend suggestion"] = "Vous recevez une suggestion d'amitié/relation";
$a->strings["You are tagged in a post"] = "Vous êtes étiqueté dans une publication";
-$a->strings["You are poked/prodded/etc. in a post"] = "Vous êtes cogné/pointé/etc. dans une publication";
+$a->strings["You are poked/prodded/etc. in a post"] = "Vous êtes cogné/encouragé/etc. dans une publication";
$a->strings["Advanced Account/Page Type Settings"] = "Type de page/Compte (avancé)";
$a->strings["Change the behaviour of this account for special situations"] = "Modifie le comportement de ce compte pour certains cas particuliers";
$a->strings["Please enable expert mode (in <a href=\"settings/features\">Settings > Additional features</a>) to adjust!"] = "Mode expert requis (<a href=\"settings/features\">Réglages > Fonctions supplémentaires</a>) svp ajuster!";
$a->strings["Miscellaneous Settings"] = "Divers";
$a->strings["Personal menu to display in your channel pages"] = "Menu personnel tel qu'il apparaîtra sur les pages de votre canal";
$a->strings["Remove this channel"] = "Supprimer ce canal";
-$a->strings["Poke/Prod"] = "Cogner/Solliciter";
-$a->strings["poke, prod or do other things to somebody"] = "Cogner, pointer, et autres choses à faire à quelqu'un";
+$a->strings["Poke/Prod"] = "Cogner/Encourager";
+$a->strings["poke, prod or do other things to somebody"] = "Cogner, encourager, et autres choses à faire à quelqu'un";
$a->strings["Recipient"] = "Destinataire";
$a->strings["Choose what you wish to do to recipient"] = "Choisir quoi lui faire";
$a->strings["Make this post private"] = "Rendre cette contribution privée";
@@ -1116,7 +1116,7 @@ $a->strings["Passwords do not match."] = "Les mots de passe ne concordent pas.";
$a->strings["Registration successful. Please check your email for validation instructions."] = "Inscription réussie. Merci de vérifier vos courriels pour valider votre compte.";
$a->strings["Your registration is pending approval by the site owner."] = "Votre inscription est en attente de l'approbation d'un administrateur.";
$a->strings["Your registration can not be processed."] = "Votre inscription ne peut être traîtée.";
-$a->strings["Registration on this site/hub is by approval only."] = "L'inscription sur cette instance/ce site est soumis à une modération.";
+$a->strings["Registration on this site/hub is by approval only."] = "L'inscription sur cette instance/ce site est soumise à une modération.";
$a->strings["<a href=\"pubsites\">Register at another affiliated site/hub</a>"] = "<a href=\"pubsites\">S'inscrire sur un site/hub affilié</a>";
$a->strings["This site has exceeded the number of allowed daily account registrations. Please try again tomorrow."] = "Ce site a dépassé le nombre de création de compte autorisé par jour. Merci de recommencer demain.";
$a->strings["Terms of Service"] = "Règles du Service";
@@ -1131,7 +1131,7 @@ $a->strings["Please re-enter your password"] = "Confirmez-le";
$a->strings["Away"] = "Absent";
$a->strings["Online"] = "En ligne";
$a->strings["Please login."] = "Merci de vous connecter.";
-$a->strings["Red Matrix - Guests: Username: {your email address}, Password: +++"] = "Matrice Rouge - Pour les invités: Usager = {votre courriel}, Mot de passe = +++";
+$a->strings["Red Matrix - Guests: Username: {your email address}, Password: +++"] = "Matrice Rouge - Pour les invités: Nom d'utilisateur = {votre courriel}, Mot de passe = +++";
$a->strings["Channel removals are not allowed within 48 hours of changing the account password."] = "Il est impossible de supprimer un canal à l'intérieur de 48 heures après avoir changé le mot de passe d'un compte.";
$a->strings["Remove This Channel"] = "Supprimer ce Canal";
$a->strings["This will completely remove this channel from the network. Once this has been done it is not recoverable."] = "Ceci effacera complètement le canal du réseau. Une fois effacé, un canal ne PEUT PAS être récupéré.";
@@ -1141,7 +1141,7 @@ $a->strings["By default only the instance of the channel located on this hub wil
$a->strings["Remove Channel"] = "Enlever le canal";
$a->strings["No channel."] = "Pas de canal.";
$a->strings["Common connections"] = "Relations communes";
-$a->strings["No connections in common."] = "Pas de relations en commun.";
+$a->strings["No connections in common."] = "Pas de relation en commun.";
$a->strings["We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID."] = "Nous avons rencontré un problème avec l'OpenID que vous nous avez fourni. Merci de vérifier que l'ID est bien saisi.";
$a->strings["The error message was:"] = "Le message d'erreur était&nbsp;:";
$a->strings["Authentication failed."] = "Échec de l'authentification.";
@@ -1251,7 +1251,7 @@ $a->strings["Ignore contact"] = "Ignorer le contact";
$a->strings["Repair URL settings"] = "Réparer les réglages d'URL";
$a->strings["View conversations"] = "Voir les conversations";
$a->strings["Delete contact"] = "Supprimer le contact";
-$a->strings["Last update:"] = "Dernière mise-à-jour&nbsp;:";
+$a->strings["Last update:"] = "Dernière mise à jour&nbsp;:";
$a->strings["Update public posts"] = "Mettre à jour les publications";
$a->strings["Update now"] = "Mettre à jour maintenant";
$a->strings["Currently blocked"] = "Actuellement bloqué";
@@ -1310,7 +1310,7 @@ $a->strings["Please use SSL (https) URL if available."] = "Merci d'utiliser SSL/
$a->strings["Please select a default timezone for your website"] = "Merci de choisir une zone de temps (fuseau horaire) pour votre site";
$a->strings["Site settings"] = "Réglages du site";
$a->strings["Could not find a command line version of PHP in the web server PATH."] = "Impossible de trouver une version CLI de PHP dans le PATH du serveur web.";
-$a->strings["If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron."] = "En l'absence de version CLI de PHP sur votre serveur, vous ne pourrez pas utiliser la mise-à-jour en arrière-plan via cron.";
+$a->strings["If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron."] = "En l'absence de version CLI de PHP sur votre serveur, vous ne pourrez pas utiliser la mise à jour en arrière-plan via cron.";
$a->strings["PHP executable path"] = "Chemin vers l'éxecutable PHP";
$a->strings["Enter full path to php executable. You can leave this blank to continue the installation."] = "Entrez le chemin complet vers l'exécutable php. Vous pouvez continuer l'installation sans.";
$a->strings["Command line PHP"] = "PHP en ligne de commande (CLI)";
@@ -1360,7 +1360,7 @@ $a->strings["Url rewrite is working"] = "La réécriture d'URL fonctionne";
$a->strings["The database configuration file \".htconfig.php\" could not be written. Please use the enclosed text to create a configuration file in your web server root."] = "Le fichier de configuration de la base de données - \".htconfig.php\" - ne peut être écrit. Merci de copier le texte généré dans un fichier à ce nom, à la racine de votre serveur web.";
$a->strings["Errors encountered creating database tables."] = "Erreurs rencontrées pendant la création de tables de BD.";
$a->strings["<h1>What next</h1>"] = "<h1>Et maintenant</h1>";
-$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "IMPORTANT&nbsp;: Vous devez créer [manuellement] une tâche planifiée pour les mises-à-jour.";
+$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "IMPORTANT&nbsp;: Vous devez créer [manuellement] une tâche planifiée pour les mises à jour.";
$a->strings["Item not found"] = "Élément introuvable";
$a->strings["Edit Block"] = "Éditer bloc";
$a->strings["Delete block?"] = "Supprimer le bloc?";
@@ -1473,7 +1473,7 @@ $a->strings["Suggest a friend for %s"] = "Suggérer une relation à %s";
$a->strings["No suggestions available. If this is a new site, please try again in 24 hours."] = "Pas de suggestions pour l'instant. Si le site est récent, merci de re-tenter dans 24 heures.";
$a->strings["Collection created."] = "Collection créée.";
$a->strings["Could not create collection."] = "Impossible de créer la collection.";
-$a->strings["Collection updated."] = "Collection mise-à-jour.";
+$a->strings["Collection updated."] = "Collection mise à jour.";
$a->strings["Create a collection of channels."] = "Créez une collection de canaux.";
$a->strings["Collection Name: "] = "Nom de la collection&nbsp;:";
$a->strings["Members are visible to other channels"] = "Les membres sont visibles par les autres canaux";
@@ -1511,7 +1511,7 @@ $a->strings["Active plugins"] = "Extensions actives";
$a->strings["Site settings updated."] = "Réglages du site sauvegardés.";
$a->strings["No special theme for accessibility"] = "Pas de thème spécifique pour l'accessibilité";
$a->strings["Yes - with approval"] = "Oui - avec approbation";
-$a->strings["My site is not a public server"] = "Mon site n'est pas un serveur publique";
+$a->strings["My site is not a public server"] = "Mon site n'est pas un serveur public";
$a->strings["My site has paid access only"] = "Mon site est payant";
$a->strings["My site has free access only"] = "Mon site est gratuit";
$a->strings["My site offers free accounts with optional paid upgrades"] = "Mon site offre des comptes gratuits avec des ajouts payants";
@@ -1633,7 +1633,7 @@ $a->strings["Debugging"] = "Débogage";
$a->strings["Log file"] = "Fichier du journal";
$a->strings["Must be writable by web server. Relative to your Red top-level directory."] = "Doit être accessible en écriture par le serveur web. Chemin relatif à la racine de votre installation de la Matrice Rouge.";
$a->strings["Log level"] = "Niveau de journalisation";
-$a->strings["Thing updated"] = "Chose mise-à-jour";
+$a->strings["Thing updated"] = "Chose mise à jour";
$a->strings["Object store: failed"] = "Stockage de l'objet&nbsp;: échec";
$a->strings["Thing added"] = "Chose ajoutée";
$a->strings["OBJ: %1\$s %2\$s %3\$s"] = "OBJ: %1\$s %2\$s %3\$s";
@@ -1703,7 +1703,7 @@ $a->strings["Action completed."] = "Action complétée.";
$a->strings["Thank you."] = "Merci.";
$a->strings["Remote privacy information not available."] = "Les informations de vie privée à distance ne sont pas disponibles.";
$a->strings["Visible to:"] = "Visible par&nbsp;:";
-$a->strings["No connections."] = "Pas de relations.";
+$a->strings["No connections."] = "Pas de relation.";
$a->strings["Visit %s's profile [%s]"] = "Visiter le profil de %s [%s]";
$a->strings["View Connnections"] = "Voir les relations";
$a->strings["No valid account found."] = "Aucun compte valide trouvé.";
@@ -1811,7 +1811,7 @@ $a->strings["View Results"] = "Voir les Résultats";
$a->strings["Friendica Photo Album Import"] = "Importer votre Album Photo Friendica";
$a->strings["This will import all your Friendica photo albums to this Red channel."] = "Cette fonction va importer tous vos albums photos Friendica dans ce canal de la Matrice Rouge.";
$a->strings["Friendica Server base URL"] = "URL vers le serveur Friendica";
-$a->strings["Friendica Login Username"] = "Nom d'usager Friendica";
+$a->strings["Friendica Login Username"] = "Nom d'utilisateur Friendica";
$a->strings["Friendica Login Password"] = "Mot de passe Friendica";
$a->strings["Account removals are not allowed within 48 hours of changing the account password."] = "Il est impossible de supprimer un compte à l'intérieur de 48 heures après avoir changé le mot de passe d'un compte.";
$a->strings["Remove This Account"] = "Supprimer ce Compte";
@@ -1887,8 +1887,8 @@ $a->strings["Set size of conversation author photo"] = "Définir la taille de la
$a->strings["Set size of followup author photos"] = "Définir la taille de la photo de l'auteur d'une réponse";
$a->strings["Sloppy photo albums"] = "Albums photo \"en biais\"";
$a->strings["Are you a clean desk or a messy desk person?"] = "Vous êtes plutôt \"bureau bien rangé\" ou \"gros foutoir\"?";
-$a->strings["Update %s failed. See error logs."] = "La mise-à-jour %s a échoué. Merci de consulter les journaux d'erreur.";
-$a->strings["Update Error at %s"] = "Erreur de mise-à-jour sur %s";
+$a->strings["Update %s failed. See error logs."] = "La mise à jour %s a échoué. Merci de consulter les journaux d'erreur.";
+$a->strings["Update Error at %s"] = "Erreur de mise à jour sur %s";
$a->strings["Create an account to access services and applications within the Red Matrix"] = "Créez un compte pour pouvoir accéder aux services et applications de la Matrice Red";
$a->strings["Password"] = "Mot de passe";
$a->strings["Remember me"] = "Se souvenir de moi";
diff --git a/view/fr/update_fail_eml.tpl b/view/fr/update_fail_eml.tpl
index 39dc6fa03..5fbad2c8a 100644
--- a/view/fr/update_fail_eml.tpl
+++ b/view/fr/update_fail_eml.tpl
@@ -1,16 +1,16 @@
Bonjour,
Je suis le serveur web de {{$sitename}};
-Les développeurs de la Matrice Rouge viennent de lancer une mise-à-jour {{$update}} récemment,
+Les développeurs de la Matrice Rouge ont lancé une mise à jour {{$update}} récemment,
toutefois, lorsque j'ai essayé de l'installer, quelques choses d'inattendu s'est produit.
-
+
Nous devons corriger la situation et cela requiert votre intervention.
-Veuillez contacter un développeur de la Matrice Rouge si vous avez de la difficulté à déterminer
+Veuillez contacter un développeur de la Matrice Rouge si vous avez des difficultés à déterminer
la meilleure approche pour résoudre le problème. Ma base de donnée est peut-être corrompue.
Le message d'erreur est '{{$error}}'.
-Veuillez accepter mes plus humbles excuses pour les inconvénients,
+Veuillez accepter mes plus humbles excuses pour les désagréments,
votre serveur web a {{$siteurl}} \ No newline at end of file
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index e68314797..ab67bc196 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -21,35 +21,41 @@
{{/if}}
<div class="clear"></div>
<div id="comment-tools-{{$id}}" class="comment-tools">
- <div id="comment-edit-bb-{{$id}}" class="btn-group pull-left">
- <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', {{$id}}); return false;">
- <i class="icon-bold comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', {{$id}}); return false;">
- <i class="icon-italic comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', {{$id}}); return false;">
- <i class="icon-underline comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote', {{$id}}); return false;">
- <i class="icon-quote-left comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', {{$id}}); return false;">
- <i class="icon-terminal comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', {{$id}}); return false;">
- <i class="icon-camera comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', {{$id}}); return false;">
- <i class="icon-link comment-icon"></i>
- </button>
- <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', {{$id}}); return false;">
- <i class="icon-facetime-video comment-icon"></i>
- </button>
+ <div id="comment-edit-bb-{{$id}}" class="btn-toolbar pull-left">
+ <div class='btn-group'>
+ <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', {{$id}}); return false;">
+ <i class="icon-bold comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', {{$id}}); return false;">
+ <i class="icon-italic comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', {{$id}}); return false;">
+ <i class="icon-underline comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote', {{$id}}); return false;">
+ <i class="icon-quote-left comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', {{$id}}); return false;">
+ <i class="icon-terminal comment-icon"></i>
+ </button>
+ </div>
+ <div class='btn-group'>
+ <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', {{$id}}); return false;">
+ <i class="icon-camera comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', {{$id}}); return false;">
+ <i class="icon-link comment-icon"></i>
+ </button>
+ <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', {{$id}}); return false;">
+ <i class="icon-facetime-video comment-icon"></i>
+ </button>
+ </div>
{{if $feature_encrypt}}
- <button class="btn btn-default btn-xs" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#comment-edit-text-' + '{{$id}}',''); return false;">
- <i class="icon-key comment-icon"></i>
- </button>
+ <div class='btn-group'>
+ <button class="btn btn-default btn-xs" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#comment-edit-text-' + '{{$id}}',''); return false;">
+ <i class="icon-key comment-icon"></i>
+ </button>
+ </div>
{{/if}}
</div>
<div class="btn-group pull-right" id="comment-edit-submit-wrapper-{{$id}}">
diff --git a/view/tpl/dir_sort_links.tpl b/view/tpl/dir_sort_links.tpl
index 2fcf0c13a..d9ecd22c6 100644
--- a/view/tpl/dir_sort_links.tpl
+++ b/view/tpl/dir_sort_links.tpl
@@ -1,9 +1,10 @@
<div class="widget" id="dir_sort_links">
<h3>{{$header}}</h3>
-<ul class="nav nav-pills nav-stacked">
- <li><a href="directory?f=&order=normal">{{$normal}}</a></li>
- <li><a href="directory?f=&order=reverse">{{$reverse}}</a></li>
- <li><a href="directory?f=&order=date">{{$date}}</a></li>
- <li><a href="directory?f=&pubforums=1">{{$pubforums}}</a></li>
-</ul>
+{{$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 />
+<input type='checkbox' {{if $pubforumsonly}}checked='checked'{{/if}} onchange='window.location.href="{{$forumsurl}}&pubforums="+(this.checked ? 1 : 0)'/> {{$pubforums}}<br />
</div>
diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl
index 2da920ab1..cdc6f1f97 100755
--- a/view/tpl/direntry.tpl
+++ b/view/tpl/direntry.tpl
@@ -6,6 +6,9 @@
{{if $entry.connect}}
<div class="directory-connect btn btn-default"><a href="{{$entry.connect}}"><i class="icon-plus connect-icon"></i> {{$entry.conn_label}}</a></div>
{{/if}}
+{{if $entry.ignlink}}
+<div class="directory-ignore btn btn-default"><a href="{{$entry.ignlink}}"> {{$entry.ignore_label}}</a></div>
+{{/if}}
</div>
</div>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index abf446ba9..bdbb7d09c 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -309,7 +309,7 @@ function enableOnUser(){
function jotClearLocation() {
$('#jot-coord').val('');
- $('#profile-nolocation-wrapper').hide();
+ $('#profile-nolocation-wrapper').attr('disabled', true);
}
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index f172a6dfa..34acce879 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -36,40 +36,48 @@
<textarea class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{$content}}</textarea>
</div>
<div id="profile-jot-submit-wrapper" class="jothidden">
- <div id="profile-jot-submit-left" class="btn-group pull-left">
+ <div id="profile-jot-submit-left" class="btn-toolbar pull-left">
{{if $visitor}}
- <button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
- <i class="icon-camera jot-icons"></i>
- </button>
- <button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
- <i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
- </button>
- <button id="profile-link-wrapper" class="btn btn-default btn-sm" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">
- <i id="profile-link" class="icon-link jot-icons"></i>
- </button>
- <button id="profile-video-wrapper" class="btn btn-default btn-sm" title="{{$video}}" onclick="jotVideoURL();return false;">
- <i id="profile-video" class="icon-facetime-video jot-icons"></i>
- </button>
- <button id="profile-audio-wrapper" class="btn btn-default btn-sm" title="{{$audio}}" onclick="jotAudioURL();return false;">
- <i id="profile-audio" class="icon-volume-up jot-icons"></i>
- </button>
- <button id="profile-nolocation-wrapper" class="btn btn-default btn-sm" style="display: none;" title="{{$noloc}}" onclick="jotClearLocation();return false;">
- <i id="profile-nolocation" class="icon-circle-blank jot-icons"></i>
- </button>
- <button id="profile-location-wrapper" class="btn btn-default btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
- <i id="profile-location" class="icon-globe jot-icons"></i>
- </button>
+ <div class='btn-group'>
+ <button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
+ <i class="icon-camera jot-icons"></i>
+ </button>
+ <button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
+ <i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
+ </button>
+ <button id="profile-link-wrapper" class="btn btn-default btn-sm" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">
+ <i id="profile-link" class="icon-link jot-icons"></i>
+ </button>
+ <button id="profile-video-wrapper" class="btn btn-default btn-sm" title="{{$video}}" onclick="jotVideoURL();return false;">
+ <i id="profile-video" class="icon-facetime-video jot-icons"></i>
+ </button>
+ <button id="profile-audio-wrapper" class="btn btn-default btn-sm" title="{{$audio}}" onclick="jotAudioURL();return false;">
+ <i id="profile-audio" class="icon-volume-up jot-icons"></i>
+ </button>
+ </div>
+ <div class='btn-group'>
+ <button id="profile-location-wrapper" class="btn btn-default btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
+ <i id="profile-location" class="icon-globe jot-icons"></i>
+ </button>
+ {{if $noloc}}
+ <button id="profile-nolocation-wrapper" class="btn btn-default btn-sm" title="{{$noloc}}" onclick="jotClearLocation();return false;" disabled="disabled">
+ <i id="profile-nolocation" class="icon-circle-blank jot-icons"></i>
+ </button>
+ {{/if}}
+ {{else}}
+ <div class='btn-group'>
{{/if}}
{{if $feature_expire}}
- <button id="profile-expire-wrapper" class="btn btn-default btn-sm" title="{{$expires}}" onclick="jotGetExpiry();return false;">
- <i id="profile-expires" class="icon-eraser jot-icons"></i>
- </button>
+ <button id="profile-expire-wrapper" class="btn btn-default btn-sm" title="{{$expires}}" onclick="jotGetExpiry();return false;">
+ <i id="profile-expires" class="icon-eraser jot-icons"></i>
+ </button>
{{/if}}
{{if $feature_encrypt}}
- <button id="profile-encrypt-wrapper" class="btn btn-default btn-sm" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;">
- <i id="profile-encrypt" class="icon-key jot-icons"></i>
- </button>
+ <button id="profile-encrypt-wrapper" class="btn btn-default btn-sm" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;">
+ <i id="profile-encrypt" class="icon-key jot-icons"></i>
+ </button>
{{/if}}
+ </div>
</div>
<div id="profile-rotator-wrapper">
<div id="profile-rotator"></div>
diff --git a/view/tpl/jot_geotag.tpl b/view/tpl/jot_geotag.tpl
index 7a398b612..60f128850 100755
--- a/view/tpl/jot_geotag.tpl
+++ b/view/tpl/jot_geotag.tpl
@@ -1,7 +1,7 @@
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$('#jot-coord').val(position.coords.latitude + ' ' + position.coords.longitude);
- $('#profile-nolocation-wrapper').show();
+ $('#profile-nolocation-wrapper').attr('disabled', false);
});
}
diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl
index 2f23948c8..ba71c1e80 100755
--- a/view/tpl/peoplefind.tpl
+++ b/view/tpl/peoplefind.tpl
@@ -12,7 +12,7 @@
</form>
<ul class="nav nav-pills nav-stacked">
{{if $similar}}<li><a href="match" >{{$similar}}</a></li>{{/if}}
- {{if $loggedin}}<li><a href="suggest" >{{$suggest}}</a></li>{{/if}}
+ {{if $loggedin}}<li><a href="directory?suggest=1" >{{$suggest}}</a></li>{{/if}}
<li><a href="randprof" >{{$random}}</a></li>
{{if $loggedin}}{{if $inv}}<li><a href="invite" >{{$inv}}</a></li>{{/if}}{{/if}}
</ul>
diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl
index aa169e6c0..1f99bf1ad 100755
--- a/view/tpl/profile_advanced.tpl
+++ b/view/tpl/profile_advanced.tpl
@@ -1,233 +1,229 @@
-<div id="profile-content-wrapper" class="generic-content-wrapper-styled">
-<h2>{{$title}}</h2>
-
-{{if $profile.canlike || $profile.like_count}}
-<div id="profile-like-wrapper">
-{{if $profile.canlike}}
- <button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('profile/' + '{{$profile.profile_guid}}','like'); return false;" title="{{$profile.likethis}}" >
- <i class="icon-thumbs-up-alt" title="{{$profile.likethis}}"></i>
- </button>
-{{/if}}
-
-
-{{if $profile.like_count}}
-<div class="btn-group">
-<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button>
-{{if $profile.likers}}
-<ul class="dropdown-menu" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}">{{$liker.name}}</a></li>{{/foreach}}</ul>
-{{/if}}
-</div>
-{{/if}}
-</div>
-{{/if}}
-
-<dl id="aprofile-fullname" class="aprofile">
- <dt>{{$profile.fullname.0}}</dt>
- <dd>{{$profile.fullname.1}}</dd>
-</dl>
-
-{{if $profile.gender}}
-<dl id="aprofile-gender" class="aprofile">
- <dt>{{$profile.gender.0}}</dt>
- <dd>{{$profile.gender.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.birthday}}
-<dl id="aprofile-birthday" class="aprofile">
- <dt>{{$profile.birthday.0}}</dt>
- <dd>{{$profile.birthday.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.age}}
-<dl id="aprofile-age" class="aprofile">
- <dt>{{$profile.age.0}}</dt>
- <dd>{{$profile.age.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.marital}}
-<dl id="aprofile-marital" class="aprofile">
- <dt><span class="heart">&hearts;</span> {{$profile.marital.0}}</dt>
- <dd>{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.sexual}}
-<dl id="aprofile-sexual" class="aprofile">
- <dt>{{$profile.sexual.0}}</dt>
- <dd>{{$profile.sexual.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.keywords}}
-<dl id="aprofile-tags" class="aprofile">
- <dt>{{$profile.keywords.0}}</dt>
- <dd>{{$profile.keywords.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.homepage}}
-<dl id="aprofile-homepage" class="aprofile">
- <dt>{{$profile.homepage.0}}</dt>
- <dd>{{$profile.homepage.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.hometown}}
-<dl id="aprofile-hometown" class="aprofile">
- <dt>{{$profile.hometown.0}}</dt>
- <dd>{{$profile.hometown.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.politic}}
-<dl id="aprofile-politic" class="aprofile">
- <dt>{{$profile.politic.0}}</dt>
- <dd>{{$profile.politic.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.religion}}
-<dl id="aprofile-religion" class="aprofile">
- <dt>{{$profile.religion.0}}</dt>
- <dd>{{$profile.religion.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.about}}
-<dl id="aprofile-about" class="aprofile">
- <dt>{{$profile.about.0}}</dt>
- <dd>{{$profile.about.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.interest}}
-<dl id="aprofile-interest" class="aprofile">
- <dt>{{$profile.interest.0}}</dt>
- <dd>{{$profile.interest.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.likes}}
-<dl id="aprofile-likes" class="aprofile">
- <dt>{{$profile.likes.0}}</dt>
- <dd>{{$profile.likes.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.dislikes}}
-<dl id="aprofile-dislikes" class="aprofile">
- <dt>{{$profile.dislikes.0}}</dt>
- <dd>{{$profile.dislikes.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.contact}}
-<dl id="aprofile-contact" class="aprofile">
- <dt>{{$profile.contact.0}}</dt>
- <dd>{{$profile.contact.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.channels}}
-<dl id="aprofile-channels" class="aprofile">
- <dt>{{$profile.channels.0}}</dt>
- <dd>{{$profile.channels.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.music}}
-<dl id="aprofile-music" class="aprofile">
- <dt>{{$profile.music.0}}</dt>
- <dd>{{$profile.music.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.book}}
-<dl id="aprofile-book" class="aprofile">
- <dt>{{$profile.book.0}}</dt>
- <dd>{{$profile.book.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.tv}}
-<dl id="aprofile-tv" class="aprofile">
- <dt>{{$profile.tv.0}}</dt>
- <dd>{{$profile.tv.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.film}}
-<dl id="aprofile-film" class="aprofile">
- <dt>{{$profile.film.0}}</dt>
- <dd>{{$profile.film.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.romance}}
-<dl id="aprofile-romance" class="aprofile">
- <dt>{{$profile.romance.0}}</dt>
- <dd>{{$profile.romance.1}}</dd>
-</dl>
-{{/if}}
-
-
-{{if $profile.work}}
-<dl id="aprofile-work" class="aprofile">
- <dt>{{$profile.work.0}}</dt>
- <dd>{{$profile.work.1}}</dd>
-</dl>
-{{/if}}
-
-{{if $profile.education}}
-<dl id="aprofile-education" class="aprofile">
- <dt>{{$profile.education.0}}</dt>
- <dd>{{$profile.education.1}}</dd>
-</dl>
-{{/if}}
-
-{{foreach $profile.extra_fields as $f}}
-{{if $profile.$f}}
-<dl id="aprofile-{{$f}}" class="aprofile">
- <dt>{{$profile.$f.0}}</dt>
- <dd>{{$profile.$f.1}}</dd>
-</dl>
-{{/if}}
-{{/foreach}}
-
-
-{{if $things}}
-{{foreach $things as $key => $items}}
-<b>{{$profile.fullname.1}} {{$key}}</b>
-<ul class="profile-thing-list">
-{{foreach $items as $item}}
-<li>{{if $item.img}}<img src="{{$item.img}}" width="100" height="100" alt="{{$item.term}}" />{{/if}}
-<a href="{{$item.url}}" >{{$item.term}}</a>
-{{if $profile.canlike}}<br />
-<button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('thing/' + '{{$item.term_hash}}','like'); return false;" title="{{$likethis}}" >
-<i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
-</button>
-{{/if}}
-{{if $item.like_count}}
-<div class="btn-group">
-<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="thing-like-{{$item.term_hash}}">{{$item.like_count}} {{$item.like_label}}</button>
-{{if $item.likes}}
-<ul class="dropdown-menu" role="menu" aria-labelledby="thing-like-{{$item.term_hash}}">{{foreach $item.likes as $liker}}<li role="presentation"><a href="{{$liker.xchan_url}}">{{$liker.xchan_name}}</a></li>{{/foreach}}</ul>
-{{/if}}
-</div>
-{{/if}}
-</li>
-{{/foreach}}
-</ul>
-<div class="clear"></div>
-{{/foreach}}
-{{/if}}
-
+<div id="profile-content-wrapper" class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <div class="pull-right dropdown">
+ {{if $profile.like_count}}
+ <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button>
+ {{if $profile.likers}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}">{{$liker.name}}</a></li>{{/foreach}}</ul>
+ {{/if}}
+ {{/if}}
+ {{if $profile.canlike}}
+ <button type="button" class="btn btn-success btn-xs" onclick="doprofilelike('profile/' + '{{$profile.profile_guid}}','like'); return false;" title="{{$profile.likethis}}" >
+ <i class="icon-thumbs-up-alt" title="{{$profile.likethis}}"></i>
+ </button>
+ {{/if}}
+ </div>
+ <h2>{{$title}}</h2>
+ <div class="clear"></div>
+ </div>
+ <div class="section-content-wrapper">
+ <dl id="aprofile-fullname" class="aprofile">
+ <dt>{{$profile.fullname.0}}</dt>
+ <dd>{{$profile.fullname.1}}</dd>
+ </dl>
+
+ {{if $profile.gender}}
+ <dl id="aprofile-gender" class="aprofile">
+ <dt>{{$profile.gender.0}}</dt>
+ <dd>{{$profile.gender.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.birthday}}
+ <dl id="aprofile-birthday" class="aprofile">
+ <dt>{{$profile.birthday.0}}</dt>
+ <dd>{{$profile.birthday.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.age}}
+ <dl id="aprofile-age" class="aprofile">
+ <dt>{{$profile.age.0}}</dt>
+ <dd>{{$profile.age.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.marital}}
+ <dl id="aprofile-marital" class="aprofile">
+ <dt><span class="heart">&hearts;</span> {{$profile.marital.0}}</dt>
+ <dd>{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.sexual}}
+ <dl id="aprofile-sexual" class="aprofile">
+ <dt>{{$profile.sexual.0}}</dt>
+ <dd>{{$profile.sexual.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.keywords}}
+ <dl id="aprofile-tags" class="aprofile">
+ <dt>{{$profile.keywords.0}}</dt>
+ <dd>{{$profile.keywords.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.homepage}}
+ <dl id="aprofile-homepage" class="aprofile">
+ <dt>{{$profile.homepage.0}}</dt>
+ <dd>{{$profile.homepage.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.hometown}}
+ <dl id="aprofile-hometown" class="aprofile">
+ <dt>{{$profile.hometown.0}}</dt>
+ <dd>{{$profile.hometown.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.politic}}
+ <dl id="aprofile-politic" class="aprofile">
+ <dt>{{$profile.politic.0}}</dt>
+ <dd>{{$profile.politic.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.religion}}
+ <dl id="aprofile-religion" class="aprofile">
+ <dt>{{$profile.religion.0}}</dt>
+ <dd>{{$profile.religion.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.about}}
+ <dl id="aprofile-about" class="aprofile">
+ <dt>{{$profile.about.0}}</dt>
+ <dd>{{$profile.about.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.interest}}
+ <dl id="aprofile-interest" class="aprofile">
+ <dt>{{$profile.interest.0}}</dt>
+ <dd>{{$profile.interest.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.likes}}
+ <dl id="aprofile-likes" class="aprofile">
+ <dt>{{$profile.likes.0}}</dt>
+ <dd>{{$profile.likes.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.dislikes}}
+ <dl id="aprofile-dislikes" class="aprofile">
+ <dt>{{$profile.dislikes.0}}</dt>
+ <dd>{{$profile.dislikes.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.contact}}
+ <dl id="aprofile-contact" class="aprofile">
+ <dt>{{$profile.contact.0}}</dt>
+ <dd>{{$profile.contact.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.channels}}
+ <dl id="aprofile-channels" class="aprofile">
+ <dt>{{$profile.channels.0}}</dt>
+ <dd>{{$profile.channels.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.music}}
+ <dl id="aprofile-music" class="aprofile">
+ <dt>{{$profile.music.0}}</dt>
+ <dd>{{$profile.music.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.book}}
+ <dl id="aprofile-book" class="aprofile">
+ <dt>{{$profile.book.0}}</dt>
+ <dd>{{$profile.book.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.tv}}
+ <dl id="aprofile-tv" class="aprofile">
+ <dt>{{$profile.tv.0}}</dt>
+ <dd>{{$profile.tv.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.film}}
+ <dl id="aprofile-film" class="aprofile">
+ <dt>{{$profile.film.0}}</dt>
+ <dd>{{$profile.film.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.romance}}
+ <dl id="aprofile-romance" class="aprofile">
+ <dt>{{$profile.romance.0}}</dt>
+ <dd>{{$profile.romance.1}}</dd>
+ </dl>
+ {{/if}}
+
+
+ {{if $profile.work}}
+ <dl id="aprofile-work" class="aprofile">
+ <dt>{{$profile.work.0}}</dt>
+ <dd>{{$profile.work.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{if $profile.education}}
+ <dl id="aprofile-education" class="aprofile">
+ <dt>{{$profile.education.0}}</dt>
+ <dd>{{$profile.education.1}}</dd>
+ </dl>
+ {{/if}}
+
+ {{foreach $profile.extra_fields as $f}}
+ {{if $profile.$f}}
+ <dl id="aprofile-{{$f}}" class="aprofile">
+ <dt>{{$profile.$f.0}}</dt>
+ <dd>{{$profile.$f.1}}</dd>
+ </dl>
+ {{/if}}
+ {{/foreach}}
+
+
+ {{if $things}}
+ {{foreach $things as $key => $items}}
+ <b>{{$profile.fullname.1}} {{$key}}</b>
+ <ul class="profile-thing-list">
+ {{foreach $items as $item}}
+ <li>{{if $item.img}}<img src="{{$item.img}}" width="100" height="100" alt="{{$item.term}}" />{{/if}}
+ <a href="{{$item.url}}" >{{$item.term}}</a>
+ {{if $profile.canlike}}<br />
+ <button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('thing/' + '{{$item.term_hash}}','like'); return false;" title="{{$likethis}}" >
+ <i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
+ </button>
+ {{/if}}
+ {{if $item.like_count}}
+ <div class="btn-group">
+ <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="thing-like-{{$item.term_hash}}">{{$item.like_count}} {{$item.like_label}}</button>
+ {{if $item.likes}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="thing-like-{{$item.term_hash}}">{{foreach $item.likes as $liker}}<li role="presentation"><a href="{{$liker.xchan_url}}">{{$liker.xchan_name}}</a></li>{{/foreach}}</ul>
+ {{/if}}
+ </div>
+ {{/if}}
+ </li>
+ {{/foreach}}
+ </ul>
+ <div class="clear"></div>
+ {{/foreach}}
+ {{/if}}
+ </div>
</div>