Conflicts:
	view/de/messages.po
	view/de/strings.php
This commit is contained in:
David 2014-05-16 19:33:16 +02:00
commit 2303f1e434
95 changed files with 13580 additions and 20078 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
favicon.*
.htconfig.php
.htpreconfig.php
\#*
include/jquery-1.4.2.min.js
*.log

BIN
images/buffer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -382,7 +382,7 @@ function acl_lookup(&$a, $out_type = 'json') {
$count = (x($_REQUEST,'count')?$_REQUEST['count']:100);
$search = (x($_REQUEST,'search')?$_REQUEST['search']:"");
$type = (x($_REQUEST,'type')?$_REQUEST['type']:"");
$conv_id = (x($_REQUEST,'conversation')?$_REQUEST['conversation']:null);
// For use with jquery.autocomplete for private mail completion
@ -450,6 +450,7 @@ function acl_lookup(&$a, $out_type = 'json') {
$contact_count = 0;
}
$tot = $group_count+$contact_count;
$groups = array();
@ -553,6 +554,52 @@ function acl_lookup(&$a, $out_type = 'json') {
$items = array_merge($groups, $contacts);
if ($conv_id) {
/* if $conv_id is set, get unknow contacts in thread */
/* but first get know contacts url to filter them out */
function _contact_link($i){ return dbesc($i['link']); }
$known_contacts = array_map(_contact_link, $contacts);
$unknow_contacts=array();
$r = q("select
`author-avatar`,`author-name`,`author-link`
from item where parent=%d
and (
`author-name` LIKE '%%%s%%' OR
`author-link` LIKE '%%%s%%'
) and
`author-link` NOT IN ('%s')
GROUP BY `author-link`
ORDER BY `author-name` ASC
",
intval($conv_id),
dbesc($search),
dbesc($search),
implode("','", $known_contacts)
);
if (is_array($r) && count($r)){
foreach($r as $row) {
// nickname..
$up = parse_url($row['author-link']);
$nick = explode("/",$up['path']);
$nick = $nick[count($nick)-1];
$nick .= "@".$up['host'];
// /nickname
$unknow_contacts[] = array(
"type" => "c",
"photo" => $row['author-avatar'],
"name" => $row['author-name'],
"id" => '',
"network" => "unknown",
"link" => $row['author-link'],
"nick" => $nick,
"forum" => false
);
}
}
$items = array_merge($items, $unknow_contacts);
$tot += count($unknow_contacts);
}
if($out_type === 'html') {
$o = array(

View File

@ -31,7 +31,10 @@ function bb_rearrange_link($shared) {
return($newshare);
}
function bb_remove_share_information($Text) {
function bb_remove_share_information($Text, $plaintext = false) {
if ($plaintext)
$Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism","[bookmark=$1]$1[/bookmark]", $Text);
$Text = preg_replace_callback("((.*?)\[class=(.*?)\](.*?)\[\/class\])ism","bb_cleanup_share",$Text);
return($Text);
}
@ -383,22 +386,19 @@ function bb_ShareAttributesDiaspora($match) {
if ($matches[1] != "")
$profile = $matches[1];
$posted = "";
// preg_match("/posted='(.*?)'/ism", $attributes, $matches);
// if ($matches[1] != "")
// $posted = " ".date("Y-m-d H:i", strtotime($matches[1]));
//
// preg_match('/posted="(.*?)"/ism', $attributes, $matches);
// if ($matches[1] != "")
// $posted = " ".date("Y-m-d H:i", strtotime($matches[1]));
$link = "";
preg_match("/link='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$link = $matches[1];
preg_match('/link="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")
$link = $matches[1];
$userid = GetProfileUsername($profile,$author);
$headline = '<div class="shared_header">';
$headline .= '<span><b>'.html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
//$headline .= sprintf(t('<span><b>'.
// html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8').
// '<a href="%s" target="_blank">%s</a>%s:</b></span>'), $profile, $userid, $posted);
$headline .= "</div>";
$text = trim($match[1]);
@ -407,7 +407,11 @@ function bb_ShareAttributesDiaspora($match) {
$text .= "<hr />";
$text .= $headline.'<blockquote class="shared_content">'.trim($match[3])."</blockquote><br />";
//$text .= $headline."<br />".trim($match[3])."<br />";
if ($link != "")
$text .= '<br /><a href="'.$link.'">[l]</a>';
// $text .= '<br /><a href="'.$link.'">'.t("Link").' [l]</a>';
return($text);
}
@ -450,10 +454,9 @@ function bb_ShareAttributesForExport($match) {
$userid = GetProfileUsername($profile,$author);
$headline = '<div class="shared_header">';
$headline .= sprintf(t('<span><b>'.
html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8').
'<a href="%s" target="_blank">%s</a>%s:</b></span>'), $link, $userid, $posted);
$headline .= "</div>";
$headline .= '<span><b>'.html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8');
$headline .= sprintf(t('<a href="%1$s" target="_blank">%2$s</a> %3$s'), $link, $userid, $posted);
$headline .= ":</b></span></div>";
$text = trim($match[1]);
@ -1070,3 +1073,4 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
return $Text;
}
?>

View File

@ -5,17 +5,17 @@
class Cache {
public static function get($key) {
if (function_exists("apc_fetch") AND function_exists("apc_exists"))
/*if (function_exists("apc_fetch") AND function_exists("apc_exists"))
if (apc_exists($key))
return(apc_fetch($key));
return(apc_fetch($key));*/
$r = q("SELECT `v` FROM `cache` WHERE `k`='%s' limit 1",
dbesc($key)
);
if (count($r)) {
if (function_exists("apc_store"))
apc_store($key, $r[0]['v'], 600);
/*if (function_exists("apc_store"))
apc_store($key, $r[0]['v'], 600);*/
return $r[0]['v'];
}
@ -29,8 +29,8 @@
dbesc($value),
dbesc(datetime_convert()));
if (function_exists("apc_store"))
apc_store($key, $value, 600);
/*if (function_exists("apc_store"))
apc_store($key, $value, 600);*/
}

View File

@ -19,8 +19,6 @@ if(! function_exists('load_config')) {
function load_config($family) {
global $a;
// To-Do: How to integrate APC here?
$r = q("SELECT * FROM `config` WHERE `cat` = '%s'", dbesc($family));
if(count($r)) {
foreach($r as $rr) {
@ -67,7 +65,7 @@ function get_config($family, $key, $instore = false) {
}
// If APC is enabled then fetch the data from there, else try XCache
if (function_exists("apc_fetch") AND function_exists("apc_exists"))
/*if (function_exists("apc_fetch") AND function_exists("apc_exists"))
if (apc_exists($family."|".$key)) {
$val = apc_fetch($family."|".$key);
$a->config[$family][$key] = $val;
@ -87,6 +85,7 @@ function get_config($family, $key, $instore = false) {
else
return $val;
}
*/
$ret = q("SELECT `v` FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
dbesc($family),
@ -98,10 +97,10 @@ function get_config($family, $key, $instore = false) {
$a->config[$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
xcache_set($family."|".$key, $val, 600);
xcache_set($family."|".$key, $val, 600);*/
return $val;
}
@ -109,10 +108,10 @@ function get_config($family, $key, $instore = false) {
$a->config[$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
xcache_set($family."|".$key, '!<unset>!', 600);
xcache_set($family."|".$key, '!<unset>!', 600);*/
}
return false;
}}
@ -157,10 +156,10 @@ function set_config($family,$key,$value) {
$a->config[$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))
xcache_set($family."|".$key, $value, 600);
xcache_set($family."|".$key, $value, 600);*/
if($ret)
return $value;
@ -210,7 +209,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
}
// If APC is enabled then fetch the data from there, else try XCache
if (function_exists("apc_fetch") AND function_exists("apc_exists"))
/*if (function_exists("apc_fetch") AND function_exists("apc_exists"))
if (apc_exists($uid."|".$family."|".$key)) {
$val = apc_fetch($uid."|".$family."|".$key);
$a->config[$uid][$family][$key] = $val;
@ -229,7 +228,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
return false;
else
return $val;
}
}*/
$ret = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1",
@ -243,10 +242,10 @@ function get_pconfig($uid,$family, $key, $instore = false) {
$a->config[$uid][$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($uid."|".$family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
xcache_set($uid."|".$family."|".$key, $val, 600);
xcache_set($uid."|".$family."|".$key, $val, 600);*/
return $val;
}
@ -254,10 +253,10 @@ function get_pconfig($uid,$family, $key, $instore = false) {
$a->config[$uid][$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($uid."|".$family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
xcache_set($uid."|".$family."|".$key, '!<unset>!', 600);
xcache_set($uid."|".$family."|".$key, '!<unset>!', 600);*/
}
return false;
}}
@ -273,10 +272,10 @@ function del_config($family,$key) {
dbesc($key)
);
// If APC is enabled then delete the data from there, else try XCache
if (function_exists("apc_delete"))
/*if (function_exists("apc_delete"))
apc_delete($family."|".$key);
elseif (function_exists("xcache_unset"))
xcache_unset($family."|".$key);
xcache_unset($family."|".$key);*/
return $ret;
}}
@ -316,10 +315,10 @@ function set_pconfig($uid,$family,$key,$value) {
$a->config[$uid][$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
if (function_exists("apc_store"))
/*if (function_exists("apc_store"))
apc_store($uid."|".$family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))
xcache_set($uid."|".$family."|".$key, $value, 600);
xcache_set($uid."|".$family."|".$key, $value, 600);*/
if($ret)

View File

@ -1043,13 +1043,18 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
}
}
if($mail_enabled) {
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . t("Post to Email") . '</div>';
}
if (!$a->user['hidewall']) {
if($mail_enabled) {
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . t("Post to Email") . '</div>';
}
call_hooks('jot_networks', $jotnets);
} else
$jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'),
t('Hide your profile details from unknown viewers?'));
call_hooks('jot_tool', $jotplugins);
call_hooks('jot_networks', $jotnets);
if($notes_cid)
$jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';

View File

@ -1,5 +1,11 @@
<?php
# if PDO is avaible for mysql, use the new database abstraction
if(class_exists('\PDO') && in_array('mysql', PDO::getAvailableDrivers())) {
require_once("library/dddbl2/dddbl.php");
require_once("include/dba_pdo.php");
}
require_once('include/datetime.php');
/**

340
include/dba_pdo.php Normal file
View File

@ -0,0 +1,340 @@
<?php
require_once('include/datetime.php');
$objDDDBLResultHandler = new \DDDBL\DataObjectPool('Result-Handler');
/**
* create handler, which returns just the PDOStatement object
* this allows usage of the cursor to scroll through
* big result-sets
*
**/
$cloPDOStatementResultHandler = function(\DDDBL\Queue $objQueue) {
$objPDO = $objQueue->getState()->get('PDOStatement');
$objQueue->getState()->update(array('result' => $objPDO));
# delete handler which closes the PDOStatement-cursor
# this will be done manual if using this handler
$objQueue->deleteHandler(QUEUE_CLOSE_CURSOR_POSITION);
};
$objDDDBLResultHandler->add('PDOStatement', array('HANDLER' => $cloPDOStatementResultHandler));
/**
*
* MySQL database class
*
* For debugging, insert 'dbg(1);' anywhere in the program flow.
* dbg(0); will turn it off. Logging is performed at LOGGER_DATA level.
* When logging, all binary info is converted to text and html entities are escaped so that
* the debugging stream is safe to view within both terminals and web pages.
*
*/
if(! class_exists('dba')) {
class dba {
private $debug = 0;
private $db;
private $result;
public $connected = false;
public $error = false;
function __construct($server,$user,$pass,$db,$install = false) {
global $a;
# work around, to store the database - configuration in DDDBL
$objDataObjectPool = new \DDDBL\DataObjectPool('Database-Definition');
$objDataObjectPool->add('DEFAULT', array('CONNECTION' => "mysql:host=$server;dbname=$db",
'USER' => $user,
'PASS' => $pass,
'DEFAULT' => true));
$stamp1 = microtime(true);
$server = trim($server);
$user = trim($user);
$pass = trim($pass);
$db = trim($db);
if (!(strlen($server) && strlen($user))){
$this->connected = false;
$this->db = null;
return;
}
if($install) {
if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) {
if(! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) {
$this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server);
$this->connected = false;
$this->db = null;
return;
}
}
}
# etablish connection to database and store PDO object
\DDDBL\connect();
$this->db = \DDDBL\getDB();
if(\DDDBL\isConnected()) {
$this->connected = true;
}
if(! $this->connected) {
$this->db = null;
if(! $install)
system_unavailable();
}
$a->save_timestamp($stamp1, "network");
}
public function getdb() {
return $this->db;
}
public function q($sql, $onlyquery = false) {
global $a;
$strHandler = (true === $onlyquery) ? 'PDOStatement' : 'MULTI';
$strQueryAlias = md5($sql);
$strSQLType = strtoupper(strstr($sql, ' ', true));
$objPreparedQueryPool = new \DDDBL\DataObjectPool('Query-Definition');
# check if query do not exists till now, if so create its definition
if(!$objPreparedQueryPool->exists($strQueryAlias))
$objPreparedQueryPool->add($strQueryAlias, array('QUERY' => $sql,
'HANDLER' => $strHandler));
if((! $this->db) || (! $this->connected))
return false;
$this->error = '';
$stamp1 = microtime(true);
try {
$r = \DDDBL\get($strQueryAlias);
# bad workaround to emulate the bizzare behavior of mysql_query
if(in_array($strSQLType, array('INSERT', 'UPDATE', 'DELETE', 'CREATE', 'DROP', 'SET')))
$result = true;
} catch (\Exception $objException) {
$result = false;
$intErrorCode = $objPreparedQueryPool->get($strQueryAlias)->get('PDOStatement')->errorCode();
}
$stamp2 = microtime(true);
$duration = (float)($stamp2-$stamp1);
$a->save_timestamp($stamp1, "database");
if(x($a->config,'system') && x($a->config['system'],'db_log')) {
if (($duration > $a->config["system"]["db_loglimit"])) {
$duration = round($duration, 3);
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
@file_put_contents($a->config["system"]["db_log"], datetime_convert()."\t".$duration."\t".
basename($backtrace[1]["file"])."\t".
$backtrace[1]["line"]."\t".$backtrace[2]["function"]."\t".
substr($sql, 0, 2000)."\n", FILE_APPEND);
}
}
if($intErrorCode)
$this->error = $intErrorCode;
if(strlen($this->error)) {
logger('dba: ' . $this->error);
}
if($this->debug) {
$mesg = '';
if($result === false)
$mesg = 'false';
elseif($result === true)
$mesg = 'true';
else {
# this needs fixing, but is a bug itself
#$mesg = mysql_num_rows($result) . ' results' . EOL;
}
$str = 'SQL = ' . printable($sql) . EOL . 'SQL returned ' . $mesg
. (($this->error) ? ' error: ' . $this->error : '')
. EOL;
logger('dba: ' . $str );
}
/**
* If dbfail.out exists, we will write any failed calls directly to it,
* regardless of any logging that may or may nor be in effect.
* These usually indicate SQL syntax errors that need to be resolved.
*/
if($result === false) {
logger('dba: ' . printable($sql) . ' returned false.' . "\n" . $this->error);
if(file_exists('dbfail.out'))
file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n" . $this->error . "\n", FILE_APPEND);
}
if(($result === true) || ($result === false))
return $result;
if ($onlyquery) {
$this->result = $r; # this will store an PDOStatement Object in result
$this->result->execute(); # execute the Statement, to get its result
return true;
}
//$a->save_timestamp($stamp1, "database");
if($this->debug)
logger('dba: ' . printable(print_r($r, true)));
return($r);
}
public function qfetch() {
if (false === $this->result)
return false;
return $this->result->fetch();
}
public function qclose() {
if ($this->result)
return $this->result->closeCursor();
}
public function dbg($dbg) {
$this->debug = $dbg;
}
public function escape($str) {
if($this->db && $this->connected) {
$strQuoted = $this->db->quote($str);
# this workaround is needed, because quote creates "'" and the beginning and the end
# of the string, which is correct. but until now the queries set this delimiter manually,
# so we must remove them from here and wait until everything uses prepared statements
return mb_substr($strQuoted, 1, mb_strlen($strQuoted) - 2);
}
}
function __destruct() {
if ($this->db)
\DDDBL\disconnect();
}
}}
if(! function_exists('printable')) {
function printable($s) {
$s = preg_replace("~([\x01-\x08\x0E-\x0F\x10-\x1F\x7F-\xFF])~",".", $s);
$s = str_replace("\x00",'.',$s);
if(x($_SERVER,'SERVER_NAME'))
$s = escape_tags($s);
return $s;
}}
// Procedural functions
if(! function_exists('dbg')) {
function dbg($state) {
global $db;
if($db)
$db->dbg($state);
}}
if(! function_exists('dbesc')) {
function dbesc($str) {
global $db;
if($db && $db->connected)
return($db->escape($str));
else
return(str_replace("'","\\'",$str));
}}
// Function: q($sql,$args);
// Description: execute SQL query with printf style args.
// Example: $r = q("SELECT * FROM `%s` WHERE `uid` = %d",
// 'user', 1);
if(! function_exists('q')) {
function q($sql) {
global $db;
$args = func_get_args();
unset($args[0]);
if($db && $db->connected) {
$stmt = @vsprintf($sql,$args); // Disabled warnings
//logger("dba: q: $stmt", LOGGER_ALL);
if($stmt === false)
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
return $db->q($stmt);
}
/**
*
* This will happen occasionally trying to store the
* session data after abnormal program termination
*
*/
logger('dba: no database: ' . print_r($args,true));
return false;
}}
/**
*
* Raw db query, no arguments
*
*/
if(! function_exists('dbq')) {
function dbq($sql) {
global $db;
if($db && $db->connected)
$ret = $db->q($sql);
else
$ret = false;
return $ret;
}}
// Caller is responsible for ensuring that any integer arguments to
// dbesc_array are actually integers and not malformed strings containing
// SQL injection vectors. All integer array elements should be specifically
// cast to int to avoid trouble.
if(! function_exists('dbesc_array_cb')) {
function dbesc_array_cb(&$item, $key) {
if(is_string($item))
$item = dbesc($item);
}}
if(! function_exists('dbesc_array')) {
function dbesc_array(&$arr) {
if(is_array($arr) && count($arr)) {
array_walk($arr,'dbesc_array_cb');
}
}}
if(! function_exists('dba_timer')) {
function dba_timer() {
return microtime(true);
}}

1227
include/dbstructure.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -329,7 +329,7 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false)
$b_outer_aes_key = base64_encode($outer_aes_key);
$outer_iv = random_string(16);
$b_outer_iv = base64_encode($outer_iv);
$handle = $user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$padded_data = pkcs5_pad($msg,16);
@ -425,7 +425,7 @@ function diaspora_decode($importer,$xml) {
else {
$encrypted_header = json_decode(base64_decode($children->encrypted_header));
$encrypted_aes_key_bundle = base64_decode($encrypted_header->aes_key);
$ciphertext = base64_decode($encrypted_header->ciphertext);

View File

@ -239,4 +239,4 @@ function html2plain($html, $wraplength = 75, $compact = false)
return(trim($message));
}
?>

View File

@ -176,7 +176,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
'$thumb' => xmlify($owner['thumb']),
'$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) ,
'$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) ,
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) ,
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) ,
'$birthday' => ((strlen($birthday)) ? '<dfrn:birthday>' . xmlify($birthday) . '</dfrn:birthday>' : ''),
'$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '<dfrn:community>1</dfrn:community>' : '')
));
@ -261,7 +261,7 @@ function construct_activity_object($item) {
}
return '';
}
}
function construct_activity_target($item) {
@ -425,7 +425,7 @@ function get_atom_elements($feed, $item, $contact = array()) {
$res = array();
$author = $item->get_author();
if($author) {
if($author) {
$res['author-name'] = unxmlify($author->get_name());
$res['author-link'] = unxmlify($author->get_link());
}
@ -554,14 +554,14 @@ function get_atom_elements($feed, $item, $contact = array()) {
$res['body'] = limit_body_size($res['body']);
// It isn't certain at this point whether our content is plaintext or html and we'd be foolish to trust
// the content type. Our own network only emits text normally, though it might have been converted to
// It isn't certain at this point whether our content is plaintext or html and we'd be foolish to trust
// the content type. Our own network only emits text normally, though it might have been converted to
// html if we used a pubsubhubbub transport. But if we see even one html tag in our text, we will
// have to assume it is all html and needs to be purified.
// It doesn't matter all that much security wise - because before this content is used anywhere, we are
// going to escape any tags we find regardless, but this lets us import a limited subset of html from
// the wild, by sanitising it and converting supported tags to bbcode before we rip out any remaining
// It doesn't matter all that much security wise - because before this content is used anywhere, we are
// going to escape any tags we find regardless, but this lets us import a limited subset of html from
// the wild, by sanitising it and converting supported tags to bbcode before we rip out any remaining
// html.
if((strpos($res['body'],'<') !== false) && (strpos($res['body'],'>') !== false)) {
@ -720,7 +720,7 @@ function get_atom_elements($feed, $item, $contact = array()) {
if(! $type)
$type = 'application/octet-stream';
$att_arr[] = '[attach]href="' . $link . '" length="' . $len . '" type="' . $type . '" title="' . $title . '"[/attach]';
$att_arr[] = '[attach]href="' . $link . '" length="' . $len . '" type="' . $type . '" title="' . $title . '"[/attach]';
}
$res['attach'] = implode(',', $att_arr);
}
@ -989,6 +989,23 @@ function item_store($arr,$force_parent = false) {
if(! x($arr,'type'))
$arr['type'] = 'remote';
/* check for create date and expire time */
$uid = intval($arr['uid']);
$r = q("SELECT expire FROM user WHERE uid = %d", $uid);
if(count($r)) {
$expire_interval = $r[0]['expire'];
if ($expire_interval>0) {
$expire_date = new DateTime( '- '.$expire_interval.' days', new DateTimeZone('UTC'));
$created_date = new DateTime($arr['created'], new DateTimeZone('UTC'));
if ($created_date < $expire_date) {
logger('item-store: item created ('.$arr['created'].') before expiration time ('.$expire_date->format(DateTime::W3C).'). ignored. ' . print_r($arr,true), LOGGER_DEBUG);
return 0;
}
}
}
// Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
@ -1647,7 +1664,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$final_dfrn_id = '';
if($perm) {
if((($perm == 'rw') && (! intval($contact['writable'])))
if((($perm == 'rw') && (! intval($contact['writable'])))
|| (($perm == 'r') && (intval($contact['writable'])))) {
q("update contact set writable = %d where id = %d",
intval(($perm == 'rw') ? 1 : 0),
@ -1657,7 +1674,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
}
}
if(($contact['duplex'] && strlen($contact['pubkey']))
if(($contact['duplex'] && strlen($contact['pubkey']))
|| ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
|| ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) {
openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']);
@ -1675,7 +1692,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if($final_dfrn_id != $orig_id) {
logger('dfrn_deliver: wrong dfrn_id.');
// did not decode properly - cannot trust this site
// did not decode properly - cannot trust this site
return 3;
}
@ -1698,16 +1715,16 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if($page)
$postvars['page'] = $page;
if($rino && $rino_allowed && (! $dissolve)) {
$key = substr(random_string(),0,16);
$data = bin2hex(aes_encrypt($postvars['data'],$key));
$postvars['data'] = $data;
logger('rino: sent key = ' . $key, LOGGER_DEBUG);
logger('rino: sent key = ' . $key, LOGGER_DEBUG);
if($dfrn_version >= 2.1) {
if(($contact['duplex'] && strlen($contact['pubkey']))
if($dfrn_version >= 2.1) {
if(($contact['duplex'] && strlen($contact['pubkey']))
|| ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
|| ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) {
@ -1758,7 +1775,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$res = parse_xml_string($xml);
return $res->status;
return $res->status;
}
@ -1791,12 +1808,12 @@ function edited_timestamp_is_newer($existing, $update) {
* $importer = the contact_record (joined to user_record) of the local user who owns this relationship.
* It is this person's stuff that is going to be updated.
* $contact = the person who is sending us stuff. If not set, we MAY be processing a "follow" activity
* from an external network and MAY create an appropriate contact record. Otherwise, we MUST
* from an external network and MAY create an appropriate contact record. Otherwise, we MUST
* have a contact record.
* $hub = should we find a hub declation in the feed, pass it back to our calling process, who might (or
* $hub = should we find a hub declation in the feed, pass it back to our calling process, who might (or
* might not) try and subscribe to it.
* $datedir sorts in reverse order
* $pass - by default ($pass = 0) we cannot guarantee that a parent item has been
* $pass - by default ($pass = 0) we cannot guarantee that a parent item has been
* imported prior to its children being seen in the stream unless we are certain
* of how the feed is arranged/ordered.
* With $pass = 1, we only pull parent items out of the stream.
@ -1957,7 +1974,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
*
* $bdtext is just a readable placeholder in case the event is shared
* with others. We will replace it during presentation to our $importer
* to contain a sparkle link and perhaps a photo.
* to contain a sparkle link and perhaps a photo.
*
*/
@ -1988,7 +2005,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
);
// This function is called twice without reloading the contact
// Make sure we only create one event. This is why &$contact
// Make sure we only create one event. This is why &$contact
// is a reference var in this function
$contact['bdyear'] = substr($birthday,0,4);
@ -2027,7 +2044,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$when = datetime_convert('UTC','UTC','now','Y-m-d H:i:s');
}
if($deleted && is_array($contact)) {
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id`
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id`
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
dbesc($uri),
intval($importer['uid']),
@ -2441,19 +2458,19 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$datarray['contact-id'] = $contact['id'];
if(! link_compare($datarray['owner-link'],$contact['url'])) {
// The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
// The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
// but otherwise there's a possible data mixup on the sender's system.
// the tgroup delivery code called from item_store will correct it if it's a forum,
// but we're going to unconditionally correct it here so that the post will always be owned by our contact.
// but we're going to unconditionally correct it here so that the post will always be owned by our contact.
logger('consume_feed: Correcting item owner.', LOGGER_DEBUG);
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = $contact['thumb'];
}
// We've allowed "followers" to reach this point so we can decide if they are
// We've allowed "followers" to reach this point so we can decide if they are
// posting an @-tag delivery, which followers are allowed to do for certain
// page types. Now that we've parsed the post, let's check if it is legit. Otherwise ignore it.
// page types. Now that we've parsed the post, let's check if it is legit. Otherwise ignore it.
if(($contact['rel'] == CONTACT_IS_FOLLOWER) && (! tgroup_check($importer['uid'],$datarray)))
continue;
@ -2811,7 +2828,7 @@ function local_delivery($importer,$data) {
dbesc_array($msg);
$r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg))
$r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg))
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
// send notifications.
@ -2895,18 +2912,18 @@ function local_delivery($importer,$data) {
}
else
$sql_extra = " and contact.self = 1 and item.wall = 1 ";
// was the top-level post for this reply written by somebody on this site?
// Specifically, the recipient?
// was the top-level post for this reply written by somebody on this site?
// Specifically, the recipient?
$is_a_remote_delete = false;
// POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used?
$r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
`contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
$r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
`contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
AND `item`.`uid` = %d
AND `item`.`uid` = %d
$sql_extra
LIMIT 1",
dbesc($parent_uri),
@ -2918,8 +2935,8 @@ function local_delivery($importer,$data) {
$is_a_remote_delete = true;
// Does this have the characteristics of a community or private group comment?
// If it's a reply to a wall post on a community/prvgroup page it's a
// valid community comment. Also forum_mode makes it valid for sure.
// If it's a reply to a wall post on a community/prvgroup page it's a
// valid community comment. Also forum_mode makes it valid for sure.
// If neither, it's not.
if($is_a_remote_delete && $community) {
@ -3094,8 +3111,8 @@ function local_delivery($importer,$data) {
}
// Does this have the characteristics of a community or private group comment?
// If it's a reply to a wall post on a community/prvgroup page it's a
// valid community comment. Also forum_mode makes it valid for sure.
// If it's a reply to a wall post on a community/prvgroup page it's a
// valid community comment. Also forum_mode makes it valid for sure.
// If neither, it's not.
if($is_a_remote_comment && $community) {
@ -3275,7 +3292,7 @@ function local_delivery($importer,$data) {
'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id,
'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']),
'verb' => ACTIVITY_POST,
'otype' => 'item',
@ -3439,7 +3456,7 @@ function local_delivery($importer,$data) {
'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id,
'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']),
'verb' => ACTIVITY_POST,
'otype' => 'item',
@ -3539,10 +3556,10 @@ function local_delivery($importer,$data) {
if(! link_compare($datarray['owner-link'],$importer['url'])) {
// The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
// The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
// but otherwise there's a possible data mixup on the sender's system.
// the tgroup delivery code called from item_store will correct it if it's a forum,
// but we're going to unconditionally correct it here so that the post will always be owned by our contact.
// but we're going to unconditionally correct it here so that the post will always be owned by our contact.
logger('local_delivery: Correcting item owner.', LOGGER_DEBUG);
$datarray['owner-name'] = $importer['senderName'];
$datarray['owner-link'] = $importer['url'];
@ -3569,7 +3586,7 @@ function local_delivery($importer,$data) {
foreach($links->link as $l) {
$atts = $l->attributes();
switch($atts['rel']) {
case "alternate":
case "alternate":
$Blink = $atts['href'];
break;
default:
@ -3592,7 +3609,7 @@ function local_delivery($importer,$data) {
'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id,
'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']),
'verb' => $datarray['verb'],
'otype' => 'person',
@ -3601,7 +3618,7 @@ function local_delivery($importer,$data) {
));
}
}
}
}
continue;
}
@ -3637,7 +3654,7 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
// create contact record
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
`blocked`, `readonly`, `pending`, `writable` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1 ) ",
intval($importer['uid']),
@ -3689,7 +3706,7 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
'$siteurl' => $a->get_baseurl(),
'$sitename' => $a->config['sitename']
));
$res = mail($r[0]['email'],
$res = mail($r[0]['email'],
email_header_encode((($sharing) ? t('A new person is sharing with you at ') : t("You have a new follower at ")) . $a->config['sitename'],'UTF-8'),
$email,
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
@ -3738,7 +3755,7 @@ function subscribe_to_hub($url,$importer,$contact,$hubmode = 'subscribe') {
);
}
// Diaspora has different message-ids in feeds than they do
// Diaspora has different message-ids in feeds than they do
// through the direct Diaspora protocol. If we try and use
// the feed, we'll get duplicates. So don't.
@ -3934,7 +3951,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
// Check to see if we should replace this photo link with an embedded image
// 1. No need to do so if the photo is public
// 2. If there's a contact-id provided, see if they're in the access list
// for the photo. If so, embed it.
// for the photo. If so, embed it.
// 3. Otherwise, if we have an item, see if the item permissions match the photo
// permissions, regardless of order but first check to see if they're an exact
// match to save some processing overhead.
@ -3943,7 +3960,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
if($cid) {
$recips = enumerate_permissions($r[0]);
if(in_array($cid, $recips)) {
$replace = true;
$replace = true;
}
}
elseif($item) {
@ -3976,7 +3993,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
}
}
}
}
}
$new_body = $new_body . substr($orig_body, 0, $img_start + $img_st_close) . $image . '[/img]';
$orig_body = substr($orig_body, $img_start + $img_st_close + $img_len + strlen('[/img]'));
@ -4001,7 +4018,7 @@ function has_permissions($obj) {
}
function compare_permissions($obj1,$obj2) {
// first part is easy. Check that these are exactly the same.
// first part is easy. Check that these are exactly the same.
if(($obj1['allow_cid'] == $obj2['allow_cid'])
&& ($obj1['allow_gid'] == $obj2['allow_gid'])
&& ($obj1['deny_cid'] == $obj2['deny_cid'])
@ -4043,14 +4060,14 @@ function item_getfeedtags($item) {
$ret[] = array('#',$matches[1][$x], $matches[2][$x]);
}
}
$matches = false;
$matches = false;
$cnt = preg_match_all('|\@\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
if($cnt) {
for($x = 0; $x < $cnt; $x ++) {
if($matches[1][$x])
$ret[] = array('@',$matches[1][$x], $matches[2][$x]);
}
}
}
return $ret;
}
@ -4087,10 +4104,10 @@ function item_expire($uid,$days) {
$expire_network_only = get_pconfig($uid,'expire','network_only');
$sql_extra = ((intval($expire_network_only)) ? " AND wall = 0 " : "");
$r = q("SELECT * FROM `item`
WHERE `uid` = %d
AND `created` < UTC_TIMESTAMP() - INTERVAL %d DAY
AND `id` = `parent`
$r = q("SELECT * FROM `item`
WHERE `uid` = %d
AND `created` < UTC_TIMESTAMP() - INTERVAL %d DAY
AND `id` = `parent`
$sql_extra
AND `deleted` = 0",
intval($uid),
@ -4136,7 +4153,7 @@ function item_expire($uid,$days) {
}
proc_run('php',"include/notifier.php","expire","$uid");
}
@ -4257,10 +4274,10 @@ function drop_item($id,$interactive = true) {
}
}
// If item is a link to a photo resource, nuke all the associated photos
// If item is a link to a photo resource, nuke all the associated photos
// (visitors will not have photo resources)
// This only applies to photos uploaded from the photos page. Photos inserted into a post do not
// generate a resource-id and therefore aren't intimately linked to the item.
// generate a resource-id and therefore aren't intimately linked to the item.
if(strlen($item['resource-id'])) {
q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ",
@ -4400,7 +4417,7 @@ function posted_dates($uid,$wall) {
if(! $dthen)
return array();
// If it's near the end of a long month, backup to the 28th so that in
// If it's near the end of a long month, backup to the 28th so that in
// consecutive loops we'll always get a whole month difference.
if(intval(substr($dnow,8)) > 28)

View File

@ -1173,3 +1173,27 @@ function original_url($url, $depth=1, $fetchbody = false) {
return($url);
}
if (!function_exists('short_link')) {
function short_link($url) {
require_once('library/slinky.php');
$slinky = new Slinky($url);
$yourls_url = get_config('yourls','url1');
if ($yourls_url) {
$yourls_username = get_config('yourls','username1');
$yourls_password = get_config('yourls', 'password1');
$yourls_ssl = get_config('yourls', 'ssl1');
$yourls = new Slinky_YourLS();
$yourls->set('username', $yourls_username);
$yourls->set('password', $yourls_password);
$yourls->set('ssl', $yourls_ssl);
$yourls->set('yourls-url', $yourls_url);
$slinky->set_cascade( array($yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL()));
} else {
// setup a cascade of shortening services
// try to get a short link from these services
// in the order ur1.ca, trim, id.gd, tinyurl
$slinky->set_cascade(array(new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL()));
}
return $slinky->short();
}};

179
include/plaintext.php Normal file
View File

@ -0,0 +1,179 @@
<?php
function get_attached_data($body) {
/*
- text:
- type: link, video, photo
- title:
- url:
- image:
- description:
- (thumbnail)
*/
$post = array();
if (preg_match_all("(\[class=(.*?)\](.*?)\[\/class\])ism",$body, $attached, PREG_SET_ORDER)) {
foreach ($attached AS $data) {
if (!in_array($data[1], array("type-link", "type-video", "type-photo")))
continue;
$post["type"] = substr($data[1], 5);
$post["text"] = trim(str_replace($data[0], "", $body));
$attacheddata = $data[2];
$URLSearchString = "^\[\]";
if (preg_match("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $attacheddata, $matches))
$post["image"] = $matches[1];
if (preg_match("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", $attacheddata, $matches)) {
$post["url"] = $matches[1];
$post["title"] = $matches[2];
}
// Search for description
if (preg_match("/\[quote\](.*?)\[\/quote\]/ism", $attacheddata, $matches))
$post["description"] = $matches[1];
}
}
return($post);
}
function plaintext($a, $b, $limit = 0, $includedlinks = false) {
require_once("include/bbcode.php");
require_once("include/html2plain.php");
require_once("mod/parse_url.php");
require_once("include/network.php");
// Simplify image codes
$body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $b["body"]);
// At first look at data that is attached via "type-..." stuff
// This will hopefully replaced with a dedicated bbcode later
$post = get_attached_data($body);
// if nothing is found, it maybe having an image.
if (!isset($post["type"])) {
$URLSearchString = "^\[\]";
if (preg_match_all("(\[url=([$URLSearchString]*)\]\s*\[img\]([$URLSearchString]*)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
if (count($pictures) == 1) {
// Checking, if the link goes to a picture
$data = parseurl_getsiteinfo($pictures[0][1], true);
if ($data["type"] == "photo") {
$post["type"] = "photo";
if (isset($data["images"][0]))
$post["image"] = $data["images"][0]["src"];
else
$post["image"] = $data["url"];
$post["preview"] = $pictures[0][2];
$post["text"] = str_replace($pictures[0][0], "", $body);
} else {
$img_str = fetch_url($pictures[0][1]);
$tempfile = tempnam(get_config("system","temppath"), "cache");
file_put_contents($tempfile, $img_str);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);
if (substr($mime, 0, 6) == "image/") {
$post["type"] = "photo";
$post["image"] = $pictures[0][1];
$post["preview"] = $pictures[0][2];
$post["text"] = str_replace($pictures[0][0], "", $body);
}
}
} elseif (count($pictures) > 1) {
$post["type"] = "link";
$post["url"] = $b["plink"];
$post["image"] = $pictures[0][2];
$post["text"] = $body;
}
} elseif (preg_match_all("(\[img\]([$URLSearchString]*)\[\/img\])ism", $body, $pictures, PREG_SET_ORDER)) {
if (count($pictures) == 1) {
$post["type"] = "photo";
$post["image"] = $pictures[0][1];
$post["text"] = str_replace($pictures[0][0], "", $body);
} elseif (count($pictures) > 1) {
$post["type"] = "link";
$post["url"] = $b["plink"];
$post["image"] = $pictures[0][1];
$post["text"] = $body;
}
}
if (!isset($post["type"])) {
$post["type"] = "text";
$post["text"] = trim($body);
}
}
if (($b["title"] != "") AND ($post["text"] != ""))
$post["text"] = trim($b["title"]."\n\n".$post["text"]);
elseif ($b["title"] != "")
$post["text"] = trim($b["title"]);
$html = bbcode($post["text"], false, false, 2);
$msg = html2plain($html, 0, true);
$msg = trim(html_entity_decode($msg,ENT_QUOTES,'UTF-8'));
$link = "";
if ($includedlinks) {
if ($post["type"] == "link")
$link = $post["url"];
elseif ($post["type"] == "video")
$link = $post["url"];
elseif ($post["type"] == "photo")
$link = $post["image"];
if (($msg == "") AND isset($post["title"]))
$msg = trim($post["title"]);
if (($msg == "") AND isset($post["description"]))
$msg = trim($post["description"]);
// If the link is already contained in the post, then it neeedn't to be added again
// But: if the link is beyond the limit, then it has to be added.
if (($link != "") AND strstr($msg, $link)) {
$pos = strpos($msg, $link);
if (($limit == 0) OR ($pos < $limit))
$link = "";
}
}
if ($limit > 0) {
// Reduce multiple spaces
// When posted to a network with limited space, we try to gain space where possible
while (strpos($msg, " ") !== false)
$msg = str_replace(" ", " ", $msg);
// Twitter is using its own limiter, so we always assume that shortened links will have this length
if (strlen($link) > 0)
$limit = $limit - 23;
if (strlen($msg) > $limit) {
if (!isset($post["url"])) {
$limit = $limit - 23;
$post["url"] = $b["plink"];
}
$lines = explode("\n", $msg);
$msg = "";
$recycle = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8');
foreach ($lines AS $row=>$line) {
if (strlen(trim($msg."\n".$line)) <= $limit)
$msg = trim($msg."\n".$line);
// Is the new message empty by now or is it a reshared message?
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
$msg = substr(substr(trim($msg."\n".$line), 0, $limit), 0, -3)."...";
}
}
}
$post["text"] = trim($msg);
return($post);
}
?>

View File

@ -197,14 +197,14 @@ function plugin_is_app($name) {
return true;
}
}
return false;
}}
/*
* parse plugin comment in search of plugin infos.
* like
*
*
* * Name: Plugin
* * Description: A plugin which plugs in
* * Version: 1.2.3
@ -222,7 +222,8 @@ function get_plugin_info($plugin){
'name' => $plugin,
'description' => "",
'author' => array(),
'version' => ""
'version' => "",
'status' => ""
);
if (!is_file("addon/$plugin/$plugin.php")) return $info;

View File

@ -19,6 +19,8 @@ function ref_session_read ($id) {
if(count($r)) {
$session_exists = true;
return $r[0]['data'];
} else {
logger("no data for session $id", LOGGER_TRACE);
}
return '';
}}

View File

@ -1,4 +1,9 @@
<?php
/*
* This is the old template engine, now deprecated.
* Friendica's default template engine is Smarty3 (see include/friendica_smarty.php)
*
*/
require_once 'object/TemplateEngine.php';
define("KEY_NOT_EXISTS", '^R_key_not_Exists^');

View File

@ -1,13 +1,5 @@
<?php
// This is our template processor.
// $s is the string requiring macro substitution.
// $r is an array of key value pairs (search => replace)
// returns substituted string.
// WARNING: this is pretty basic, and doesn't properly handle search strings that are substrings of each other.
// For instance if 'test' => "foo" and 'testing' => "bar", testing could become either bar or fooing,
// depending on the order in which they were declared in the array.
require_once("include/template_processor.php");
require_once("include/friendica_smarty.php");
@ -661,6 +653,9 @@ function attribute_contains($attr,$s) {
}}
if(! function_exists('logger')) {
/* setup int->string log level map */
$LOGGER_LEVELS = array();
/**
* log levels:
* LOGGER_NORMAL (default)
@ -678,9 +673,16 @@ function logger($msg,$level = 0) {
// turn off logger in install mode
global $a;
global $db;
global $LOGGER_LEVELS;
if(($a->module == 'install') || (! ($db && $db->connected))) return;
if (count($LOGGER_LEVEL)==0){
foreach (get_defined_constants() as $k=>$v){
if (substr($k,0,7)=="LOGGER_") $LOGGER_LEVELS[$v] = substr($k,7,7);
}
}
$debugging = get_config('system','debugging');
$loglevel = intval(get_config('system','loglevel'));
$logfile = get_config('system','logfile');
@ -688,8 +690,19 @@ function logger($msg,$level = 0) {
if((! $debugging) || (! $logfile) || ($level > $loglevel))
return;
$callers = debug_backtrace();
$logline = sprintf("%s@%s\t[%s]:%s:%s:%s\t%s\n",
datetime_convert(),
session_id(),
$LOGGER_LEVELS[$level],
basename($callers[0]['file']),
$callers[0]['line'],
$callers[1]['function'],
$msg
);
$stamp1 = microtime(true);
@file_put_contents($logfile, datetime_convert() . ':' . session_id() . ' ' . $msg . "\n", FILE_APPEND);
@file_put_contents($logfile, $logline, FILE_APPEND);
$a->save_timestamp($stamp1, "file");
return;
}}

View File

@ -14,6 +14,11 @@ function ACPopup(elm,backend_url){
this.kp_timer = false;
this.url = backend_url;
this.conversation_id = null;
var conv_id = this.element.id.match(/\d+$/);
if (conv_id) this.conversation_id = conv_id[0];
console.log("ACPopup elm id",this.element.id,"conversation",this.conversation_id);
var w = 530;
var h = 130;
@ -67,6 +72,7 @@ ACPopup.prototype._search = function(){
count:100,
search:this.searchText,
type:'c',
conversation: this.conversation_id,
}
$.ajax({
@ -79,8 +85,10 @@ ACPopup.prototype._search = function(){
if (data.tot>0){
that.cont.show();
$(data.items).each(function(){
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
that.add(html, this.nick.replace(' ','') + '+' + this.id + ' - ' + this.link);
var html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick);
var nick = this.nick.replace(' ','');
if (this.id!=='') nick += '+' + this.id;
that.add(html, nick + ' - ' + this.link);
});
} else {
that.cont.hide();

View File

@ -0,0 +1,83 @@
<?php
namespace DDDBL;
require_once __DIR__ . '/inc/DataObjectPool.class.php';
require_once __DIR__ . '/inc/DataObject.class.php';
require_once __DIR__ . '/inc/Singleton.class.php';
require_once __DIR__ . '/inc/Queue.class.php';
require_once __DIR__ . '/inc/exceptions/UnexpectedParameterTypeException.class.php';
require_once __DIR__ . '/inc/exceptions/QueryException.class.php';
require_once __DIR__ . '/inc/database.func.php';
# position of handler, which gets the active database-connection into the queue
define('QUEUE_GET_DB_CONNECTION_POSITION', 10);
define('QUEUE_GET_QUERY_POSITION', 20);
define('QUEUE_BIND_DATA_TYPE_POSITION', 30);
define('QUEUE_PREPARE_QUERY_POSITION', 40);
define('QUEUE_EXECUTE_QUERY_POSITION', 50);
define('QUEUE_FORMAT_RESULT_POSITION', 60);
define('QUEUE_CLOSE_CURSOR_POSITION', 70);
###############################################
### set validator for "Database-Definition" ###
###############################################
$objDBDefinitionValidator = function ($arrValues) {
foreach(array('CONNECTION', 'USER', 'PASS') AS $strDefinitionField)
if(!isset($arrValues[$strDefinitionField]) || !is_string($arrValues[$strDefinitionField]))
return false;
if(isset($arrValues['PDO']) && !is_a($arrValues['PDO'], '\PDO'))
return false;
return true;
};
$objDataObjectPool = new DataObjectPool('Database-Definition');
$objDataObjectPool->setValidator($objDBDefinitionValidator);
############################################
### set validator for "Query-Definition" ###
############################################
$objQueryDefinitionValidator = function ($arrValues) {
if(!isset($arrValues['QUERY']) || !is_string($arrValues['QUERY']))
return false;
if(isset($arrValues['HANDLER']) && !is_string($arrValues['HANDLER']))
return false;
return true;
};
$objDataObjectPool = new DataObjectPool('Query-Definition');
$objDataObjectPool->setValidator($objQueryDefinitionValidator);
##########################################
### set validator for "Result-Handler" ###
##########################################
$objResultHandlerValidator = function ($arrValues) {
if(!isset($arrValues['HANDLER']) || !is_callable($arrValues['HANDLER']))
return false;
return true;
};
$objDataObjectPool = new DataObjectPool('Result-Handler');
$objDataObjectPool->setValidator($objResultHandlerValidator);
#########################################
### register queue and result handler ###
#########################################
require_once __DIR__ . '/handler/register_queue_handler.inc.php';
require_once __DIR__ . '/handler/register_result_handler.inc.php';

184
library/dddbl2/dddbl.php Normal file
View File

@ -0,0 +1,184 @@
<?php
namespace DDDBL;
require_once __DIR__ . '/config.inc.php';
/**
* @throws \Exception - if no parameter are given
* @throws UnexpectedParameterTypeException - if first parameter is not a string
*
* @returns (mixed) - the result of the query-definition execution
*
* expect a list of parameter with at least one value. the
* list is handled over to the queue, which will executed
* with them
*
* in the end a result of the execution of the query-definition
* through the stored handler is returned
*
**/
function get() {
$arrParameter = func_get_args();
if(empty($arrParameter))
throw new \Exception ("no parameter given for execution");
if(!is_string($arrParameter[0]))
throw new UnexpectedParameterTypeException('string', $arrParameter[0]);
# get instance of queue and work with a copy of it
$objQueue = Singleton::getInstance('\DDDBL\Queue');
$objQueue = $objQueue->getClone();
return $objQueue->execute($arrParameter);
}
/**
* @param $strFile - the file with the query definitions to store
*
* store all query-definitions from the given file
*
**/
function storeQueryFileContent($strFile) {
storeDefinitionsFromFileInGroup($strFile, 'Query-Definition');
}
/**
* @param $strDir - the dir with query-definitions files
* @param $strMatch - a rule files in the dir have to match
*
* iterate through all files in the given dir. if a file matches
* the rule in $strMatch, the definitions in the file will be stored
* as query-definitions. all files are match in default.
*
**/
function loadQueryDefinitionsInDir($strDir, $strMatch = '*') {
walkDirForCallback($strDir, '\DDDBL\storeQueryFileContent', $strMatch);
}
/**
* @param $strFile - the file with the database definitions to store
*
* store all database definition from the given file
*
**/
function storeDBFileContent($strFile) {
$cloAdditionalHandler = function ($objDataObjectPool, $arrDefinition) {
if(!empty($arrDefinition['DEFAULT']) && true == (boolean) $arrDefinition['DEFAULT'])
$objDataObjectPool->add('DEFAULT', $arrDefinition);
};
storeDefinitionsFromFileInGroup($strFile, 'Database-Definition', $cloAdditionalHandler);
}
/**
* @param $strDir - the dir with query-definitions files
* @param $strMatch - a rule files in the dir have to match
*
* iterate through all files in the given dir. if a file matches
* the rule in $strMatch, the definitions in the file will be stored
* as database-definitions. all files are matched in default.
*
**/
function loadDBDefinitionsInDir($strDir, $strMatch = '*') {
walkDirForCallback($strDir, '\DDDBL\loadDBDefinitionsInDir', $strMatch);
}
/**
* @param $strPath - the path to the dir to handle
* @param $strCallback - the callback to call when a matching file is found
* @param $strFilenameMatch - the rule to filename has to match
*
* @throws UnexpectedParameterTypeException - if the given path or filematch-rule is not a string
* @throws UnexpectedParameterTypeException - if the given callback is not a callable
* @throws \Exception - if given path is not a directory
* @throws \Exception - if the directory is not readable
*
* reads all files of the given directory (just directory, not recursive)
* and checks, if the filename matches against the given rule. if
* a match is found the given callback is called with the full
* path to the file
*
**/
function walkDirForCallback($strPath, $strCallback, $strFilenameMatch) {
if(!is_string($strPath))
throw new UnexpectedParameterTypeException('string', $strPath);
if(!is_callable($strCallback))
throw new UnexpectedParameterTypeException('callable', $strCallback);
if(!is_string($strFilenameMatch))
throw new UnexpectedParameterTypeException('string', $strFilenameMatch);
if(!is_dir($strPath))
throw new \Exception ('given path is not an directory: ' . $strPath);
$resDirHandle = opendir($strPath);
if(!is_resource($resDirHandle))
throw new \Exception ('could not read directory: ' . $strPath);
while($strFile = readdir($resDirHandle))
if(is_file($strPath.$strFile) && fnmatch($strFilenameMatch, $strFile))
call_user_func_array($strCallback, array($strPath.$strFile));
closedir($resDirHandle);
}
/**
* @param $strFile - the file with definitions
* @param $strGroup - the group the definitions should be stored in
*
* @throws UnexpectedParameterTypeException - if the given file is not a string
* @throws UnexpectedParameterTypeException - if the given optional handler is not a callable
* @throws \Exception - if the given file is not a file or do not exists
* @throws \Exception - if the given file is not readable
*
* generic function to store all definitions in a given file
* in the specified group.
*
* if an additional handler is given, it is called AFTER the storage of the
* definition. when called it will get the reference to the DataObjectPool and the
* found definition as parameter.
*
**/
function storeDefinitionsFromFileInGroup($strFile, $strGroup, $cloAdditionalHandler = null) {
if(!is_string($strGroup))
throw new UnexpectedParameterTypeException('string', $strGroup);
if(!is_null($cloAdditionalHandler) && !is_callable($cloAdditionalHandler))
throw new UnexpectedParameterTypeException('callable', $cloAdditionalHandler);
if(!is_file($strFile) || !file_exists($strFile))
throw new \Exception ("given file is not a file or doesn't exists: $strFile");
if(!is_readable($strFile))
throw new \Exception ("given file is not readable: $strFile");
$arrDefinitions = parse_ini_file($strFile, true);
$objDataObjectPool = new DataObjectPool($strGroup);
foreach($arrDefinitions AS $strDefinitionAlias => $arrDefinition) {
$objDataObjectPool->add($strDefinitionAlias, $arrDefinition);
if(!is_null($cloAdditionalHandler))
$cloAdditionalHandler($objDataObjectPool, $arrDefinition);
}
}

View File

@ -0,0 +1,208 @@
<?php
namespace DDDBL;
$objQueue = Singleton::getInstance('\DDDBL\Queue');
#############################
### db-connection handler ###
#############################
# get (or first establish) connection to database
# and store the DataObject of the connection in the Queue-State
$cloStoreDBConnection = function(\DDDBL\Queue $objQueue, array $arrParameter) {
if(!isConnected())
connect();
$objQueue->getState()->update(array('DB' => getDBDataObject()));
};
$objQueue->addHandler(QUEUE_GET_DB_CONNECTION_POSITION, $cloStoreDBConnection);
###############################
### query-definition-loader ###
###############################
# get the DataObject of the query and store it in the queue
$cloGetQuery = function(\DDDBL\Queue $objQueue, array $arrParameter) {
$objDataObjectPool = new DataObjectPool('Query-Definition');
# get the first entry of the parameter-list; this is the query-alias
$strAlias = array_shift($arrParameter);
if(empty($strAlias) || !is_string($strAlias))
throw new \Exception('no query-alias defined!');
if(!$objDataObjectPool->exists($strAlias))
throw new \Exception("given query alias is unknown: $strAlias");
$objQueue->getState()->update(array('QUERY' => $objDataObjectPool->get($strAlias)));
};
$objQueue->addHandler(QUEUE_GET_QUERY_POSITION, $cloGetQuery);
#################################
### set BIND-DATA-TYPE option ###
#################################
# check if the query has a BIND-DATA-TYPE config.
# if not check if there is one given for the database-connection.
# if yes, store it as setting for the query, otherwise
# set false for this option
$cloSetBindDataTypeConfig = function(\DDDBL\Queue $objQueue, array $arrParameter) {
$objDB = $objQueue->getState()->get('DB');
$objQuery = $objQueue->getState()->get('QUERY');
# skip this step, if the query itselfs has its own
if($objQuery->exists('BIND-DATA-TYPE')) {
$objQuery->update(array('BIND-DATA-TYPE' => (bool) $objQuery->get('BIND-DATA-TYPE'))); #bugfix for php-bug #38409
return;
}
# set type to false, if no config is available, otherwise use the given config
if(!$objDB->exists('BIND-DATA-TYPE'))
$objQuery->update(array('BIND-DATA-TYPE' => false));
else
$objQuery->update(array('BIND-DATA-TYPE' => (bool) $objDB->get('BIND-DATA-TYPE')));
};
$objQueue->addHandler(QUEUE_BIND_DATA_TYPE_POSITION, $cloSetBindDataTypeConfig);
#####################
### prepare query ###
#####################
# get the stored query and prepare() it for the given database-connection
# store the resulting PDOStatement
$cloPrepareQuery = function(\DDDBL\Queue $objQueue, array $arrParameter) {
# if query is not prepared yet, do this now
if(!$objQueue->getState()->get('QUERY')->exists('PDOStatement')) {
$objPDO = $objQueue->getState()->get('DB')->get('PDO');
$objPDO = $objPDO->prepare($objQueue->getState()->get('QUERY')->get('QUERY'));
$objQueue->getState()->get('QUERY')->update(array('PDOStatement' => $objPDO));
}
# copy reference of prepared statement into queue for execution
$objQueue->getState()->update(array('PDOStatement' => $objQueue->getState()->get('QUERY')->get('PDOStatement')));
};
$objQueue->addHandler(QUEUE_PREPARE_QUERY_POSITION, $cloPrepareQuery);
#########################
### execute the query ###
#########################
# handler, which maps the data-type of a variable to the PDO-constants
$cloMapDataType = function($mixedParameter) {
$arrDataTypeMap = array('NULL' => \PDO::PARAM_NULL,
'boolean' => \PDO::PARAM_BOOL,
'integer' => \PDO::PARAM_INT,
'string' => \PDO::PARAM_STR);
$strDataType = gettype($mixedParameter);
if(!isset($arrDataTypeMap[$strDataType]))
throw new \Exception ("could not bind parameters data type - type is not supported by PDO: $strDataType");
return $arrDataTypeMap[$strDataType];
};
# bind the given parameter to the prepared statement,
# then set the fetch mode and execute the query
$cloQueryExcecute = function(\DDDBL\Queue $objQueue, array $arrParameter) use ($cloMapDataType) {
$objPDO = $objQueue->getState()->get('PDOStatement');
# remove the alias from the parameter list
array_shift($arrParameter);
$objQuery = $objQueue->getState()->get('QUERY');
if(true === $objQuery->get('BIND-DATA-TYPE')) {
foreach($arrParameter AS $intIndex => $mixedParameter)
$objPDO->bindValue($intIndex + 1, $mixedParameter, $cloMapDataType($mixedParameter));
} else {
foreach($arrParameter AS $intIndex => $mixedParameter)
$objPDO->bindValue($intIndex + 1, $mixedParameter);
}
$objPDO->setFetchMode(\PDO::FETCH_ASSOC);
# execute the query. if execution fails, throw an exception
if(!$objPDO->execute())
throw new QueryException($objPDO, $objQuery->getAll());
};
$objQueue->addHandler(QUEUE_EXECUTE_QUERY_POSITION, $cloQueryExcecute);
###############################
### format the query result ###
###############################
# if a result-handler for the query is configured, call it
$cloFormatQueryResult = function(\DDDBL\Queue $objQueue, array $arrParameter) {
$objQuery = $objQueue->getState()->get('QUERY');
if(!$objQuery->exists('HANDLER'))
return ;
# get the handler and its config
$strHandlerConfig = $objQuery->get('HANDLER');
$arrHandlerConfig = preg_split('/\s+/', $strHandlerConfig);
$strHandler = array_shift($arrHandlerConfig);
# remove handler-name from config
$strHandlerConfig = trim(str_replace($strHandler, '', $strHandlerConfig));
$objDataObjectPool = new DataObjectPool('Result-Handler');
if(!$objDataObjectPool->exists($strHandler))
throw new \Exception ("unknown result-handler: $strHandler");
$objHandler = $objDataObjectPool->get($strHandler);
$cloHandler = $objHandler->get('HANDLER');
$cloHandler($objQueue, $strHandlerConfig);
};
$objQueue->addHandler(QUEUE_FORMAT_RESULT_POSITION, $cloFormatQueryResult);
####################
### close cursor ###
####################
# closing the cursor of the PDOStatement. this will free
# the result and enable the connection to execute the next query
$cloCloseCursor = function(\DDDBL\Queue $objQueue, array $arrParameter) {
$objQueryResult = $objQueue->getState()->get('PDOStatement');
$objQueryResult->closeCursor();
};
$objQueue->addHandler(QUEUE_CLOSE_CURSOR_POSITION, $cloCloseCursor);

View File

@ -0,0 +1,102 @@
<?php
namespace DDDBL;
$objDataObjectPool = new DataObjectPool('Result-Handler');
#################################
### handler for: SINGLE_VALUE ###
#################################
$cloSingleValueHandler = function(\DDDBL\Queue $objQueue) {
$arrResult = $objQueue->getState()->get('PDOStatement')->fetch();
$objQueue->getState()->update(array('result' => (empty($arrResult)) ? null : reset($arrResult)));
};
$objDataObjectPool->add('SINGLE_VALUE', array('HANDLER' => $cloSingleValueHandler));
###########################
### handler for: SINGLE ###
###########################
$cloSingleHandler = function(\DDDBL\Queue $objQueue) {
$arrResult = $objQueue->getState()->get('PDOStatement')->fetch();
$objQueue->getState()->update(array('result' => (empty($arrResult)) ? null : $arrResult));
};
$objDataObjectPool->add('SINGLE', array('HANDLER' => $cloSingleHandler));
##########################
### handler for: MULTI ###
##########################
$cloMultiHandler = function(\DDDBL\Queue $objQueue) {
$arrResult = $objQueue->getState()->get('PDOStatement')->fetchAll();
$objQueue->getState()->update(array('result' => (empty($arrResult)) ? array() : $arrResult));
};
$objDataObjectPool->add('MULTI', array('HANDLER' => $cloMultiHandler));
#########################
### handler for: LIST ###
#########################
$cloListHandler = function(\DDDBL\Queue $objQueue) {
$objResultCursor = $objQueue->getState()->get('PDOStatement');
$arrResult = array();
while($arrRow = $objResultCursor->fetch())
array_push($arrResult, current($arrRow));
$objQueue->getState()->update(array('result' => $arrResult));
};
$objDataObjectPool->add('LIST', array('HANDLER' => $cloListHandler));
#############################
### handler for: GROUP_BY ###
#############################
$cloGroupedByHandler = function(\DDDBL\Queue $objQueue, $strGroupColumn) {
$objResultCursor = $objQueue->getState()->get('PDOStatement');
$arrResult = array();
while($arrRow = $objResultCursor->fetch()) {
if(!isset($arrRow[$strGroupColumn]))
throw new \Exception ("could not group result by non-existing column: $strGroupColumn");
$arrResult[$arrRow[$strGroupColumn]][] = $arrRow;
}
$objQueue->getState()->update(array('result' => $arrResult));
};
$objDataObjectPool->add('GROUP_BY', array('HANDLER' => $cloGroupedByHandler));
#############################
### handler for: NOT_NULL ###
#############################
$cloNotNullHandler = function(\DDDBL\Queue $objQueue) {
$arrResult = $objQueue->getState()->get('PDOStatement')->fetch();
$objQueue->getState()->update(array('result' => (empty($arrResult)) ? false : true));
};
$objDataObjectPool->add('NOT_NULL', array('HANDLER' => $cloNotNullHandler));

View File

@ -0,0 +1,195 @@
<?php
namespace DDDBL;
/**
* a DataObject is a generic object
* to store data under given keys.
*
* it allows getting, adding, updating and deleting
* data.
*
* a validation callback can be provided
* to ensure, that the stored data
* validate correctly.
*
**/
class DataObject {
/**
* list of stored data
**/
private $arrData = array();
/**
* callback to validate all stored data
**/
private $cloValidator = null;
/**
* @param $cloValidator - optional validator callback to validate stored data
* @param $arrData - optional list of data to store in object
*
* @throws UnexpectedParameterTypeException - if validator callback is not a callable
*
* initiates the data-object and stores the validator callback. if no
* callback is given, a default callback is stored, which validates against
* everything.
*
* if optional data are given, they are passed to DataObject::add(), to be stored
* immediatley
*
**/
public function __construct($cloValidator = null, array $arrData = array()) {
if(!is_null($cloValidator) && !is_callable($cloValidator))
throw new UnexpectedParameterTypeException('callable', $cloValidator);
$this->cloValidator = (!is_null($cloValidator)) ? $cloValidator : function() {return true; };
if(!empty($arrData))
$this->add($arrData);
}
/**
* @param $arrData - list of data to store in object
*
* @throws \Exception - if a key is already in use
* @throws \Exception - if the final data-set do not validate
*
* add the list of data to the existing ones. the given data
* must have the following format:
* array([key] => data
* [key] => data, [..])
*
* if a key in the given data is already used in stored
* data the addition is aborted and an exception is
* thrown.
*
* the stored data are only modified on success
*
**/
public function add(array $arrData) {
$arrMergedData = array_merge($this->arrData, $arrData);
foreach($arrData AS $strKey => $mixData)
if(array_key_exists($strKey, $this->arrData))
throw new \Exception("could not store data, key is already in use: $strKey");
$cloValidator = $this->cloValidator;
if(!$cloValidator($arrMergedData))
throw new \Exception("given data do not validate");
$this->arrData = $arrMergedData;
}
/**
* @param $arrData - list of data to update
*
* @throws \Exception - if the final data-set do not validate
*
* update the stored data with the given data-set. for
* the structure of $arrData have a look at DataObject:add()
*
* existing keys are overwritten with new values. new
* keys are added to the data-set.
*
* if validation of final set fails, an exception is
* thrown. no data are modified on failure.
*
**/
public function update(array $arrData) {
$arrMergedData = array_merge($this->arrData, $arrData);
$cloValidator = $this->cloValidator;
if(!$cloValidator($arrMergedData))
throw new \Exception("given data do not validate");
$this->arrData = $arrMergedData;
}
/**
* @param $strKey - the key of the value to delete
*
* @throws UnexpectedParameterTypeException - if given key is not a string
*
* delete the value stored under the given key.
* if given key do not exists, nothing is done!
*
**/
public function delete($strKey) {
if(!is_string($strKey))
throw new UnexpectedParameterTypeException('string', $strKey);
if($this->exists($strKey))
unset($this->arrData[$strKey]);
}
/**
* @param $strKey - the key to check
*
* @throws UnexpectedParameterTypeException - if given key is not a string
*
* @return (boolean) true, if key exists
* @return (boolean) false, if key do not exists
*
* check if the given key exists
*
**/
public function exists($strKey) {
if(!is_string($strKey))
throw new UnexpectedParameterTypeException('string', $strKey);
if(!array_key_exists($strKey, $this->arrData))
return false;
return true;
}
/**
* @param $strKey - the key to get the value from
*
* @throws UnexpectedParameterTypeException - if given key is not a string
* @throws \Exception - if given key is unknown
*
* @return (mixed) the value stored under the given key
*
* return the value stored under the given key
*
**/
public function get($strKey) {
if(!is_string($strKey))
throw new UnexpectedParameterTypeException('string', $strKey);
if(!$this->exists($strKey))
throw new \Exception("unknown key: $strKey");
return $this->arrData[$strKey];
}
/**
* return all stored data in the structure of:
* array([key] => data
* [key] => data, [..])
*
**/
public function getAll() {
return $this->arrData;
}
}

View File

@ -0,0 +1,207 @@
<?php
namespace DDDBL;
/**
* The DataObjectPool is a class to manage
* the DataObjects for different types.
*
* DataObjects are stored within groups. Every group
* has a validatator, with is applyed to
* every DataObject stored in the group.
* If no validatator is set, no validation will
* be done.
*
* A DataObject is referenced by an identifier,
* which is uniqiue within a group.
*
* when creating a DataObjectPool instance,
* the wanted group is set. All following
* operations are done at this group.
*
**/
class DataObjectPool {
/**
* the actual group to operate on
*
**/
private $strGroup = null;
/**
* list of validators for each group. structure:
* array([group] => validator-callback,
* [group-n] => validator-callback-n, [..])
*
**/
static private $arrValidatorList = array();
/**
* list of DataObjects. stored in the following structure:
* array([group][uniqueue-identifier] => DataObject-reference,
* [group-n][uniqueue-identifier-n] => DataObject-reference-n, [..])
*
**/
static private $arrDataObjects = array();
/**
* @param $strGroup - the group of DataObjects to operate on
*
* @throws UnexpectedParameterTypeException - if given group is not a string
*
* create an instance of DataObjectPool and store the group
* to operate on
*
**/
public function __construct($strGroup) {
if(!is_string($strGroup))
throw new UnexpectedParameterTypeException('string', $strGroup);
$this->strGroup = $strGroup;
if(!array_key_exists($this->strGroup, self::$arrValidatorList))
self::$arrValidatorList[$this->strGroup] = null;
if(!array_key_exists($this->strGroup, self::$arrDataObjects))
self::$arrDataObjects[$this->strGroup] = array();
}
/**
* @param $cloValidator - the validator to set for the group
*
* @throws UnexpectedParameterTypeException - if given validator is not a callable
*
* set the validator for the active group. this validator
* is given to each newly created DataObject.
* if it is changed, the existing DataObjects are
* *NOT* revalidated.
*
**/
public function setValidator($cloValidator) {
if(!is_callable($cloValidator))
throw new UnexpectedParameterTypeException('string', $cloValidator);
self::$arrValidatorList[$this->strGroup] = $cloValidator;
}
/**
* @param $strIdentifier - the unique identifier of the DataObject
* @param $arrData - the data to store in the DataObject
*
* @see DataObject:add()
*
* @throws UnexpectedParameterTypeException - if identifier is not a string
* @throws \Exception - if given identifier is not unique
*
* @returns (DataObject) - reference to the created DataObject-instance
*
* create a new DataObject and store it in the pool. The given
* identifier is the key to retrieve the DataObject from the pool.
* The given data are stored within the DataObject.
*
* After creation and storage of the DataObject, a reference
* to the object is returned
*
**/
public function add($strIdentifier, array $arrData) {
if(!is_string($strIdentifier))
throw new UnexpectedParameterTypeException('string', $strIdentifier);
if($this->exists($strIdentifier))
throw new \Exception ("identifier already in use: $strIdentifier");
$objDataObject = new DataObject(self::$arrValidatorList[$this->strGroup], $arrData);
self::$arrDataObjects[$this->strGroup][$strIdentifier] = $objDataObject;
return $objDataObject;
}
/**
* @param $strIdentifier - the identifier of the object to delete
*
* @throws UnexpectedParameterTypeException - if given identifier is not a string
* @throws \Exception - if the given identifier is not known
*
* delete the stored DataObject from the DataObjectPool
*
**/
public function delete($strIdentifier) {
if(!is_string($strIdentifier))
throw new UnexpectedParameterTypeException('string', $strIdentifier);
if(!$this->exists($strIdentifier))
throw new \Exception ("DataObject not found, identifier unknown: $strIdentifier");
unset(self::$arrDataObjects[$this->strGroup][$strIdentifier]);
}
/**
* @param $strIdentifier - the identifier to check
*
* @throws UnexpectedParameterTypeException - if given identifier is not a string
*
* @returns (boolean) true, if the identifier exists
* @returns (boolean) false, if the identifier do not exists
*
**/
public function exists($strIdentifier) {
if(!is_string($strIdentifier))
throw new UnexpectedParameterTypeException('string', $strIdentifier);
if(!isset(self::$arrDataObjects[$this->strGroup][$strIdentifier]))
return false;
return true;
}
/**
* @param $strIdentifier - the identifier of the DataObject to retrieve
*
* @throws UnexpectedParameterTypeException - if given identifier is not a string
* @throws \Exception - if given identifier is unknown
*
* @returns (DataObject) - reference to the DataObject
*
* returns a reference to the DataObject stored under the identifer
*
**/
public function get($strIdentifier) {
if(!is_string($strIdentifier))
throw new UnexpectedParameterTypeException('string', $strIdentifier);
if(!$this->exists($strIdentifier))
throw new \Exception ("DataObject not found, identifier unknown: $strIdentifier");
return self::$arrDataObjects[$this->strGroup][$strIdentifier];
}
/**
* @returns (array) - list of all DataObjects of the active group
*
* returns an array of all stored DataObjects of the active group
* with the following structure:
*
* array([identifier] => DataObject-reference,
* [identifier-n] => DataObject-reference-n, [..])
*
**/
public function getAll() {
return self::$arrDataObjects[$this->strGroup];
}
}

View File

@ -0,0 +1,138 @@
<?php
namespace DDDBL;
/**
* this class implements a queue of handler, which
* are called in a specified order.
*
* this allows the combiniation of different steps,
* like database-connection management, query execution
* and result parsing in a simple list of actions.
*
* Queue::getClone() returns a clone of the queue,
* which allows modifications of the queue by
* the executed handler.
* in this way different problems, like substituions,
* test-cases, statistics and much more can be solved,
* without destroying the configured order for other queries.
*
**/
class Queue {
/**
* the sorted (!) queue of handler to execute
*
**/
private $arrHandlerQueue = array();
/**
* @see \DDDBL\DataObject
*
* an DataObject, which is used to store the states of the queue
*
**/
private $objState = null;
/**
* @param $intPosition - the position to store the handler at
* @param $cloHandler - the handler to store in the queue
*
* @throws UnexpectedParameterTypeException - if the first parameter is not an integer
* @throws UnexpectedParameterTypeException - if the second parameter is not a callable
* @throws \Exception - if there is already a handler stored under the given position
*
* store the given handler under the given position in the queue.
* if the position is already in use an expection is thrown.
*
**/
public function addHandler($intPosition, $cloHandler) {
if(!is_int($intPosition))
throw new UnexpectedParameterTypeException('integer', $intPosition);
if(!is_callable($cloHandler))
throw new UnexpectedParameterTypeException('callable', $cloHandler);
if(!empty($this->arrHandlerQueue[$intPosition]))
throw new \Exception("there is already a handler stored for position: $intPosition");
$this->arrHandlerQueue[$intPosition] = $cloHandler;
ksort($this->arrHandlerQueue);
}
/**
* @param $intPosition - the position the handler for deletion is stored under
*
* @throws UnexpectedParameterTypeException - if the parameter is not an integer
*
* delete the handler stored under the given position
*
**/
public function deleteHandler($intPosition) {
if(!is_int($intPosition))
throw new UnexpectedParameterTypeException('integer', $intPosition);
if(array_key_exists($intPosition, $this->arrHandlerQueue))
unset($this->arrHandlerQueue[$intPosition]);
}
/**
* @returns (\DDDBL\Queue) - a clone of the queue-instance
*
* return a clone of the acutal queue
*
**/
public function getClone() {
return clone $this;
}
/**
* @param $arrParameter - the parameter to use when executing the queue-handler
*
* @returns (mixed) the state of "result"
*
* execute all handler in the queue, in the given
* order from low to high. after execution return the
* state "result".
*
* handler which generates an output
* are expected to store the result in this state
*
**/
public function execute(array $arrParameter) {
$this->getState()->add(array('result' => null));
foreach($this->arrHandlerQueue AS $cloHandler)
$cloHandler($this, $arrParameter);
return $this->getState()->get('result');
}
/**
* @returns (DataObject) - the DataObject which handles the states of the queue
*
* returns a reference to the DataObject, which
* stores all states of the queue.
*
* if no object exists till now, a new one is created
*
**/
public function getState() {
if(!is_object($this->objState))
$this->objState = new DataObject();
return $this->objState;
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace DDDBL;
/**
* simple implementation of generic singleton
* for all classes, which allows additional instances
* if needed
*
**/
class Singleton {
/**
* @param $strClass - the class we want an instance from
*
* @throws UnexpectedParameterTypeException - if given parameter is not a string
* @throws \Exception - if given class do not exists
*
* @return (object) - an instance of the given classname
*
* get a reference to the instance of the given class.
* if instance do not exists, create one. after creation
* always return reference to this reference
*
**/
static function getInstance($strClass) {
if(!is_string($strClass))
throw new UnexpectedParameterTypeException('string', $strClass);
if(!class_exists($strClass))
throw new \Exception ("class do not exists: $strClass");
static $arrObjectList = array();
if(!isset($arrObjectList[$strClass]))
$arrObjectList[$strClass] = new $strClass();
return $arrObjectList[$strClass];
}
}

View File

@ -0,0 +1,206 @@
<?php
namespace DDDBL;
/**
* @returns (PDO) - reference to PDO object
* @returns (boolean) false, if there is no connection to the database
*
* if there is a connection to the database,
* the PDO object is returned otherwise false
*
**/
function getDB() {
if(!isConnected())
return false;
$objDB = getDBDataObject();
return $objDB->get('PDO');
}
/**
* @returns (boolean) true, if connection exists or is established
* @returns (boolean) false, if connection could not be established
*
* if no connection to the database exists, establishe one.
*
**/
function connect() {
if(isConnected())
return true;
$objDB = getDBDataObject();
try {
$objPDO = new \PDO($objDB->get('CONNECTION'),
$objDB->get('USER'),
$objDB->get('PASS'));
} catch (\Exception $objException) {
return false;
}
$objDB->update(array('PDO' => $objPDO));
return true;
}
/**
* disconnect from the database
*
**/
function disconnect() {
$objDB = getDBDataObject();
$objPDO = $objDB->get('PDO');
$objPDO = null;
$objDB->delete('PDO');
}
/**
* check if a connection to the database is established
*
**/
function isConnected() {
$objDB = getDBDataObject();
if(!$objDB->exists('PDO'))
return false;
return true;
}
/**
* @returns (boolean) true, if transaction started
* @returns (boolean) false, if transaction could not be started
* @returns (boolean) false, if no connection to database exists
*
* start a transaction
*
**/
function startTransaction() {
return mapMethod('beginTransaction');
}
/**
* @returns (boolean) true, if there is an active transaction
* @returns (boolean) false, if there is no active transaction
* @returns (boolean) false, if no connection to database exists
*
* check if there is an active transaction
*
**/
function inTransaction() {
return mapMethod('inTransaction');
}
/**
* @returns (boolean) true, if rollback was successfull
* @returns (boolean) false, if rollback was not successfull
* @returns (boolean) false, if no connection to database exists
*
* perform a rollback of the active transaction
*
**/
function rollback() {
return mapMethod('rollback');
}
/**
* @returns (boolean) true, if commit was successfull
* @returns (boolean) false, if commit was not successfull
* @returns (boolean) false, if no connection to database exists
*
* commit the active transaction
*
**/
function commit() {
return mapMethod('commit');
}
/**
* @returns (array) - list of error-information
*
* get information about an error
*
**/
function getErrorInfo() {
return mapMethod('errorInfo');
}
/**
* change the active database-connection. all db-functions
* are performed at the new connection.
*
* ATTENTION: the old connection is *not* closed!
*
**/
function changeDB($strIdentifier) {
$objDataObjectPool = new DataObjectPool('Database-Definition');
$objNewDB = $objDataObjectPool->get($strIdentifier);
$objDataObjectPool->delete('DEFAULT');
$objDataObjectPool->add('DEFAULT', $objNewDB->getAll());
}
/**
* @returns (DataObject) - reference to the DataObject of default connection
*
* returns the DataObject of the default connection.
*
**/
function getDBDataObject() {
$objDataObjectPool = new DataObjectPool('Database-Definition');
return $objDataObjectPool->get('DEFAULT');
}
/**
* @throws UnexpectedParameterTypeException - if the given parameter is not a string
*
* @returns (boolean) false, if no connection is established
*
* check if a connection to the database is established. if so,
* the given parameter is used, as method to call at the
* PDO object. the result of the call is returned
*
**/
function mapMethod($strMethod) {
if(!is_string($strMethod))
throw new UnexpectedParameterTypeException('string', $strMethod);
if(!isConnected())
return false;
$objDB = getDBDataObject();
$objPDO = $objDB->get('PDO');
return $objPDO->$strMethod();
}

View File

@ -0,0 +1,94 @@
<?php
namespace DDDBL;
/**
*
* create an exception with relevant information, if a query fails
*
**/
class QueryException extends \Exception {
/**
*
* @param $objPDO - the PDO object which caused the error when executed
* @param $arrQueryDefinition - the complete query definition
*
* create an error message which contains all relevant informations
* and print them as exception
*
**/
public function __construct(\PDOStatement $objPDO, $arrQueryDefinition) {
$strMessage = self::createErrorMessage($objPDO, $arrQueryDefinition);
parent::__construct($strMessage);
}
/**
*
* @param $objPDO - the PDO object related with the error
* @param $arrQueryDefinition - the complete query definition
*
* @return (string) the complete exception message
*
* build and return the exception message out of the given error info
* and query definition
*
**/
private function createErrorMessage($objPDO, $arrQueryDefinition) {
$strMessage = self::flattenQueryErrorInfo($objPDO);
$strMessage .= self::flattenQueryDefiniton($arrQueryDefinition);
return $strMessage;
}
/**
*
* @param $objPDO - PDO object to get error information from
*
* @return (string) a flatten error info from the query object
*
* build and return a flatten error-info
* from the driver specific error message
*
**/
private function flattenQueryErrorInfo($objPDO) {
$arrErrorInfo = $objPDO->errorInfo();
$strMessage = '';
if(!empty($arrErrorInfo) && !empty($arrErrorInfo[0]) && '00000' !== $arrErrorInfo[0])
$strMessage = "\nError-Code: {$arrErrorInfo[0]}\nError-Message: {$arrErrorInfo[2]}\n";
return $strMessage;
}
/**
*
* @param $arrQueryDefinition - the complete query definition
*
* @return (string) a text version of the query definition
*
* create an text, which contains all information
* of the query definition
*
**/
private function flattenQueryDefiniton($arrQueryDefinition) {
$strMessage = "\nQuery-Definiton:\n";
foreach($arrQueryDefinition AS $strKeyword => $strContent)
$strMessage .= "$strKeyword: $strContent\n";
return $strMessage . "\n";
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace DDDBL;
/**
* exception if the given parameter
* has an unexpected data-type
*
**/
class UnexpectedParameterTypeException extends \Exception {
/**
* @param $strExpected - the expected datatype
* @param $mixedValue - the given parameter
*
* determines the datatype of the given parameter and
* creates and stores the exception message
*
**/
public function __construct($strExpected, $mixedValue) {
parent::__construct("value of type $strExpected expected, but got: " . gettype($mixedValue));
}
}

View File

@ -87,10 +87,11 @@ function admin_content(&$a) {
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
return "";
if (function_exists("apc_delete")) {
$toDelete = new APCIterator('user', APC_ITER_VALUE);
apc_delete($toDelete);
}
// APC deactivated, since there are problems with PHP 5.5
//if (function_exists("apc_delete")) {
// $toDelete = new APCIterator('user', APC_ITER_VALUE);
// apc_delete($toDelete);
//}
/**
* Side bar links
@ -329,7 +330,7 @@ function admin_page_site_post(&$a){
$private_addons = ((x($_POST,'private_addons')) ? True : False);
$disable_embedded = ((x($_POST,'disable_embedded')) ? True : False);
$allow_users_remote_self = ((x($_POST,'allow_users_remote_self')) ? True : False);
$no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False);
$no_openid = !((x($_POST,'no_openid')) ? True : False);
$no_regfullname = !((x($_POST,'no_regfullname')) ? True : False);
@ -403,6 +404,7 @@ function admin_page_site_post(&$a){
set_config('system','poll_interval',$poll_interval);
set_config('system','maxloadavg',$maxloadavg);
set_config('config','sitename',$sitename);
set_config('system','suppress_language',$suppress_language);
if ($banner==""){
// don't know why, but del_config doesn't work...
q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
@ -1028,13 +1030,24 @@ function admin_page_plugins(&$a){
*/
$plugins = array();
$files = glob("addon/*/");
$files = glob("addon/*/"); /* */
if($files) {
foreach($files as $file) {
foreach($files as $file) {
if (is_dir($file)){
list($tmp, $id)=array_map("trim", explode("/",$file));
$info = get_plugin_info($id);
$plugins[] = array( $id, (in_array($id, $a->plugins)?"on":"off") , $info);
$show_plugin = true;
// If the addon is unsupported, then only show it, when it is enabled
if ((strtolower($info["status"]) == "unsupported") AND !in_array($id, $a->plugins))
$show_plugin = false;
// Override the above szenario, when the admin really wants to see outdated stuff
if (get_config("system", "show_unsupported_addons"))
$show_plugin = true;
if ($show_plugin)
$plugins[] = array($id, (in_array($id, $a->plugins)?"on":"off") , $info);
}
}
}
@ -1045,7 +1058,7 @@ function admin_page_plugins(&$a){
'$page' => t('Plugins'),
'$submit' => t('Save Settings'),
'$baseurl' => $a->get_baseurl(true),
'$function' => 'plugins',
'$function' => 'plugins',
'$plugins' => $plugins,
'$form_security_token' => get_form_security_token("admin_themes"),
));
@ -1127,16 +1140,16 @@ function admin_page_themes(&$a){
$allowed_themes[] = trim($x);
$themes = array();
$files = glob('view/theme/*');
if($files) {
foreach($files as $file) {
$f = basename($file);
$is_experimental = intval(file_exists($file . '/experimental'));
$files = glob('view/theme/*'); /* */
if($files) {
foreach($files as $file) {
$f = basename($file);
$is_experimental = intval(file_exists($file . '/experimental'));
$is_supported = 1-(intval(file_exists($file . '/unsupported'))); // Is not used yet
$is_allowed = intval(in_array($f,$allowed_themes));
$themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
}
}
}
}
if(! count($themes)) {
notice( t('No themes found.'));
@ -1272,12 +1285,12 @@ function admin_page_logs_post(&$a) {
set_config('system','debugging', $debugging);
set_config('system','loglevel', $loglevel);
}
info( t("Log settings updated.") );
goaway($a->get_baseurl(true) . '/admin/logs' );
return; // NOTREACHED
return; // NOTREACHED
}
/**
@ -1285,7 +1298,7 @@ function admin_page_logs_post(&$a) {
* @return string
*/
function admin_page_logs(&$a){
$log_choices = Array(
LOGGER_NORMAL => 'Normal',
LOGGER_TRACE => 'Trace',
@ -1293,7 +1306,7 @@ function admin_page_logs(&$a){
LOGGER_DATA => 'Data',
LOGGER_ALL => 'All'
);
$t = get_markup_template("admin_logs.tpl");
$f = get_config('system','logfile');
@ -1325,7 +1338,7 @@ readable.");
}
fclose($fp);
}
}
}
return replace_macros($t, array(
'$title' => t('Administration'),
@ -1335,7 +1348,7 @@ readable.");
'$data' => $data,
'$baseurl' => $a->get_baseurl(true),
'$logname' => get_config('system','logfile'),
// name, label, value, help string, extra data...
'$debugging' => array('debugging', t("Enable Debugging"),get_config('system','debugging'), ""),
'$logfile' => array('logfile', t("Log file"), get_config('system','logfile'), t("Must be writable by web server. Relative to your Friendica top-level directory.")),
@ -1354,7 +1367,7 @@ function admin_page_remoteupdate_post(&$a) {
return;
}
if (x($_POST,'remotefile') && $_POST['remotefile']!=""){
$remotefile = $_POST['remotefile'];
$ftpdata = (x($_POST['ftphost'])?$_POST:false);
@ -1377,14 +1390,14 @@ function admin_page_remoteupdate(&$a) {
$canwrite = canWeWrite();
$canftp = function_exists('ftp_connect');
$needupdate = true;
$u = checkUpdate();
if (!is_array($u)){
$needupdate = false;
$u = array('','','');
}
$tpl = get_markup_template("admin_remoteupdate.tpl");
return replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
@ -1401,5 +1414,5 @@ function admin_page_remoteupdate(&$a) {
'$ftppwd' => array('ftppwd', t("FTP Password"), '',''),
'$remotefile'=>array('remotefile','', $u['2'],''),
));
}

View File

@ -504,7 +504,7 @@ function load_database($db) {
foreach($arr as $a) {
if(strlen(trim($a))) {
$r = @$db->q(trim($a));
if(! $r) {
if(false === $r) {
$errors .= t('Errors encountered creating database tables.') . $a . EOL;
}
}

View File

@ -738,7 +738,7 @@ die("ss");
// This problem can occur expecially with imported facebook posts
$max_comments = get_config("system", "max_comments");
if ($max_comments == 0)
$max_comments = 1000;
$max_comments = 100;
$items = array();

View File

@ -51,6 +51,7 @@ function completeurl($url, $scheme) {
}
function parseurl_getsiteinfo($url, $no_guessing = false) {
$siteinfo = array();
$url = trim($url, "'");
@ -172,7 +173,7 @@ function parseurl_getsiteinfo($url, $no_guessing = false) {
$siteinfo["image"] = $attr["content"];
break;
case "twitter:card":
if ($siteinfo["type"] == "")
if (($siteinfo["type"] == "") OR ($attr["content"] == "photo"))
$siteinfo["type"] = $attr["content"];
break;
case "twitter:description":
@ -440,3 +441,4 @@ function parse_url_content(&$a) {
killme();
}
?>

View File

@ -1640,10 +1640,15 @@ function photos_content(&$a) {
$profile_link = $profile_url;
$drop = '';
if(($item['contact-id'] == $contact_id) || ($item['uid'] == local_user()))
$drop = replace_macros(get_markup_template('photo_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
$dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user()));
$drop = array(
'dropping' => $dropping,
'pagedrop' => false,
'select' => t('Select'),
'delete' => t('Delete'),
);
if($a->theme['template_engine'] === 'internal') {

View File

@ -27,8 +27,6 @@ function removeme_post(&$a) {
}
function removeme_content(&$a) {
if(! local_user())
@ -36,6 +34,9 @@ function removeme_content(&$a) {
$hash = random_string();
require_once("mod/settings.php");
settings_init($a);
$_SESSION['remove_account_verify'] = $hash;
$tpl = get_markup_template('removeme.tpl');
@ -48,6 +49,6 @@ function removeme_content(&$a) {
'$submit' => t('Remove My Account')
));
return $o;
return $o;
}
}

View File

@ -16,10 +16,11 @@ function get_theme_config_file($theme){
function settings_init(&$a) {
if (function_exists("apc_delete")) {
$toDelete = new APCIterator('user', APC_ITER_VALUE);
apc_delete($toDelete);
}
// APC deactivated, since there are problems with PHP 5.5
//if (function_exists("apc_delete")) {
// $toDelete = new APCIterator('user', APC_ITER_VALUE);
// apc_delete($toDelete);
//}
// These lines provide the javascript needed by the acl selector
@ -956,6 +957,8 @@ function settings_content(&$a) {
$pageset_tpl = get_markup_template('pagetypes.tpl');
$pagetype = replace_macros($pageset_tpl, array(
'$user' => t("User Types"),
'$community' => t("Community Types"),
'$page_normal' => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
t('This account is a normal personal profile'),
($a->user['page-flags'] == PAGE_NORMAL)),

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -122,6 +122,7 @@ $a->strings["font size"] = "velikost fondu";
$a->strings["base font size for your interface"] = "základní velikost fontu";
$a->strings["Set resize level for images in posts and comments (width and height)"] = "Nastavit velikost fotek v přízpěvcích a komentářích (šířka a výška)";
$a->strings["Set theme width"] = "Nastavení šířku grafické šablony";
$a->strings["Set style"] = "Nastavit styl";
$a->strings["Delete this item?"] = "Odstranit tuto položku?";
$a->strings["show fewer"] = "zobrazit méně";
$a->strings["Update %s failed. See error logs."] = "Aktualizace %s selhala. Zkontrolujte protokol chyb.";
@ -421,6 +422,7 @@ $a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] =
$a->strings["Site settings updated."] = "Nastavení webu aktualizováno.";
$a->strings["No special theme for mobile devices"] = "žádné speciální téma pro mobilní zařízení";
$a->strings["Never"] = "Nikdy";
$a->strings["At post arrival"] = "Při obdržení příspěvku";
$a->strings["Frequently"] = "Často";
$a->strings["Hourly"] = "každou hodinu";
$a->strings["Twice daily"] = "Dvakrát denně";
@ -501,7 +503,7 @@ $a->strings["Use PHP UTF8 regular expressions"] = "Použít PHP UTF8 regulární
$a->strings["Show Community Page"] = "Zobrazit stránku komunity";
$a->strings["Display a Community page showing all recent public postings on this site."] = "Zobrazit Komunitní stránku zobrazující všechny veřejné příspěvky napsané na této stránce.";
$a->strings["Enable OStatus support"] = "Zapnout podporu OStatus";
$a->strings["Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Poskytnout zabudouvanou kompatibilitu s OStatus (identi.ca, status.net, etc.). Veškerá komunikace s OStatus je veřejná, proto bude občas zobrazeno upozornění.";
$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Poskytnout zabudouvanou kompatibilitu s OStatus (StatusNet, GNU Social apod.). Veškerá komunikace s OStatus je veřejná, proto bude občas zobrazeno upozornění.";
$a->strings["OStatus conversation completion interval"] = "Interval dokončení konverzace OStatus";
$a->strings["How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."] = "Jak často by mělo probíhat ověřování pro nové přísvěvky v konverzacích OStatus? Toto může být velmi výkonově náročný úkol.";
$a->strings["Enable Diaspora support"] = "Povolit podporu Diaspora";
@ -777,6 +779,9 @@ $a->strings["Currently ignored"] = "V současnosti ignorováno";
$a->strings["Currently archived"] = "Aktuálně archivován";
$a->strings["Hide this contact from others"] = "Skrýt tento kontakt před ostatními";
$a->strings["Replies/likes to your public posts <strong>may</strong> still be visible"] = "Odpovědi/Libí se na Vaše veřejné příspěvky <strong>mohou být</strong> stále viditelné";
$a->strings["Notification for new posts"] = "Upozornění na nové příspěvky";
$a->strings["Send a notification of every new post of this contact"] = "Poslat upozornění při každém novém příspěvku tohoto kontaktu";
$a->strings["Fetch further information for feeds"] = "Načíst další informace pro kanál";
$a->strings["Suggestions"] = "Doporučení";
$a->strings["Suggest potential friends"] = "Navrhnout potenciální přátele";
$a->strings["All Contacts"] = "Všechny kontakty";
@ -798,11 +803,10 @@ $a->strings["Edit contact"] = "Editovat kontakt";
$a->strings["Search your contacts"] = "Prohledat Vaše kontakty";
$a->strings["Update"] = "Aktualizace";
$a->strings["everybody"] = "Žádost o připojení selhala nebo byla zrušena.";
$a->strings["Account settings"] = "Nastavení účtu";
$a->strings["Additional features"] = "Další funkčnosti";
$a->strings["Display settings"] = "Nastavení zobrazení";
$a->strings["Connector settings"] = "Nastavení konektoru";
$a->strings["Plugin settings"] = "Nastavení pluginu";
$a->strings["Display"] = "Zobrazení";
$a->strings["Social Networks"] = "Sociální sítě";
$a->strings["Delegations"] = "Delegace";
$a->strings["Connected apps"] = "Propojené aplikace";
$a->strings["Export personal data"] = "Export osobních údajů";
$a->strings["Remove account"] = "Odstranit účet";
@ -844,7 +848,6 @@ $a->strings["enabled"] = "povoleno";
$a->strings["disabled"] = "zakázáno";
$a->strings["StatusNet"] = "StatusNet";
$a->strings["Email access is disabled on this site."] = "Přístup k elektronické poště je na tomto serveru zakázán.";
$a->strings["Connector Settings"] = "Nastavení konektoru";
$a->strings["Email/Mailbox Setup"] = "Nastavení e-mailu";
$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "Pokud chcete komunikovat pomocí této služby s Vašimi kontakty z e-mailu (volitelné), uveďte, jak se připojit k Vaší e-mailové schránce.";
$a->strings["Last successful email check:"] = "Poslední úspěšná kontrola e-mailu:";
@ -869,6 +872,7 @@ $a->strings["Number of items to display per page:"] = "Počet položek zobrazen
$a->strings["Maximum of 100 items"] = "Maximum 100 položek";
$a->strings["Number of items to display per page when viewed from mobile device:"] = "Počet položek ke zobrazení na stránce při zobrazení na mobilním zařízení:";
$a->strings["Don't show emoticons"] = "Nezobrazovat emotikony";
$a->strings["Don't show notices"] = "Nezobrazovat oznámění";
$a->strings["Infinite scroll"] = "Nekonečné posouvání";
$a->strings["Normal Account Page"] = "Normální stránka účtu";
$a->strings["This account is a normal personal profile"] = "Tento účet je běžný osobní profil";
@ -1129,6 +1133,8 @@ $a->strings["Public photo"] = "Veřejné fotografie";
$a->strings["Share"] = "Sdílet";
$a->strings["View Album"] = "Zobrazit album";
$a->strings["Recent Photos"] = "Aktuální fotografie";
$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "Omlouváme se, možná je Váš soubor větší než je povolené maximum dle nastavení PHP";
$a->strings["Or - did you try to upload an empty file?"] = "Nebo - nenahrával jste prázdný soubor?";
$a->strings["File exceeds size limit of %d"] = "Velikost souboru přesáhla limit %d";
$a->strings["File upload failed."] = "Nahrání souboru se nezdařilo.";
$a->strings["No videos selected"] = "Není vybráno žádné video";
@ -1311,6 +1317,7 @@ $a->strings["This action exceeds the limits set by your subscription plan."] = "
$a->strings["This action is not available under your subscription plan."] = "Tato akce není v rámci Vašeho předplatného dostupná.";
$a->strings["User not found."] = "Uživatel nenalezen";
$a->strings["There is no status with this id."] = "Není tu žádný status s tímto id.";
$a->strings["There is no conversation with this id."] = "Nemáme žádnou konverzaci s tímto id.";
$a->strings["view full size"] = "zobrazit v plné velikosti";
$a->strings["Starts:"] = "Začíná:";
$a->strings["Finishes:"] = "Končí:";
@ -1470,6 +1477,9 @@ $a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s napřidáno n
$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Upozornění] %s Vás označil";
$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s Vás označil na %2\$s";
$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]Vás označil[/url].";
$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notify] %s nasdílel nový příspěvek";
$a->strings["%1\$s shared a new post at %2\$s"] = "%1\$s nasdílel nový příspěvek na %2\$s";
$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]nasdílel příspěvek[/url].";
$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Upozornění] %1\$s Vás šťouchnul";
$a->strings["%1\$s poked you at %2\$s"] = "%1\$s Vás šťouchnul na %2\$s";
$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "Uživatel %1\$s [url=%2\$s]Vás šťouchnul[/url].";
@ -1519,6 +1529,8 @@ $a->strings["Search site content"] = "Hledání na stránkách tohoto webu";
$a->strings["Conversations on this site"] = "Konverzace na tomto webu";
$a->strings["Directory"] = "Adresář";
$a->strings["People directory"] = "Adresář";
$a->strings["Information"] = "Informace";
$a->strings["Information about this friendica instance"] = "Informace o této instanci Friendica";
$a->strings["Conversations from your friends"] = "Konverzace od Vašich přátel";
$a->strings["Network Reset"] = "Síťový Reset";
$a->strings["Load Network page with no filters"] = "Načíst stránku Síť bez filtrů";
@ -1530,7 +1542,7 @@ $a->strings["Inbox"] = "Doručená pošta";
$a->strings["Outbox"] = "Odeslaná pošta";
$a->strings["Manage"] = "Spravovat";
$a->strings["Manage other pages"] = "Spravovat jiné stránky";
$a->strings["Delegations"] = "Delegace";
$a->strings["Account settings"] = "Nastavení účtu";
$a->strings["Manage/Edit Profiles"] = "Spravovat/Editovat Profily";
$a->strings["Manage/edit friends and contacts"] = "Spravovat/upravit přátelé a kontakty";
$a->strings["Site setup and configuration"] = "Nastavení webu a konfigurace";
@ -1553,7 +1565,8 @@ $a->strings["Love/Romance:"] = "Láska/romance";
$a->strings["Work/employment:"] = "Práce/zaměstnání:";
$a->strings["School/education:"] = "Škola/vzdělávání:";
$a->strings["Image/photo"] = "Obrázek/fotografie";
$a->strings["<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a href=\"%s\" target=\"external-link\">post</a>"] = "<span><a href=\"%s\" target=\"external-link\">%s</a> napsal následující <a href=\"%s\" target=\"external-link\">příspěvek</a>";
$a->strings["<span><a href=\"%s\" target=\"_blank\">%s</a> wrote the following <a href=\"%s\" target=\"_blank\">post</a>"] = "<span><a href=\"%s\" target=\"_blank\">%s</a> napsal následující <a href=\"%s\" target=\"_blank\">příspěvek</a>";
$a->strings["<span><b>"] = "<span><b>";
$a->strings["$1 wrote:"] = "$1 napsal:";
$a->strings["Encrypted content"] = "Šifrovaný obsah";
$a->strings["Unknown | Not categorised"] = "Neznámé | Nezařazeno";
@ -1573,6 +1586,8 @@ $a->strings["MySpace"] = "MySpace";
$a->strings["Google+"] = "Google+";
$a->strings["pump.io"] = "pump.io";
$a->strings["Twitter"] = "Twitter";
$a->strings["Diaspora Connector"] = "Diaspora konektor";
$a->strings["Statusnet"] = "Statusnet";
$a->strings["Miscellaneous"] = "Různé";
$a->strings["year"] = "rok";
$a->strings["month"] = "měsíc";
@ -1601,6 +1616,8 @@ $a->strings["Richtext Editor"] = "Richtext Editor";
$a->strings["Enable richtext editor"] = "Povolit richtext editor";
$a->strings["Post Preview"] = "Náhled příspěvku";
$a->strings["Allow previewing posts and comments before publishing them"] = "Povolit náhledy příspěvků a komentářů před jejich zveřejněním";
$a->strings["Auto-mention Forums"] = "Automaticky zmíněná Fóra";
$a->strings["Add/remove mention when a fourm page is selected/deselected in ACL window."] = "Přidat/odebrat zmínku, když stránka fóra je označena/odznačena v ACL okně";
$a->strings["Network Sidebar Widgets"] = "Síťové postranní widgety";
$a->strings["Search by Date"] = "Vyhledávat dle Data";
$a->strings["Ability to select posts by date ranges"] = "Možnost označit příspěvky dle časového intervalu";

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
Dear {{$username}},
the administrator of {{$sitename}} has set up an account for you.
The login details are as follows:
Site Location: {{$siteurl}}
Login Name: {{$email}}
Password: {{$password}}
You may change your password from your account "Settings" page after logging
in.
Please take a few moments to review the other account settings on that page.
You may also wish to add some basic information to your default profile
(on the "Profiles" page) so that other people can easily find you.
We recommend setting your full name, adding a profile photo,
adding some profile "keywords" (very useful in making new friends) - and
perhaps what country you live in; if you do not wish to be more specific
than that.
We fully respect your right to privacy, and none of these items are necessary.
If you are new and do not know anybody here, they may help
you to make some new and interesting friends.
Thank you and welcome to {{$sitename}}.
Sincerely,
{{$sitename}} Administrator

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,20 @@
Cher(e) $username,
Cher/Chère $[username],
Votre mot de passe a été changé comme demandé. Merci de
mémoriser cette information (ou de changer immédiatement pour un
mot de passe que vous retiendrez).
Votre mot de passe a été modifié comme demandé. Merci de conserver
cette information pour un usage ultérieur (ou bien de changer votre mot de
passe immédiatement en quelque chose dont vous vous souviendrez).
Vos informations de connexion sont désormais :
Vos identifiants sont comme suit :
Site : $siteurl
Pseudo/Courriel : $email
Mot de passe : $new_password
Adresse du site: $[siteurl]
Utilisateur: $[email]
Mot de passe: $[new_password]
Vous pouvez changer ce mot de passe depuis la page des « réglages » de votre compte,
après connexion
Vous pouvez changer ce mot de passe depuis vos 'Réglages' une fois connecté.
Sincèrement votre,
l'administrateur de $sitename
Sincèrement,
l'administrateur de $[sitename]

View File

@ -1,22 +1,34 @@
Cher(e) $username,
Cher $[username],
Merci de vous être inscrit sur $[sitename]. Votre compte est bien créé.
Vos informations de connexion sont comme suit :
Merci de votre inscription à $sitename. Votre compte a été créé.
Les informations de connexion sont les suivantes :
Site : $siteurl
Pseudo/Courriel : $email
Mot de passe : $password
Adresse du site: $[siteurl]
Utilisateur: $[email]
Mot de passe: $[password]
Vous pouvez changer de mot de passe dans la page des « Réglages » de votre compte,
après connexion.
Vous pouvez changer votre mot de passe depuis la page "Réglages" une fois
connecté.
Merci de prendre quelques minutes pour découvrir les autres réglages disponibles
sur cette page.
Merci de prender quelques instants pour vérifier les autres réglages de cette page.
Merci, et bienvenue sur $sitename.
Vous pouvez aussi ajouter quelques informatiques de base à votre profil par défaut
(sur la page "Profils") pour que les autres membres vous trouvent facilement.
Nous vous recommandons d'indiquer un nom complet, d'ajouter une photo
de profil, quelques "mots-clés" (très efficace pour rencontrer des gens) - et
peut-être aussi votre pays de résidence ; sauf si vous souhaitez être plus
précis, bien sûr.
Nous avons le plus grand respect pour votre vie privée, et aucun de ces éléments n'est nécessaire.
Si vous êtes nouveau et ne connaissez personne, ils peuvent cependant vous
aider à vous faire quelques nouveaux et intéressants contacts.
Merci, et bienvenue sur $[sitename].
Sincèrement votre,
l'administrateur de $sitename
l'administrateur de $[sitename]

View File

@ -1,27 +1,25 @@
Une nouvelle demande d'inscription a été reçue sur $sitename, et elle
nécessite votre approbation.
Une nouvelle demande d'inscription a été reçue par $[sitename], elle
nécessite votre approbation.
Les informations de connexion sont les suivantes :
Les détails du compte sont:
Nom complet : $username
Site : $siteurl
Pseudo/Courriel : $email
Nom complet: $[username]
Adresse du site: $[siteurl]
Utilisateur: $[email]
Pour approuver cette demande, merci de suivre le lien :
Pour approuver, merci de visiter le lien suivant:
$siteurl/regmod/allow/$hash
$[siteurl]/regmod/allow/$[hash]
Pour rejeter cette demande et supprimer le compte associé,
merci de suivre le lien :
Pour refuser et supprimer le compte:
$siteurl/regmod/deny/$hash
$[siteurl]/regmod/deny/$[hash]
En vous remerçiant.
Merci d'avance.

View File

@ -109,17 +109,18 @@ $a->strings["Left"] = "Gauche";
$a->strings["Center"] = "Centre";
$a->strings["Color scheme"] = "Palette de couleurs";
$a->strings["Posts font size"] = "Taille de texte des messages";
$a->strings["Textareas font size"] = "";
$a->strings["Textareas font size"] = "Taille de police des zones de texte";
$a->strings["Set colour scheme"] = "Choisir le schéma de couleurs";
$a->strings["default"] = "défaut";
$a->strings["Background Image"] = "";
$a->strings["Background Image"] = "Image de fond";
$a->strings["The URL to a picture (e.g. from your photo album) that should be used as background image."] = "";
$a->strings["Background Color"] = "";
$a->strings["Background Color"] = "Couleur de fond";
$a->strings["HEX value for the background color. Don't include the #"] = "";
$a->strings["font size"] = "";
$a->strings["font size"] = "Taille de police";
$a->strings["base font size for your interface"] = "";
$a->strings["Set resize level for images in posts and comments (width and height)"] = "Choisir une taille pour les images dans les publications et commentaires (largeur et hauteur)";
$a->strings["Set theme width"] = "Largeur du thème";
$a->strings["Set style"] = "Définir le style";
$a->strings["Delete this item?"] = "Effacer cet élément?";
$a->strings["show fewer"] = "montrer moins";
$a->strings["Update %s failed. See error logs."] = "Mise-à-jour %s échouée. Voir les journaux d'erreur.";
@ -134,10 +135,10 @@ $a->strings["Remember me"] = "Se souvenir de moi";
$a->strings["Or login using OpenID: "] = "Ou connectez-vous via OpenID: ";
$a->strings["Forgot your password?"] = "Mot de passe oublié?";
$a->strings["Password Reset"] = "Réinitialiser le mot de passe";
$a->strings["Website Terms of Service"] = "";
$a->strings["terms of service"] = "";
$a->strings["Website Privacy Policy"] = "";
$a->strings["privacy policy"] = "";
$a->strings["Website Terms of Service"] = "Conditions d'utilisation du site internet";
$a->strings["terms of service"] = "conditions d'utilisation";
$a->strings["Website Privacy Policy"] = "Politique de confidentialité du site internet";
$a->strings["privacy policy"] = "politique de confidentialité";
$a->strings["Requested account is not available."] = "Le compte demandé n'est pas disponible.";
$a->strings["Requested profile is not available."] = "Le profil demandé n'est pas disponible.";
$a->strings["Edit profile"] = "Editer le profil";
@ -166,7 +167,7 @@ $a->strings["Status"] = "Statut";
$a->strings["Status Messages and Posts"] = "Messages d'état et publications";
$a->strings["Profile Details"] = "Détails du profil";
$a->strings["Photo Albums"] = "Albums photo";
$a->strings["Videos"] = "";
$a->strings["Videos"] = "Vidéos";
$a->strings["Events and Calendar"] = "Événements et agenda";
$a->strings["Personal Notes"] = "Notes personnelles";
$a->strings["Only You Can See This"] = "Vous seul pouvez voir ça";
@ -207,7 +208,7 @@ $a->strings["Your Email Address: "] = "Votre adresse courriel: ";
$a->strings["Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be '<strong>nickname@\$sitename</strong>'."] = "Choisissez un pseudo. Celui devra commencer par une lettre. L'adresse de votre profil en découlera sous la forme '&lt;strong&gt;pseudo@\$sitename&lt;/strong&gt;'.";
$a->strings["Choose a nickname: "] = "Choisir un pseudo: ";
$a->strings["Import"] = "Importer";
$a->strings["Import your profile to this friendica instance"] = "";
$a->strings["Import your profile to this friendica instance"] = "Importer votre profile dans cette instance de friendica";
$a->strings["Profile not found."] = "Profil introuvable.";
$a->strings["Contact not found."] = "Contact introuvable.";
$a->strings["This may occasionally happen if contact was requested by both persons and it has already been approved."] = "Ceci peut se produire lorsque le contact a été requis par les deux personnes et a déjà été approuvé.";
@ -232,7 +233,7 @@ $a->strings["%1\$s has joined %2\$s"] = "%1\$s a rejoint %2\$s";
$a->strings["Authorize application connection"] = "Autoriser l'application à se connecter";
$a->strings["Return to your app and insert this Securty Code:"] = "Retournez à votre application et saisissez ce Code de Sécurité : ";
$a->strings["Please login to continue."] = "Merci de vous connecter pour continuer.";
$a->strings["Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?"] = "Voulez-vous autoriser cette application à accéder à vos notices et contacts, et/ou à créer des notices à votre place?";
$a->strings["Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?"] = "Voulez-vous autoriser cette application à accéder à vos billets et contacts, et/ou à créer des billets à votre place?";
$a->strings["No valid account found."] = "Impossible de trouver un compte valide.";
$a->strings["Password reset request issued. Check your email."] = "Réinitialisation du mot de passe en cours. Vérifiez votre courriel.";
$a->strings["Password reset requested at %s"] = "Requête de réinitialisation de mot de passe à %s";
@ -354,9 +355,9 @@ $a->strings["If you don't have a command line version of PHP installed on server
$a->strings["PHP executable path"] = "Chemin vers l'exécutable de PHP";
$a->strings["Enter full path to php executable. You can leave this blank to continue the installation."] = "Entrez le chemin (absolu) vers l'exécutable 'php'. Vous pouvez laisser cette ligne vide pour continuer l'installation.";
$a->strings["Command line PHP"] = "Version \"ligne de commande\" de PHP";
$a->strings["PHP executable is not the php cli binary (could be cgi-fgci version)"] = "";
$a->strings["Found PHP version: "] = "";
$a->strings["PHP cli binary"] = "";
$a->strings["PHP executable is not the php cli binary (could be cgi-fgci version)"] = "L'executable PHP n'est pas le binaire php client (c'est peut être la version cgi-fcgi)";
$a->strings["Found PHP version: "] = "Version de PHP:";
$a->strings["PHP cli binary"] = "PHP cli binary";
$a->strings["The command line version of PHP on your system does not have \"register_argc_argv\" enabled."] = "La version \"ligne de commande\" de PHP de votre système n'a pas \"register_argc_argv\" d'activé.";
$a->strings["This is required for message delivery to work."] = "Ceci est requis pour que la livraison des messages fonctionne.";
$a->strings["PHP register_argc_argv"] = "PHP register_argc_argv";
@ -380,11 +381,11 @@ $a->strings["This is most often a permission setting, as the web server may not
$a->strings["At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder."] = "A la fin de cette étape, nous vous fournirons un texte à sauvegarder dans un fichier nommé .htconfig.php à la racine de votre répertoire Friendica.";
$a->strings["You can alternatively skip this procedure and perform a manual installation. Please see the file \"INSTALL.txt\" for instructions."] = "Vous pouvez également sauter cette étape et procéder à une installation manuelle. Pour cela, merci de lire le fichier \"INSTALL.txt\".";
$a->strings[".htconfig.php is writable"] = "Fichier .htconfig.php accessible en écriture";
$a->strings["Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering."] = "";
$a->strings["In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder."] = "";
$a->strings["Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder."] = "";
$a->strings["Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains."] = "";
$a->strings["view/smarty3 is writable"] = "";
$a->strings["Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering."] = "Friendica utilise le moteur de modèles Smarty3 pour le rendu d'affichage web. Smarty3 compile les modèles en PHP pour accélérer le rendu.";
$a->strings["In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder."] = "Pour pouvoir stocker ces modèles compilés, le serveur internet doit avoir accès au droit d'écriture pour le répertoire view/smarty3/ sous le dossier racine de Friendica.";
$a->strings["Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder."] = "Veuillez vous assurer que l'utilisateur qui exécute votre serveur internet (p. ex. www-data) détient le droit d'accès en écriture sur ce dossier.";
$a->strings["Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains."] = "Note: pour plus de sécurité, vous devriez ne donner le droit d'accès en écriture qu'à view/smarty3/ et pas aux fichiers modèles (.tpl) qu'il contient.";
$a->strings["view/smarty3 is writable"] = "view/smarty3 est autorisé à l écriture";
$a->strings["Url rewrite in .htaccess is not working. Check your server configuration."] = "La réécriture d'URL dans le fichier .htaccess ne fonctionne pas. Vérifiez la configuration de votre serveur.";
$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 (\".htconfig.php\") ne peut être créé. Merci d'utiliser le texte ci-joint pour créer ce fichier à la racine de votre hébergement.";
@ -418,6 +419,7 @@ $a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] =
$a->strings["Site settings updated."] = "Réglages du site mis-à-jour.";
$a->strings["No special theme for mobile devices"] = "Pas de thème particulier pour les terminaux mobiles";
$a->strings["Never"] = "Jamais";
$a->strings["At post arrival"] = "A l'arrivé d'une publication";
$a->strings["Frequently"] = "Fréquemment";
$a->strings["Hourly"] = "Toutes les heures";
$a->strings["Twice daily"] = "Deux fois par jour";
@ -429,7 +431,7 @@ $a->strings["Open"] = "Ouvert";
$a->strings["No SSL policy, links will track page SSL state"] = "Pas de politique SSL, le liens conserveront l'état SSL de la page";
$a->strings["Force all links to use SSL"] = "Forcer tous les liens à utiliser SSL";
$a->strings["Self-signed certificate, use SSL for local links only (discouraged)"] = "Certificat auto-signé, n'utiliser SSL que pour les liens locaux (non recommandé)";
$a->strings["Save Settings"] = "";
$a->strings["Save Settings"] = "Sauvegarder les paramétres";
$a->strings["File upload"] = "Téléversement de fichier";
$a->strings["Policies"] = "Politiques";
$a->strings["Advanced"] = "Avancé";
@ -437,19 +439,19 @@ $a->strings["Performance"] = "Performance";
$a->strings["Relocate - WARNING: advanced function. Could make this server unreachable."] = "";
$a->strings["Site name"] = "Nom du site";
$a->strings["Banner/Logo"] = "Bannière/Logo";
$a->strings["Additional Info"] = "";
$a->strings["Additional Info"] = "Informations supplémentaires";
$a->strings["For public servers: you can add additional information here that will be listed at dir.friendica.com/siteinfo."] = "";
$a->strings["System language"] = "Langue du système";
$a->strings["System theme"] = "Thème du système";
$a->strings["Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"] = "Thème par défaut sur ce site - peut être changé en fonction des profils - <a href='#' id='cnftheme'>changer les réglages du thème</a>";
$a->strings["Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"] = "Thème par défaut sur ce site - peut être changé au niveau du profile utilisateur - <a href='#' id='cnftheme'>changer les réglages du thème</a>";
$a->strings["Mobile system theme"] = "Thème mobile";
$a->strings["Theme for mobile devices"] = "Thème pour les terminaux mobiles";
$a->strings["SSL link policy"] = "Politique SSL pour les liens";
$a->strings["Determines whether generated links should be forced to use SSL"] = "Détermine si les liens générés doivent forcer l'usage de SSL";
$a->strings["Determines whether generated links should be forced to use SSL"] = "Détermine si les liens générés doivent forcer l'utilisation de SSL";
$a->strings["Old style 'Share'"] = "";
$a->strings["Deactivates the bbcode element 'share' for repeating items."] = "";
$a->strings["Hide help entry from navigation menu"] = "Cacher l'aide du menu de navigation";
$a->strings["Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly."] = "Cacher l'entrée du menu pour les pages d'Aide dans le menu de navigation. Vous pouvez toujours y accéder en tapant /help directement.";
$a->strings["Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly."] = "Cacher du menu de navigation le l'entrée des vers les pages d'aide. Vous pouvez toujours y accéder en tapant directement /help.";
$a->strings["Single user instance"] = "Instance mono-utilisateur";
$a->strings["Make this instance multi-user or single-user for the named user"] = "Transformer cette en instance en multi-utilisateur ou mono-utilisateur pour cet l'utilisateur.";
$a->strings["Maximum image size"] = "Taille maximale des images";
@ -475,17 +477,17 @@ $a->strings["Force publish"] = "Forcer la publication globale";
$a->strings["Check to force all profiles on this site to be listed in the site directory."] = "Cocher pour publier obligatoirement tous les profils locaux dans l'annuaire du site.";
$a->strings["Global directory update URL"] = "URL de mise-à-jour de l'annuaire global";
$a->strings["URL to update the global directory. If this is not set, the global directory is completely unavailable to the application."] = "URL de mise-à-jour de l'annuaire global. Si vide, l'annuaire global sera complètement indisponible.";
$a->strings["Allow threaded items"] = "Activer les commentaires imbriqués";
$a->strings["Allow threaded items"] = "autoriser le suivi des éléments par fil conducteur";
$a->strings["Allow infinite level threading for items on this site."] = "Permettre une imbrication infinie des commentaires.";
$a->strings["Private posts by default for new users"] = "Publications privées par défaut pour les nouveaux utilisateurs";
$a->strings["Set default post permissions for all new members to the default privacy group rather than public."] = "Rendre les posts de tous les nouveaux utilisateurs accessibles seulement par le groupe de contacts par défaut, et non par tout le monde.";
$a->strings["Set default post permissions for all new members to the default privacy group rather than public."] = "Rendre les publications de tous les nouveaux utilisateurs accessibles seulement par le groupe de contacts par défaut, et non par tout le monde.";
$a->strings["Don't include post content in email notifications"] = "Ne pas inclure le contenu posté dans l'e-mail de notification";
$a->strings["Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure."] = "Ne pas inclure le contenu d'un postage/commentaire/message privé/etc dans l'e-mail de notification qui est envoyé à partir du site, par mesure de confidentialité.";
$a->strings["Disallow public access to addons listed in the apps menu."] = "";
$a->strings["Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure."] = "Ne pas inclure le contenu d'un billet/commentaire/message privé/etc dans l'e-mail de notification qui est envoyé à partir du site, par mesure de confidentialité.";
$a->strings["Disallow public access to addons listed in the apps menu."] = "Interdire l'acces public pour les extentions listées dans le menu apps.";
$a->strings["Checking this box will restrict addons listed in the apps menu to members only."] = "";
$a->strings["Don't embed private images in posts"] = "";
$a->strings["Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while."] = "";
$a->strings["Allow Users to set remote_self"] = "";
$a->strings["Allow Users to set remote_self"] = "Autoriser les utilisateurs à définir remote_self";
$a->strings["With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream."] = "";
$a->strings["Block multiple registrations"] = "Interdire les inscriptions multiples";
$a->strings["Disallow users to register additional accounts for use as pages."] = "Ne pas permettre l'inscription de comptes multiples comme des pages.";
@ -498,7 +500,7 @@ $a->strings["Use PHP UTF8 regular expressions"] = "Utiliser les expressions rati
$a->strings["Show Community Page"] = "Montrer la \"Place publique\"";
$a->strings["Display a Community page showing all recent public postings on this site."] = "Afficher une page Communauté avec toutes les publications publiques récentes du site.";
$a->strings["Enable OStatus support"] = "Activer le support d'OStatus";
$a->strings["Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Fournir une compatibilité OStatus (identi.ca, status.net, etc.). Toutes les communications d'OStatus sont publiques, des avertissements liés à la vie privée seront affichés si utile.";
$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Fourni nativement la compatibilité avec OStatus (StatusNet, GNU Social etc.). Touts les communications utilisant OStatus sont public, des avertissements liés à la vie privée seront affichés si utile.";
$a->strings["OStatus conversation completion interval"] = "";
$a->strings["How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."] = "";
$a->strings["Enable Diaspora support"] = "Activer le support de Diaspora";
@ -519,7 +521,7 @@ $a->strings["Maximum Load Average"] = "Plafond de la charge moyenne";
$a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = "Charge système maximale à partir de laquelle l'émission et la réception seront soumises à un délai supplémentaire. Par défaut, 50.";
$a->strings["Use MySQL full text engine"] = "Utiliser le moteur de recherche plein texte de MySQL";
$a->strings["Activates the full text engine. Speeds up search - but can only search for four and more characters."] = "Activer le moteur de recherche plein texte. Accélère la recherche mais peut seulement rechercher quatre lettres ou plus.";
$a->strings["Suppress Language"] = "";
$a->strings["Suppress Language"] = "Supprimer un langage";
$a->strings["Suppress language information in meta information about a posting."] = "";
$a->strings["Path to item cache"] = "Chemin vers le cache des objets.";
$a->strings["Cache duration in seconds"] = "Durée du cache en secondes";
@ -538,7 +540,7 @@ $a->strings["Failed Updates"] = "Mises-à-jour échouées";
$a->strings["This does not include updates prior to 1139, which did not return a status."] = "Ceci n'inclut pas les versions antérieures à la 1139, qui ne retournaient jamais de détails.";
$a->strings["Mark success (if update was manually applied)"] = "Marquer comme 'réussie' (dans le cas d'une mise-à-jour manuelle)";
$a->strings["Attempt to execute this update step automatically"] = "Tenter d'éxecuter cette étape automatiquement";
$a->strings["Registration successful. Email send to user"] = "";
$a->strings["Registration successful. Email send to user"] = "Souscription réussi. Mail envoyé à l'utilisateur";
$a->strings["%s user blocked/unblocked"] = array(
0 => "%s utilisateur a (dé)bloqué",
1 => "%s utilisateurs ont (dé)bloqué",
@ -550,7 +552,7 @@ $a->strings["%s user deleted"] = array(
$a->strings["User '%s' deleted"] = "Utilisateur '%s' supprimé";
$a->strings["User '%s' unblocked"] = "Utilisateur '%s' débloqué";
$a->strings["User '%s' blocked"] = "Utilisateur '%s' bloqué";
$a->strings["Add User"] = "";
$a->strings["Add User"] = "Ajouter l'utilisateur";
$a->strings["select all"] = "tout sélectionner";
$a->strings["User registrations waiting for confirm"] = "Inscriptions d'utilisateurs en attente de confirmation";
$a->strings["User waiting for permanent deletion"] = "";
@ -564,7 +566,7 @@ $a->strings["Block"] = "Bloquer";
$a->strings["Unblock"] = "Débloquer";
$a->strings["Site admin"] = "Administration du Site";
$a->strings["Account expired"] = "Compte expiré";
$a->strings["New User"] = "";
$a->strings["New User"] = "Nouvel utilisateur";
$a->strings["Register date"] = "Date d'inscription";
$a->strings["Last login"] = "Dernière connexion";
$a->strings["Last item"] = "Dernier élément";
@ -572,10 +574,10 @@ $a->strings["Deleted since"] = "";
$a->strings["Account"] = "Compte";
$a->strings["Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "Les utilisateurs sélectionnés vont être supprimés!\\n\\nTout ce qu'ils ont posté sur ce site sera définitivement perdu!\\n\\nÊtes-vous certain?";
$a->strings["The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "L'utilisateur {0} va être supprimé!\\n\\nTout ce qu'il a posté sur ce site sera définitivement perdu!\\n\\nÊtes-vous certain?";
$a->strings["Name of the new user."] = "";
$a->strings["Nickname"] = "";
$a->strings["Nickname of the new user."] = "";
$a->strings["Email address of the new user."] = "";
$a->strings["Name of the new user."] = "Nom du nouvel utilisateur.";
$a->strings["Nickname"] = "Pseudo";
$a->strings["Nickname of the new user."] = "Pseudo du nouvel utilisateur.";
$a->strings["Email address of the new user."] = "Adresse mail du nouvel utilisateur.";
$a->strings["Plugin %s disabled."] = "Extension %s désactivée.";
$a->strings["Plugin %s enabled."] = "Extension %s activée.";
$a->strings["Disable"] = "Désactiver";
@ -589,7 +591,7 @@ $a->strings["[Experimental]"] = "[Expérimental]";
$a->strings["[Unsupported]"] = "[Non supporté]";
$a->strings["Log settings updated."] = "Réglages des journaux mis-à-jour.";
$a->strings["Clear"] = "Effacer";
$a->strings["Enable Debugging"] = "";
$a->strings["Enable Debugging"] = "Activer le déboggage";
$a->strings["Log file"] = "Fichier de journaux";
$a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "Accès en écriture par le serveur web requis. Relatif à la racine de votre installation de Friendica.";
$a->strings["Log level"] = "Niveau de journalisaton";
@ -605,7 +607,7 @@ $a->strings["Tips for New Members"] = "Conseils aux nouveaux venus";
$a->strings["link"] = "lien";
$a->strings["%1\$s tagged %2\$s's %3\$s with %4\$s"] = "%1\$s a taggué %3\$s de %2\$s avec %4\$s";
$a->strings["Item not found"] = "Élément introuvable";
$a->strings["Edit post"] = "Éditer la publication";
$a->strings["Edit post"] = "Éditer le billet";
$a->strings["upload photo"] = "envoi image";
$a->strings["Attach file"] = "Joindre fichier";
$a->strings["attach file"] = "ajout fichier";
@ -620,7 +622,7 @@ $a->strings["Clear browser location"] = "Effacer la localisation du navigateur";
$a->strings["clear location"] = "supp. localisation";
$a->strings["Permission settings"] = "Réglages des permissions";
$a->strings["CC: email addresses"] = "CC: adresses de courriel";
$a->strings["Public post"] = "Notice publique";
$a->strings["Public post"] = "Billet publique";
$a->strings["Set title"] = "Définir un titre";
$a->strings["Categories (comma-separated list)"] = "Catégories (séparées par des virgules)";
$a->strings["Example: bob@example.com, mary@example.com"] = "Exemple: bob@exemple.com, mary@exemple.com";
@ -714,8 +716,8 @@ $a->strings["Submit Request"] = "Envoyer la requête";
$a->strings["[Embedded content - reload page to view]"] = "[contenu incorporé - rechargez la page pour le voir]";
$a->strings["View in context"] = "Voir dans le contexte";
$a->strings["%d contact edited."] = array(
0 => "",
1 => "",
0 => "%d contact édité",
1 => "%d contacts édités.",
);
$a->strings["Could not access contact record."] = "Impossible d'accéder à l'enregistrement du contact.";
$a->strings["Could not locate selected profile."] = "Impossible de localiser le profil séléctionné.";
@ -769,6 +771,9 @@ $a->strings["Currently ignored"] = "Actuellement ignoré";
$a->strings["Currently archived"] = "Actuellement archivé";
$a->strings["Hide this contact from others"] = "Cacher ce contact aux autres";
$a->strings["Replies/likes to your public posts <strong>may</strong> still be visible"] = "Les réponses et \"j'aime\" à vos contenus publics <strong>peuvent</strong> être toujours visibles";
$a->strings["Notification for new posts"] = "Notification des nouvelles publications";
$a->strings["Send a notification of every new post of this contact"] = "";
$a->strings["Fetch further information for feeds"] = "";
$a->strings["Suggestions"] = "Suggestions";
$a->strings["Suggest potential friends"] = "Suggérer des amis potentiels";
$a->strings["All Contacts"] = "Tous les contacts";
@ -790,11 +795,10 @@ $a->strings["Edit contact"] = "Éditer le contact";
$a->strings["Search your contacts"] = "Rechercher dans vos contacts";
$a->strings["Update"] = "Mises-à-jour";
$a->strings["everybody"] = "tout le monde";
$a->strings["Account settings"] = "Compte";
$a->strings["Additional features"] = "Fonctions supplémentaires";
$a->strings["Display settings"] = "Affichage";
$a->strings["Connector settings"] = "Connecteurs";
$a->strings["Plugin settings"] = "Extensions";
$a->strings["Display"] = "Afficher";
$a->strings["Social Networks"] = "Réseaux sociaux";
$a->strings["Delegations"] = "Délégations";
$a->strings["Connected apps"] = "Applications connectées";
$a->strings["Export personal data"] = "Exporter";
$a->strings["Remove account"] = "Supprimer le compte";
@ -805,12 +809,12 @@ $a->strings["Features updated"] = "Fonctionnalités mises à jour";
$a->strings["Relocate message has been send to your contacts"] = "";
$a->strings["Passwords do not match. Password unchanged."] = "Les mots de passe ne correspondent pas. Aucun changement appliqué.";
$a->strings["Empty passwords are not allowed. Password unchanged."] = "Les mots de passe vides sont interdits. Aucun changement appliqué.";
$a->strings["Wrong password."] = "";
$a->strings["Wrong password."] = "Mauvais mot de passe.";
$a->strings["Password changed."] = "Mots de passe changés.";
$a->strings["Password update failed. Please try again."] = "Le changement de mot de passe a échoué. Merci de recommencer.";
$a->strings[" Please use a shorter name."] = " Merci d'utiliser un nom plus court.";
$a->strings[" Name too short."] = " Nom trop court.";
$a->strings["Wrong Password"] = "";
$a->strings["Wrong Password"] = "Mauvais mot de passe";
$a->strings[" Not valid email."] = " Email invalide.";
$a->strings[" Cannot change to that email."] = " Impossible de changer pour cet email.";
$a->strings["Private forum has no privacy permissions. Using default privacy group."] = "Ce forum privé n'a pas de paramètres de vie privée. Utilisation des paramètres de confidentialité par défaut.";
@ -836,7 +840,6 @@ $a->strings["enabled"] = "activé";
$a->strings["disabled"] = "désactivé";
$a->strings["StatusNet"] = "StatusNet";
$a->strings["Email access is disabled on this site."] = "L'accès courriel est désactivé sur ce site.";
$a->strings["Connector Settings"] = "Connecteurs";
$a->strings["Email/Mailbox Setup"] = "Réglages de courriel/boîte à lettre";
$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "Si vous souhaitez communiquer avec vos contacts \"courriel\" (facultatif), merci de nous indiquer comment vous connecter à votre boîte.";
$a->strings["Last successful email check:"] = "Dernière vérification réussie des courriels:";
@ -859,8 +862,9 @@ $a->strings["Update browser every xx seconds"] = "Mettre-à-jour l'affichage tou
$a->strings["Minimum of 10 seconds, no maximum"] = "Délai minimum de 10 secondes, pas de maximum";
$a->strings["Number of items to display per page:"] = "Nombre déléments par page:";
$a->strings["Maximum of 100 items"] = "Maximum de 100 éléments";
$a->strings["Number of items to display per page when viewed from mobile device:"] = "";
$a->strings["Number of items to display per page when viewed from mobile device:"] = "Nombre d'éléments a afficher par page pour un appareil mobile";
$a->strings["Don't show emoticons"] = "Ne pas afficher les émoticônes (smileys grahiques)";
$a->strings["Don't show notices"] = "";
$a->strings["Infinite scroll"] = "";
$a->strings["Normal Account Page"] = "Compte normal";
$a->strings["This account is a normal personal profile"] = "Ce compte correspond à un profil normal, pour une seule personne (physique, généralement)";
@ -899,9 +903,9 @@ $a->strings["Password Settings"] = "Réglages de mot de passe";
$a->strings["New Password:"] = "Nouveau mot de passe:";
$a->strings["Confirm:"] = "Confirmer:";
$a->strings["Leave password fields blank unless changing"] = "Laissez les champs de mot de passe vierges, sauf si vous désirez les changer";
$a->strings["Current Password:"] = "";
$a->strings["Your current password to confirm the changes"] = "";
$a->strings["Password:"] = "";
$a->strings["Current Password:"] = "Mot de passe actuel:";
$a->strings["Your current password to confirm the changes"] = "Votre mot de passe actuel pour confirmer les modifications";
$a->strings["Password:"] = "Mot de passe:";
$a->strings["Basic Settings"] = "Réglages basiques";
$a->strings["Full Name:"] = "Nom complet:";
$a->strings["Email Address:"] = "Adresse courriel:";
@ -1011,7 +1015,7 @@ $a->strings["Group created."] = "Groupe créé.";
$a->strings["Could not create group."] = "Impossible de créer le groupe.";
$a->strings["Group not found."] = "Groupe introuvable.";
$a->strings["Group name changed."] = "Groupe renommé.";
$a->strings["Save Group"] = "";
$a->strings["Save Group"] = "Sauvegarder le groupe";
$a->strings["Create a group of contacts/friends."] = "Créez un groupe de contacts/amis.";
$a->strings["Group Name: "] = "Nom du groupe: ";
$a->strings["Group removed."] = "Groupe enlevé.";
@ -1093,7 +1097,7 @@ $a->strings["You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."] = "Vo
$a->strings["Upload Photos"] = "Téléverser des photos";
$a->strings["New album name: "] = "Nom du nouvel album: ";
$a->strings["or existing album name: "] = "ou nom d'un album existant: ";
$a->strings["Do not show a status post for this upload"] = "Ne pas publier de notice pour cet envoi";
$a->strings["Do not show a status post for this upload"] = "Ne pas publier de notice de statut pour cet envoi";
$a->strings["Permissions"] = "Permissions";
$a->strings["Private Photo"] = "Photo privée";
$a->strings["Public Photo"] = "Photo publique";
@ -1120,12 +1124,14 @@ $a->strings["Public photo"] = "Photo publique";
$a->strings["Share"] = "Partager";
$a->strings["View Album"] = "Voir l'album";
$a->strings["Recent Photos"] = "Photos récentes";
$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "Désolé, il semble que votre fichier est plus important que ce que la configuration de PHP autorise";
$a->strings["Or - did you try to upload an empty file?"] = "";
$a->strings["File exceeds size limit of %d"] = "La taille du fichier dépasse la limite de %d";
$a->strings["File upload failed."] = "Le téléversement a échoué.";
$a->strings["No videos selected"] = "";
$a->strings["View Video"] = "";
$a->strings["Recent Videos"] = "";
$a->strings["Upload New Videos"] = "";
$a->strings["No videos selected"] = "Pas de vidéo sélectionné";
$a->strings["View Video"] = "Regarder la vidéo";
$a->strings["Recent Videos"] = "Vidéos récente";
$a->strings["Upload New Videos"] = "Téléversé une nouvelle vidéo";
$a->strings["Poke/Prod"] = "Solliciter";
$a->strings["poke, prod or do other things to somebody"] = "solliciter (poke/...) quelqu'un";
$a->strings["Recipient"] = "Destinataire";
@ -1241,11 +1247,11 @@ $a->strings["Friend/Connect Request"] = "Demande de connexion/relation";
$a->strings["New Follower"] = "Nouvel abonné";
$a->strings["No introductions."] = "Aucune demande d'introduction.";
$a->strings["Notifications"] = "Notifications";
$a->strings["%s liked %s's post"] = "%s a aimé la notice de %s";
$a->strings["%s disliked %s's post"] = "%s n'a pas aimé la notice de %s";
$a->strings["%s liked %s's post"] = "%s a aimé le billet de %s";
$a->strings["%s disliked %s's post"] = "%s n'a pas aimé le billet de %s";
$a->strings["%s is now friends with %s"] = "%s est désormais ami(e) avec %s";
$a->strings["%s created a new post"] = "%s a publié une notice";
$a->strings["%s commented on %s's post"] = "%s a commenté une notice de %s";
$a->strings["%s created a new post"] = "%s a publié un billet";
$a->strings["%s commented on %s's post"] = "%s a commenté le billet de %s";
$a->strings["No more network notifications."] = "Aucune notification du réseau.";
$a->strings["Network Notifications"] = "Notifications du réseau";
$a->strings["No more personal notifications."] = "Aucun notification personnelle.";
@ -1298,8 +1304,9 @@ $a->strings["Categories"] = "Catégories";
$a->strings["Click here to upgrade."] = "Cliquez ici pour mettre à jour.";
$a->strings["This action exceeds the limits set by your subscription plan."] = "Cette action dépasse les limites définies par votre abonnement.";
$a->strings["This action is not available under your subscription plan."] = "Cette action n'est pas disponible avec votre abonnement.";
$a->strings["User not found."] = "";
$a->strings["There is no status with this id."] = "";
$a->strings["User not found."] = "Utilisateur non trouvé";
$a->strings["There is no status with this id."] = "Il n'y a pas de statut avec cet id.";
$a->strings["There is no conversation with this id."] = "Il n'y a pas de conversation avec cet id.";
$a->strings["view full size"] = "voir en pleine taille";
$a->strings["Starts:"] = "Débute:";
$a->strings["Finishes:"] = "Finit:";
@ -1340,8 +1347,8 @@ $a->strings["Send PM"] = "Message privé";
$a->strings["Poke"] = "Sollicitations (pokes)";
$a->strings["%s likes this."] = "%s aime ça.";
$a->strings["%s doesn't like this."] = "%s n'aime pas ça.";
$a->strings["<span %1\$s>%2\$d people</span> like this"] = "";
$a->strings["<span %1\$s>%2\$d people</span> don't like this"] = "";
$a->strings["<span %1\$s>%2\$d people</span> like this"] = "<span %1\$s>%2\$d personnes</span> aiment ça";
$a->strings["<span %1\$s>%2\$d people</span> don't like this"] = "<span %1\$s>%2\$d personnes</span> n'aiment pas ça";
$a->strings["and"] = "et";
$a->strings[", and %d other people"] = ", et %d autres personnes";
$a->strings["%s like this."] = "%s aiment ça.";
@ -1360,15 +1367,15 @@ $a->strings["Private post"] = "Message privé";
$a->strings["Logged out."] = "Déconnecté.";
$a->strings["Error decoding account file"] = "";
$a->strings["Error! No version data in file! This is not a Friendica account file?"] = "";
$a->strings["Error! Cannot check nickname"] = "";
$a->strings["User '%s' already exists on this server!"] = "";
$a->strings["Error! Cannot check nickname"] = "Erreur! Pseudo invalide";
$a->strings["User '%s' already exists on this server!"] = "L'utilisateur '%s' existe déjà sur ce serveur!";
$a->strings["User creation error"] = "Erreur de création d'utilisateur";
$a->strings["User profile creation error"] = "Erreur de création du profil utilisateur";
$a->strings["%d contact not imported"] = array(
0 => "%d contacts non importés",
1 => "%d contacts non importés",
);
$a->strings["Done. You can now login with your username and password"] = "";
$a->strings["Done. You can now login with your username and password"] = "Action réalisé. Vous pouvez désormais vous connecter avec votre nom d'utilisateur et votre mot de passe";
$a->strings["newer"] = "Plus récent";
$a->strings["older"] = "Plus ancien";
$a->strings["prev"] = "précédent";
@ -1457,6 +1464,9 @@ $a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s a posté sur
$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Notification] %s vous a repéré";
$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s vous parle sur %2\$s";
$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]vous a taggé[/url].";
$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notification] %s partage une nouvelle publication";
$a->strings["%1\$s shared a new post at %2\$s"] = "";
$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]partage une publication[/url].";
$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Notify] %1\$s vous a sollicité";
$a->strings["%1\$s poked you at %2\$s"] = "%1\$s vous a sollicité via %2\$s";
$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "%1\$s vous a [url=%2\$s]sollicité[/url].";
@ -1506,9 +1516,11 @@ $a->strings["Search site content"] = "Rechercher dans le contenu du site";
$a->strings["Conversations on this site"] = "Conversations ayant cours sur ce site";
$a->strings["Directory"] = "Annuaire";
$a->strings["People directory"] = "Annuaire des utilisateurs";
$a->strings["Information"] = "Information";
$a->strings["Information about this friendica instance"] = "Information au sujet de cette instance de friendica";
$a->strings["Conversations from your friends"] = "Conversations de vos amis";
$a->strings["Network Reset"] = "";
$a->strings["Load Network page with no filters"] = "";
$a->strings["Load Network page with no filters"] = "Chargement des pages du réseau sans filtre";
$a->strings["Friend Requests"] = "Demande d'amitié";
$a->strings["See all notifications"] = "Voir toute notification";
$a->strings["Mark all system notifications seen"] = "Marquer toutes les notifications système comme 'vues'";
@ -1517,7 +1529,7 @@ $a->strings["Inbox"] = "Messages entrants";
$a->strings["Outbox"] = "Messages sortants";
$a->strings["Manage"] = "Gérer";
$a->strings["Manage other pages"] = "Gérer les autres pages";
$a->strings["Delegations"] = "Délégations";
$a->strings["Account settings"] = "Compte";
$a->strings["Manage/Edit Profiles"] = "Gérer/Éditer les profiles";
$a->strings["Manage/edit friends and contacts"] = "Gérer/éditer les amitiés et contacts";
$a->strings["Site setup and configuration"] = "Démarrage et configuration du site";
@ -1540,7 +1552,8 @@ $a->strings["Love/Romance:"] = "Amour/Romance:";
$a->strings["Work/employment:"] = "Activité professionnelle/Occupation:";
$a->strings["School/education:"] = "Études/Formation:";
$a->strings["Image/photo"] = "Image/photo";
$a->strings["<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a href=\"%s\" target=\"external-link\">post</a>"] = "<span><a href=\"%s\" target=\"external-link\">%s</a> a écris le <a href=\"%s\" target=\"external-link\">post</a> suivant";
$a->strings["<span><a href=\"%s\" target=\"_blank\">%s</a> wrote the following <a href=\"%s\" target=\"_blank\">post</a>"] = "";
$a->strings["<span><b>"] = "";
$a->strings["$1 wrote:"] = "$1 a écrit:";
$a->strings["Encrypted content"] = "Contenu chiffré";
$a->strings["Unknown | Not categorised"] = "Inconnu | Non-classé";
@ -1558,8 +1571,10 @@ $a->strings["LinkedIn"] = "LinkedIn";
$a->strings["XMPP/IM"] = "XMPP/IM";
$a->strings["MySpace"] = "MySpace";
$a->strings["Google+"] = "Google+";
$a->strings["pump.io"] = "";
$a->strings["Twitter"] = "";
$a->strings["pump.io"] = "pump.io";
$a->strings["Twitter"] = "Twitter";
$a->strings["Diaspora Connector"] = "Connecteur Diaspora";
$a->strings["Statusnet"] = "Statusnet";
$a->strings["Miscellaneous"] = "Divers";
$a->strings["year"] = "an";
$a->strings["month"] = "mois";
@ -1583,19 +1598,21 @@ $a->strings["Happy Birthday %s"] = "Joyeux anniversaire, %s !";
$a->strings["General Features"] = "Fonctions générales";
$a->strings["Multiple Profiles"] = "Profils multiples";
$a->strings["Ability to create multiple profiles"] = "Possibilité de créer plusieurs profils";
$a->strings["Post Composition Features"] = "";
$a->strings["Post Composition Features"] = "Caractéristiques de composition de publication";
$a->strings["Richtext Editor"] = "Éditeur de texte enrichi";
$a->strings["Enable richtext editor"] = "Activer l'éditeur de texte enrichi";
$a->strings["Post Preview"] = "";
$a->strings["Allow previewing posts and comments before publishing them"] = "";
$a->strings["Network Sidebar Widgets"] = "";
$a->strings["Post Preview"] = "Aperçu du billet";
$a->strings["Allow previewing posts and comments before publishing them"] = "Permet la prévisualisation des billets et commentaires avant de les publier";
$a->strings["Auto-mention Forums"] = "";
$a->strings["Add/remove mention when a fourm page is selected/deselected in ACL window."] = "";
$a->strings["Network Sidebar Widgets"] = "Widgets réseau pour barre latérale";
$a->strings["Search by Date"] = "Rechercher par Date";
$a->strings["Ability to select posts by date ranges"] = "";
$a->strings["Group Filter"] = "";
$a->strings["Ability to select posts by date ranges"] = "Capacité de sélectionner les billets par intervalles de dates";
$a->strings["Group Filter"] = "Filtre de groupe";
$a->strings["Enable widget to display Network posts only from selected group"] = "";
$a->strings["Network Filter"] = "";
$a->strings["Network Filter"] = "Filtre de réseau";
$a->strings["Enable widget to display Network posts only from selected network"] = "";
$a->strings["Save search terms for re-use"] = "";
$a->strings["Save search terms for re-use"] = "Sauvegarder la recherche pour une utilisation ultérieure";
$a->strings["Network Tabs"] = "";
$a->strings["Network Personal Tab"] = "";
$a->strings["Enable tab to display only Network posts that you've interacted on"] = "";
@ -1603,18 +1620,18 @@ $a->strings["Network New Tab"] = "";
$a->strings["Enable tab to display only new Network posts (from the last 12 hours)"] = "";
$a->strings["Network Shared Links Tab"] = "";
$a->strings["Enable tab to display only Network posts with links in them"] = "";
$a->strings["Post/Comment Tools"] = "";
$a->strings["Multiple Deletion"] = "";
$a->strings["Post/Comment Tools"] = "outils de publication/commentaire";
$a->strings["Multiple Deletion"] = "Suppression multiple";
$a->strings["Select and delete multiple posts/comments at once"] = "";
$a->strings["Edit Sent Posts"] = "";
$a->strings["Edit Sent Posts"] = "Edité les publications envoyées";
$a->strings["Edit and correct posts and comments after sending"] = "";
$a->strings["Tagging"] = "";
$a->strings["Ability to tag existing posts"] = "";
$a->strings["Post Categories"] = "";
$a->strings["Add categories to your posts"] = "";
$a->strings["Tagging"] = "Tagger";
$a->strings["Ability to tag existing posts"] = "Autorisé à tagger des publications existantes";
$a->strings["Post Categories"] = "Catégories des publications";
$a->strings["Add categories to your posts"] = "Ajouter des catégories à vos publications";
$a->strings["Ability to file posts under folders"] = "";
$a->strings["Dislike Posts"] = "";
$a->strings["Ability to dislike posts/comments"] = "";
$a->strings["Dislike Posts"] = "N'aime pas";
$a->strings["Ability to dislike posts/comments"] = "Autorisé a ne pas aimer les publications/commentaires";
$a->strings["Star Posts"] = "";
$a->strings["Ability to mark special posts with a star indicator"] = "";
$a->strings["Sharing notification from Diaspora network"] = "Notification de partage du réseau Diaspora";
@ -1688,5 +1705,5 @@ $a->strings["It's complicated"] = "C'est compliqué";
$a->strings["Don't care"] = "S'en désintéresse";
$a->strings["Ask me"] = "Me demander";
$a->strings["stopped following"] = "retiré de la liste de suivi";
$a->strings["Drop Contact"] = "";
$a->strings["Drop Contact"] = "Supprimer le contact";
$a->strings["Cannot locate DNS info for database server '%s'"] = "Impossible de localiser les informations DNS pour le serveur de base de données '%s'";

View File

@ -62,3 +62,42 @@ span.connector {
.type-link img + br, .type-video img + br{
display: none;
}
/* Shared Messages */
.shared_header {
height: 32px;
color: #999;
border-top: 1px solid #D2D2D2;
padding-top: 5px;
margin-top: 5px;
}
.shared_header a {
color: black;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.shared_header a:hover {
color: #36c;
}
.shared_header img {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
float: left;
}
.shared_header span {
margin-left: 9px;
}
blockquote.shared_content {
margin-left: 32px;
color: #000;
border: none;
}

File diff suppressed because it is too large Load Diff

View File

@ -120,6 +120,7 @@ $a->strings["font size"] = "skriftstørrelse";
$a->strings["base font size for your interface"] = "standard skriftstørrelse i ditt brukergrensesnitt";
$a->strings["Set resize level for images in posts and comments (width and height)"] = "Angi størrelsesendringen for bilder i innlegg og kommentarer (bredde og høyde)";
$a->strings["Set theme width"] = "Angi temabredde";
$a->strings["Set style"] = "Angi stil";
$a->strings["Delete this item?"] = "Slett dette elementet?";
$a->strings["show fewer"] = "vis færre";
$a->strings["Update %s failed. See error logs."] = "Oppdatering %s mislyktes. Se feilloggene.";
@ -418,6 +419,7 @@ $a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] =
$a->strings["Site settings updated."] = "Nettstedets innstillinger er oppdatert.";
$a->strings["No special theme for mobile devices"] = "Ikke eget tema for mobile enheter";
$a->strings["Never"] = "Aldri";
$a->strings["At post arrival"] = "Ved mottak av innlegg";
$a->strings["Frequently"] = "Ofte";
$a->strings["Hourly"] = "Hver time";
$a->strings["Twice daily"] = "To ganger daglig";
@ -498,7 +500,7 @@ $a->strings["Use PHP UTF8 regular expressions"] = "Bruk PHP UTF8 regulære uttry
$a->strings["Show Community Page"] = "Vis Felleskap-side";
$a->strings["Display a Community page showing all recent public postings on this site."] = "Vis en Fellesskapsside som viser de siste offentlige meldinger på dette nettstedet.";
$a->strings["Enable OStatus support"] = "Aktiver Ostatus-støtte";
$a->strings["Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Tilby innebygget OStatus-kompatibilitet (identi.ca, status.net, etc.). All kommunikasjon via OStatus er offentlig, så personvernadvarsler vil bli vist av og til.";
$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Tilby innebygget Ostatus-samhandling (StatusNet, GNU Social osv.). All kommunikasjon via OStatus er offentlig, så advarsler om personvern vil bli vist av og til.";
$a->strings["OStatus conversation completion interval"] = "OStatus intervall for samtalefullførelse";
$a->strings["How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."] = "Hvor ofte skal spørrefunksjonen sjekke etter nye oppføringer i OStatus-samtaler? Dette kan være en svært ressurskrevende oppgave.";
$a->strings["Enable Diaspora support"] = "Aktiver Diaspora-støtte";
@ -769,6 +771,9 @@ $a->strings["Currently ignored"] = "Ignorert nå";
$a->strings["Currently archived"] = "For øyeblikket arkivert";
$a->strings["Hide this contact from others"] = "Skjul denne kontakten for andre";
$a->strings["Replies/likes to your public posts <strong>may</strong> still be visible"] = "Svar/liker til dine offentlige innlegg <strong>kan</strong> fortsatt være synlige";
$a->strings["Notification for new posts"] = "Varsling om nye innlegg";
$a->strings["Send a notification of every new post of this contact"] = "Send et varsel ved hvert nytt innlegg fra denne kontakten";
$a->strings["Fetch further information for feeds"] = "Hent ytterligere informasjon til strømmer";
$a->strings["Suggestions"] = "Forslag";
$a->strings["Suggest potential friends"] = "Foreslå mulige venner";
$a->strings["All Contacts"] = "Alle kontakter";
@ -790,11 +795,10 @@ $a->strings["Edit contact"] = "Endre kontakt";
$a->strings["Search your contacts"] = "Søk i dine kontakter";
$a->strings["Update"] = "Oppdater";
$a->strings["everybody"] = "alle";
$a->strings["Account settings"] = "Kontoinnstillinger";
$a->strings["Additional features"] = "Tilleggsfunksjoner";
$a->strings["Display settings"] = "Visningsinnstillinger";
$a->strings["Connector settings"] = "Koblingsinnstillinger";
$a->strings["Plugin settings"] = "Tilleggsinnstillinger";
$a->strings["Display"] = "Vis";
$a->strings["Social Networks"] = "Sosiale nettverk";
$a->strings["Delegations"] = "Delegasjoner";
$a->strings["Connected apps"] = "Tilkoblede programmer";
$a->strings["Export personal data"] = "Eksporter personlige data";
$a->strings["Remove account"] = "Fjern konto";
@ -836,7 +840,6 @@ $a->strings["enabled"] = "aktivert";
$a->strings["disabled"] = "avskrudd";
$a->strings["StatusNet"] = "StatusNet";
$a->strings["Email access is disabled on this site."] = "E-posttilgang er avskrudd på dette stedet.";
$a->strings["Connector Settings"] = "Koblingsinnstillinger";
$a->strings["Email/Mailbox Setup"] = "E-post-/postboksinnstillinger";
$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "Hvis du ønsker å kommunisere med e-postkontakter via denne tjenesten (frivillig), vennligst oppgi hvordan din postboks kontaktes.";
$a->strings["Last successful email check:"] = "Siste vellykkede e-postsjekk:";
@ -861,6 +864,7 @@ $a->strings["Number of items to display per page:"] = "Antall elementer som vise
$a->strings["Maximum of 100 items"] = "Maksimum 100 elementer";
$a->strings["Number of items to display per page when viewed from mobile device:"] = "Antall elementer å vise per side ved visning på mobil enhet:";
$a->strings["Don't show emoticons"] = "Ikke vis uttrykksikoner";
$a->strings["Don't show notices"] = "Ikke vis varsler";
$a->strings["Infinite scroll"] = "Uendelig rulling";
$a->strings["Normal Account Page"] = "Vanlig konto-side";
$a->strings["This account is a normal personal profile"] = "Denne kontoen er en vanlig personlig profil";
@ -1120,6 +1124,8 @@ $a->strings["Public photo"] = "Offentlig bilde";
$a->strings["Share"] = "Del";
$a->strings["View Album"] = "Vis album";
$a->strings["Recent Photos"] = "Nye bilder";
$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "Beklager, din opplasting er kanskje større enn PHP-konfigurasjonen tillater";
$a->strings["Or - did you try to upload an empty file?"] = "Eller - forsøkte du å laste opp en tom fil?";
$a->strings["File exceeds size limit of %d"] = "Filstørrelsen er større enn begrensning på %d";
$a->strings["File upload failed."] = "Opplasting av filen mislyktes.";
$a->strings["No videos selected"] = "Ingen videoer er valgt";
@ -1300,6 +1306,7 @@ $a->strings["This action exceeds the limits set by your subscription plan."] = "
$a->strings["This action is not available under your subscription plan."] = "Denne handlingen er ikke tilgjengelig i henhold til din abonnementsplan.";
$a->strings["User not found."] = "Brukeren ble ikke funnet.";
$a->strings["There is no status with this id."] = "Det er ingen status tilknyttet denne id-en.";
$a->strings["There is no conversation with this id."] = "Det finnes ingen samtale med denne id-en.";
$a->strings["view full size"] = "Vis i full størrelse";
$a->strings["Starts:"] = "Starter:";
$a->strings["Finishes:"] = "Slutter:";
@ -1457,6 +1464,9 @@ $a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s skrev et innl
$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Notify] %s merket deg";
$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s merket deg %2\$s";
$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]merket deg[/url].";
$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notify] %s delte et nytt innlegg";
$a->strings["%1\$s shared a new post at %2\$s"] = "%1\$s delte et nytt innlegg på %2\$s";
$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]delte et innlegg[/url].";
$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Notify] %1\$s dyttet deg";
$a->strings["%1\$s poked you at %2\$s"] = "%1\$s dyttet deg %2\$s";
$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "%1\$s [url=%2\$s]dyttet deg[/url].";
@ -1506,6 +1516,8 @@ $a->strings["Search site content"] = "Søk i nettstedets innhold";
$a->strings["Conversations on this site"] = "Samtaler på dette nettstedet";
$a->strings["Directory"] = "Katalog";
$a->strings["People directory"] = "Personkatalog";
$a->strings["Information"] = "Informasjon";
$a->strings["Information about this friendica instance"] = "Informasjon om denne Friendica-instansen.";
$a->strings["Conversations from your friends"] = "Samtaler fra dine venner";
$a->strings["Network Reset"] = "Nettverk tilbakestilling";
$a->strings["Load Network page with no filters"] = "Hent Nettverk-siden uten filter";
@ -1517,7 +1529,7 @@ $a->strings["Inbox"] = "Innboks";
$a->strings["Outbox"] = "Utboks";
$a->strings["Manage"] = "Behandle";
$a->strings["Manage other pages"] = "Behandle andre sider";
$a->strings["Delegations"] = "Delegasjoner";
$a->strings["Account settings"] = "Kontoinnstillinger";
$a->strings["Manage/Edit Profiles"] = "Behandle/endre profiler";
$a->strings["Manage/edit friends and contacts"] = "Behandle/endre venner og kontakter";
$a->strings["Site setup and configuration"] = "Nettstedsoppsett og konfigurasjon";
@ -1540,7 +1552,8 @@ $a->strings["Love/Romance:"] = "Kjærlighet/romanse:";
$a->strings["Work/employment:"] = "Arbeid/ansatt hos:";
$a->strings["School/education:"] = "Skole/utdanning:";
$a->strings["Image/photo"] = "Bilde/fotografi";
$a->strings["<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a href=\"%s\" target=\"external-link\">post</a>"] = "<span><a href=\"%s\" target=\"external-link\">%s</a> skrev det følgende <a href=\"%s\" target=\"external-link\">innlegget</a>";
$a->strings["<span><a href=\"%s\" target=\"_blank\">%s</a> wrote the following <a href=\"%s\" target=\"_blank\">post</a>"] = "<span><a href=\"%s\" target=\"_blank\">%s</a> skrev følgende <a href=\"%s\" target=\"_blank\">innlegg</a>";
$a->strings["<span><b>"] = "<span><b>";
$a->strings["$1 wrote:"] = "$1 skrev:";
$a->strings["Encrypted content"] = "Kryptert innhold";
$a->strings["Unknown | Not categorised"] = "Ukjent | Ikke kategorisert";
@ -1560,6 +1573,8 @@ $a->strings["MySpace"] = "MySpace";
$a->strings["Google+"] = "Google+";
$a->strings["pump.io"] = "pump.io";
$a->strings["Twitter"] = "Twitter";
$a->strings["Diaspora Connector"] = "Diaspora-forbindelse";
$a->strings["Statusnet"] = "StatusNet";
$a->strings["Miscellaneous"] = "Diverse";
$a->strings["year"] = "år";
$a->strings["month"] = "måned";
@ -1588,6 +1603,8 @@ $a->strings["Richtext Editor"] = "Rik tekstredigering";
$a->strings["Enable richtext editor"] = "Skru på rik tekstredigering";
$a->strings["Post Preview"] = "Forhåndsvisning av innlegg";
$a->strings["Allow previewing posts and comments before publishing them"] = "Tillat forhåndsvisning av innlegg og kommentarer før publisering";
$a->strings["Auto-mention Forums"] = "Auto-nevning av forum";
$a->strings["Add/remove mention when a fourm page is selected/deselected in ACL window."] = "Legg til/fjern nevning når en forumside velges/ikke lenger velges i tilgangsstyringsvinduet/ACL-vinduet.";
$a->strings["Network Sidebar Widgets"] = "Småprogrammer i sidestolpen for Nettverk";
$a->strings["Search by Date"] = "Søk etter dato";
$a->strings["Ability to select posts by date ranges"] = "Mulighet for å velge innlegg etter datoområder";

View File

@ -3,8 +3,10 @@
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<h4>{{$user}}</h4>
{{include file="field_radio.tpl" field=$page_normal}}
{{include file="field_radio.tpl" field=$page_community}}
{{include file="field_radio.tpl" field=$page_prvgroup}}
{{include file="field_radio.tpl" field=$page_soapbox}}
{{include file="field_radio.tpl" field=$page_freelove}}
<h4>{{$community}}</h4>
{{include file="field_radio.tpl" field=$page_community}}
{{include file="field_radio.tpl" field=$page_prvgroup}}

View File

@ -1,9 +0,0 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$id}}" >
<a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
</div>
<div class="wall-item-delete-end"></div>

View File

@ -17,7 +17,14 @@
<div class="wall-item-title" id="wall-item-title-{{$id}}">{{$title}}</div>
<div class="wall-item-body" id="wall-item-body-{{$id}}" >{{$body}}</div>
</div>
{{$drop}}
{{if $drop.dropping }}
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$id}}" >
<a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
</div>
<div class="wall-item-delete-end"></div>
{{/if}}
<div class="wall-item-wrapper-end"></div>
<div class="wall-item-comment-separator"></div>
{{$comment}}

View File

@ -61,7 +61,7 @@
<h3>{{$importh}}</h3>
<div id ="import-profile">
<a href="/uimport">{{$importt}}</a>
<a href="uimport">{{$importt}}</a>
</div>
</form>

View File

@ -0,0 +1 @@
{{* Dummy file to avoid errors when installing themes *}}

View File

@ -486,6 +486,7 @@ header {
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
z-index: 110;
color: #ffffff;
}
@ -815,6 +816,7 @@ aside #profiles-menu {
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
}
#contact-block .contact-block-h4 {
float: left;
@ -896,6 +898,7 @@ aside #profiles-menu {
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
}
.widget h3 {
padding: 0px;
@ -1160,6 +1163,9 @@ section {
color: #2d2d2d;
border: 1px solid #2d2d2d;
}
.wall-item-comment-wrapper.photo {
margin: 1em 2em 1em 0px;
}
.threaded .wall-item-comment-wrapper {
margin-left: 0px;
}
@ -1174,6 +1180,7 @@ section {
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;

View File

@ -486,6 +486,7 @@ header {
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
z-index: 110;
color: #ffffff;
}
@ -815,6 +816,7 @@ aside #profiles-menu {
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
}
#contact-block .contact-block-h4 {
float: left;
@ -896,6 +898,7 @@ aside #profiles-menu {
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
}
.widget h3 {
padding: 0px;
@ -1160,6 +1163,9 @@ section {
color: #2d2d2d;
border: 1px solid #2d2d2d;
}
.wall-item-comment-wrapper.photo {
margin: 1em 2em 1em 0px;
}
.threaded .wall-item-comment-wrapper {
margin-left: 0px;
}
@ -1174,6 +1180,7 @@ section {
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;

View File

@ -486,6 +486,7 @@ header {
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
z-index: 110;
color: #ffffff;
}
@ -815,6 +816,7 @@ aside #profiles-menu {
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
}
#contact-block .contact-block-h4 {
float: left;
@ -896,6 +898,7 @@ aside #profiles-menu {
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
}
.widget h3 {
padding: 0px;
@ -1160,6 +1163,9 @@ section {
color: #2d2d2d;
border: 1px solid #2d2d2d;
}
.wall-item-comment-wrapper.photo {
margin: 1em 2em 1em 0px;
}
.threaded .wall-item-comment-wrapper {
margin-left: 0px;
}
@ -1174,6 +1180,7 @@ section {
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;

View File

@ -586,6 +586,10 @@ section {
color: @CommentBoxFullColor;
border: 1px solid @CommentBoxFullBorderColor;
}
&.photo {
margin: 1em 2em 1em 0px;
}
}
.threaded .wall-item-comment-wrapper { margin-left: 0px; }

View File

@ -1,6 +1 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-{{$id}}" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-{{$id}}" action="item" method="post" onsubmit="post_comment({{$id}}); return false;">
<input type="hidden" name="type" value="{{$type}}" />

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
{{$live_update}}
{{foreach $threads as $thread}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' />
<script language="javascript" type="text/javascript"
src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="fileas-sidebar" class="widget">
<h3>{{$title}}</h3>
<div id="nets-desc">{{$desc}}</div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="widget">
{{if $title}}<h3>{{$title}}</h3>{{/if}}
{{if $desc}}<div class="desc">{{$desc}}</div>{{/if}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="group-sidebar" class="widget">
<div class="title tool">
<h3 class="label">{{$title}}</h3>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<form id="profile-jot-form" action="{{$action}}" method="post">
<div id="jot">
<div id="profile-jot-desc" class="jothidden">&nbsp;</div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="wall-item-container {{$item.indent}}">
<div class="wall-item-item">
<div class="wall-item-info">

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="mail-display-subject">
<span class="{{if $thread_seen}}seen{{else}}unseen{{/if}}">{{$thread_subject}}</span>
<a href="message/dropconv/{{$thread_id}}" onclick="return confirmDelete();" title="{{$delete}}" class="mail-delete icon s22 delete"></a>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="mail-list-wrapper">
<span class="mail-subject {{if $seen}}seen{{else}}unseen{{/if}}"><a href="message/{{$id}}" class="mail-link">{{$subject}}</a></span>
<span class="mail-from">{{$from_name}}</span>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="message-sidebar" class="widget">
<div id="message-new" class="{{if $new.sel}}selected{{/if}}"><a href="{{$new.url}}">{{$new.label}}</a> </div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="nets-sidebar" class="widget">
<h3>{{$title}}</h3>
<div id="nets-desc">{{$desc}}</div>

View File

@ -0,0 +1,79 @@
<div class="wall-item-container {{$indent}}">
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper">
<a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$id}}">
<img src="{{$thumb}}" class="contact-photo{{$sparkle}}" id="wall-item-photo-{{$id}}" alt="{{$name}}" />
</a>
</div>
<div class="wall-item-location">{{$location}}</div>
</div>
<div class="wall-item-content">
{{if $title}}<h2><a href="{{$plink.href}}">{{$title}}</a></h2>{{/if}}
{{$body}}
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
</div>
<div class="wall-item-tags">
{{foreach $tags as $tag}}
<span class='tag'>{{$tag}}</span>
{{/foreach}}
</div>
</div>
<div class="wall-item-bottom">
<div class="">
{{if $plink}}<a class="icon s16 link" title="{{$plink.title}}" href="{{$plink.href}}">{{$plink.title}}</a>{{/if}}
</div>
<div class="wall-item-actions">
<div class="wall-item-actions-author">
<a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$sparkle}}">{{$name}}</span></a> <span class="wall-item-ago" title="{{$localtime}}">{{$ago}}</span>
</div>
<div class="wall-item-actions-social">
{{if $star}}
<a href="#" id="star-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
<a href="#" id="unstar-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
{{/if}}
{{if $vote}}
<a href="#" id="like-{{$id}}" title="{{$vote.like.0}}" onclick="dolike({{$id}},'like'); return false">{{$vote.like.1}}</a>
<a href="#" id="dislike-{{$id}}" title="{{$vote.dislike.0}}" onclick="dolike({{$id}},'dislike'); return false">{{$vote.dislike.1}}</a>
{{/if}}
{{if $vote.share}}
<a href="#" id="share-{{$id}}" title="{{$vote.share.0}}" onclick="jotShare({{$id}}); return false">{{$vote.share.1}}</a>
{{/if}}
</div>
<div class="wall-item-actions-tools">
{{if $drop.pagedrop}}
<input type="checkbox" title="{{$drop.select}}" name="itemselected[]" class="item-select" value="{{$id}}" />
{{/if}}
{{if $drop.dropping}}
<a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$drop.delete}}">{{$drop.delete}}</a>
{{/if}}
{{if $edpost}}
<a class="icon edit s16" href="{{$edpost.0}}" title="{{$edpost.1}}"></a>
{{/if}}
</div>
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-{{$id}}">{{$like}}</div>
<div class="wall-item-dislike" id="wall-item-dislike-{{$id}}">{{$dislike}}</div>
{{if $conv}}
<div class="wall-item-conv" id="wall-item-conv-{{$id}}" >
<a href='{{$conv.href}}' id='context-{{$id}}' title='{{$conv.title}}'>{{$conv.title}}</a>
</div>
{{/if}}
</div>
</div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="live-display"></div>
<h3 id="photo-album-title"><a href="{{$album.0}}">{{$album.1}}</a></h3>
@ -34,7 +29,8 @@
{{$dislike}}
</div>
{{/if}}
<div class="wall-item-comment-wrapper">
<div class="wall-item-comment-wrapper photo">
{{$comments}}
</div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="vcard">
<div class="tool">

View File

@ -1,9 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<h3>{{$header}}</h3>
<div id="prvmail-wrapper" >

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="saved-search-list" class="widget">
<h3 class="title">{{$title}}</h3>

View File

@ -1,9 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="wall-item-decor">
<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
{{if $item.lock}}<span class="icon s22 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
@ -89,8 +83,8 @@
{{if $item.conv}}
<div class="wall-item-conv" id="wall-item-conv-{{$item.id}}" >
<a href='{{$item.conv.href}}' id='context-{{$item.id}}' title='{{$item.conv.title}}'>{{$item.conv.title}}</a>
{{/if}}
</div>
{{/if}}
</div>

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<script src="{{$baseurl}}/view/theme/quattro/jquery.tools.min.js"></script>
{{include file="field_select.tpl" field=$color}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
{{$live_update}}
{{foreach $threads as $thread}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
{{if $mode == display}}
{{else}}
{{if $item.comment_firstcollapsed}}

View File

@ -1,8 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
{{if $mode == display}}
{{else}}
{{if $item.comment_firstcollapsed}}

View File

@ -1,96 +0,0 @@
// Quattro Theme LESS file
// "Echo" palette from Inkscape
@Yellow1 : #fce94f;
@Blue1:rgb(25,174,255);
@Blue2:rgb(0,132,200);
@Blue3:rgb(0,92,148);
@Red1:rgb(255,65,65);
@Red2:rgb(220,0,0);
@Red3:rgb(181,0,0);
@Orange1:rgb(255,255,62);
@Orange2:rgb(255,153,0);
@Orange3:rgb(255,102,0);
@Brown1:rgb(255,192,34);
@Brown2:rgb(184,129,0);
@Brown3:rgb(128,77,0);
@Green1:rgb(204,255,66);
@Green2:rgb(154,222,0);
@Green3:rgb(0,145,0);
@Purple1:rgb(241,202,255);
@Purple2:rgb(215,108,255);
@Purple3:rgb(186,0,255);
@Metalic1:rgb(189,205,212);
@Metalic2:rgb(158,171,176);
@Metalic3:rgb(54,78,89);
@Metalic4:rgb(14,35,46);
@Grey1:rgb(255,255,255);
@Grey2:rgb(204,204,204);
@Grey3:rgb(153,153,153);
@Grey4:rgb(102,102,102);
@Grey5:rgb(45,45,45);
// Theme colors
@BodyBackground: @Grey1;
@BodyColor: @Grey5;
@Link: @Blue3;
@LinkHover: @Blue3;
@LinkVisited: @Blue3;
@ButtonColor: @Grey1;
@ButtonBackgroundColor: @Grey5;
@Banner: @Grey1;
@NavbarBackground:@Metalic4;
@NavbarSelectedBg:@Metalic3;
@NavbarSelectedBorder: @Metalic2;
@NavbarNotifBg: @Blue1;
@Menu: @Grey5;
@MenuBg: @Grey1;
@MenuBorder: @Metalic3;
@MenuItem: @Grey5;
@MenuItemHoverBg: @Metalic1;
@MenuItemSeparator: @Metalic2;
@MenuEmpty: @Metalic2;
@MenuItemDetail: @Metalic2;
@AsideBorder: @Metalic1;
@AsideConnect: @Grey1;
@AsideConnectBg: @Blue3;
@AsideConnectHoverBg: @Blue1;
@VCardLabelColor: @Grey3;
@InfoColor: @Grey1;
@InfoBackgroundColor: @Metalic3;
@NoticeColor: @Grey1;
@NoticeBackgroundColor: #511919;
@ThreadBackgroundColor: #f6f7f8;
@ShinyBorderColor: @Yellow1;
@CommentBoxEmptyColor: @Grey3;
@CommentBoxEmptyBorderColor: @Grey3;
@CommentBoxFullColor: @Grey5;
@CommentBoxFullBorderColor: @Grey5;
@TagColor: @Grey1;
@JotToolsBackgroundColor: @Metalic4;
@JotToolsBorderColor: @Metalic2;
@JotToolsOverBackgroundColor: @Metalic3;
@JotToolsOverBorderColor: @Metalic1;
@JotToolsText: @Grey2;
@JotSubmitBackgroundColor: @Grey2;
@JotSubmitText: @Grey4;
@JotSubmitOverBackgroundColor: @Metalic1;
@JotSubmitOverText: @Grey4;
@JotPermissionUnlockBackgroundColor: @Grey2;
@JotPermissionLockBackgroundColor: @Grey4;
@JotLoadingBackgroundColor: @Grey1;
@JotPreviewBackgroundColor: @Yellow1;

View File

@ -1,59 +0,0 @@
// Quattro Theme LESS file
/* icons */
.icons(@size: 22) {
&.notify { background-image: url("../../../images/icons/@{size}/notify_off.png"); }
&.gear { background-image: url("../../../images/icons/@{size}/gear.png"); }
&.add { background-image: url("../../../images/icons/@{size}/add.png"); }
&.delete { background-image: url("../../../images/icons/@{size}/delete.png"); }
&.edit { background-image: url("../../../images/icons/@{size}/edit.png"); }
&.star { background-image: url("../../../images/icons/@{size}/star.png"); }
&.menu { background-image: url("../../../images/icons/@{size}/menu.png"); }
&.link { background-image: url("../../../images/icons/@{size}/link.png"); }
&.lock { background-image: url("../../../images/icons/@{size}/lock.png"); }
&.unlock { background-image: url("../../../images/icons/@{size}/unlock.png"); }
&.type-unkn { background-image: url("../../../images/icons/@{size}/zip.png"); }
&.type-audio{ background-image: url("../../../images/icons/@{size}/audio.png"); }
&.type-video{ background-image: url("../../../images/icons/@{size}/video.png"); }
&.type-image{ background-image: url("../../../images/icons/@{size}/image.png"); }
&.type-text { background-image: url("../../../images/icons/@{size}/text.png"); }
}
.icon {
background-color: transparent ;
background-repeat: no-repeat;
background-position: left center;
display: block;
overflow: hidden;
text-indent: -9999px;
padding: 1px;
&.text {
text-indent: 0px;
}
&.s10 {
min-width:10px; height: 10px;
.icons(10);
&.text { padding: 2px 0px 0px 15px; }
}
&.s16 {
min-width:16px; height: 16px;
.icons(16);
&.text { padding: 4px 0px 0px 20px; }
}
&.s22 {
min-width:22px; height: 22px;
.icons(22);
&.text { padding: 10px 0px 0px 25px; }
}
&.s48 {
width:48px; height: 48px;
.icons(48);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -233,44 +233,6 @@ div.pager {
float: left;
}
.shared_header {
height: 32px;
color: #999;
border-top: 1px solid #D2D2D2;
padding-top: 5px;
margin-top: 5px;
}
.shared_header a {
color: black;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.shared_header a:hover {
color: #36c;
}
.shared_header img {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
float: left;
}
.shared_header span {
margin-left: 9px;
}
blockquote.shared_content {
margin-left: 32px;
color: #000;
border: none;
}
#contact-edit-drop-link-end {
/* clear: both; */
}
@ -953,7 +915,7 @@ aside #profiles-menu {
}
aside #search-text, aside #side-follow-url, aside #side-peoplefind-url {
width: 150px;
width: 140px;
height: 17px;
padding-left: 10px;
/*border-top-left-radius: 15px;
@ -1352,6 +1314,7 @@ h2 {
width: calc(100% - 90px);
border-bottom: 1px solid hsl(198, 21%, 79%);
}
.wall-item-container.comment .wall-item-content {
max-width: 585px;
}
@ -1376,6 +1339,17 @@ h2 {
.wall-item-comment-wrapper {
margin: 1px 15px 1px 80px;
}
.wall-item-comment-wrapper.photo {
margin: 1px 15px 1px 0px;
}
.wall-item-comment-wrapper.photo .wall-item-container.comment {
margin-left: 0px;
width: 665px;
width: 100%;
border-bottom: 1px solid hsl(198, 21%, 79%);
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
}
@ -2318,7 +2292,13 @@ a.mail-list-link {
.vevent {
border: 1px solid #CCCCCC;
max-width: 600px;
position: relative;
margin-top: 4px;
margin-right: 4px;
margin-bottom: 15px;
}
.vevent .event-description, .vevent .event-location {
margin-left: 10px;
margin-right: 10px;

View File

@ -1,14 +0,0 @@
/**
* Fabio Comuni <http://kirgroup.com/profile/fabrixxm>
**/
// Less file http://lesscss.org/
// compile with lessc
// $ lessc style.less > style.css
@import "colors";
@import "icons";
@import "quattro";

View File

@ -112,7 +112,9 @@
<ul id="nav-notifications-template" style="display:none;" rel="template">
<li><a href="{0}"><img data-src="{1}">{2} <span class="notif-when">{3}</span></a></li>
</ul>
<!--
<div style="position: fixed; bottom: 61px; left: 220px;">{{$langselector}}</div>
-->
{{*
{{if $nav.logout}}<a id="nav-logout-link" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" >{{$nav.logout.1}}</a> {{/if}}

View File

@ -0,0 +1,78 @@
<div class="wall-item-container {{$indent}} {{$shiny}} ">
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper">
<a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$id}}">
<img src="{{$thumb}}" class="contact-photo{{$sparkle}}" id="wall-item-photo-{{$id}}" alt="{{$name}}" />
</a>
</div>
</div>
<div class="wall-item-actions-author">
<a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$sparkle}}">{{$name}}</span></a>
<span class="wall-item-ago">
{{if $plink}}<a class="link" title="{{$plink.title}}" href="{{$plink.href}}" style="color: #999">{{$ago}}</a>{{else}} {{$ago}} {{/if}}
{{if $lock}}<span class="fakelink" style="color: #999" onclick="lockview(event,{{$id}});">{{$lock}}</span> {{/if}}
</span>
</div>
<div class="wall-item-content">
{{if $title}}<h2><a href="{{$plink.href}}">{{$title}}</a></h2>{{/if}}
{{$body}}
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
</div>
<div class="wall-item-tags">
{{foreach $tags as $tag}}
<span class='tag'>{{$tag}}</span>
{{/foreach}}
</div>
</div>
<div class="wall-item-bottom">
<div class="">
<!-- {{if $plink}}<a title="{{$plink.title}}" href="{{$plink.href}}"><i class="icon-link icon-large"></i></a>{{/if}} -->
{{if $conv}}<a href='{{$conv.href}}' id='context-{{$id}}' title='{{$conv.title}}'><i class="icon-link icon-large"></i></a>{{/if}}
</div>
<div class="wall-item-actions">
<div class="wall-item-location">{{$location}}&nbsp;</div>
<div class="wall-item-actions-social">
{{if $star}}
<a href="#" id="star-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
<a href="#" id="unstar-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
{{/if}}
{{if $vote}}
<a href="#" id="like-{{$id}}" title="{{$vote.like.0}}" onclick="dolike({{$id}},'like'); return false">{{$vote.like.1}}</a>
<a href="#" id="dislike-{{$id}}" title="{{$vote.dislike.0}}" onclick="dolike({{$id}},'dislike'); return false">{{$vote.dislike.1}}</a>
{{/if}}
{{if $vote.share}}
<a href="#" id="share-{{$id}}" title="{{$vote.share.0}}" onclick="jotShare({{$id}}); return false">{{$vote.share.1}}</a>
{{/if}}
</div>
<div class="wall-item-actions-tools">
{{if $drop.pagedrop}}
<input type="checkbox" title="{{$drop.select}}" name="itemselected[]" class="item-select" value="{{$id}}" />
{{/if}}
{{if $drop.dropping}}
<a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$drop.delete}}">{{$drop.delete}}</a>
{{/if}}
{{if $edpost}}
<a class="icon edit s16" href="{{$edpost.0}}" title="{{$edpost.1}}"></a>
{{/if}}
</div>
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-{{$id}}">{{$like}}</div>
<div class="wall-item-dislike" id="wall-item-dislike-{{$id}}">{{$dislike}}</div>
</div>
</div>

View File

@ -0,0 +1,44 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div id="live-display"></div>
<h3><a href="{{$album.0}}">{{$album.1}}</a></h3>
<div id="photo-edit-link-wrap">
{{if $tools}}
<a id="photo-edit-link" href="{{$tools.edit.0}}">{{$tools.edit.1}}</a>
|
<a id="photo-toprofile-link" href="{{$tools.profile.0}}">{{$tools.profile.1}}</a>
{{/if}}
{{if $lock}} | <img src="images/lock_icon.gif" class="lockview" alt="{{$lock}}" onclick="lockview(event,'photo/{{$id}}');" /> {{/if}}
</div>
{{if $prevlink}}<div id="photo-prev-link"><a href="{{$prevlink.0}}">{{$prevlink.1}}</a></div>{{/if}}
<div id="photo-photo"><a href="{{$photo.href}}" title="{{$photo.title}}"><img src="{{$photo.src}}" /></a></div>
{{if $nextlink}}<div id="photo-next-link"><a href="{{$nextlink.0}}">{{$nextlink.1}}</a></div>{{/if}}
<div id="photo-photo-end"></div>
<div id="photo-caption">{{$desc}}</div>
{{if $tags}}
<div id="in-this-photo-text">{{$tags.0}}</div>
<div id="in-this-photo">{{$tags.1}}</div>
{{/if}}
{{if $tags.2}}<div id="tag-remove"><a href="{{$tags.2}}">{{$tags.3}}</a></div>{{/if}}
{{if $edit}}{{$edit}}{{/if}}
{{if $likebuttons}}
<div id="photo-like-div">
{{$likebuttons}}
{{$like}}
{{$dislike}}
</div>
{{/if}}
<div class="wall-item-comment-wrapper photo">
{{$comments}}
</div>
{{$paginate}}

File diff suppressed because it is too large Load Diff

View File

@ -118,6 +118,7 @@ $a->strings["font size"] = "字体尺寸";
$a->strings["base font size for your interface"] = "您的界面基础字体尺寸";
$a->strings["Set resize level for images in posts and comments (width and height)"] = "选择图片在文章和评论的重设尺寸(宽和高)";
$a->strings["Set theme width"] = "选择主题宽";
$a->strings["Set style"] = "选择款式";
$a->strings["Delete this item?"] = "删除这个项目?";
$a->strings["show fewer"] = "显示更小";
$a->strings["Update %s failed. See error logs."] = "更新%s美通过。看错误记录。";
@ -415,6 +416,7 @@ $a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] =
$a->strings["Site settings updated."] = "网站设置更新了。";
$a->strings["No special theme for mobile devices"] = "没专门适合手机的主题";
$a->strings["Never"] = "从未";
$a->strings["At post arrival"] = "收件的时候";
$a->strings["Frequently"] = "时常";
$a->strings["Hourly"] = "每小时";
$a->strings["Twice daily"] = "每日两次";
@ -495,7 +497,7 @@ $a->strings["Use PHP UTF8 regular expressions"] = "用PHP UTF8正则表达式";
$a->strings["Show Community Page"] = "表示社会页";
$a->strings["Display a Community page showing all recent public postings on this site."] = "表示社会页表明这网站所有最近公开的文章";
$a->strings["Enable OStatus support"] = "使OStatus支持可用";
$a->strings["Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "提供内装的OStatusidenti.ca, status.net, 等兼容。OStatus内什么通知是公开的所以偶尔隐私警告被表示。";
$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "提供OStatusStatusNetGNU Social兼容性。所有OStatus的交通是公开的所以私事警告偶尔来表示。";
$a->strings["OStatus conversation completion interval"] = "OStatus对话完成间隔";
$a->strings["How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."] = "喂器要多久查一次新文章在OStatus交流这会花许多系统资源。";
$a->strings["Enable Diaspora support"] = "使Diaspora支持能够";
@ -761,6 +763,9 @@ $a->strings["Currently ignored"] = "现在不理的";
$a->strings["Currently archived"] = "现在存档着";
$a->strings["Hide this contact from others"] = "隐藏这个熟人给别人";
$a->strings["Replies/likes to your public posts <strong>may</strong> still be visible"] = "回答/喜欢关您公开文章<strong>会</strong>还可见的";
$a->strings["Notification for new posts"] = "新消息提示";
$a->strings["Send a notification of every new post of this contact"] = "发提示在所有这个联络的新消息";
$a->strings["Fetch further information for feeds"] = "拿文源别的消息";
$a->strings["Suggestions"] = "建议";
$a->strings["Suggest potential friends"] = "建议潜在朋友们";
$a->strings["All Contacts"] = "所有的熟人";
@ -782,11 +787,10 @@ $a->strings["Edit contact"] = "编熟人";
$a->strings["Search your contacts"] = "搜索您的熟人";
$a->strings["Update"] = "更新";
$a->strings["everybody"] = "每人";
$a->strings["Account settings"] = "帐户配置";
$a->strings["Additional features"] = "附加的特点";
$a->strings["Display settings"] = "表示设置";
$a->strings["Connector settings"] = "插销设置";
$a->strings["Plugin settings"] = "插件设置";
$a->strings["Display"] = "显示";
$a->strings["Social Networks"] = "社会化网络";
$a->strings["Delegations"] = "代表";
$a->strings["Connected apps"] = "连接着应用";
$a->strings["Export personal data"] = "出口私人信息";
$a->strings["Remove account"] = "删除账户";
@ -828,7 +832,6 @@ $a->strings["enabled"] = "能够做的";
$a->strings["disabled"] = "使不能用";
$a->strings["StatusNet"] = "StatusNet";
$a->strings["Email access is disabled on this site."] = "这个网站没有邮件使用权";
$a->strings["Connector Settings"] = "连接器设置";
$a->strings["Email/Mailbox Setup"] = "邮件收件箱设置";
$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "如果您想用这股服务(可选的)跟邮件熟人交流,请指定怎么连通您的收件箱。";
$a->strings["Last successful email check:"] = "上个成功收件箱检查:";
@ -853,6 +856,7 @@ $a->strings["Number of items to display per page:"] = "每页表示多少项目
$a->strings["Maximum of 100 items"] = "最多100项目";
$a->strings["Number of items to display per page when viewed from mobile device:"] = "用手机看一页展示多少项目:";
$a->strings["Don't show emoticons"] = "别表示请表符号";
$a->strings["Don't show notices"] = "别表提示";
$a->strings["Infinite scroll"] = "无限的滚动";
$a->strings["Normal Account Page"] = "平常账户页";
$a->strings["This account is a normal personal profile"] = "这个帐户是正常私人简介";
@ -1111,6 +1115,8 @@ $a->strings["Public photo"] = "公开照相";
$a->strings["Share"] = "分享";
$a->strings["View Album"] = "看照片册";
$a->strings["Recent Photos"] = "最近的照片";
$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "不好意思可能你上传的是PHP设置允许的大";
$a->strings["Or - did you try to upload an empty file?"] = "或者,你是不是上传空的文件?";
$a->strings["File exceeds size limit of %d"] = "文件数目超过最多%d";
$a->strings["File upload failed."] = "文件上传失败。";
$a->strings["No videos selected"] = "没选择的视频";
@ -1289,6 +1295,7 @@ $a->strings["This action exceeds the limits set by your subscription plan."] = "
$a->strings["This action is not available under your subscription plan."] = "这个行动在您的订阅不可用的。";
$a->strings["User not found."] = "找不到用户";
$a->strings["There is no status with this id."] = "没有什么状态跟这个ID";
$a->strings["There is no conversation with this id."] = "没有这个ID的对话";
$a->strings["view full size"] = "看全尺寸";
$a->strings["Starts:"] = "开始:";
$a->strings["Finishes:"] = "结束:";
@ -1444,6 +1451,9 @@ $a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s放在[url=%2\
$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Notify] %s标签您";
$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s把您在%2\$s标签";
$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s[url=%2\$s]把您标签[/url].";
$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notify] %s分享新的消息";
$a->strings["%1\$s shared a new post at %2\$s"] = "%1\$s分享新的消息在%2\$s";
$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]分享一个消息[/url].";
$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Notify]您被%1\$s戳";
$a->strings["%1\$s poked you at %2\$s"] = "您被%1\$s戳在%2\$s";
$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "%1\$s[url=%2\$s]把您戳[/url]。";
@ -1493,6 +1503,8 @@ $a->strings["Search site content"] = "搜索网站内容";
$a->strings["Conversations on this site"] = "这个网站的交谈";
$a->strings["Directory"] = "名录";
$a->strings["People directory"] = "人物名录";
$a->strings["Information"] = "资料";
$a->strings["Information about this friendica instance"] = "资料关于这个Friendica服务器";
$a->strings["Conversations from your friends"] = "从你朋友们的交谈";
$a->strings["Network Reset"] = "网络重设";
$a->strings["Load Network page with no filters"] = "表示网络页无滤器";
@ -1504,7 +1516,7 @@ $a->strings["Inbox"] = "收件箱";
$a->strings["Outbox"] = "发件箱";
$a->strings["Manage"] = "代用户";
$a->strings["Manage other pages"] = "管理别的页";
$a->strings["Delegations"] = "代表";
$a->strings["Account settings"] = "帐户配置";
$a->strings["Manage/Edit Profiles"] = "管理/编辑简介";
$a->strings["Manage/edit friends and contacts"] = "管理/编朋友们和熟人们";
$a->strings["Site setup and configuration"] = "网站开办和配置";
@ -1527,7 +1539,8 @@ $a->strings["Love/Romance:"] = "爱情/浪漫";
$a->strings["Work/employment:"] = "工作";
$a->strings["School/education:"] = "学院/教育";
$a->strings["Image/photo"] = "图像/照片";
$a->strings["<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a href=\"%s\" target=\"external-link\">post</a>"] = "<span><a href=\"%s\" target=\"external-link\">%s</a>写了下面的<a href=\"%s\" target=\"external-link\">文章</a>";
$a->strings["<span><a href=\"%s\" target=\"_blank\">%s</a> wrote the following <a href=\"%s\" target=\"_blank\">post</a>"] = "<span><a href=\"%s\" target=\"_blank\">%s</a>写了下面的<a href=\"%s\" target=\"_blank\">消息</a>";
$a->strings["<span><b>"] = "<span><b>";
$a->strings["$1 wrote:"] = "$1写";
$a->strings["Encrypted content"] = "加密的内容";
$a->strings["Unknown | Not categorised"] = "未知的 |无分类";
@ -1547,6 +1560,8 @@ $a->strings["MySpace"] = "MySpace";
$a->strings["Google+"] = "Google+";
$a->strings["pump.io"] = "pump.io";
$a->strings["Twitter"] = "Twitter";
$a->strings["Diaspora Connector"] = "Diaspora连接";
$a->strings["Statusnet"] = "Statusnet";
$a->strings["Miscellaneous"] = "形形色色";
$a->strings["year"] = "";
$a->strings["month"] = "";
@ -1575,6 +1590,8 @@ $a->strings["Richtext Editor"] = "富文本格式编辑";
$a->strings["Enable richtext editor"] = "使富文本格式编辑可用";
$a->strings["Post Preview"] = "文章预演";
$a->strings["Allow previewing posts and comments before publishing them"] = "允许文章和评论出版前预演";
$a->strings["Auto-mention Forums"] = "自动提示论坛";
$a->strings["Add/remove mention when a fourm page is selected/deselected in ACL window."] = "添加删除提示论坛页选择淘汰在ACL窗户的时候。";
$a->strings["Network Sidebar Widgets"] = "网络工具栏小窗口";
$a->strings["Search by Date"] = "按日期搜索";
$a->strings["Ability to select posts by date ranges"] = "能按时期范围选择文章";

View File

@ -1,143 +0,0 @@
<?php
require_once('include/attach.php');
require_once('include/datetime.php');
function wall_attach_post(&$a) {
if($a->argc > 1) {
$nick = $a->argv[1];
$r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1",
dbesc($nick)
);
if(! count($r))
return;
}
else
return;
$can_post = false;
$visitor = 0;
$page_owner_uid = $r[0]['uid'];
$page_owner_cid = $r[0]['id'];
$page_owner_nick = $r[0]['nickname'];
$community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
if((local_user()) && (local_user() == $page_owner_uid))
$can_post = true;
else {
if($community_page && remote_user()) {
$cid = 0;
if(is_array($_SESSION['remote'])) {
foreach($_SESSION['remote'] as $v) {
if($v['uid'] == $page_owner_uid) {
$cid = $v['cid'];
break;
}
}
}
if($cid) {
$r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1",
intval($cid),
intval($page_owner_uid)
);
if(count($r)) {
$can_post = true;
$visitor = $cid;
}
}
}
}
if(! $can_post) {
notice( t('Permission denied.') . EOL );
killme();
}
if(! x($_FILES,'userfile'))
killme();
$src = $_FILES['userfile']['tmp_name'];
$filename = basename($_FILES['userfile']['name']);
$filesize = intval($_FILES['userfile']['size']);
$maxfilesize = get_config('system','maxfilesize');
/* Found html code written in text field of form,
* when trying to upload a file with filesize
* greater than upload_max_filesize. Cause is unknown.
* Then Filesize gets <= 0.
*/
if($filesize <=0) {
notice(t('Sorry, maybe your upload is bigger than the PHP configuration allows') . EOL .(t('Or - did you try to upload an empty file?')) . EOL);
@unlink($src);
killme();
}
if(($maxfilesize) && ($filesize > $maxfilesize)) {
notice( sprintf(t('File exceeds size limit of %d'), $maxfilesize) . EOL);
@unlink($src);
return;
}
$r = q("select sum(octet_length(data)) as total from attach where uid = %d ",
intval($page_owner_uid)
);
$limit = service_class_fetch($page_owner_uid,'attach_upload_limit');
if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
echo upgrade_message(true) . EOL ;
@unlink($src);
killme();
}
$filedata = @file_get_contents($src);
$mimetype = z_mime_content_type($filename);
$hash = random_string();
$created = datetime_convert();
$r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` )
VALUES ( %d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
intval($page_owner_uid),
dbesc($hash),
dbesc($filename),
dbesc($mimetype),
intval($filesize),
dbesc($filedata),
dbesc($created),
dbesc($created),
dbesc('<' . $page_owner_cid . '>'),
dbesc(''),
dbesc(''),
dbesc('')
);
@unlink($src);
if(! $r) {
echo ( t('File upload failed.') . EOL);
killme();
}
$r = q("SELECT `id` FROM `attach` WHERE `uid` = %d AND `created` = '%s' AND `hash` = '%s' LIMIT 1",
intval($page_owner_uid),
dbesc($created),
dbesc($hash)
);
if(! count($r)) {
echo ( t('File upload failed.') . EOL);
killme();
}
$lf = "\n";
echo $lf . $lf . '[attachment]' . $r[0]['id'] . '[/attachment]' . $lf;
killme();
// NOTREACHED
}