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

update to movim 20150910

This commit is contained in:
src386 2015-09-10 15:41:45 +02:00
parent 18a1bd2668
commit b165092e2b
67 changed files with 1094 additions and 923 deletions

View file

@ -7,11 +7,12 @@ Warning: BETA.
You need a valid SSL certificate to use Movim, auto-signed is not allowed. You need a valid SSL certificate to use Movim, auto-signed is not allowed.
Current Movim version : 0.9 git2015-08-25 Current Movim version : 0.9 git2015-09-10
**Changelog** **Changelog**
0.9b 2015-0 0.9b 2015-0
- Update to upstream Movim 0.9 git2015-09-10
- Add notes in README about public pods & whitelisting - Add notes in README about public pods & whitelisting
- script/install now check if path is empty. - script/install now check if path is empty.
- script/remove now delete /etc/php/fpm/pool.d/movim.conf (fix #8). - script/remove now delete /etc/php/fpm/pool.d/movim.conf (fix #8).

View file

@ -47,17 +47,9 @@ class MovimEmoji
} }
} }
/** function addUrls($string, $preview = false) {
* @desc Prepare the string (add the a to the links and show the smileys)
*
* @param string $string
* @param boolean display large emojis
* @param check the links and convert them to pictures (heavy)
* @return string
*/
function prepareString($string, $large = false, $preview = false) {
// Add missing links // Add missing links
$string = preg_replace_callback( return preg_replace_callback(
"/([\w\"'>]+\:\/\/[\w-?&;#+%:~=\.\/\@]+[\w\/])/", function ($match) use($preview) { "/([\w\"'>]+\:\/\/[\w-?&;#+%:~=\.\/\@]+[\w\/])/", function ($match) use($preview) {
if(!in_array(substr($match[0], 0, 1), array('>', '"', '\''))) { if(!in_array(substr($match[0], 0, 1), array('>', '"', '\''))) {
$content = $match[0]; $content = $match[0];
@ -84,6 +76,18 @@ function prepareString($string, $large = false, $preview = false) {
}, $string }, $string
); );
}
/**
* @desc Prepare the string (add the a to the links and show the smileys)
*
* @param string $string
* @param boolean display large emojis
* @param check the links and convert them to pictures (heavy)
* @return string
*/
function prepareString($string, $large = false, $preview = false) {
$string = addUrls($string, $preview);
// We remove all the style attributes // We remove all the style attributes
$string = preg_replace_callback( $string = preg_replace_callback(
@ -94,16 +98,7 @@ function prepareString($string, $large = false, $preview = false) {
// Twitter hashtags // Twitter hashtags
$string = preg_replace_callback( $string = preg_replace_callback(
"/ #[a-zA-Z0-9_-]{3,}/", function ($match) { "/ #[a-zA-Z0-9_-]{3,}/", function ($match) { return ' <a class="twitter hastag" href="http://twitter.com/search?q='. urlencode(trim($match[0])). '&src=hash" target="_blank">'. trim($match[0]). '</a>'; }, ' ' . $string);
return
' <a class="twitter hastag" href="http://twitter.com/search?q='.
urlencode(trim($match[0])).
'&src=hash" target="_blank">'.
trim($match[0]).
'</a>';
}, ' ' . $string
);
$string = preg_replace_callback( $string = preg_replace_callback(
"/ @[a-zA-Z0-9_-]{3,}/", function ($match) { "/ @[a-zA-Z0-9_-]{3,}/", function ($match) {
return return

View file

@ -2,31 +2,31 @@
namespace modl; namespace modl;
class Conference extends Model { class Conference extends Model {
public $jid; public $jid;
public $conference; protected $conference;
public $name; protected $name;
public $nick; protected $nick;
public $autojoin; public $autojoin;
public $status; public $status;
public function __construct() { public function __construct() {
$this->_struct = ' $this->_struct = '
{ {
"jid" : "jid" :
{"type":"string", "size":128, "mandatory":true, "key":true }, {"type":"string", "size":128, "mandatory":true, "key":true },
"conference" : "conference" :
{"type":"string", "size":128, "mandatory":true, "key":true }, {"type":"string", "size":128, "mandatory":true, "key":true },
"name" : "name" :
{"type":"string", "size":128, "mandatory":true }, {"type":"string", "size":128, "mandatory":true },
"nick" : "nick" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"autojoin" : "autojoin" :
{"type":"int", "size":1 }, {"type":"int", "size":1 },
"status" : "status" :
{"type":"int", "size":1 } {"type":"int", "size":1 }
}'; }';
parent::__construct(); parent::__construct();
} }
} }

View file

@ -31,7 +31,7 @@ class Config extends Model {
"loglevel" : "loglevel" :
{"type":"string", "size":16, "mandatory":true }, {"type":"string", "size":16, "mandatory":true },
"timezone" : "timezone" :
{"type":"string", "size":16, "mandatory":true }, {"type":"string", "size":32, "mandatory":true },
"xmppwhitelist" : "xmppwhitelist" :
{"type":"text" }, {"type":"text" },
"info" : "info" :
@ -50,7 +50,7 @@ class Config extends Model {
parent::__construct(); parent::__construct();
$this->description = __('global.description'); $this->description = 'Description';//__('global.description');
$this->theme = 'material'; $this->theme = 'material';
$this->locale = 'en'; $this->locale = 'en';
$this->maxusers = -1; $this->maxusers = -1;

View file

@ -2,6 +2,8 @@
namespace modl; namespace modl;
use Respect\Validation\Validator;
class Contact extends Model { class Contact extends Model {
public $jid; public $jid;
@ -158,37 +160,36 @@ class Contact extends Model {
} }
public function set($vcard, $jid) { public function set($vcard, $jid) {
$this->jid = \echapJid($jid); $this->__set('jid', \echapJid($jid));
$validate_date = Validator::date('Y-m-d');
if(isset($vcard->vCard->BDAY) if(isset($vcard->vCard->BDAY)
&& (string)$vcard->vCard->BDAY != '') && $validate_date->validate($vcard->vCard->BDAY))
$this->date = (string)$vcard->vCard->BDAY; $this->__set('date', (string)$vcard->vCard->BDAY);
else
$this->date = null;
$this->date = date(DATE_ISO8601, strtotime($this->date)); $this->__set('date', date(DATE_ISO8601, strtotime($this->date)));
$this->name = (string)$vcard->vCard->NICKNAME; $this->__set('name', (string)$vcard->vCard->NICKNAME);
$this->fn = (string)$vcard->vCard->FN; $this->__set('fn', (string)$vcard->vCard->FN);
$this->url = (string)$vcard->vCard->URL; $this->__set('url', (string)$vcard->vCard->URL);
$this->gender = (string)$vcard->vCard->{'X-GENDER'}; $this->__set('gender', (string)$vcard->vCard->{'X-GENDER'});
$this->marital = (string)$vcard->vCard->MARITAL->STATUS; $this->__set('marital', (string)$vcard->vCard->MARITAL->STATUS);
$this->email = (string)$vcard->vCard->EMAIL->USERID; $this->__set('email', (string)$vcard->vCard->EMAIL->USERID);
$this->adrlocality = (string)$vcard->vCard->ADR->LOCALITY; $this->__set('adrlocality', (string)$vcard->vCard->ADR->LOCALITY);
$this->adrpostalcode = (string)$vcard->vCard->ADR->PCODE; $this->__set('adrpostalcode', (string)$vcard->vCard->ADR->PCODE);
$this->adrcountry = (string)$vcard->vCard->ADR->CTRY; $this->__set('adrcountry', (string)$vcard->vCard->ADR->CTRY);
if(filter_var((string)$vcard->vCard->PHOTO, FILTER_VALIDATE_URL)) { if(filter_var((string)$vcard->vCard->PHOTO, FILTER_VALIDATE_URL)) {
$this->photobin = base64_encode( $this->__set('photobin', base64_encode(
requestUrl((string)$vcard->vCard->PHOTO, 1)); requestUrl((string)$vcard->vCard->PHOTO, 1)));
} else { } else {
$this->photobin = (string)$vcard->vCard->PHOTO->BINVAL; $this->__set('photobin', (string)$vcard->vCard->PHOTO->BINVAL);
} }
$this->description = (string)$vcard->vCard->DESC; $this->__set('description', (string)$vcard->vCard->DESC);
} }
public function createThumbnails() { public function createThumbnails() {
@ -250,32 +251,32 @@ class Contact extends Model {
} }
public function setTune($stanza) { public function setTune($stanza) {
$this->tuneartist = (string)$stanza->items->item->tune->artist; $this->__set('tuneartist', (string)$stanza->items->item->tune->artist);
$this->tunelenght = (int)$stanza->items->item->tune->lenght; $this->__set('tunelenght', (int)$stanza->items->item->tune->lenght);
$this->tunerating = (int)$stanza->items->item->tune->rating; $this->__set('tunerating', (int)$stanza->items->item->tune->rating);
$this->tunesource = (string)$stanza->items->item->tune->source; $this->__set('tunesource', (string)$stanza->items->item->tune->source);
$this->tunetitle = (string)$stanza->items->item->tune->title; $this->__set('tunetitle', (string)$stanza->items->item->tune->title);
$this->tunetrack = (string)$stanza->items->item->tune->track; $this->__set('tunetrack', (string)$stanza->items->item->tune->track);
} }
public function setVcard4($vcard) { public function setVcard4($vcard) {
if(isset($vcard->bday->date)) $validate_date = Validator::date('Y-m-d');
$this->date = (string)$vcard->bday->date; if(isset($vcard->bday->date)
if(empty($this->date)) && $validate_date->validate($vcard->bday->date))
$this->date = null; $this->__set('date', (string)$vcard->bday->date);
$this->name = (string)$vcard->nickname->text; $this->__set('name', (string)$vcard->nickname->text);
$this->fn = (string)$vcard->fn->text; $this->__set('fn', (string)$vcard->fn->text);
$this->url = (string)$vcard->url->uri; $this->__set('url', (string)$vcard->url->uri);
if(isset($vcard->gender)) if(isset($vcard->gender))
$this->gender = (string)$vcard->gender->sex->text; $this->__set('gender ', (string)$vcard->gender->sex->text);
if(isset($vcard->marital)) if(isset($vcard->marital))
$this->marital = (string)$vcard->marital->status->text; $this->__set('marital', (string)$vcard->marital->status->text);
$this->adrlocality = (string)$vcard->adr->locality; $this->__set('adrlocality', (string)$vcard->adr->locality);
$this->adrcountry = (string)$vcard->adr->country; $this->__set('adrcountry', (string)$vcard->adr->country);
$this->adrpostalcode = (string)$vcard->adr->code; $this->__set('adrpostalcode', (string)$vcard->adr->code);
if(isset($vcard->impp)) { if(isset($vcard->impp)) {
foreach($vcard->impp->children() as $c) { foreach($vcard->impp->children() as $c) {
@ -283,21 +284,20 @@ class Contact extends Model {
switch($key) { switch($key) {
case 'twitter' : case 'twitter' :
$this->twitter = str_replace('@', '', $value); $this->__set('twitter', str_replace('@', '', $value));
break; break;
case 'skype' : case 'skype' :
$this->skype = (string)$value; $this->__set('skype', (string)$value);
break; break;
case 'ymsgr' : case 'ymsgr' :
$this->yahoo = (string)$value; $this->__set('yahoo', (string)$value);
break; break;
} }
} }
} }
$this->email = (string)$vcard->email->text; $this->__set('email', (string)$vcard->email->text);
$this->__set('description', trim((string)$vcard->note->text));
$this->description = trim((string)$vcard->note->text);
} }
public function getPlace() { public function getPlace() {
@ -389,6 +389,26 @@ class Contact extends Model {
} }
} }
function getAlbum()
{
$uri = str_replace(
' ',
'%20',
'http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=80c1aa3abfa9e3d06f404a2e781e38f9&artist='.
$this->tuneartist.
'&album='.
$this->tunesource.
'&format=json'
);
$json = json_decode(requestURL($uri, 2));
if($json->album) {
$json->album->url = $json->album->image[2]->{'#text'};
return $json->album;
}
}
function toRoster() { function toRoster() {
return array( return array(
'jid' => $this->jid, 'jid' => $this->jid,

View file

@ -6,15 +6,15 @@ class Message extends Model {
public $session; public $session;
public $jidto; public $jidto;
public $jidfrom; public $jidfrom;
public $resource; protected $resource;
public $type; public $type;
public $subject; protected $subject;
public $thread; protected $thread;
public $body; protected $body;
public $html; protected $html;
public $published; public $published;
public $delivered; public $delivered;
@ -25,30 +25,30 @@ class Message extends Model {
{ {
$this->_struct = ' $this->_struct = '
{ {
"session" : "session" :
{"type":"string", "size":128, "mandatory":true }, {"type":"string", "size":128, "mandatory":true },
"jidto" : "jidto" :
{"type":"string", "size":128, "mandatory":true }, {"type":"string", "size":128, "mandatory":true },
"jidfrom" : "jidfrom" :
{"type":"string", "size":128, "mandatory":true }, {"type":"string", "size":128, "mandatory":true },
"resource" : "resource" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"type" : "type" :
{"type":"string", "size":20 }, {"type":"string", "size":20 },
"subject" : "subject" :
{"type":"text"}, {"type":"text"},
"thread" : "thread" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"body" : "body" :
{"type":"text"}, {"type":"text"},
"html" : "html" :
{"type":"text"}, {"type":"text"},
"published" : "published" :
{"type":"date"}, {"type":"date"},
"delivered" : "delivered" :
{"type":"date"} {"type":"date"}
}'; }';
parent::__construct(); parent::__construct();
} }
@ -66,15 +66,15 @@ class Message extends Model {
$this->jidfrom = $jid[0]; $this->jidfrom = $jid[0];
if(isset($jid[1])) if(isset($jid[1]))
$this->resource = $jid[1]; $this->__set('resource', $jid[1]);
$this->type = 'chat'; $this->type = 'chat';
if($stanza->attributes()->type) { if($stanza->attributes()->type) {
$this->type = (string)$stanza->attributes()->type; $this->type = (string)$stanza->attributes()->type;
} }
$this->body = (string)$stanza->body; $this->__set('body', (string)$stanza->body);
$this->subject = (string)$stanza->subject; $this->__set('subject', (string)$stanza->subject);
$images = (bool)($this->type == 'chat'); $images = (bool)($this->type == 'chat');
@ -83,9 +83,9 @@ class Message extends Model {
$this->html = \fixSelfClosing($this->html); $this->html = \fixSelfClosing($this->html);
$this->html = \prepareString($this->html, false, $images); $this->html = \prepareString($this->html, false, $images);
} else {*/ } else {*/
$this->html = \prepareString($this->body, false, $images); // $this->html = \prepareString($this->body, false, $images);
//} //}
if($stanza->delay) if($stanza->delay)
$this->published = gmdate('Y-m-d H:i:s', strtotime($stanza->delay->attributes()->stamp)); $this->published = gmdate('Y-m-d H:i:s', strtotime($stanza->delay->attributes()->stamp));
elseif($parent && $parent->delay) elseif($parent && $parent->delay)
@ -95,4 +95,15 @@ class Message extends Model {
$this->delivered = gmdate('Y-m-d H:i:s'); $this->delivered = gmdate('Y-m-d H:i:s');
} }
} }
public function convertEmojis()
{
$emoji = \MovimEmoji::getInstance();
$this->body = $emoji->replace($this->body);
}
public function addUrls()
{
$this->body = addUrls($this->body);
}
} }

View file

@ -109,33 +109,33 @@ class Postn extends Model {
else else
$entry = $item; $entry = $item;
$this->origin = $from; $this->__set('origin', $from);
if($node) if($node)
$this->node = $node; $this->__set('node', $node);
else else
$this->node = (string)$item->attributes()->node; $this->__set('node', (string)$item->attributes()->node);
$this->nodeid = (string)$entry->attributes()->id; $this->__set('nodeid', (string)$entry->attributes()->id);
if($entry->entry->id) if($entry->entry->id)
$this->nodeid = (string)$entry->entry->id; $this->__set('nodeid', (string)$entry->entry->id);
// Get some informations on the author // Get some informations on the author
if($entry->entry->author->name) if($entry->entry->author->name)
$this->aname = (string)$entry->entry->author->name; $this->__set('aname', (string)$entry->entry->author->name);
if($entry->entry->author->uri) if($entry->entry->author->uri)
$this->aid = substr((string)$entry->entry->author->uri, 5); $this->__set('aid', substr((string)$entry->entry->author->uri, 5));
if($entry->entry->author->email) if($entry->entry->author->email)
$this->aemail = (string)$entry->entry->author->email; $this->__set('aemail', (string)$entry->entry->author->email);
// Non standard support // Non standard support
if($entry->entry->source && $entry->entry->source->author->name) if($entry->entry->source && $entry->entry->source->author->name)
$this->aname = (string)$entry->entry->source->author->name; $this->__set('aname', (string)$entry->entry->source->author->name);
if($entry->entry->source && $entry->entry->source->author->uri) if($entry->entry->source && $entry->entry->source->author->uri)
$this->aid = substr((string)$entry->entry->source->author->uri, 5); $this->__set('aid', substr((string)$entry->entry->source->author->uri, 5));
$this->title = (string)$entry->entry->title; $this->__set('title', (string)$entry->entry->title);
// Content // Content
if($entry->entry->summary && (string)$entry->entry->summary != '') if($entry->entry->summary && (string)$entry->entry->summary != '')
@ -153,23 +153,22 @@ class Postn extends Model {
$content = $summary.$content; $content = $summary.$content;
if($entry->entry->updated) if($entry->entry->updated)
$this->updated = (string)$entry->entry->updated; $this->__set('updated', (string)$entry->entry->updated);
else else
$this->updated = gmdate(DATE_ISO8601); $this->__set('updated', gmdate(DATE_ISO8601));
if($entry->entry->published) if($entry->entry->published)
$this->published = (string)$entry->entry->published; $this->__set('published', (string)$entry->entry->published);
elseif($entry->entry->updated) elseif($entry->entry->updated)
$this->published = (string)$entry->entry->updated; $this->__set('published', (string)$entry->entry->updated);
else else
$this->published = gmdate(DATE_ISO8601); $this->__set('published', gmdate(DATE_ISO8601));
if($delay) if($delay)
$this->delay = $delay; $this->__set('delay', $delay);
$contentimg = $this->setAttachements($entry->entry->link); $contentimg = $this->setAttachements($entry->entry->link);
// Tags parsing // Tags parsing
if($entry->entry->category) { if($entry->entry->category) {
$this->tags = array(); $this->tags = array();
@ -183,22 +182,24 @@ class Postn extends Model {
} }
if(!empty($this->tags)) if(!empty($this->tags))
$this->tags = serialize($this->tags); $this->__set('tags', serialize($this->tags));
if($contentimg != '') if($contentimg != '')
$content .= '<br />'.$contentimg; $content .= '<br />'.$contentimg;
if(!isset($this->commentplace)) if(!isset($this->commentplace))
$this->commentplace = $this->origin; $this->__set('commentplace', $this->origin);
$this->content = trim($content); $this->__set('content', trim($content));
$this->contentcleaned = prepareString(html_entity_decode($this->content)); //$this->__set('contentcleaned', prepareString(html_entity_decode($this->content)));
$purifier = new \HTMLPurifier();
$this->contentcleaned = $purifier->purify(html_entity_decode($this->content));
if($entry->entry->geoloc) { if($entry->entry->geoloc) {
if($entry->entry->geoloc->lat != 0) if($entry->entry->geoloc->lat != 0)
$this->lat = (string)$entry->entry->geoloc->lat; $this->__set('lat', (string)$entry->entry->geoloc->lat);
if($entry->entry->geoloc->lon != 0) if($entry->entry->geoloc->lon != 0)
$this->lon = (string)$entry->entry->geoloc->lon; $this->__set('lon', (string)$entry->entry->geoloc->lon);
} }
} }

View file

@ -4,23 +4,23 @@ namespace Modl;
class Presence extends Model { class Presence extends Model {
protected $id; protected $id;
protected $session; protected $session;
protected $jid; protected $jid;
// General presence informations // General presence informations
protected $resource; protected $resource;
protected $value; protected $value;
protected $priority; protected $priority;
protected $status; protected $status;
// Client Informations // Client Informations
protected $node; protected $node;
protected $ver; protected $ver;
// Delay - XEP 0203 // Delay - XEP 0203
protected $delay; protected $delay;
// Last Activity - XEP 0256 // Last Activity - XEP 0256
protected $last; protected $last;
@ -33,84 +33,84 @@ class Presence extends Model {
// vcard-temp:x:update, not saved in the DB // vcard-temp:x:update, not saved in the DB
public $photo = false; public $photo = false;
public function __construct() { public function __construct() {
$this->_struct = ' $this->_struct = '
{ {
"id" : "id" :
{"type":"string", "size":128, "mandatory":true }, {"type":"string", "size":128, "mandatory":true },
"session" : "session" :
{"type":"string", "size":64, "mandatory":true, "key":true }, {"type":"string", "size":64, "mandatory":true, "key":true },
"jid" : "jid" :
{"type":"string", "size":64, "mandatory":true, "key":true }, {"type":"string", "size":64, "mandatory":true, "key":true },
"resource" : "resource" :
{"type":"string", "size":64, "key":true }, {"type":"string", "size":64, "key":true },
"value" : "value" :
{"type":"int", "size":11, "mandatory":true }, {"type":"int", "size":11, "mandatory":true },
"priority" : "priority" :
{"type":"int", "size":11 }, {"type":"int", "size":11 },
"status" : "status" :
{"type":"text"}, {"type":"text"},
"node" : "node" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"ver" : "ver" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"delay" : "delay" :
{"type":"date"}, {"type":"date"},
"last" : "last" :
{"type":"int", "size":11 }, {"type":"int", "size":11 },
"publickey" : "publickey" :
{"type":"text"}, {"type":"text"},
"muc" : "muc" :
{"type":"int", "size":1 }, {"type":"int", "size":1 },
"mucjid" : "mucjid" :
{"type":"string", "size":64 }, {"type":"string", "size":64 },
"mucaffiliation" : "mucaffiliation" :
{"type":"string", "size":32 }, {"type":"string", "size":32 },
"mucrole" : "mucrole" :
{"type":"string", "size":32 } {"type":"string", "size":32 }
}'; }';
parent::__construct(); parent::__construct();
} }
public function setPresence($stanza) { public function setPresence($stanza) {
$jid = explode('/',(string)$stanza->attributes()->from); $jid = explode('/',(string)$stanza->attributes()->from);
if($stanza->attributes()->to) if($stanza->attributes()->to)
$to = current(explode('/',(string)$stanza->attributes()->to)); $to = current(explode('/',(string)$stanza->attributes()->to));
else else
$to = $jid[0]; $to = $jid[0];
$this->session = $to; $this->__set('session', $to);
$this->jid = $jid[0]; $this->__set('jid', $jid[0]);
if(isset($jid[1])) if(isset($jid[1]))
$this->resource = $jid[1]; $this->__set('resource', $jid[1]);
else else
$this->resource = 'default'; $this->__set('resource', 'default');
$this->status = (string)$stanza->status; $this->__set('status', (string)$stanza->status);
if($stanza->c) { if($stanza->c) {
$this->node = (string)$stanza->c->attributes()->node; $this->__set('node', (string)$stanza->c->attributes()->node);
$this->ver = (string)$stanza->c->attributes()->ver; $this->__set('ver', (string)$stanza->c->attributes()->ver);
} }
if($stanza->priority) if($stanza->priority)
$this->priority = (string)$stanza->priority; $this->__set('priority', (string)$stanza->priority);
if((string)$stanza->attributes()->type == 'error') { if((string)$stanza->attributes()->type == 'error') {
$this->value = 6; $this->__set('value', 6);
} elseif((string)$stanza->attributes()->type == 'unavailable') { } elseif((string)$stanza->attributes()->type == 'unavailable') {
$this->value = 5; $this->__set('value', 5);
} elseif((string)$stanza->show == 'away') { } elseif((string)$stanza->show == 'away') {
$this->value = 2; $this->__set('value', 2);
} elseif((string)$stanza->show == 'dnd') { } elseif((string)$stanza->show == 'dnd') {
$this->value = 3; $this->__set('value', 3);
} elseif((string)$stanza->show == 'xa') { } elseif((string)$stanza->show == 'xa') {
$this->value = 4; $this->__set('value', 4);
} else { } else {
$this->value = 1; $this->__set('value', 1);
} }
// Specific XEP // Specific XEP
@ -118,41 +118,41 @@ class Presence extends Model {
foreach($stanza->children() as $name => $c) { foreach($stanza->children() as $name => $c) {
switch($c->attributes()->xmlns) { switch($c->attributes()->xmlns) {
case 'jabber:x:signed' : case 'jabber:x:signed' :
$this->publickey = (string)$c; $this->__set('publickey', (string)$c);
break; break;
case 'http://jabber.org/protocol/muc#user' : case 'http://jabber.org/protocol/muc#user' :
$this->muc = true; $this->__set('muc ', true);
if($c->item->attributes()->jid) if($c->item->attributes()->jid)
$this->mucjid = cleanJid((string)$c->item->attributes()->jid); $this->__set('mucjid', cleanJid((string)$c->item->attributes()->jid));
else else
$this->mucjid = (string)$stanza->attributes()->from; $this->__set('mucjid', (string)$stanza->attributes()->from);
$this->mucrole = (string)$c->item->attributes()->role; $this->__set('mucrole', (string)$c->item->attributes()->role);
$this->mucaffiliation = (string)$c->item->attributes()->affiliation; $this->__set('mucaffiliation', (string)$c->item->attributes()->affiliation);
break; break;
case 'vcard-temp:x:update' : case 'vcard-temp:x:update' :
$this->photo = true; $this->__set('photo', true);
break; break;
} }
} }
} }
if($stanza->delay) { if($stanza->delay) {
$this->delay = $this->__set('delay',
gmdate( gmdate(
'Y-m-d H:i:s', 'Y-m-d H:i:s',
strtotime( strtotime(
(string)$stanza->delay->attributes()->stamp (string)$stanza->delay->attributes()->stamp
) )
) )
; );
} }
if($stanza->query) { if($stanza->query) {
$this->last = (int)$stanza->query->attributes()->seconds; $this->__set('last', (int)$stanza->query->attributes()->seconds);
} }
} }
public function getPresence() { public function getPresence() {
$txt = array( $txt = array(
1 => 'online', 1 => 'online',
@ -162,7 +162,7 @@ class Presence extends Model {
5 => 'offline', 5 => 'offline',
6 => 'server_error' 6 => 'server_error'
); );
$arr = array(); $arr = array();
$arr['jid'] = $this->jid; $arr['jid'] = $this->jid;
$arr['resource'] = $this->resource; $arr['resource'] = $this->resource;
@ -172,7 +172,7 @@ class Presence extends Model {
$arr['status'] = $this->status; $arr['status'] = $this->status;
$arr['node'] = $this->node; $arr['node'] = $this->node;
$arr['ver'] = $this->ver; $arr['ver'] = $this->ver;
return $arr; return $arr;
} }

View file

@ -2,56 +2,57 @@
namespace modl; namespace modl;
class RosterLink extends Model { class RosterLink extends Model {
public $session; public $session;
public $jid; public $jid;
public $rostername; protected $rostername;
public $rosterask; public $rosterask;
public $rostersubscription; public $rostersubscription;
public $realname; protected $realname;
public $groupname; protected $groupname;
public $chaton; public $chaton;
public $publickey; public $publickey;
public function __construct() { public function __construct() {
$this->_struct = ' $this->_struct = '
{ {
"session" : "session" :
{"type":"string", "size":128, "mandatory":true, "key":true }, {"type":"string", "size":128, "mandatory":true, "key":true },
"jid" : "jid" :
{"type":"string", "size":128, "mandatory":true, "key":true }, {"type":"string", "size":128, "mandatory":true, "key":true },
"rostername" : "rostername" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"rosterask" : "rosterask" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"rostersubscription" : "rostersubscription" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"realname" : "realname" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"groupname" : "groupname" :
{"type":"string", "size":128 }, {"type":"string", "size":128 },
"chaton" : "chaton" :
{"type":"int", "size":11 } {"type":"int", "size":11 }
}'; }';
parent::__construct(); parent::__construct();
} }
function set($stanza) { function set($stanza) {
$this->jid = (string)$stanza->attributes()->jid; $this->jid = (string)$stanza->attributes()->jid;
if(isset($stanza->attributes()->name) && (string)$stanza->attributes()->name != '') if(isset($stanza->attributes()->name)
$this->rostername = (string)$stanza->attributes()->name; && (string)$stanza->attributes()->name != '')
$this->__set('rostername', (string)$stanza->attributes()->name);
else else
$this->rostername = (string)$stanza->attributes()->jid; $this->__set('rostername', (string)$stanza->attributes()->jid);
$this->rosterask = (string)$stanza->attributes()->ask; $this->__set('rosterask', (string)$stanza->attributes()->ask);
$this->rostersubscription = (string)$stanza->attributes()->subscription; $this->__set('rostersubscription', (string)$stanza->attributes()->subscription);
$this->groupname = (string)$stanza->group; $this->__set('groupname', (string)$stanza->group);
} }
} }

View file

@ -4,11 +4,11 @@ namespace modl;
class Subscription extends Model { class Subscription extends Model {
public $jid; public $jid;
public $server; protected $server;
public $node; protected $node;
public $subscription; protected $subscription;
public $subid; protected $subid;
public $title; protected $title;
public $description; public $description;
public $tags; public $tags;
public $timestamp; public $timestamp;
@ -40,13 +40,13 @@ class Subscription extends Model {
} }
function set($jid, $server, $node, $s) { function set($jid, $server, $node, $s) {
$this->jid = $jid; $this->__set('jid', $jid);
$this->server = $server; $this->__set('server', $server);
$this->node = $node; $this->__set('node', $node);
$this->jid = (string)$s->attributes()->jid; $this->__set('jid', (string)$s->attributes()->jid);
$this->subscription = (string)$s->attributes()->subscription; $this->__set('subscription', (string)$s->attributes()->subscription);
$this->subid = (string)$s->attributes()->subid; $this->__set('subid', (string)$s->attributes()->subid);
$this->tags = serialize(array()); $this->__set('tags', serialize(array()));
if($this->subid = '') if($this->subid = '')
$this->subid = 'default'; $this->subid = 'default';

View file

@ -5,6 +5,7 @@
<?php $this->widget('Tabs');?> <?php $this->widget('Tabs');?>
<?php $this->widget('About');?> <?php $this->widget('About');?>
<?php $this->widget('Help');?>
<?php $this->widget('Caps');?> <?php $this->widget('Caps');?>
</div> </div>
</section> </section>

View file

@ -11,8 +11,8 @@
<meta name="theme-color" content="#1C1D5B" /> <meta name="theme-color" content="#1C1D5B" />
<link rel="shortcut icon" href="<?php $this->linkFile('img/favicon.ico');?>" /> <link rel="shortcut icon" href="<?php $this->linkFile('img/favicon.ico');?>" />
<link rel="stylesheet" href="<?php echo BASE_URI; ?>app/assets/js/leaflet.css" /> <!--<link rel="stylesheet" href="<?php echo BASE_URI; ?>app/assets/js/leaflet.css" />
<script src="<?php echo BASE_URI; ?>app/assets/js/leaflet.js"></script> <script src="<?php echo BASE_URI; ?>app/assets/js/leaflet.js"></script>-->
<script src="<?php echo BASE_URI; ?>app/assets/js/favico.js"></script> <script src="<?php echo BASE_URI; ?>app/assets/js/favico.js"></script>
<!-- OTR --> <!-- OTR -->

View file

@ -20,7 +20,7 @@
<span class="icon bubble color purple"><i class="zmdi zmdi-flag"></i></span> <span class="icon bubble color purple"><i class="zmdi zmdi-flag"></i></span>
<span>{$c->__('about.translators')}</span> <span>{$c->__('about.translators')}</span>
<p> <p>
Thanks to all the translators <a href="https://translations.launchpad.net/movim">translations.launchpad.net/movim</a> {$c->__('about.translators_text')} <a href="https://www.transifex.com/projects/p/movim/">www.transifex.com/projects/p/movim/</a>
</p> </p>
</li> </li>
<li class="subheader">{$c->__('about.software')}</li> <li class="subheader">{$c->__('about.software')}</li>

View file

@ -1,8 +1,9 @@
[about] [about]
thanks = Thanks thanks = Thanks
developers = Developers developers = Developers
translators = Translators translators = Translators
software = Software translators_text = "Thanks to all the translators"
resources = Resources software = Software
api = API resources = Resources
info = Movim is an XMPP-based communication platform. All the project, except the following software and resources, is under api = API
info = Movim is an XMPP-based communication platform. All the project, except the following software and resources, is under

View file

@ -13,7 +13,7 @@ class Account extends WidgetBase
$this->addjs('account.js'); $this->addjs('account.js');
$this->registerEvent('register_changepassword_handle', 'onPasswordChanged'); $this->registerEvent('register_changepassword_handle', 'onPasswordChanged');
$this->registerEvent('register_remove_handle', 'onRemoved'); $this->registerEvent('register_remove_handle', 'onRemoved');
$this->registerEvent('register_get_handle', 'onRegister'); $this->registerEvent('register_get_handle', 'onRegister', 'account');
} }
function onPasswordChanged() function onPasswordChanged()

View file

@ -10,3 +10,7 @@ var Account = {
Presence_ajaxLogout(); Presence_ajaxLogout();
} }
} }
MovimWebsocket.attach(function() {
Notification.current('account');
});

View file

@ -9,12 +9,12 @@ class AccountNext extends WidgetBase {
{ {
$this->addjs('accountnext.js'); $this->addjs('accountnext.js');
$this->addcss('accountnext.css'); $this->addcss('accountnext.css');
$this->registerEvent('register_get_handle', 'onForm'); $this->registerEvent('register_get_handle', 'onForm');
$this->registerEvent('register_set_handle', 'onRegistered'); $this->registerEvent('register_set_handle', 'onRegistered');
$this->registerEvent('register_set_errorconflict', 'onRegisterError'); $this->registerEvent('register_set_errorconflict', 'onRegisterError', 'accountnext');
$this->registerEvent('register_set_errornotacceptable', 'onRegisterNotAcceptable'); $this->registerEvent('register_set_errornotacceptable', 'onRegisterNotAcceptable', 'accountnext');
$this->registerEvent('register_get_errorserviceunavailable', 'onServiceUnavailable'); $this->registerEvent('register_get_errorserviceunavailable', 'onServiceUnavailable', 'accountnext');
} }
function display() function display()
@ -35,7 +35,7 @@ class AccountNext extends WidgetBase {
switch($form->x->attributes()->xmlns) { switch($form->x->attributes()->xmlns) {
case 'jabber:x:data' : case 'jabber:x:data' :
$formview = $this->tpl(); $formview = $this->tpl();
$formh = $xtf->getHTML($form->x->asXML()); $formh = $xtf->getHTML($form->x->asXML());
$formview->assign('submitdata', $this->call('ajaxRegister', "movim_form_to_json('data')")); $formview->assign('submitdata', $this->call('ajaxRegister', "movim_form_to_json('data')"));
@ -47,13 +47,13 @@ class AccountNext extends WidgetBase {
case 'jabber:x:oob' : case 'jabber:x:oob' :
$oobview = $this->tpl(); $oobview = $this->tpl();
$oobview->assign('url', (string)$form->x->url); $oobview->assign('url', (string)$form->x->url);
$html = $oobview->draw('_accountnext_oob', true); $html = $oobview->draw('_accountnext_oob', true);
RPC::call('movim_fill', 'subscription_form', $html); RPC::call('movim_fill', 'subscription_form', $html);
break; break;
} }
} else{ } else{
$formh = $xtf->getHTML($form->asXML()); $formh = $xtf->getHTML($form->asXML());
} }
@ -65,9 +65,9 @@ class AccountNext extends WidgetBase {
$view = $this->tpl(); $view = $this->tpl();
$view->assign('url', (string)$form->x->url); $view->assign('url', (string)$form->x->url);
$html = $view->draw('_accountnext_registered', true); $html = $view->draw('_accountnext_registered', true);
RPC::call('movim_fill', 'subscription_form', $html); RPC::call('movim_fill', 'subscription_form', $html);
RPC::call('setUsername', $data->username->value); RPC::call('setUsername', $data->username->value);
} }
@ -77,12 +77,12 @@ class AccountNext extends WidgetBase {
$error = $package->content; $error = $package->content;
Notification::append(null, $error); Notification::append(null, $error);
} }
function onRegisterNotAcceptable() function onRegisterNotAcceptable()
{ {
Notification::append(null, $this->__('error.not_acceptable')); Notification::append(null, $this->__('error.not_acceptable'));
} }
function onServiceUnavailable() function onServiceUnavailable()
{ {
Notification::append(null, $this->__('error.service_unavailable')); Notification::append(null, $this->__('error.service_unavailable'));

View file

@ -12,10 +12,10 @@
</div> </div>
<input <input
class="button flat oppose" class="button oppose color"
type="submit" type="submit"
name="submit" name="submit"
value="{$c->__('button.submit')}" /> value="{$c->__('button.validate')}" />
</form> </form>
</li> </li>
</ul> </ul>

View file

@ -72,6 +72,8 @@ class AdminMain extends WidgetBase
$cd = new \Modl\ConfigDAO(); $cd = new \Modl\ConfigDAO();
$config = $cd->get(); $config = $cd->get();
$l = Locale::start();
$this->view->assign('conf', $cd->get()); $this->view->assign('conf', $cd->get());
$this->view->assign('logs', $this->view->assign('logs',
array( array(
@ -96,6 +98,6 @@ class AdminMain extends WidgetBase
} }
$this->view->assign('timezones', getTimezoneList()); $this->view->assign('timezones', getTimezoneList());
$this->view->assign('langs', loadLangArray()); $this->view->assign('langs', $l->getList());
} }
} }

View file

@ -155,7 +155,7 @@
<input <input
type="submit" type="submit"
class="button color green oppose" class="button color green oppose"
value="{$c->__('button.submit')}"/> value="{$c->__('button.save')}"/>
<div class="clear"></div> <div class="clear"></div>
</form> </form>
</div> </div>

View file

@ -46,7 +46,7 @@ class AdminTest extends WidgetBase
$config = $cd->get(); $config = $cd->get();
$this->view->assign('dbconnected', $md->_connected); $this->view->assign('dbconnected', $md->_connected);
$this->view->assign('dbtype', $supported[$conf['type']]); $this->view->assign('dbtype', $supported[$config->type]);
$this->view->assign('dbinfos', sizeof($md->check())); $this->view->assign('dbinfos', sizeof($md->check()));
$this->view->assign('websocketurl', $config->websocketurl); $this->view->assign('websocketurl', $config->websocketurl);
} }

View file

@ -34,10 +34,11 @@
</div> </div>
<ul> <ul>
<!--
<li class="subheader"> <li class="subheader">
{$c->__('compatibility.info')} {$c->__('compatibility.info')}
</li> </li>
-->
{if="$dbconnected"} {if="$dbconnected"}
{if="$dbinfos > 0"} {if="$dbinfos > 0"}
<li> <li>

View file

@ -93,17 +93,24 @@
</li> </li>
</ul> </ul>
</header> </header>
{$attachements = $value->getAttachements()}
<section> <section>
<content> <content>
{if="strlen($value->contentcleaned) < 500 && isset($attachements.pictures)"}
{loop="$attachements.pictures"}
<a href="{$value.href}" class="alternate" target="_blank">
<img class="big_picture" type="{$value.type}" src="{$value.href|urldecode}"/>
</a>
{/loop}
{/if}
{$value->contentcleaned} {$value->contentcleaned}
</content> </content>
</section> </section>
<footer> <footer>
{$attachements = $value->getAttachements()}
<ul class="middle divided spaced"> <ul class="middle divided spaced">
{if="isset($attachements.links)"} {if="isset($attachements.links)"}
{loop="$attachements.links"} {loop="$attachements.links"}
{if="substr($value.href, 0, 5) != 'xmpp:'"} {if="substr($value.href, 0, 5) != 'xmpp:' && filter_var($value.href, FILTER_VALIDATE_URL)"}
<li> <li>
<span class="icon"> <span class="icon">
<img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/> <img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/>
@ -132,7 +139,7 @@
{/loop} {/loop}
{/if} {/if}
</ul> </ul>
{if="isset($attachements.pictures)"} {if="strlen($value->contentcleaned) >= 500 && isset($attachements.pictures)"}
<ul class="flex middle"> <ul class="flex middle">
{loop="$attachements.pictures"} {loop="$attachements.pictures"}
<li class="block pic"> <li class="block pic">

View file

@ -30,10 +30,6 @@ class Bookmark extends WidgetBase
{ {
$this->addcss('bookmark.css'); $this->addcss('bookmark.css');
$this->registerEvent('bookmark', 'onBookmark'); $this->registerEvent('bookmark', 'onBookmark');
$this->registerEvent('bookmarkerror', 'onBookmarkError');
//$this->registerEvent('mucrole', 'onMucRole');
$this->registerEvent('groupsubscribed', 'onGroupSubscribed'); $this->registerEvent('groupsubscribed', 'onGroupSubscribed');
$this->registerEvent('groupunsubscribed', 'onGroupUnsubscribed'); $this->registerEvent('groupunsubscribed', 'onGroupUnsubscribed');
} }
@ -128,16 +124,6 @@ class Bookmark extends WidgetBase
RPC::call('movim_fill', 'bookmarks', $html); RPC::call('movim_fill', 'bookmarks', $html);
Notification::append(null, $this->__('bookmarks.updated')); Notification::append(null, $this->__('bookmarks.updated'));
} }
/*
function onMucRole($arr)
{
}
*/
function onBookmarkError($error)
{
Notification::append(null, $this->__('bookmarks.error').$error);
}
function ajaxGetBookmark() function ajaxGetBookmark()
{ {

View file

@ -253,7 +253,7 @@ class Chat extends WidgetBase
} }
$m->body = rawurldecode($message); $m->body = rawurldecode($message);
$m->html = prepareString($m->body, false, true); //$m->html = prepareString($m->body, false, true);
$m->published = gmdate('Y-m-d H:i:s'); $m->published = gmdate('Y-m-d H:i:s');
$m->delivered = gmdate('Y-m-d H:i:s'); $m->delivered = gmdate('Y-m-d H:i:s');
@ -265,7 +265,7 @@ class Chat extends WidgetBase
$p = new Publish; $p = new Publish;
$p->setTo($to); $p->setTo($to);
//$p->setHTML($m->html); //$p->setHTML($m->html);
$p->setContent(htmlspecialchars($m->body)); $p->setContent($m->body);
if($muc) { if($muc) {
$p->setMuc(); $p->setMuc();
@ -488,7 +488,10 @@ class Chat extends WidgetBase
if(isset($message->html)) { if(isset($message->html)) {
$message->body = $message->html; $message->body = $message->html;
} else { } else {
$message->body = prepareString(htmlentities($message->body , ENT_COMPAT,'UTF-8')); // We add some smileys...
$message->convertEmojis();
$message->addUrls();
// $message->body = prepareString(htmlentities($message->body , ENT_COMPAT,'UTF-8'));
} }
if($message->type == 'groupchat') { if($message->type == 'groupchat') {

View file

@ -77,7 +77,6 @@ var Chat = {
}; };
bubble.querySelector('span.user').innerHTML = message.resource; bubble.querySelector('span.user').innerHTML = message.resource;
var conversation = document.getElementById(id); var conversation = document.getElementById(id);
if(conversation) { if(conversation) {
conversation.appendChild(bubble); conversation.appendChild(bubble);
@ -110,6 +109,7 @@ var Chat = {
if(bubble) { if(bubble) {
bubble.querySelector('div.bubble div').innerHTML = message.body; bubble.querySelector('div.bubble div').innerHTML = message.body;
bubble.querySelector('div.bubble span.info').innerHTML = message.published; bubble.querySelector('div.bubble span.info').innerHTML = message.published;
movim_append(id, bubble.outerHTML); movim_append(id, bubble.outerHTML);

View file

@ -36,7 +36,9 @@ class Config extends WidgetBase
/* We load the user configuration */ /* We load the user configuration */
$this->user->reload(); $this->user->reload();
$view->assign('languages', loadLangArray()); $l = Locale::start();
$view->assign('languages', $l->getList());
$view->assign('me', $this->user->getLogin()); $view->assign('me', $this->user->getLogin());
$view->assign('conf', $this->user->getConfig()); $view->assign('conf', $this->user->getConfig());

View file

@ -271,26 +271,6 @@ class Contact extends WidgetBase
} }
} }
function getLastFM($contact)
{
$uri = str_replace(
' ',
'%20',
'http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=80c1aa3abfa9e3d06f404a2e781e38f9&artist='.
$contact->tuneartist.
'&album='.
$contact->tunesource.
'&format=json'
);
$json = json_decode(requestURL($uri, 2));
$img = $json->album->image[2]->{'#text'};
$url = $json->album->url;
return array($img, $url);
}
/** /**
* @brief Validate the jid * @brief Validate the jid
* *

View file

@ -131,14 +131,6 @@
</li> </li>
{/if} {/if}
{if="$contact->description != null && trim($contact->description) != ''"}
<li class="condensed block">
<span class="icon gray"><i class="zmdi zmdi-format-align-justify"></i></span>
<span>{$c->__('general.about')}</span>
<p class="all">{$contact->description}</p>
</li>
{/if}
{if="$contact->mood != null"} {if="$contact->mood != null"}
{$moods = unserialize($contact->mood)} {$moods = unserialize($contact->mood)}
<li class="condensed block"> <li class="condensed block">
@ -150,7 +142,16 @@
</p> </p>
</li> </li>
{/if} {/if}
{if="$contact->description != null && trim($contact->description) != ''"}
<li class="condensed block large">
<span class="icon gray"><i class="zmdi zmdi-format-align-justify"></i></span>
<span>{$c->__('general.about')}</span>
<p class="all">{$contact->description}</p>
</li>
{/if}
</ul> </ul>
<br />
{if="$blog != null"} {if="$blog != null"}
<ul class="active"> <ul class="active">
@ -171,26 +172,25 @@
</ul> </ul>
{/if} {/if}
{if="$contact->tuneartist || $contact->tunetitle"} {$album = $contact->getAlbum()}
{if="$album"}
<ul class="flex"> <ul class="flex">
<li class="subheader block large">{$c->__('general.tune')}</li> <li class="subheader block large">{$c->__('general.tune')}</li>
{$img_array = $c->getLastFM($contact)}
<li class=" <li class="
block block
{if="$contact->tunetitle"}condensed{/if} {if="$contact->tunetitle"}condensed{/if}
{if="isset($img_array[1]) && $img_array[1] != ''"} action{/if} action
"> ">
{if="isset($img_array[1]) && $img_array[1] != ''"}
<div class="action"> <div class="action">
<a href="{$img_array[1]}" target="_blank"> <a href="{$album->url}" target="_blank">
<i class="zmdi zmdi-radio"></i> <i class="zmdi zmdi-radio"></i>
</a> </a>
</div> </div>
{/if}
<span class="icon bubble"> <span class="icon bubble">
{if="isset($img_array[0]) && $img_array[0] != ''"} {if="isset($album->url)"}
<img src="{$img_array[0]}"/> <img src="{$album->url}"/>
{else} {else}
<i class="zmdi zmdi-play-circle-fill"></i> <i class="zmdi zmdi-play-circle-fill"></i>
{/if} {/if}
@ -203,7 +203,6 @@
{$contact->tunesource} {$contact->tunesource}
{/if} {/if}
</span> </span>
{if="$contact->tunetitle"} {if="$contact->tunetitle"}
<p>{$contact->tunetitle}</p> <p>{$contact->tunetitle}</p>
{/if} {/if}
@ -329,7 +328,7 @@
{/if} {/if}
{if="$contactr->rostersubscription == 'none'"} {if="$contactr->rostersubscription == 'none'"}
<span class="icon gray"> <span class="icon gray">
<i class="zmdi zmdi-do-not-disturb"></i> <i class="zmdi zmdi-block"></i>
</span> </span>
<span>{$c->__('subscription.nil')}</span> <span>{$c->__('subscription.nil')}</span>

View file

@ -196,10 +196,6 @@ class Group extends WidgetBase
$view->assign('node', $node); $view->assign('node', $node);
$html .= $view->draw('_group_publish', true); $html .= $view->draw('_group_publish', true);
$header = $this->prepareHeader($server, $node);
Header::fill($header);
RPC::call('MovimTpl.fill', '#group_widget.'.stringToUri($server.'_'.$node), $html); RPC::call('MovimTpl.fill', '#group_widget.'.stringToUri($server.'_'.$node), $html);
RPC::call('Group.enableVideos'); RPC::call('Group.enableVideos');
} }
@ -282,14 +278,14 @@ class Group extends WidgetBase
->request(); ->request();
} }
function ajaxGetSubscriptions($server, $node) function ajaxGetSubscriptions($server, $node, $notify = true)
{ {
if(!$this->validateServerNode($server, $node)) return; if(!$this->validateServerNode($server, $node)) return;
$r = new GetSubscriptions; $r = new GetSubscriptions;
$r->setTo($server) $r->setTo($server)
->setNode($node) ->setNode($node)
->setSync() ->setNotify($notify)
->request(); ->request();
} }

View file

@ -54,7 +54,7 @@
<li onclick="Group_ajaxGetConfig('{$item->server}', '{$item->node}')"> <li onclick="Group_ajaxGetConfig('{$item->server}', '{$item->node}')">
<span>{$c->__('group.configuration')}</span> <span>{$c->__('group.configuration')}</span>
</li> </li>
<li onclick="Group_ajaxGetSubscriptions('{$item->server}', '{$item->node}')"> <li onclick="Group_ajaxGetSubscriptions('{$item->server}', '{$item->node}', true)">
<span>{$c->__('group.subscriptions')}</span> <span>{$c->__('group.subscriptions')}</span>
</li> </li>
<li onclick="Group_ajaxDelete('{$item->server}', '{$item->node}')"> <li onclick="Group_ajaxDelete('{$item->server}', '{$item->node}')">

View file

@ -20,11 +20,13 @@
<span class="icon bubble color {$value->node|stringToColor}">{$value->node|firstLetterCapitalize}</span> <span class="icon bubble color {$value->node|stringToColor}">{$value->node|firstLetterCapitalize}</span>
{/if} {/if}
<h2> <h2>
{if="$value->title != null"} <a href="{$c->route('news', $value->nodeid)}">
{$value->title} {if="$value->title != null"}
{else} {$value->title}
{$c->__('post.default_title')} {else}
{/if} {$c->__('post.default_title')}
{/if}
</a>
</h2> </h2>
<p> <p>
{if="$value->getContact()->getTrueName() != ''"} {if="$value->getContact()->getTrueName() != ''"}
@ -47,7 +49,7 @@
<ul class="thin"> <ul class="thin">
{if="isset($attachements.links)"} {if="isset($attachements.links)"}
{loop="$attachements.links"} {loop="$attachements.links"}
{if="substr($value.href, 0, 5) != 'xmpp:'"} {if="substr($value.href, 0, 5) != 'xmpp:' && filter_var($value.href, FILTER_VALIDATE_URL)"}
<li> <li>
<span class="icon small"><img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/></span> <span class="icon small"><img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/></span>
<a href="{$value.href}" class="alternate" target="_blank"> <a href="{$value.href}" class="alternate" target="_blank">
@ -110,7 +112,9 @@
{/if} {/if}
<span class="info">{$value->published|strtotime|prepareDate}</span> <span class="info">{$value->published|strtotime|prepareDate}</span>
<span> <span>
{$value->getContact()->getTrueName()} <a href="{$c->route('contact', $value->getContact()->jid)}">
{$value->getContact()->getTrueName()}
</a>
</span> </span>
<p class="all"> <p class="all">
{$value->content} {$value->content}

View file

@ -10,7 +10,7 @@ var Groups = {
Group_ajaxGetItems(this.dataset.server, this.dataset.node); Group_ajaxGetItems(this.dataset.server, this.dataset.node);
Group_ajaxGetMetadata(this.dataset.server, this.dataset.node); Group_ajaxGetMetadata(this.dataset.server, this.dataset.node);
Group_ajaxGetAffiliations(this.dataset.server, this.dataset.node); Group_ajaxGetAffiliations(this.dataset.server, this.dataset.node);
//Group_ajaxGetSubscriptions(this.dataset.server, this.dataset.node); Group_ajaxGetSubscriptions(this.dataset.server, this.dataset.node, false);
Groups.reset(items); Groups.reset(items);
movim_add_class(this, 'active'); movim_add_class(this, 'active');
} }

View file

@ -32,7 +32,7 @@
<p>{$c->__('chatroom.button')}<br/>movim@conference.movim.eu</p> <p>{$c->__('chatroom.button')}<br/>movim@conference.movim.eu</p>
</li> </li>
</ul> </ul>
<!--
<div class="clear spacetop"></div> <div class="clear spacetop"></div>
<h2 class="padded_top_bottom">{$c->__('help.faq')}</h2> <h2 class="padded_top_bottom">{$c->__('help.faq')}</h2>
@ -71,5 +71,5 @@
</section> </section>
</article> </article>
</div> </div>-->
</div> </div>

View file

@ -24,9 +24,6 @@ wrong_account = Movim failed to authenticate. You entered wrong data
mechanism = Authentication mechanism not supported by Movim mechanism = Authentication mechanism not supported by Movim
fail_auth = The XMPP authentification failed fail_auth = The XMPP authentification failed
[account]
title = Accounts
[form] [form]
username = My address username = My address
password = Password password = Password
@ -34,6 +31,6 @@ create_one = Create one !
another_account = Another account another_account = Another account
no_account = No account yet ? no_account = No account yet ?
whitelist.info = You can login with accounts from theses servers whitelist.info = You can login with accounts from theses servers
connected = Connected connected = Connected
population = Population population = Population

View file

@ -23,7 +23,7 @@ var Login = {
Login.rememberSession(localStorage.username); Login.rememberSession(localStorage.username);
// A fallback security // A fallback security
setTimeout("MovimWebsocket.unregister()", 7000); setTimeout("MovimWebsocket.unregister()", 20000);
} }
}, },

View file

@ -8,7 +8,7 @@
<div id="form" class="dialog"> <div id="form" class="dialog">
<section> <section>
<span class="info">{$c->__('connected')} {$connected} / {$pop}</span> <span class="info">{$c->__('form.connected')} {$connected} / {$pop}</span>
<h3>{$c->__('page.login')}</h3> <h3>{$c->__('page.login')}</h3>
<form <form
data-action="{$submit}" data-action="{$submit}"

View file

@ -8,7 +8,7 @@
margin-right: 0.5em; margin-right: 0.5em;
border-radius: 1em; border-radius: 1em;
} }
/*
#notifs_widget.groupshown li:not(:first-child){ #notifs_widget.groupshown li:not(:first-child){
display: none; display: none;
} }
@ -24,3 +24,4 @@
content: "\f2c0"; content: "\f2c0";
display: inline-block; display: inline-block;
} }
*/

View file

@ -68,7 +68,7 @@
<ul class="middle divided spaced"> <ul class="middle divided spaced">
{if="isset($attachements.links)"} {if="isset($attachements.links)"}
{loop="$attachements.links"} {loop="$attachements.links"}
{if="substr($value.href, 0, 5) != 'xmpp:'"} {if="substr($value.href, 0, 5) != 'xmpp:' && filter_var($value.href, FILTER_VALIDATE_URL)"}
<li> <li>
<span class="icon"> <span class="icon">
<img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/> <img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/>

View file

@ -1,24 +1,12 @@
[post] [post]
news_feed = News Feed news_feed = News Feed
placeholder = Discover and register to the groups you are interested in placeholder = Discover and register to the groups you are interested in
preview = Preview
help = Help
help_more = More help
help_manual = Markdown syntax manual
title = Title
content = Content content = Content
link = Link
tags = Tags
valid_url = Please enter a valid url
no_content_preview = No content to preview
no_content = No content
published = Post published published = Post published
deleted = Post deleted deleted = Post deleted
gallery = This picture will be added to your gallery
hot = "What's Hot" hot = "What's Hot"
hot_text = Posts recently published in Groups that you are not subscribed (yet) hot_text = Posts recently published in Groups that you are not subscribed (yet)
new = New post new = New post
embed_tip = You can also use services like Imgur or Flickr to host your picture and paste the link here.
repost = This is a re-post from %s repost = This is a re-post from %s
repost_profile = See %s profile repost_profile = See %s profile

View file

@ -29,6 +29,7 @@ class Publish extends WidgetBase
function load() function load()
{ {
$this->addjs('publish.js'); $this->addjs('publish.js');
$this->addcss('publish.css');
$this->registerEvent('pubsub_postpublish_handle', 'onPublish'); $this->registerEvent('pubsub_postpublish_handle', 'onPublish');
$this->registerEvent('pubsub_testpostpublish_handle', 'onTestPublish'); $this->registerEvent('pubsub_testpostpublish_handle', 'onTestPublish');
$this->registerEvent('pubsub_testpostpublish_error', 'onTestPublishError'); $this->registerEvent('pubsub_testpostpublish_error', 'onTestPublishError');
@ -138,41 +139,47 @@ class Publish extends WidgetBase
{ {
RPC::call('Publish.disableSend'); RPC::call('Publish.disableSend');
if($form->content->value != '') { if($form->title->value != '') {
$content = Markdown::defaultTransform($form->content->value);
$p = new PostPublish; $p = new PostPublish;
$p->setFrom($this->user->getLogin()) $p->setFrom($this->user->getLogin())
->setTo($form->to->value) ->setTo($form->to->value)
->setContent($form->content->value) ->setTitle($form->title->value)
->setNode($form->node->value); ->setNode($form->node->value);
//->setLocation($geo) //->setLocation($geo)
//->enableComments() //->enableComments()
if($form->content->value != '') {
$p->setContent($form->content->value);
$content = Markdown::defaultTransform($form->content->value);
$p->setContentXhtml(rawurldecode($content));
}
// Still usefull ? Check line 44
if($form->node->value == 'urn:xmpp:microblog:0') { if($form->node->value == 'urn:xmpp:microblog:0') {
$p->enableComments(); $p->enableComments();
} }
if($form->title->value != '') {
$p->setTitle($form->title->value);
}
if($form->embed->value != '' && filter_var($form->embed->value, FILTER_VALIDATE_URL)) { if($form->embed->value != '' && filter_var($form->embed->value, FILTER_VALIDATE_URL)) {
$embed = Embed\Embed::create($form->embed->value); try {
$p->setLink($form->embed->value); $embed = Embed\Embed::create($form->embed->value);
$p->setLink($form->embed->value);
if($embed->type == 'photo') { if($embed->type == 'photo') {
$key = key($embed->images); $key = key($embed->images);
$p->setImage($embed->images[0]['value'], $embed->title, $embed->images[0]['mime']); $p->setImage($embed->images[0]['value'], $embed->title, $embed->images[0]['mime']);
} else { } else {
$content .= $this->prepareEmbed($embed); $content .= $this->prepareEmbed($embed);
}
} catch(Exception $e) {
error_log($e->getMessage());
} }
} }
$p->setContentXhtml(rawurldecode($content)) $p->request();
->request();
} else { } else {
RPC::call('Publish.enableSend'); RPC::call('Publish.enableSend');
Notification::append(false, $this->__('publish.no_content')); Notification::append(false, $this->__('publish.no_title'));
} }
} }
@ -185,15 +192,19 @@ class Publish extends WidgetBase
return; return;
} }
$embed = Embed\Embed::create($url); try {
$html = $this->prepareEmbed($embed); $embed = Embed\Embed::create($url);
$html = $this->prepareEmbed($embed);
if($embed->type == 'photo') { if($embed->type == 'photo') {
RPC::call('movim_fill', 'gallery', $this->prepareGallery($embed)); RPC::call('movim_fill', 'gallery', $this->prepareGallery($embed));
RPC::call('movim_fill', 'preview', ''); RPC::call('movim_fill', 'preview', '');
} else { } else {
RPC::call('movim_fill', 'preview', $html); RPC::call('movim_fill', 'preview', $html);
RPC::call('movim_fill', 'gallery', ''); RPC::call('movim_fill', 'gallery', '');
}
} catch(Exception $e) {
error_log($e->getMessage());
} }
} }

View file

@ -5,10 +5,7 @@
<input type="text" name="title" placeholder="{$c->__('post.title')}"> <input type="text" name="title" placeholder="{$c->__('post.title')}">
<label for="title">{$c->__('post.title')}</label> <label for="title">{$c->__('post.title')}</label>
</div> </div>
<div>
<textarea name="content" placeholder="{$c->__('post.content')}" onkeyup="movim_textarea_autoheight(this);"></textarea>
<label for="content">{$c->__('post.content')}</label>
</div>
<div> <div>
<input <input
type="url" type="url"
@ -25,6 +22,15 @@
</article> </article>
<div id="gallery"></div> <div id="gallery"></div>
</div> </div>
<div id="enable_content" onclick="Publish.enableContent();">
<input type="text" value="{$c->__('publish.add_text')}"/>
<label>{$c->__('publish.add_text_label')}</label>
</div>
<div id="content_field">
<textarea name="content" placeholder="{$c->__('post.content_text')}" onkeyup="movim_textarea_autoheight(this);"></textarea>
<label for="content">{$c->__('post.content_label')}</label>
</div>
<ul class="middle flex active"> <ul class="middle flex active">
{if="$c->supported('upload')"} {if="$c->supported('upload')"}

View file

@ -1,4 +1,4 @@
<q cite="{$embed->url}"> <div class="quote" cite="{$embed->url}">
<ul> <ul>
<li> <li>
<span> <span>
@ -17,4 +17,4 @@
</li> </li>
{/if} {/if}
</ul> </ul>
</q> </div>

View file

@ -5,22 +5,23 @@ preview = Preview
help = Help help = Help
help_more = More help help_more = More help
help_manual = Markdown syntax manual help_manual = Markdown syntax manual
title = Title content_label = Content
content = Content content_text = You can format your content using Markdown
link = Link link = Link
tags = Tags tags = Tags
published = Post published published = Post published
deleted = Post deleted deleted = Post deleted
gallery = This picture will be added to your gallery gallery = This picture will be added to your gallery
hot = "What's Hot"
embed_tip = You can also use services like Imgur or Flickr to host your picture and paste the link here. embed_tip = You can also use services like Imgur or Flickr to host your picture and paste the link here.
[publish] [publish]
valid_url = Please enter a valid url valid_url = Please enter a valid url
no_content_preview = No content to preview no_content_preview = No content to preview
no_content = No content no_title = Please provide a title
new = New post new = New post
title = Publish title = Publish
attach = Add a file or a picture to your post attach = Add a file or a picture to your post
no_publication = You cannot publish a post on this Group no_publication = You cannot publish a post on this Group
form_filled = Some fields have been filled in. Do you still want to go back and loose their content? form_filled = Some fields have been filled in. Do you still want to go back and loose their content?
add_text = Click here to add some text to your publication
add_text_label = Add some text

View file

@ -0,0 +1,13 @@
#post_widget #enable_content > * {
transition: opacity 0.3s ease;
cursor: pointer;
opacity: 0.3;
}
#post_widget #enable_content:hover > * {
opacity: 1;
}
#post_widget #content_field {
display: none;
}

View file

@ -23,6 +23,11 @@ var Publish = {
movim_add_class('#button_send', 'disabled'); movim_add_class('#button_send', 'disabled');
}, },
enableContent: function() {
document.querySelector('#enable_content').style.display = 'none';
document.querySelector('#content_field').style.display = 'block';
},
headerBack: function(server, node, ok) { headerBack: function(server, node, ok) {
// We check if the form is filled // We check if the form is filled
if(Publish.checkFilled() && ok == false) { if(Publish.checkFilled() && ok == false) {

View file

@ -16,6 +16,7 @@ class Rooms extends WidgetBase
$this->registerEvent('bookmark_set_handle', 'onBookmark'); $this->registerEvent('bookmark_set_handle', 'onBookmark');
$this->registerEvent('presence_muc_handle', 'onConnected'); $this->registerEvent('presence_muc_handle', 'onConnected');
$this->registerEvent('presence_unavailable_handle', 'onDisconnected'); $this->registerEvent('presence_unavailable_handle', 'onDisconnected');
$this->registerEvent('presence_muc_errorconflict', 'onConflict');
} }
function onBookmark() function onBookmark()
@ -29,6 +30,11 @@ class Rooms extends WidgetBase
$this->refreshRooms(); $this->refreshRooms();
} }
function onConflict()
{
Notification::append(null, $this->__('chatrooms.conflict'));
}
function onDisconnected() function onDisconnected()
{ {
// We reset the Chat view // We reset the Chat view
@ -196,9 +202,9 @@ class Rooms extends WidgetBase
array_push($arr, array_push($arr,
array( array(
'type' => 'conference', 'type' => 'conference',
'name' => $c->name, 'name' => htmlentities($c->name),
'autojoin' => $c->autojoin, 'autojoin' => $c->autojoin,
'nick' => $c->nick, 'nick' => htmlentities($c->nick),
'jid' => $c->conference)); 'jid' => $c->conference));
} }

View file

@ -18,16 +18,17 @@
<span class="second">{$value->conference}</span> <span class="second">{$value->conference}</span>
</li> </li>
{/loop} {/loop}
{if="$conferences == null"}
<li class="condensed">
<span class="icon green">
<i class="zmdi zmdi-accounts-outline"></i>
</span>
<p>{$c->__('rooms.empty_text1')} {$c->__('rooms.empty_text2')}</p>
</li>
{/if}
</ul> </ul>
{if="$conferences == null"}
<ul class="thick spaced">
<li class="condensed">
<span class="icon green">
<i class="zmdi zmdi-accounts-outline"></i>
</span>
<p>{$c->__('rooms.empty_text1')} {$c->__('rooms.empty_text2')}</p>
</li>
</ul>
{/if}
{else} {else}
{if="$c->getView() == 'room' && $room != false"} {if="$c->getView() == 'room' && $room != false"}
<div class="placeholder icon"> <div class="placeholder icon">

View file

@ -1,7 +1,7 @@
[rooms] [rooms]
add = Add a chatroom add = Add a chatroom
empty_text1 = "You don't have any chatroom yet." empty_text1 = "You don't have any chatroom yet."
empty_text2 = Add one by clicking on the add button in the header. empty_text2 = Add one by clicking on the add button.
[chatrooms] [chatrooms]
title = Chatrooms title = Chatrooms
@ -17,6 +17,7 @@ connected = Connected to the chatroom
disconnected = Disconnected from the chatroom disconnected = Disconnected from the chatroom
users = Users in the room users = Users in the room
bad_nickname = Please enter a correct nickname (2 to 40 characters) bad_nickname = Please enter a correct nickname (2 to 40 characters)
conflict = Username already taken
[bookmarks] [bookmarks]
updated = Bookmarks updated updated = Bookmarks updated

View file

@ -31,18 +31,18 @@
<!--ng-class="rosterCtrl.getContactClient(myjid.ajiditems)"-- >--> <!--ng-class="rosterCtrl.getContactClient(myjid.ajiditems)"-- >-->
<div <div
class="action" class="action"
ng-if="myjid.ajiditems.rosterview.tune != '' || myjid.ajiditems.rosterview.type != '' || myjid.ajiditems.rosterview.subscription != 'both'" ng-if="myjid.ajiditems.rosterview.tune || myjid.ajiditems.rosterview.type != '' || myjid.ajiditems.rosterview.subscription != 'both'"
ng-switch on="myjid.ajiditems.rosterview.type"> ng-switch on="myjid.ajiditems.rosterview.type">
<i ng-switch-when="handheld" class="zmdi zmdi-smartphone"></i> <i ng-switch-when="handheld" class="zmdi zmdi-smartphone"></i>
<i ng-switch-when="phone" class="zmdi zmdi-smartphone"></i> <i ng-switch-when="phone" class="zmdi zmdi-smartphone"></i>
<i ng-switch-when="web" class="zmdi zmdi-globe-alt"></i> <i ng-switch-when="web" class="zmdi zmdi-globe-alt"></i>
<i ng-switch-when="bot" class="zmdi zmdi-memory"></i> <i ng-switch-when="bot" class="zmdi zmdi-memory"></i>
<i ng-if="myjid.ajiditems.rosterview.tune" class="zmdi zmdi-play-arrow"></i> <i ng-if="myjid.ajiditems.rosterview.tune" class="zmdi zmdi-play"></i>
<i ng-if="myjid.ajiditems.rosterview.subscription == 'to'" class="zmdi zmdi-arrow-in"></i> <i ng-if="myjid.ajiditems.rosterview.subscription == 'to'" class="zmdi zmdi-arrow-in"></i>
<i ng-if="myjid.ajiditems.rosterview.subscription == 'from'" class="zmdi zmdi-arrow-out"></i> <i ng-if="myjid.ajiditems.rosterview.subscription == 'from'" class="zmdi zmdi-arrow-out"></i>
<i ng-if="myjid.ajiditems.rosterview.subscription == 'none'" class="zmdi zmdi-do-not-disturb"></i> <i ng-if="myjid.ajiditems.rosterview.subscription == 'none'" class="zmdi zmdi-block"></i>
</div> </div>
<span <span
ng-if="::myjid.ajiditems.rosterview.avatar != false" ng-if="::myjid.ajiditems.rosterview.avatar != false"
class="icon bubble status {{myjid.ajiditems.rosterview.presencetxt}}" class="icon bubble status {{myjid.ajiditems.rosterview.presencetxt}}"

View file

@ -21,7 +21,7 @@
</span> </span>
<span>{$c->__('privacy.privacy_question')}</span> <span>{$c->__('privacy.privacy_question')}</span>
<p>{$c->__('privacy.privacy_info')}</p> <p>{$c->__('privacy.privacy_info')}</p>
</li> </li>
</ul> </ul>
@ -52,9 +52,9 @@
<select name="day" class="datepicker"> <select name="day" class="datepicker">
<option value="-1">{$c->__('Day')}</option> <option value="-1">{$c->__('Day')}</option>
{loop="$days"} {loop="$days"}
<option value="{$value}" <option value="{$value}"
{if="$key == substr($me->date, 8)"} {if="$key == substr($me->date, 8)"}
selected selected
{/if} {/if}
>{$value}</option> >{$value}</option>
{/loop} {/loop}
@ -64,9 +64,9 @@
<select name="year" class="datepicker"> <select name="year" class="datepicker">
<option value="-1">{$c->__('Year')}</option> <option value="-1">{$c->__('Year')}</option>
{loop="$years"} {loop="$years"}
<option value="{$value}" <option value="{$value}"
{if="$value == substr($me->date,0,4)"} {if="$value == substr($me->date,0,4)"}
selected selected
{/if} {/if}
>{$value}</option> >{$value}</option>
{/loop} {/loop}
@ -76,9 +76,9 @@
<select name="month" class="datepicker"> <select name="month" class="datepicker">
<option value="-1">{$c->__('Month')}</option> <option value="-1">{$c->__('Month')}</option>
{loop="$months"} {loop="$months"}
<option value="{$key}" <option value="{$key}"
{if="$key == substr($me->date,5,2)"} {if="$key == substr($me->date,5,2)"}
selected selected
{/if} {/if}
>{$value}</option> >{$value}</option>
{/loop} {/loop}
@ -91,9 +91,9 @@
<div class="select"> <div class="select">
<select name="gender"> <select name="gender">
{loop="$gender"} {loop="$gender"}
<option <option
{if="$key == $me->gender"} {if="$key == $me->gender"}
selected selected
{/if} {/if}
value="{$key}">{$value}</option> value="{$key}">{$value}</option>
{/loop} {/loop}
@ -106,9 +106,9 @@
<div class="select"> <div class="select">
<select name="marital"> <select name="marital">
{loop="$marital"} {loop="$marital"}
<option <option
{if="$key == $me->marital"} {if="$key == $me->marital"}
selected selected
{/if} {/if}
value="{$key}">{$value}</option> value="{$key}">{$value}</option>
{/loop} {/loop}
@ -134,15 +134,15 @@
<input type="text" type="locality" name ="locality" class="content" value="{$me->adrlocality}" placeholder="{$c->__('position.locality')}"> <input type="text" type="locality" name ="locality" class="content" value="{$me->adrlocality}" placeholder="{$c->__('position.locality')}">
<label for="url">{$c->__('position.locality')}</label> <label for="url">{$c->__('position.locality')}</label>
</div> </div>
<div class="block"> <div class="block">
<div class="select"> <div class="select">
<select name="country"> <select name="country">
<option value=""></option> <option value=""></option>
{loop="$countries"} {loop="$countries"}
<option <option
{if="$value == $me->adrcountry"} {if="$value == $me->adrcountry"}
selected selected
{/if} {/if}
value="{$value}">{$value}</option> value="{$value}">{$value}</option>
{/loop} {/loop}
@ -152,19 +152,19 @@
</div> </div>
<h3 class="block large">{$c->__('accounts.accounts_title')}</h3> <h3 class="block large">{$c->__('accounts.accounts_title')}</h3>
<div class="block"> <div class="block">
<input type="text" name="twitter" class="content" value="{$me->twitter}" placeholder="{$c->__('accounts.nickname')}"> <input type="text" name="twitter" class="content" value="{$me->twitter}" placeholder="{$c->__('accounts.twitter')}">
<label for="twitter"><i class="fa fa-twitter"></i> {$c->__('accounts.twitter')}</label> <label for="twitter"><i class="fa fa-twitter"></i> {$c->__('accounts.twitter')}</label>
</div> </div>
<div class="block"> <div class="block">
<input type="text" name="skype" class="content" value="{$me->skype}" placeholder="{$c->__('accounts.nickname')}"> <input type="text" name="skype" class="content" value="{$me->skype}" placeholder="{$c->__('accounts.skype')}">
<label for="skype"><i class="fa fa-skype"></i> {$c->__('accounts.skype')}</label> <label for="skype"><i class="fa fa-skype"></i> {$c->__('accounts.skype')}</label>
</div> </div>
<div class="block"> <div class="block">
<input type="email" name="yahoo" class="content" value="{$me->yahoo}" placeholder="{$c->__('accounts.accounts_yahoo')}"> <input type="email" name="yahoo" class="content" value="{$me->yahoo}" placeholder="{$c->__('accounts.yahoo')}">
<label for="skype"><i class="fa fa-yahoo"></i> {$c->__('accounts.yahoo')}</label> <label for="skype"><i class="fa fa-yahoo"></i> {$c->__('accounts.yahoo')}</label>
</div> </div>
@ -173,9 +173,9 @@
onclick=" onclick="
{$submit} {$submit}
movim_button_save('#vcard4validate'); movim_button_save('#vcard4validate');
this.value = '{$c->__('Submitting')}'; this.value = '{$c->__('Submitting')}';
this.className='button oppose inactive';" this.className='button oppose inactive';"
class="button color oppose" class="button color oppose"
id="vcard4validate" id="vcard4validate"
> >
{$c->__('button.save')} {$c->__('button.save')}

View file

@ -25,9 +25,8 @@ country = Country
accounts_title = Accounts accounts_title = Accounts
twitter = Twitter twitter = Twitter
skype = Skype skype = Skype
yahoo = Yahoo yahoo = Yahoo Account
accounts_nickname = Nickname accounts_nickname = Nickname
accounts_yahoo = Yahoo Account
[privacy] [privacy]
privacy_title = Privacy Level privacy_title = Privacy Level

View file

@ -81,7 +81,7 @@ class Bootstrap {
DOCUMENT_ROOT.'/log/php.log', DOCUMENT_ROOT.'/log/php.log',
DOCUMENT_ROOT.'/cache/test.tmp', DOCUMENT_ROOT.'/cache/test.tmp',
); );
$errors=array(); $errors = array();
if(!is_writable(DOCUMENT_ROOT)) if(!is_writable(DOCUMENT_ROOT))
$errors[] = 'We\'re unable to write to folder '.DOCUMENT_ROOT.': check rights'; $errors[] = 'We\'re unable to write to folder '.DOCUMENT_ROOT.': check rights';
@ -200,9 +200,6 @@ class Bootstrap {
} }
private function loadSystem() { private function loadSystem() {
// Loads up all system libraries.
require_once(SYSTEM_PATH . "/i18n/i18n.php");
require_once(SYSTEM_PATH . "Session.php"); require_once(SYSTEM_PATH . "Session.php");
require_once(SYSTEM_PATH . "Sessionx.php"); require_once(SYSTEM_PATH . "Sessionx.php");
require_once(SYSTEM_PATH . "Utils.php"); require_once(SYSTEM_PATH . "Utils.php");
@ -219,8 +216,8 @@ class Bootstrap {
require_once(LIB_PATH . "XMPPtoForm.php"); require_once(LIB_PATH . "XMPPtoForm.php");
// SDPtoJingle and JingletoSDP lib :) // SDPtoJingle and JingletoSDP lib :)
require_once(LIB_PATH . "SDPtoJingle.php"); //require_once(LIB_PATH . "SDPtoJingle.php");
require_once(LIB_PATH . "JingletoSDP.php"); //require_once(LIB_PATH . "JingletoSDP.php");
} }
private function loadHelpers() { private function loadHelpers() {
@ -241,7 +238,7 @@ class Bootstrap {
require_once(SYSTEM_PATH . "widget/WidgetBase.php"); require_once(SYSTEM_PATH . "widget/WidgetBase.php");
require_once(SYSTEM_PATH . "widget/WidgetWrapper.php"); require_once(SYSTEM_PATH . "widget/WidgetWrapper.php");
require_once(APP_PATH . "widgets/WidgetCommon/WidgetCommon.php"); //require_once(APP_PATH . "widgets/WidgetCommon/WidgetCommon.php");
require_once(APP_PATH . "widgets/Notification/Notification.php"); require_once(APP_PATH . "widgets/Notification/Notification.php");
} }
@ -255,20 +252,23 @@ class Bootstrap {
$cd = new \Modl\ConfigDAO(); $cd = new \Modl\ConfigDAO();
$config = $cd->get(); $config = $cd->get();
$l = Movim\i18n\Locale::start();
if($user->isLogged()) { if($user->isLogged()) {
$lang = $user->getConfig('language'); $lang = $user->getConfig('language');
if(isset($lang)) { if(isset($lang)) {
loadLanguage($lang); $l->load($lang);
} else { } else {
// Load default language. // Load default language.
loadLanguage($config->locale); $l->load($config->locale);
} }
} }
else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { elseif(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
loadLanguageAuto(); $l->detect();
$l->loadPo();
} }
else { else {
loadLanguage($config->locale); $l->load($config->locale);
} }
} }
@ -321,7 +321,7 @@ class Bootstrap {
if(file_exists(DOCUMENT_ROOT.'/config/db.inc.php')) { if(file_exists(DOCUMENT_ROOT.'/config/db.inc.php')) {
require DOCUMENT_ROOT.'/config/db.inc.php'; require DOCUMENT_ROOT.'/config/db.inc.php';
} else { } else {
throw new MovimException('Cannot find config/db.inc.php file'); throw new Exception('Cannot find config/db.inc.php file');
} }
$db->setConnectionArray($conf); $db->setConnectionArray($conf);
@ -387,7 +387,7 @@ class Bootstrap {
$s->load(); $s->load();
$user = new User; $user = new User;
$db = modl\Modl::getInstance(); $db = Modl\Modl::getInstance();
$db->setUser($user->getLogin()); $db->setUser($user->getLogin());
} }
} }

View file

@ -22,6 +22,7 @@
"react/socket-client": "0.4.*@dev", "react/socket-client": "0.4.*@dev",
"forxer/Gravatar": "~1.2", "forxer/Gravatar": "~1.2",
"respect/validation": "0.8.*" "respect/validation": "0.8.*",
"ezyang/htmlpurifier": "^4.7"
} }
} }

View file

@ -9,8 +9,6 @@ use \React\EventLoop\Factory;
use React\Socket\Server as Reactor; use React\Socket\Server as Reactor;
require dirname(__FILE__) . '/vendor/autoload.php'; require dirname(__FILE__) . '/vendor/autoload.php';
require dirname(__FILE__) . '/src/Movim/Daemon/Core.php'; // Why ?
require dirname(__FILE__) . '/src/Movim/Daemon/Session.php'; // Why ?
define('DOCUMENT_ROOT', dirname(__FILE__)); define('DOCUMENT_ROOT', dirname(__FILE__));
require_once(DOCUMENT_ROOT.'/bootstrap.php'); require_once(DOCUMENT_ROOT.'/bootstrap.php');

View file

@ -40,9 +40,14 @@
define('DOCUMENT_ROOT', dirname(__FILE__)); define('DOCUMENT_ROOT', dirname(__FILE__));
require_once(DOCUMENT_ROOT.'/bootstrap.php'); require_once(DOCUMENT_ROOT.'/bootstrap.php');
$bootstrap = new Bootstrap(); try {
$bootstrap = new Bootstrap();
$bootstrap->boot(); $bootstrap->boot();
} catch(Exception $e) {
error_log($e->getMessage());
echo 'Oops, something went wrong, please check the log files';
return;
}
$rqst = new FrontController(); $rqst = new FrontController();
$rqst->handle(); $rqst->handle();

View file

@ -52,8 +52,8 @@ $stdin_behaviour = function ($data) use (&$conn, $loop, &$buffer, &$connector, &
$port = 5222; $port = 5222;
$dns = \Moxl\Utils::resolveHost($msg->host); $dns = \Moxl\Utils::resolveHost($msg->host);
if(isset($dns[0]['target']) && $dns[0]['target'] != null) $msg->host = $dns[0]['target']; if(isset($dns->target) && $dns->target != null) $msg->host = $dns->target;
if(isset($dns[0]['port']) && $dns[0]['port'] != null) $port = $dns[0]['port']; if(isset($dns->port) && $dns->port != null) $port = $dns->port;
#fwrite(STDERR, colorize('open a socket to '.$domain, 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); #fwrite(STDERR, colorize('open a socket to '.$domain, 'yellow')." : ".colorize('sent to XMPP', 'green')."\n");
$connector->create($msg->host, $port)->then($xmpp_behaviour); $connector->create($msg->host, $port)->then($xmpp_behaviour);
} }
@ -111,6 +111,8 @@ $xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$s
|| $message == '<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>') { || $message == '<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>') {
stream_set_blocking($conn->stream, 1); stream_set_blocking($conn->stream, 1);
stream_context_set_option($conn->stream, 'ssl', 'allow_self_signed', true); stream_context_set_option($conn->stream, 'ssl', 'allow_self_signed', true);
#stream_context_set_option($conn->stream, 'ssl', 'verify_peer_name', false);
#stream_context_set_option($conn->stream, 'ssl', 'verify_peer', false);
$out = stream_socket_enable_crypto($conn->stream, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT); $out = stream_socket_enable_crypto($conn->stream, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT);
$restart = true; $restart = true;
@ -137,7 +139,7 @@ $xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$s
\RPC::clear(); \RPC::clear();
if(!empty($msg)) { if(!empty($msg)) {
//[MaJ[MaJ[MaJ[MaI[MaI[MaI[MaI[MaI[MaI[MaI[MaI[MaIecho json_encode($msg).""; //echo json_encode($msg)."";
echo base64_encode(gzcompress(json_encode($msg), 9)).""; echo base64_encode(gzcompress(json_encode($msg), 9))."";
//fwrite(STDERR, colorize(json_encode($msg).' '.strlen($msg), 'yellow')." : ".colorize('sent to browser', 'green')."\n"); //fwrite(STDERR, colorize(json_encode($msg).' '.strlen($msg), 'yellow')." : ".colorize('sent to browser', 'green')."\n");
} }

View file

@ -1,6 +1,9 @@
# French translations for Movim Website package. #
# This file is distributed under the same license as the Movim Website package. # Translators:
# This file was translated from CodingTeam at <http://codingteam.net/>. # Éfrit, 2015
# Jaussoin Timothée <edhelas@movim.eu>, 2015
# Maxime Buquet <tidusx62@gmail.com>, 2015
# Tom <caporaldead@gmail.com>, 2015
#. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-#
#. extracted from ../app/widgets/About/locales.ini #. extracted from ../app/widgets/About/locales.ini
#. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-#
@ -91,18 +94,18 @@
#. extracted from ../locales/locales.ini #. extracted from ../locales/locales.ini
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Movim Website\n" "Project-Id-Version: movim\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-20 15:17+0200\n" "POT-Creation-Date: 2015-08-20 15:17+0200\n"
"PO-Revision-Date: 2015-06-10 08:09+0000\n" "PO-Revision-Date: 2015-08-21 09:30+0000\n"
"Last-Translator: Axelos <axelos@broman.fr>\n" "Last-Translator: Jaussoin Timothée <edhelas@movim.eu>\n"
"Language-Team: \n" "Language-Team: French (France) (http://www.transifex.com/movim/movim/language/fr_FR/)\n"
"Language: \n" "Language: fr_FR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2015-06-18 21:08+0000\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Launchpad (build 17570)\n" "X-Generator: Translate Toolkit 1.12.0\n"
#: [about]thanks #: [about]thanks
msgid "Thanks" msgid "Thanks"
@ -137,9 +140,8 @@ msgid "Account"
msgstr "Compte" msgstr "Compte"
#: [account]password_change_title #: [account]password_change_title
#, fuzzy
msgid "Change my password" msgid "Change my password"
msgstr "Mot de passe incorrect" msgstr "Changer de mot de passe"
#: [account]password [db]password [credentials]password [form]password #: [account]password [db]password [credentials]password [form]password
#: [input]password #: [input]password
@ -147,9 +149,8 @@ msgid "Password"
msgstr "Mot de passe" msgstr "Mot de passe"
#: [account]password_confirmation #: [account]password_confirmation
#, fuzzy
msgid "Password confirmation" msgid "Password confirmation"
msgstr "%s Configuration" msgstr "Confirmation du mot de passe"
#: [account]password_changed #: [account]password_changed
msgid "The password has been updated" msgid "The password has been updated"
@ -157,7 +158,7 @@ msgstr "Le mot de passe a été mis à jour"
#: [account]password_not_valid #: [account]password_not_valid
msgid "Please provide a valid password (6 characters minimum)" msgid "Please provide a valid password (6 characters minimum)"
msgstr "Veuillez entrer un mot de passe valide (6 lettres minimum)" msgstr "Veuillez entrer un mot de passe valide (6 caractères minimum)"
#: [account]password_not_same #: [account]password_not_same
msgid "The provided passwords are not the same" msgid "The provided passwords are not the same"
@ -168,17 +169,16 @@ msgid "Delete my account"
msgstr "Supprimer mon compte" msgstr "Supprimer mon compte"
#: [account]delete #: [account]delete
#, fuzzy
msgid "Delete your account" msgid "Delete your account"
msgstr "Supprimer mon compte" msgstr "Supprimer votre compte"
#: [account]delete_text #: [account]delete_text
msgid "You will delete your XMPP account and all the relative information linked to it (profile, contacts and publications)." msgid "You will delete your XMPP account and all the relative information linked to it (profile, contacts and publications)."
msgstr "Vous allez supprimer votre compte XMPP ainsi que l'ensemble des informations liés à celui-ci (profil, contacts et billets)." msgstr "Vous allez supprimer votre compte XMPP ainsi que lensemble des informations qui y sont liées (profil, contacts et billets)."
#: [account]delete_text_confirm #: [account]delete_text_confirm
msgid "Are you sure that you want to delete it ?" msgid "Are you sure that you want to delete it ?"
msgstr "Êtes-vous sûr de vouloir le supprimer?" msgstr "Êtes-vous sûr de vouloir le supprimer?"
#: [account]gateway_title #: [account]gateway_title
msgid "Gateway" msgid "Gateway"
@ -198,11 +198,11 @@ msgstr "sur"
#: [create]successfull #: [create]successfull
msgid "Your acccount has been successfully registered" msgid "Your acccount has been successfully registered"
msgstr "Votre compte a été correctement enregistré" msgstr "Compte créé avec succès"
#: [create]loading #: [create]loading
msgid "Loading" msgid "Loading"
msgstr "Chargement en cours" msgstr "Chargement"
#: [error]not_acceptable #: [error]not_acceptable
msgid "Not Acceptable" msgid "Not Acceptable"
@ -210,11 +210,11 @@ msgstr "Non acceptable"
#: [error]service_unavailable #: [error]service_unavailable
msgid "The registration system of this server is currently unavailable" msgid "The registration system of this server is currently unavailable"
msgstr "Le système denregistrement de ce serveur est actuellement indisponible" msgstr "Le système dinscription de ce serveur est actuellement indisponible"
#: [oob]about #: [oob]about
msgid "This server use an external system for the registration, please click on the following URL." msgid "This server use an external system for the registration, please click on the following URL."
msgstr "Ce serveur utilise un service externe pour enregistrer les nouveaux utilisateurs, veuillez sil vous plaît cliquer sur le lien suivant." msgstr "Ce serveur utilise un service externe pour enregistrer les nouveaux utilisateurs, cliquer sur lien suivant pour y accéder."
#: [adhoc]title #: [adhoc]title
msgid "Actions" msgid "Actions"
@ -226,7 +226,7 @@ msgstr "Base de données"
#: [db]connect_error #: [db]connect_error
msgid "Modl wasn't able to connect to the database" msgid "Modl wasn't able to connect to the database"
msgstr "Modl na pas été en mesure de se connecter à la base de données" msgstr "Modl na pas pu se connecter à la base de données"
#: [db]connect_success #: [db]connect_success
msgid "Movim is connected to the database" msgid "Movim is connected to the database"
@ -246,7 +246,7 @@ msgstr "Type de base de données"
#: [db]username [credentials]username [input]username #: [db]username [credentials]username [input]username
msgid "Username" msgid "Username"
msgstr "Identifiant" msgstr "Nom dutilisateur"
#: [db]host #: [db]host
msgid "Host" msgid "Host"
@ -257,9 +257,8 @@ msgid "Port"
msgstr "Port" msgstr "Port"
#: [db]name #: [db]name
#, fuzzy
msgid "Database sName" msgid "Database sName"
msgstr "Nom de la base de données" msgstr ""
#: [admin]general #: [admin]general
msgid "General Settings" msgid "General Settings"
@ -275,7 +274,7 @@ msgstr "Langue par défaut"
#: [general]log_verbosity #: [general]log_verbosity
msgid "Log verbosity" msgid "Log verbosity"
msgstr "Niveau de détail des journaux" msgstr "Niveau de détails des journaux"
#: [general]timezone #: [general]timezone
msgid "Server Timezone" msgid "Server Timezone"
@ -291,7 +290,7 @@ msgstr "Configuration du WebSocket"
#: [websocket]info #: [websocket]info
msgid "Enter here a valid WebSocket URI in the form" msgid "Enter here a valid WebSocket URI in the form"
msgstr "Veuillez saisir une URI WebSocket valide dans le formulaire" msgstr "Veuillez saisir une URI du WebSocket valide dans le formulaire"
#: [websocket]label #: [websocket]label
msgid "WebSocket URI" msgid "WebSocket URI"
@ -299,7 +298,7 @@ msgstr "URI du WebSocket"
#: [websocket]save_info #: [websocket]save_info
msgid "If you change the URI, please restart the daemon to reload the configuration" msgid "If you change the URI, please restart the daemon to reload the configuration"
msgstr "Si vous changez lURI, veuillez relancer le démon afin de prendre en compte la configuration" msgstr "Veuillez relancer le démon si vous changer lURI, afin de prendre en compte la configuration"
#: [websocket]publics #: [websocket]publics
msgid "Public WebSockets" msgid "Public WebSockets"
@ -311,7 +310,7 @@ msgstr "Identification de ladministrateur"
#: [credentials]info #: [credentials]info
msgid "Change the default credentials admin/password" msgid "Change the default credentials admin/password"
msgstr "Modifiez les paramètres didentification admin/password" msgstr "Modifiez les paramètres didentification admin/mot de passe"
#: [credentials]re_password #: [credentials]re_password
msgid "Retype password" msgid "Retype password"
@ -323,7 +322,7 @@ msgstr "Serveurs XMPP : Liste blanche"
#: [whitelist]info1 #: [whitelist]info1
msgid "If you want to specify a list of authorized XMPP servers on your Movim pod and forbid the connection on all the others please put their domain name here, with comma (ex: movim.eu,jabber.fr)" msgid "If you want to specify a list of authorized XMPP servers on your Movim pod and forbid the connection on all the others please put their domain name here, with comma (ex: movim.eu,jabber.fr)"
msgstr "Si vous souhaitez établir une liste de serveurs XMPP autorisés sur votre pod Movim et interdire la connexion à tous les autres, veuillez saisir la liste de leurs noms de domaine, séparés par une virgule (ex : movim.eu, jabber.fr)." msgstr "Si vous souhaitez établir une liste de serveurs XMPP autorisés sur votre pod Movim et interdire la connexion à tous les autres, saisissez la liste de leurs noms de domaine, séparés par une virgule (ex : movim.eu, jabber.fr)."
#: [whitelist]info2 #: [whitelist]info2
msgid "Leave this field blank if you allow the access to all the XMPP accounts." msgid "Leave this field blank if you allow the access to all the XMPP accounts."
@ -334,7 +333,6 @@ msgid "List of whitelisted XMPP servers"
msgstr "Liste blanche des serveurs XMPP" msgstr "Liste blanche des serveurs XMPP"
#: [information]title #: [information]title
#, fuzzy
msgctxt "[information]title" msgctxt "[information]title"
msgid "Information Message" msgid "Information Message"
msgstr "Message dinformation" msgstr "Message dinformation"
@ -348,12 +346,10 @@ msgid "This message will be displayed on the login page"
msgstr "Ce message sera affiché sur la page de connexion." msgstr "Ce message sera affiché sur la page de connexion."
#: [information]info2 #: [information]info2
#, fuzzy
msgid "Leave this field blank if you dont want to show any message." msgid "Leave this field blank if you dont want to show any message."
msgstr "Laissez ce champ vide si vous ne voulez afficher aucun message." msgstr "Laissez ce champ vide si vous ne voulez afficher aucun message."
#: [information]label #: [information]label
#, fuzzy
msgctxt "[information]label" msgctxt "[information]label"
msgid "Information Message" msgid "Information Message"
msgstr "Message dinformation" msgstr "Message dinformation"
@ -372,11 +368,11 @@ msgstr "Journal système et fichiers"
#: [rewrite]title #: [rewrite]title
msgid "URL Rewriting" msgid "URL Rewriting"
msgstr "Réécriture d'URL" msgstr "Réécriture dURL"
#: [rewrite]info #: [rewrite]info
msgid "The URL Rewriting can be enabled" msgid "The URL Rewriting can be enabled"
msgstr "La réécriture d'URL peut être activée" msgstr "La réécriture dURL peut être activée"
#: [admin]compatibility #: [admin]compatibility
msgid "General Overview" msgid "General Overview"
@ -384,7 +380,7 @@ msgstr "Aperçu général"
#: [compatibility]info #: [compatibility]info
msgid "Movim has found some issues or things that need to be fixed or improved" msgid "Movim has found some issues or things that need to be fixed or improved"
msgstr "Movim a rencontré des problèmes ou des choses qui doivent être corrigés ou améliorés" msgstr "Movim a rencontré des problèmes ou des soucis qui doivent être corrigés ou améliorés"
#: [compatibility]php1 #: [compatibility]php1
msgid "Update your PHP-Version: %s" msgid "Update your PHP-Version: %s"
@ -407,7 +403,6 @@ msgid "Install the php5-gd library"
msgstr "Installez la librairie php5-gd" msgstr "Installez la librairie php5-gd"
#: [compatibility]rights #: [compatibility]rights
#, fuzzy
msgid "Read and write rights for the webserver in Movims root directory" msgid "Read and write rights for the webserver in Movims root directory"
msgstr "Droits de lecture et décriture pour le serveur web dans le dossier racine de Movim" msgstr "Droits de lecture et décriture pour le serveur web dans le dossier racine de Movim"
@ -421,11 +416,11 @@ msgstr "La base de données doit être mise à jour, allez dans son panneau pour
#: [compatibility]websocket #: [compatibility]websocket
msgid "WebSocket connection error, check if the Movim Daemon is running and is reachable" msgid "WebSocket connection error, check if the Movim Daemon is running and is reachable"
msgstr "" msgstr "Erreur de connexion WebSocket, vérifiez si le démon Movim est en cours dexécution et sil est joignable"
#: [compatibility]xmpp_websocket #: [compatibility]xmpp_websocket
msgid "XMPP Websocket connection error, please check the validity of the URL given in the General Configuration" msgid "XMPP Websocket connection error, please check the validity of the URL given in the General Configuration"
msgstr "Erreur de connexion XMPP Websocket, s'il vous plaît vérifier la validité de l'URL donnée dans la configuration générale" msgstr "Erreur de connexion XMPP Websocket, veuillez vérifier la validité de lURL donnée dans la configuration générale"
#: [schema]browser #: [schema]browser
msgid "Browser" msgid "Browser"
@ -433,7 +428,7 @@ msgstr "Navigateur"
#: [schema]movim #: [schema]movim
msgid "Movim Core" msgid "Movim Core"
msgstr "" msgstr "Cœur de Movim"
#: [schema]daemon #: [schema]daemon
msgid "Movim Daemon" msgid "Movim Daemon"
@ -449,11 +444,11 @@ msgstr "Vous pouvez enregistrer ici votre pod sur %slAPI officielle%s et êtr
#: [api]register #: [api]register
msgid "Your pod is not registered on the API" msgid "Your pod is not registered on the API"
msgstr "Votre pod nest pas enregistré sur lAPI" msgstr "Votre pod nest pas enregistré dans lAPI"
#: [api]registered #: [api]registered
msgid "Your pod is registered on the API" msgid "Your pod is registered on the API"
msgstr "Votre pod est enregistré sur lAPI" msgstr "Votre pod est enregistré dans lAPI"
#: [api]wait #: [api]wait
msgid "Your pod is not yet validated" msgid "Your pod is not yet validated"
@ -481,7 +476,7 @@ msgstr "Utiliser"
#: [avatar]webcam #: [avatar]webcam
msgid "Webcam" msgid "Webcam"
msgstr "Caméra" msgstr "Webcam"
#: [avatar]cheese #: [avatar]cheese
msgid "Cheese !" msgid "Cheese !"
@ -505,7 +500,7 @@ msgstr "Flux de %s"
#: [blog]empty #: [blog]empty
msgid "This user has not posted anything right now" msgid "This user has not posted anything right now"
msgstr "Cet utilisateur n'a rien publié pour le moment" msgstr "Cet utilisateur na rien publié pour le moment"
#: [title]conferences #: [title]conferences
msgid "Conferences" msgid "Conferences"
@ -524,7 +519,6 @@ msgid "Chat Room ID"
msgstr "Identifiant du salon" msgstr "Identifiant du salon"
#: [chatroom]name #: [chatroom]name
#, fuzzy
msgctxt "[chatroom]name" msgctxt "[chatroom]name"
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
@ -550,7 +544,6 @@ msgid "Bookmarks updated"
msgstr "Signets mis à jour" msgstr "Signets mis à jour"
#: [bookmarks]error #: [bookmarks]error
#, fuzzy
msgid "An error occured :" msgid "An error occured :"
msgstr "Une erreur sest produite : " msgstr "Une erreur sest produite : "
@ -567,7 +560,6 @@ msgid "URL"
msgstr "URL" msgstr "URL"
#: [url]name #: [url]name
#, fuzzy
msgctxt "[url]name" msgctxt "[url]name"
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
@ -614,7 +606,7 @@ msgstr "Discuter avec vos contacts"
#: [chat]frequent [chats]frequent #: [chat]frequent [chats]frequent
msgid "Frequent contacts" msgid "Frequent contacts"
msgstr "Contacts fréquent" msgstr "Contacts fréquents"
#: [chatroom]members #: [chatroom]members
msgid "Members" msgid "Members"
@ -645,14 +637,12 @@ msgid "Subject changed"
msgstr "Sujet mis à jour" msgstr "Sujet mis à jour"
#: [chats]empty_title #: [chats]empty_title
#, fuzzy
msgid "No chats yet..." msgid "No chats yet..."
msgstr "Pas de commentaires pour le moment" msgstr "Pas de discussions pour le moment"
#: [chats]empty #: [chats]empty
#, fuzzy
msgid "Open a new conversation by clicking on the plus button bellow or visit the Contacts page." msgid "Open a new conversation by clicking on the plus button bellow or visit the Contacts page."
msgstr "Commencez une nouvelle conversation en cliquant sur le bouton plus ci-dessous" msgstr "Commencez une nouvelle conversation en cliquant sur le bouton plus ci-dessous ou visitez la page Contacts."
#: [chats]add #: [chats]add
msgid "Chat with a contact" msgid "Chat with a contact"
@ -707,7 +697,6 @@ msgid "Appearence"
msgstr "Apparence" msgstr "Apparence"
#: [config]info #: [config]info
#, fuzzy
msgid "This configuration is shared wherever you are connected" msgid "This configuration is shared wherever you are connected"
msgstr "Cette configuration est partagée partout où vous vous connectez!" msgstr "Cette configuration est partagée partout où vous vous connectez!"
@ -832,44 +821,40 @@ msgid "Last public post"
msgstr "Derniers billets public" msgstr "Derniers billets public"
#: [subscription]to #: [subscription]to
#, fuzzy
msgid "You can see this contact status" msgid "You can see this contact status"
msgstr "Pas de flux public pour ce contact" msgstr "Vous pouvez voir l'état de ce contact"
#: [subscription]to_button #: [subscription]to_button
msgid "Share my status" msgid "Share my status"
msgstr "" msgstr "Partager mon état"
#: [subscription]to_text #: [subscription]to_text
msgid "But this contact cannot see yours" msgid "But this contact cannot see yours"
msgstr "" msgstr "Mais ce contact ne peux pas voir le votre"
#: [subscription]from #: [subscription]from
#, fuzzy
msgid "You are not subscribed to this contact" msgid "You are not subscribed to this contact"
msgstr "Vous allez vous désinscrire de ce Groupe." msgstr "Vous nêtes pas abonné à ce contact"
#: [subscription]from_button #: [subscription]from_button
#, fuzzy
msgid "Ask to subscribe" msgid "Ask to subscribe"
msgstr "%s souscrits" msgstr "Demander pour sabonner"
#: [subscription]from_text #: [subscription]from_text
msgid "But this contact can still see if you are online" msgid "But this contact can still see if you are online"
msgstr "" msgstr "Mais ce contact peut tout de même voir votre présence en ligne"
#: [subscription]nil #: [subscription]nil
#, fuzzy
msgid "No subscriptions" msgid "No subscriptions"
msgstr "Abonnements" msgstr ""
#: [subscription]nil_button #: [subscription]nil_button
msgid "Invite" msgid "Invite"
msgstr "" msgstr "Inviter"
#: [subscription]nil_text #: [subscription]nil_text
msgid "This contact is in your contact list but there is no subscriptions between the two accounts" msgid "This contact is in your contact list but there is no subscriptions between the two accounts"
msgstr "" msgstr "Ce contact est dans votre liste de contacts mais il ny a pas dabonnements entre les deux comptes"
#: [group]subscribe #: [group]subscribe
msgid "Subscribe" msgid "Subscribe"
@ -905,7 +890,7 @@ msgstr "Êtes-vous sûr?"
#: [group]empty_text #: [group]empty_text
msgid "Discover, follow and share" msgid "Discover, follow and share"
msgstr "Découvrire, suivre et partager" msgstr "Découvrir, suivre et partager"
#: [group]empty #: [group]empty
msgid "Something bad happened to this group" msgid "Something bad happened to this group"
@ -929,16 +914,15 @@ msgstr "Il semblerait que que groupe n'existe plus. Souhaitez-vous le supprimer
#: [group]counter #: [group]counter
msgid "%s groups on this server" msgid "%s groups on this server"
msgstr "" msgstr "%s groupes sur ce serveur"
#: [group]subscriptions [statistics]subscriptions #: [group]subscriptions [statistics]subscriptions
msgid "Subscriptions" msgid "Subscriptions"
msgstr "Abonnements" msgstr "Abonnements"
#: [group]servers #: [group]servers
#, fuzzy
msgid "Groups servers" msgid "Groups servers"
msgstr "Groupes" msgstr ""
#: [group]search_server #: [group]search_server
msgid "Search for a new server" msgid "Search for a new server"
@ -1002,11 +986,11 @@ msgstr "Groupe supprimé avec succès"
#: [groups]name_error #: [groups]name_error
msgid "Please provide a valid group name (4 characters minimum)" msgid "Please provide a valid group name (4 characters minimum)"
msgstr "" msgstr "Merci d'entrer un nom de groupe valide (4 caractères minimum)"
#: [groups]no_creation #: [groups]no_creation
msgid "You cannot create a new Group on this server" msgid "You cannot create a new Group on this server"
msgstr "" msgstr "Aucun formulaire de création de compte na été trouvé sur le serveur"
#: [groups]sub #: [groups]sub
msgid "%s subscribers" msgid "%s subscribers"
@ -1017,9 +1001,8 @@ msgid "%s posts"
msgstr "%s billets" msgstr "%s billets"
#: [groups]disco_error #: [groups]disco_error
#, fuzzy
msgid "This server doesn't exists" msgid "This server doesn't exists"
msgstr "Ce serveur héberge %s comptes" msgstr ""
#: [menu]all #: [menu]all
msgid "All" msgid "All"
@ -1030,14 +1013,12 @@ msgid "Refresh all the streams"
msgstr "Rafraîchir tous les flux" msgstr "Rafraîchir tous les flux"
#: [roster]search #: [roster]search
#, fuzzy
msgid "Search in your contacts" msgid "Search in your contacts"
msgstr "Discuter avec vos contacts" msgstr "Chercher dans vos contacts "
#: [hello]active_contacts #: [hello]active_contacts
#, fuzzy
msgid "Active contacts" msgid "Active contacts"
msgstr "Vos contacts" msgstr "Contacts actifs"
#: [hello]chat #: [hello]chat
msgid "Go on the Chat page" msgid "Go on the Chat page"
@ -1053,7 +1034,7 @@ msgstr "Lire tous ces articles sur la page Actualité"
#: [hello]blog_title #: [hello]blog_title
msgid "Visit your public blog" msgid "Visit your public blog"
msgstr "Aller sur votre blog publique" msgstr "Aller sur votre blog public"
#: [hello]blog_text #: [hello]blog_text
msgid "See your public posts and share them with all your contacts" msgid "See your public posts and share them with all your contacts"
@ -1169,7 +1150,7 @@ msgstr "Mettre à jour ma position"
#: [login_anonymous]bad_username #: [login_anonymous]bad_username
msgid "Bad nickname (between 4 and 40 characters)" msgid "Bad nickname (between 4 and 40 characters)"
msgstr "" msgstr "Mauvais surnom (entre 4 et 40 caractères)"
#: [error]username #: [error]username
msgid "Wrong username" msgid "Wrong username"
@ -1208,7 +1189,6 @@ msgid "Account successfully created"
msgstr "Compte créé avec succès" msgstr "Compte créé avec succès"
#: [error]xmpp_unauthorized #: [error]xmpp_unauthorized
#, fuzzy
msgctxt "[error]xmpp_unauthorized" msgctxt "[error]xmpp_unauthorized"
msgid "Your XMPP server is unauthorized" msgid "Your XMPP server is unauthorized"
msgstr "Votre compte XMPP nest pas autorisé à se connecter" msgstr "Votre compte XMPP nest pas autorisé à se connecter"
@ -1246,7 +1226,6 @@ msgid "Invalid password format"
msgstr "Mot de passe non valide" msgstr "Mot de passe non valide"
#: [error]unauthorized #: [error]unauthorized
#, fuzzy
msgctxt "[error]unauthorized" msgctxt "[error]unauthorized"
msgid "Your XMPP server is unauthorized" msgid "Your XMPP server is unauthorized"
msgstr "Votre compte XMPP nest pas autorisé à se connecter" msgstr "Votre compte XMPP nest pas autorisé à se connecter"
@ -1300,12 +1279,10 @@ msgid "Population"
msgstr "Population" msgstr "Population"
#: [menu]empty_title #: [menu]empty_title
#, fuzzy
msgid "No news yet..." msgid "No news yet..."
msgstr "Pas de commentaires pour le moment" msgstr "Pas de commentaires pour le moment"
#: [menu]empty #: [menu]empty
#, fuzzy
msgid "Welcome on your news feed, here you will see all the posts published by your contacts and in the groups you have subscribed." msgid "Welcome on your news feed, here you will see all the posts published by your contacts and in the groups you have subscribed."
msgstr "Bienvenue sur flux dactualité, ici vous verrez tous les billets publiés dans les groupes auxquels vous vous êtes abonnés." msgstr "Bienvenue sur flux dactualité, ici vous verrez tous les billets publiés dans les groupes auxquels vous vous êtes abonnés."
@ -1439,16 +1416,15 @@ msgstr "Vous pouvez également utiliser des services comme Imgur ou Flickr pour
#: [post]repost #: [post]repost
msgid "This is a re-post from %s" msgid "This is a re-post from %s"
msgstr "" msgstr "Ceci est une republication de %s"
#: [post]repost_profile #: [post]repost_profile
msgid "See %s profile" msgid "See %s profile"
msgstr "" msgstr "Voir le profil de %s"
#: [post]public #: [post]public
#, fuzzy
msgid "Publish this post publicly?" msgid "Publish this post publicly?"
msgstr "Publier ce billet sur votre flux public?" msgstr ""
#: [post]blog_add #: [post]blog_add
msgid "Post published on your blog" msgid "Post published on your blog"
@ -1496,11 +1472,11 @@ msgstr "Présence"
#: [status]online #: [status]online
msgid "Online with Movim" msgid "Online with Movim"
msgstr "" msgstr "En ligne avec Movim"
#: [publish]title #: [publish]title
msgid "Publish" msgid "Publish"
msgstr "" msgstr "Publier"
#: [publish]attach #: [publish]attach
msgid "Add a file or a picture to your post" msgid "Add a file or a picture to your post"
@ -1508,11 +1484,11 @@ msgstr ""
#: [publish]no_publication #: [publish]no_publication
msgid "You cannot publish a post on this Group" msgid "You cannot publish a post on this Group"
msgstr "" msgstr "Vous ne pouvez pas publier de billet sur ce groupe"
#: [publish]form_filled #: [publish]form_filled
msgid "Some fields have been filled in. Do you still want to go back and loose their content?" msgid "Some fields have been filled in. Do you still want to go back and loose their content?"
msgstr "" msgstr "Certains champs ont été remplis. Êtes-vous sûr de vouloir revenir en arrière et de perdre le contenu déjà saisi ?"
#: [public_groups]shared #: [public_groups]shared
msgid "Shared" msgid "Shared"
@ -1548,31 +1524,31 @@ msgstr "Utilisateurs du salon"
#: [chatrooms]bad_nickname #: [chatrooms]bad_nickname
msgid "Please enter a correct nickname (2 to 40 characters)" msgid "Please enter a correct nickname (2 to 40 characters)"
msgstr "" msgstr "Merci d'entrer un surnom valide (entre 2 et 40 caractères)"
#: [room]anonymous_title #: [room]anonymous_title
msgid "Public chatroom" msgid "Public chatroom"
msgstr "" msgstr "Salon public"
#: [room]no_room #: [room]no_room
msgid "Please provide a room address" msgid "Please provide a room address"
msgstr "" msgstr "Merci d'entrer l'adresse d'un salon"
#: [room]anonymous_text1 #: [room]anonymous_text1
msgid "You are currently logued as an anonymous user." msgid "You are currently logued as an anonymous user."
msgstr "" msgstr "Vous êtes actuellement connecté en tant qu'anonyme"
#: [room]anonymous_text2 #: [room]anonymous_text2
msgid "You can join using your own account or create one on the login page by loging out using the cross in the top-right corner." msgid "You can join using your own account or create one on the login page by loging out using the cross in the top-right corner."
msgstr "" msgstr "Vous pouvez vous connecter en utilisant votre propre compte ou en créer un sur la page de connexion, en cliquant sur la croix en haut à droite."
#: [room]anonymous_login #: [room]anonymous_login
msgid "Login on %s" msgid "Login on %s"
msgstr "" msgstr "Connexion sur %s"
#: [room]nick #: [room]nick
msgid "Your nickname" msgid "Your nickname"
msgstr "" msgstr "Votre surnom"
#: [roster]ungrouped #: [roster]ungrouped
msgid "Ungrouped" msgid "Ungrouped"
@ -1599,14 +1575,12 @@ msgid "Please enter a valid Jabber ID"
msgstr "Veuillez entrer un identifiant Jabber valide" msgstr "Veuillez entrer un identifiant Jabber valide"
#: [roster]no_contacts_title #: [roster]no_contacts_title
#, fuzzy
msgid "No contacts ?" msgid "No contacts ?"
msgstr "Vos contacts" msgstr ""
#: [roster]no_contacts_text #: [roster]no_contacts_text
#, fuzzy
msgid "You can add one using the + button bellow" msgid "You can add one using the + button bellow"
msgstr "Pas de contacts? Vous pouvez en ajouter un en cliquant sur le bouton + ci-dessous ou aller sur la page Explorer" msgstr ""
#: [roster]show_hide #: [roster]show_hide
msgid "Show/Hide" msgid "Show/Hide"
@ -1689,9 +1663,8 @@ msgid "No contact specified"
msgstr "Aucun contact indiqué" msgstr "Aucun contact indiqué"
#: [upload]title #: [upload]title
#, fuzzy
msgid "Upload a file" msgid "Upload a file"
msgstr "Téléverser" msgstr ""
#: [upload]choose #: [upload]choose
msgid "Choose a file to upload" msgid "Choose a file to upload"
@ -1718,10 +1691,9 @@ msgid "Your profile is now restricted"
msgstr "Votre profil est maintenant restreint" msgstr "Votre profil est maintenant restreint"
#: [general]nickname #: [general]nickname
#, fuzzy
msgctxt "[general]nickname" msgctxt "[general]nickname"
msgid "Nickname" msgid "Nickname"
msgstr "Pseudonyme" msgstr "Surnom"
#: [accounts]twitter #: [accounts]twitter
msgid "Twitter" msgid "Twitter"
@ -1736,15 +1708,13 @@ msgid "Yahoo"
msgstr "Yahoo" msgstr "Yahoo"
#: [accounts]accounts_nickname #: [accounts]accounts_nickname
#, fuzzy
msgctxt "[accounts]accounts_nickname" msgctxt "[accounts]accounts_nickname"
msgid "Nickname" msgid "Nickname"
msgstr "Pseudonyme" msgstr "Surnom"
#: [accounts]accounts_yahoo #: [accounts]accounts_yahoo
#, fuzzy
msgid "Yahoo Account" msgid "Yahoo Account"
msgstr "Compte" msgstr "Compte Yahoo"
#: [privacy]privacy_title #: [privacy]privacy_title
msgid "Privacy Level" msgid "Privacy Level"
@ -1880,7 +1850,7 @@ msgstr "Partager"
#: [page]room #: [page]room
msgid "Room" msgid "Room"
msgstr "" msgstr "Salon"
#: [error]error #: [error]error
msgid "Error: %s" msgid "Error: %s"
@ -2048,11 +2018,11 @@ msgstr "Connexion"
#: [button]bool_yes #: [button]bool_yes
msgid "Yes" msgid "Yes"
msgstr "Oui" msgstr ""
#: [button]bool_no #: [button]bool_no
msgid "No" msgid "No"
msgstr "Non" msgstr ""
#: [button]return #: [button]return
msgid "Return" msgid "Return"
@ -2111,10 +2081,9 @@ msgid "Sunday"
msgstr "Dimanche" msgstr "Dimanche"
#: [gender]nil #: [gender]nil
#, fuzzy
msgctxt "[gender]nil" msgctxt "[gender]nil"
msgid "None" msgid "None"
msgstr "Aucun" msgstr ""
#: [gender]male #: [gender]male
msgid "Male" msgid "Male"
@ -2149,10 +2118,9 @@ msgid "Registered"
msgstr "Inscrit" msgstr "Inscrit"
#: [marital]nil #: [marital]nil
#, fuzzy
msgctxt "[marital]nil" msgctxt "[marital]nil"
msgid "None" msgid "None"
msgstr "Aucun" msgstr ""
#: [marital]single #: [marital]single
msgid "Single" msgid "Single"
@ -2627,7 +2595,6 @@ msgid "Yesterday"
msgstr "Hier" msgstr "Hier"
#: [date]ago #: [date]ago
#, fuzzy
msgid "%d days ago" msgid "%d days ago"
msgstr " Il y a %d jours" msgstr " Il y a %d jours"
@ -2657,11 +2624,11 @@ msgstr "courriel"
#: [post]no_comments #: [post]no_comments
msgid "No comments yet" msgid "No comments yet"
msgstr "Pas de commentaires pour le moment" msgstr ""
#: [post]no_comments_stream #: [post]no_comments_stream
msgid "No comments stream" msgid "No comments stream"
msgstr "Pas de flux de commentaires" msgstr ""
#: [post]no_load #: [post]no_load
msgid "Your feed cannot be loaded." msgid "Your feed cannot be loaded."
@ -2684,9 +2651,8 @@ msgid "Show the older comments"
msgstr "Afficher les commentaires plus anciens" msgstr "Afficher les commentaires plus anciens"
#: [post]comments_loading #: [post]comments_loading
#, fuzzy
msgid "Loading comments..." msgid "Loading comments..."
msgstr "Chargement des commentaires…" msgstr ""
#: [post]comments_get #: [post]comments_get
msgid "Get the comments" msgid "Get the comments"
@ -2731,300 +2697,3 @@ msgstr "LAPI est indisponible pour le moment, réessayez plus tard."
#: [field]type_here #: [field]type_here
msgid "Type here" msgid "Type here"
msgstr "Rédigez votre message ici" msgstr "Rédigez votre message ici"
#~ msgid "Environment"
#~ msgstr "Environnement"
#~ msgid "You can login with Facebook (chat only) using %syour.id@chat.facebook.com%s and your password"
#~ msgstr "Vous pouvez vous connecter avec Facebook (messagerie instantanée uniquement) en entrant %svotre.id@chat.facebook.com%s et votre mot de passe"
#~ msgid "%sGmail accounts are also compatible%s but are not fully supported"
#~ msgstr "%sLes comptes Gmail sont aussi compatibles%s mais ne sont pas complètement pris en charge"
#~ msgid "You can login using your favorite Jabber account"
#~ msgstr "Vous pouvez vous connecter avec votre compte Jabber favori"
#~ msgid "or with our demonstration account"
#~ msgstr "ou avec notre compte de démonstration"
#~ msgid "%s has been removed from your public groups"
#~ msgstr "%s a été supprimé de vos groupes publics"
#~ msgid "Remove a chatroom"
#~ msgstr "Enlever un salon de discussion"
#~ msgid "You are going to remove the following chatroom. Please confirm your action."
#~ msgstr "Vous allez supprimer le salon de discussion suivant de vos signets. Confirmez sil vous plaît."
#~ msgid "Remote application incompatible"
#~ msgstr "Lapplication distante est incompatible"
#~ msgid "Remove"
#~ msgstr "Retirer"
#~ msgid "remorseful"
#~ msgstr "plein de remords"
#~ msgid "Movim's folder must be writable."
#~ msgstr "Le dossier racine de Movim doit être accessible en écriture."
#~ msgid "Couldn't create directory '%s'."
#~ msgstr "La création du répertoire '%s' est impossible."
#~ msgid "Couldn't create configuration file '%s'."
#~ msgstr "La création du fichier de configuration '%s' est impossible."
#~ msgid "Compatibility Test"
#~ msgstr "Test de compatibilité"
#~ msgid "User not logged in."
#~ msgstr "Vous n'êtes pas authentifié."
#~ msgid "JID not provided."
#~ msgstr "JID indisponible."
#~ msgid "jid '%s' is incorrect"
#~ msgstr "Le JID '%s' n'est pas valide"
#~ msgid "Cannot open log file '%s'"
#~ msgstr "Le journal '%s' ne peut être ouvert"
#~ msgid "%s - Account Creation"
#~ msgstr "%s - Création de compte"
#~ msgid "Remove this contact"
#~ msgstr "Supprimer ce contact"
#~ msgid "Debug console"
#~ msgstr "Console de débogage"
#~ msgid "Logout"
#~ msgstr "Se déconnecter"
#~ msgid "Decline"
#~ msgstr "Refuser"
#~ msgid "Loading the contact feed ..."
#~ msgstr "Chargement du flux ..."
#~ msgid "wants to talk with you"
#~ msgstr "veut discuter avec vous"
#~ msgid "or"
#~ msgstr "ou"
#~ msgid "Actual version : "
#~ msgstr "Version actuelle : "
#~ msgid "Install %s and %s packages"
#~ msgstr "Veuillez installer les paquets %s et %s"
#~ msgid "Update your PHP version or contact your server administrator"
#~ msgstr "Mettez à jour votre version de PHP ou contactez l'administrateur de votre serveur"
#~ msgid "Enable read and write rights on Movim's root folder"
#~ msgstr "Activez les droits de lecture et d'écriture sur le dossier racine de Movim"
#~ msgid "Please remove the %s folder in order to complete the installation"
#~ msgstr "Veuillez supprimer le dossier %s pour terminer l'installation"
#~ msgid "Database Movim schema installed"
#~ msgstr "Le schéma des tables a été installé"
#~ msgid "Valid Bosh"
#~ msgstr "Bosh valide"
#~ msgid "Success !"
#~ msgstr "Bravo !"
#~ msgid "The current BOSH URL in invalid"
#~ msgstr "L'URL Bosh donnée n'est pas valide"
#~ msgid "Loading your feed ..."
#~ msgstr "Chargement de votre flux ..."
#~ msgid "Show All"
#~ msgstr "Tout afficher"
#~ msgid "Follow"
#~ msgstr "Suivre"
#~ msgid "Database Detected"
#~ msgstr "Base de données détectée"
#~ msgid "Movim requires the %s extension."
#~ msgstr "Movim a besoin de l'extension %s."
#~ msgid "The following requirements were not met. Please make sure they are all satisfied in order to install Movim."
#~ msgstr "Les dépendances ci-dessous ne sont pas satisfaites. Assurez-vous qu'elles le soient afin d'installer Movim."
#~ msgid "You can now access your shiny Movim instance %sJump In !%s"
#~ msgstr "Vous pouvez maintenant accéder à votre version fraîchement installée de Movim %sAllons y !%s"
#~ msgid "Install the %s package"
#~ msgstr "Installer le paquet %s"
#~ msgid "XMPP Connection Preferences"
#~ msgstr "Configuration de la connexion XMPP"
#~ msgid "You entered different passwords"
#~ msgstr "Vous avez entré des mots de passe différents"
#~ msgid "BOSH Connection Preferences"
#~ msgstr "Configuration de la connexion BOSH"
#~ msgid "Wrong ID"
#~ msgstr "Mauvais identifiant"
#~ msgid "Only alphanumerics elements are authorized"
#~ msgstr "Seul des éléments alphanumériques sont autorisés"
#~ msgid "Make sure your password is safe :"
#~ msgstr "Soyez sur que votre mot de passe est suffisamment robuste :"
#~ msgid "Example :"
#~ msgstr "Exemple :"
#~ msgid "Same here !"
#~ msgstr "Même chôse ici !"
#~ msgid "Retype"
#~ msgstr "Retaper"
#~ msgid "Pseudo"
#~ msgstr "Pseudo"
#~ msgid "Create"
#~ msgstr "Créer"
#~ msgid "Create my vCard"
#~ msgstr "Créer ma vCard"
#~ msgid "A capital letter, a digit and a special character are recommended"
#~ msgstr "Un bon mot de passe est composé d'au moins une majuscule, un chiffre et un caractère spécial"
#~ msgid "8 characters"
#~ msgstr "8 caractères"
#~ msgid "Proxy Preferences"
#~ msgstr "Préférences du Proxy"
#~ msgid "Address"
#~ msgstr "Adresse"
#~ msgid "Firstly fill in this blank with a brand new account ID, this address will follow you on all the Movim network !"
#~ msgstr "Tout d'abord remplir ce vide avec un ID de tout nouveau compte, cette adresse vous suivra sur tout le réseau Movim !"
#~ msgid "%s - Add An Account"
#~ msgstr "%s - Ajouter Un Compte"
#~ msgid "Add your login informations"
#~ msgstr "Ajoutez vos informations de connexion"
#~ msgid "Client Name"
#~ msgstr "Nom du client"
#~ msgid "Client Type"
#~ msgstr "Type de Client"
#~ msgid "Contacts (%s)"
#~ msgstr "Contacts (%s)"
#~ msgid "Your server doesn't support post publication, you can only read contact's feeds"
#~ msgstr "Votre serveur ne gère pas la publication des billets, vous ne pouvez que lire les flux de vos contacts."
#~ msgid "No profile yet ?"
#~ msgstr "Pas encore de profil ?"
#~ msgid "Edit my Profile"
#~ msgstr "Modifier mon profil"
#~ msgid "PHP version mismatch. Movim requires PHP 5.3 minimum."
#~ msgstr "La version de PHP ne correspond pas. Movim nécessite la version 5.3 au minimum."
#~ msgid "normal"
#~ msgstr "standard"
#~ msgid "terse"
#~ msgstr "concis"
#~ msgid "empty"
#~ msgstr "vide"
#~ msgid "Keep in mind that Movim is still under development and will handle many personal details. Its use can potentially endanger your data. Always pay attention to information that you submit."
#~ msgstr "Gardez à l'esprit que Movim est encore en développement et va manipuler des informations personnelles. Son utilisation peut donc les mettre en danger. Faites donc toujours attention aux informations que vous envoyez."
#~ msgid "Before you enjoy your social network, a few adjustements are required."
#~ msgstr "Avant que vous utilisiez votre réseau social, quelques ajustements sont nécessaires."
#~ msgid "ultimate"
#~ msgstr "complet"
#~ msgid "talkative"
#~ msgstr "bavard"
#~ msgid "Although Movim is evolving fast, many (many) features are missing. Be patient ;). You can have a look %s at next versions's roadmaps %s to know if the one you want is on its way."
#~ msgstr "Même si Movim avance vite, il manque encore de (très) nombreuses fonctionnalités. Soyez patient ;). Vous pouvez aller jeter un œil aux %s feuilles de routes des prochaines version %s pour voir si celle-ci n'est pas déjà prévue."
#~ msgid "Go to the %s to the Frequently Asked Questions %s or come ask your question on the official chatroom %s or via our mailing-list (%s see the dedicated page %s)."
#~ msgstr "Allez jeter un oeil %s à la Foire aux Questions %s ou venez nous la poser directement sur le salon officiel %s ou sur la mailing-list (%s voir la page dédiée %s)."
#~ msgid "Don't forget that Movim is an open source project, a helping hand is always welcome (see %s Can I participate %s)"
#~ msgstr "Et n'oubliez pas que Movim est un logiciel libre, un petit coup de main est toujours le bienvenu (voir la page %s Puis-je participer %s)."
#~ msgid "Link my current account"
#~ msgstr "Lier mon compte actuel"
#~ msgid "Connecting..."
#~ msgstr "Connexion…"
#~ msgid "Invite this user"
#~ msgstr "Inviter cet utilisateur"
#~ msgid "Bosh connection failed with error '%s'"
#~ msgstr "La connection Bosh a échoué avec l'erreur '%s'"
#~ msgid "Database connection failed with error '%s'"
#~ msgstr "La connexion à la base de données à échoué avec l'erreur '%s'"
#~ msgid "XMPP connection through Bosh failed with error '%s'"
#~ msgstr "La connection XMPP à travers Bosh a échoué avec l'erreur '%s'"
#~ msgid "Send request"
#~ msgstr "Envoyer la demande"
#~ msgid "Thank you for downloading Movim!"
#~ msgstr "Merci d'avoir téléchargé Movim !"
#~ msgid "Some errors were detected. Please correct them for the installation to proceed."
#~ msgstr "Des erreurs ont été détectées. Veuillez les corriger pour terminer correctement l'installation."
#~ msgid "Cannot load element value '%s'"
#~ msgstr "Impossible de charger la valeur de l'élément « %s »"
#~ msgid "Invalid name"
#~ msgstr "Nom incorrect"
#~ msgid "Username already taken"
#~ msgstr "Identifiant déjà utilisé"
#~ msgid "What is Movim?"
#~ msgstr "Quest-ce que Movim?"
#~ msgid "My Posts"
#~ msgstr "Mes billets"
#~ msgid "I can't find the answer to my question here"
#~ msgstr "Ma question nest pas listée ici"
#~ msgid "Visit the page %s What is Movim ? %s to know more about the project, its aims and understand how it works."
#~ msgstr "Visitez la page %s Quest-ce que Movim ? %s pour en savoir plus le projet, ses buts et comprendre son fonctionnement."
#~ msgid "Some features are missing/I can't do everything I used to do on other social networks"
#~ msgstr "Il manque des fonctionnalités / Je narrive pas à faire ce que je faisais sur les autres réseaux sociaux"
#~ msgid "Could not communicate with the XMPP server"
#~ msgstr "Erreur de communication avec le serveur XMPP"
#~ msgid "Could not connect to the XMPP server"
#~ msgstr "Erreur de connexion au serveur XMPP"

View file

@ -0,0 +1,215 @@
<?php
namespace Movim\i18n;
class Locale {
private static $_instance;
public $translations;
public $language;
public $hash = array();
private function __construct()
{
$this->loadIni(
LOCALES_PATH . 'locales.ini',
true,
INI_SCANNER_RAW);
$dir = scandir(WIDGETS_PATH);
foreach($dir as $widget) {
$path = WIDGETS_PATH . $widget . '/locales.ini';
if(file_exists($path)) {
$this->loadIni($path);
}
}
}
/**
* @desc Load a locales ini file and merge it with hash attribute
* @param $file The path of the fie
*/
private function loadIni($file)
{
$this->hash = array_merge_recursive(
$this->hash,
parse_ini_file(
$file,
true,
INI_SCANNER_RAW
)
);
}
public static function start()
{
if(!isset(self::$_instance)) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* @desc Return an array containing all the presents languages in i18n
*/
public function getList() {
require_once('languages.php');
$lang_list = get_lang_list();
$dir = scandir(LOCALES_PATH);
$po = array();
foreach($dir as $files) {
$explode = explode('.', $files);
if(end($explode) == 'po') {
$po[$explode[0]] = $lang_list[$explode[0]];
}
}
return $po;
}
/**
* @desc Translate a key
* @param $key The key to translate
* @param $args Arguments to pass to sprintf
*/
public function translate($key, $args = false)
{
$arr = explode('.', $key);
if(is_array($this->hash)
&& array_key_exists($arr[0], $this->hash)
&& array_key_exists($arr[1], $this->hash[$arr[0]])) {
$skey = $this->hash[$arr[0]][$arr[1]];
if(is_array($this->translations)
&& array_key_exists($skey, $this->translations)
&& isset($this->translations[$skey])) {
$string = $this->translations[$skey];
} else {
if($this->language != 'en') {
\Utils::log('Locale: Translation not found in ['.$this->language.'] for "'.$key.'" : "'.$skey.'"');
}
if(is_string($skey)) {
$string = $skey;
} else {
\Utils::log('Locale: Double definition for "'.$key.'" got '.serialize($skey));
$string = $skey[0];
}
}
if($args != false) {
array_unshift($args, $string);
$string = call_user_func_array("sprintf", $args);
}
return $string;
} else {
\Utils::log('Locale: Translation key "'.$key.'" not found');
}
}
/**
* @desc Auto-detects the language from the user browser
*/
public function detect()
{
$langs = array();
preg_match_all(
'/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i',
$_SERVER['HTTP_ACCEPT_LANGUAGE'],
$lang_parse);
if (count($lang_parse[1])) {
$langs = array_combine($lang_parse[1], $lang_parse[4]);
foreach ($langs as $lang => $val) {
if ($val === '') $langs[$lang] = 1;
}
arsort($langs, SORT_NUMERIC);
}
while((list($key, $value) = each($langs))) {
if(file_exists(LOCALES_PATH . $key . '.po')) {
$this->language = $key;
return;
}
$exploded = explode('-', $key);
$key = reset($exploded);
if(file_exists(LOCALES_PATH . $key . '.po')) {
$this->language = $key;
return;
}
$this->language = 'en';
}
}
/**
* @desc Load a specific language
* @param $language The language key to load
*/
public function load($language)
{
$this->language = $language;
$this->loadPo();
}
/**
* @desc Parses a .po file based on the current language
*/
public function loadPo()
{
$pofile = LOCALES_PATH.$this->language.'.po';
if(!file_exists($pofile)) {
return false;
}
// Parsing the file.
$handle = fopen($pofile, 'r');
$this->translations = array();
$msgid = "";
$msgstr = "";
$last_token = "";
while($line = fgets($handle)) {
if($line[0] == "#" || trim(rtrim($line)) == "") {
continue;
}
if(preg_match('#^msgid#', $line)) {
if($last_token == "msgstr") {
$this->translations[$msgid] = $msgstr;
}
$last_token = "msgid";
$msgid = $this->getQuotedString($line);
}
else if(preg_match('#^msgstr#', $line)) {
$last_token = "msgstr";
$msgstr = $this->getQuotedString($line);
}
else {
$last_token .= $this->getQuotedString($line);
}
}
if($last_token == "msgstr") {
$this->translations[$msgid] = $msgstr;
}
fclose($handle);
}
private function getQuotedString($string)
{
$matches = array();
preg_match('#"(.+)"#', $string, $matches);
if(isset($matches[1]))
return $matches[1];
}
}

View file

@ -0,0 +1,206 @@
<?php
/**
* Return an array containing all the presents languages in i18n/
*
*/
function get_lang_list() {
$lang_list = array(
'aa' => "Afar",
'ab' => "Abkhazian",
'af' => "Afrikaans",
'am' => "Amharic",
'an' => "Aragon&#233;s",
'ar' => "&#1593;&#1585;&#1576;&#1610;",
'as' => "Assamese",
'ast' => "Asturianu",
'ay' => "Aymara",
'az' => "&#1040;&#1079;&#1241;&#1088;&#1073;&#1072;&#1112;&#1209;&#1072;&#1085;",
'ba' => "Bashkir",
'be' => "&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1110;",
'ber_tam' => "Tamazigh",
'ber_tam_tfng' => "Tamazigh tifinagh",
'bg' => "&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;",
'bh' => "Bihari",
'bi' => "Bislama",
'bm' => "Bambara",
'bn' => "Bengali; Bangla",
'bo' => "Tibetan",
'br' => "brezhoneg",
'bs' => "bosanski",
'ca' => "Catal&#224;",
'co' => "Corsu",
'cpf' => "Kr&eacute;ol r&eacute;yon&eacute;",
'cpf_dom' => "Krey&ograve;l",
'cpf_hat' => "Kr&eacute;y&ograve;l (P&eacute;yi Dayiti)",
'cs' => "&#269;e&#353;tina",
'cy' => "Cymraeg", # welsh, gallois
'da' => "Dansk",
'de' => "Deutsch",
'dz' => "Bhutani",
'el' => "&#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940;",
'en' => "English",
'en_hx' => "H4ck3R",
'en_sm' => "Smurf",
'eo' => "Esperanto",
'es' => "Espa&#241;ol",
'es_co' => "Colombiano",
'et' => "Eesti",
'eu' => "Euskara",
'fa' => "&#1601;&#1575;&#1585;&#1587;&#1609;",
'ff' => "Fulah", // peul
'fi' => "Suomi",
'fj' => "Fiji",
'fo' => "F&#248;royskt",
'fon' => "Fongb&egrave;",
'fr' => "Fran&#231;ais",
'fr_sc' => "Schtroumpf",
'fr_lpc' => "Langue parl&#233;e compl&#233;t&#233;e",
'fr_lsf' => "Langue des signes fran&#231;aise",
'fr_spl' => "Fran&#231;ais simplifi&#233;",
'fr_tu' => "Fran&#231;ais copain",
'fy' => "Frisian",
'ga' => "Irish",
'gd' => "Scots Gaelic",
'gl' => "Galego",
'gn' => "Guarani",
'grc' => "&#7944;&#961;&#967;&#945;&#943;&#945; &#7961;&#955;&#955;&#951;&#957;&#953;&#954;&#942;", // grec ancien
'gu' => "Gujarati",
'ha' => "Hausa",
'hbo' => "&#1506;&#1489;&#1512;&#1497;&#1514;&#1470;&#1492;&#1514;&#1504;&#1498;", // hebreu classique ou biblique
'he' => "&#1506;&#1489;&#1512;&#1497;&#1514;",
'hi' => "&#2361;&#2367;&#2306;&#2342;&#2368;",
'hr' => "Hrvatski",
'hu' => "Magyar",
'hy' => "Armenian",
'ia' => "Interlingua",
'id' => "Indonesia",
'ie' => "Interlingue",
'io' => "Ido",
'ik' => "Inupiak",
'is' => "&#237;slenska",
'it' => "Italiano",
'it_fem' => "Italiana",
'iu' => "Inuktitut",
'ja' => "&#26085;&#26412;&#35486;",
'jv' => "Javanese",
'ka' => "&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;",
'kk' => "&#2325;&#2379;&#2306;&#2325;&#2339;&#2368;",
'kl' => "Kalaallisut",
'km' => "Cambodian",
'kn' => "Kannada",
'ko' => "&#54620;&#44397;&#50612;",
'ks' => "Kashmiri",
'ku' => "Kurdish",
'ky' => "Kirghiz",
'la' => "lingua latina",
'lb' => "L&euml;tzebuergesch",
'ln' => "Lingala",
'lo' => "&#3742;&#3762;&#3754;&#3762;&#3749;&#3762;&#3751;", # lao
'lt' => "Lietuvi&#371;",
'lu' => "Luba-katanga",
'lv' => "Latvie&#353;u",
'man' => "Mandingue", # a traduire en mandingue
'mfv' => "Manjak", # ISO-639-3
'mg' => "Malagasy",
'mi' => "Maori",
'mk' => "&#1084;&#1072;&#1082;&#1077;&#1076;&#1086;&#1085;&#1089;&#1082;&#1080; &#1112;&#1072;&#1079;&#1080;&#1082;",
'ml' => "Malayalam",
'mn' => "Mongolian",
'mo' => "Moldavian",
'mos' => "Mor&eacute;",
'mr' => "&#2350;&#2352;&#2366;&#2336;&#2368;",
'ms' => "Bahasa Malaysia",
'mt' => "Maltese",
'my' => "Burmese",
'na' => "Nauru",
'nap' => "Napulitano",
'ne' => "Nepali",
'nqo' => "N'ko", // www.manden.org
'nl' => "Nederlands",
'no' => "Norsk",
'nb' => "Norsk bokm&aring;l",
'nn' => "Norsk nynorsk",
'oc' => "&Ograve;c",
'oc_lnc' => "&Ograve;c lengadocian",
'oc_ni' => "&Ograve;c ni&ccedil;ard",
'oc_ni_la' => "&Ograve;c ni&ccedil;ard (larg)",
'oc_prv' => "&Ograve;c proven&ccedil;au",
'oc_gsc' => "&Ograve;c gascon",
'oc_lms' => "&Ograve;c lemosin",
'oc_auv' => "&Ograve;c auvernhat",
'oc_va' => "&Ograve;c vivaroaupenc",
'om' => "(Afan) Oromo",
'or' => "Oriya",
'pa' => "Punjabi",
'pbb' => 'Nasa Yuwe',
'pl' => "Polski",
'ps' => "Pashto, Pushto",
'pt' => "Portugu&#234;s",
'pt_br' => "Portugu&#234;s do Brasil",
'qu' => "Quechua",
'rm' => "Rhaeto-Romance",
'rn' => "Kirundi",
'ro' => "Rom&#226;n&#259;",
'roa' => "Ch'ti",
'ru' => "&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;",
'rw' => "Kinyarwanda",
'sa' => "&#2360;&#2306;&#2360;&#2381;&#2325;&#2371;&#2340;",
'sc' => "Sardu",
'scn' => "Sicilianu",
'sd' => "Sindhi",
'sg' => "Sangho",
'sh' => "Srpskohrvastski",
'sh_latn' => 'Srpskohrvastski',
'sh_cyrl' => '&#1057;&#1088;&#1087;&#1089;&#1082;&#1086;&#1093;&#1088;&#1074;&#1072;&#1090;&#1089;&#1082;&#1080;',
'si' => "Sinhalese",
'sk' => "Sloven&#269;ina", // (Slovakia)
'sl' => "Sloven&#353;&#269;ina", // (Slovenia)
'sm' => "Samoan",
'sn' => "Shona",
'so' => "Somali",
'sq' => "Shqip",
'sr' => "&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;",
'src' => 'Sardu logudor&#233;su', // sarde cf 'sc'
'sro' => 'Sardu campidan&#233;su',
'ss' => "Siswati",
'st' => "Sesotho",
'su' => "Sundanese",
'sv' => "Svenska",
'sw' => "Kiswahili",
'ta' => "&#2980;&#2990;&#3007;&#2996;&#3021;", // Tamil
'te' => "Telugu",
'tg' => "Tajik",
'th' => "&#3652;&#3607;&#3618;",
'ti' => "Tigrinya",
'tk' => "Turkmen",
'tl' => "Tagalog",
'tn' => "Setswana",
'to' => "Tonga",
'tr' => "T&#252;rk&#231;e",
'ts' => "Tsonga",
'tt' => "&#1058;&#1072;&#1090;&#1072;&#1088;",
'tw' => "Twi",
'ty' => "Reo m&#257;`ohi", // tahitien
'ug' => "Uighur",
'uk' => "&#1091;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;",
'ur' => "&#1649;&#1585;&#1583;&#1608;",
'uz' => "U'zbek",
'vi' => "Ti&#7871;ng Vi&#7879;t",
'vo' => "Volapuk",
'wa' => "Walon",
'wo' => "Wolof",
'xh' => "Xhosa",
'yi' => "Yiddish",
'yo' => "Yoruba",
'za' => "Zhuang",
'zh' => "&#20013;&#25991;", // chinois (ecriture simplifiee)
'zh_tw' => "&#21488;&#28771;&#20013;&#25991;", // chinois taiwan (ecr. traditionnelle)
'zu' => "Zulu"
);
return $lang_list;
}
?>

View file

@ -53,7 +53,8 @@ class User {
$this->config = $session->config; $this->config = $session->config;
$lang = $this->getConfig('language'); $lang = $this->getConfig('language');
if(isset($lang)) { if(isset($lang)) {
loadLanguage($lang); $l = Movim\i18n\Locale::start();
$l->load($lang);
} }
$cd = new modl\CapsDAO; $cd = new modl\CapsDAO;

View file

@ -20,6 +20,25 @@ use Monolog\Logger;
use Monolog\Handler\SyslogHandler; use Monolog\Handler\SyslogHandler;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
class Utils {
public static function log($message, $priority = '')
{
if(LOG_LEVEL != null && LOG_LEVEL > 0) {
$log = new Logger('movim');
$handler = new SyslogHandler('movim');
if(LOG_LEVEL > 1)
$log->pushHandler(new StreamHandler(LOG_PATH.'/movim.log', Logger::DEBUG));
$log->pushHandler($handler, Logger::DEBUG);
$errlines = explode("\n",$message);
foreach ($errlines as $txt) { $log->addDebug($txt); }
}
}
}
/** /**
* Return the list of gender * Return the list of gender
*/ */
@ -502,7 +521,6 @@ function generateUUID($string = false) {
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
} }
function movim_log($logs) { function movim_log($logs) {
$log = new Logger('movim'); $log = new Logger('movim');
$log->pushHandler(new SyslogHandler('movim')); $log->pushHandler(new SyslogHandler('movim'));
@ -614,4 +632,16 @@ function requestURL($url, $timeout = 10, $post = false) {
return false; return false;
} }
} }
/*
* @desc Translate something
*/
function __() {
$args = func_get_args();
$l = Movim\i18n\Locale::start();
$string = array_shift($args);
return $l->translate($string, $args);
}
?> ?>

View file

@ -27,7 +27,7 @@ class WidgetBase
protected $user; protected $user;
protected $name; protected $name;
protected $pure; // To render the widget without the container protected $pure; // To render the widget without the container
protected $translations = array(); // Set translations in the controller //protected $translations = array(); // Set translations in the controller
protected $_view; protected $_view;
public $events; public $events;
public $filters; public $filters;
@ -73,11 +73,6 @@ class WidgetBase
'tpl_ext' => 'tpl', 'tpl_ext' => 'tpl',
'auto_escape' => false 'auto_escape' => false
); );
if(file_exists($this->respath('locales.ini', true))) {
$this->translations = parse_ini_file($this->respath('locales.ini', true), true, INI_SCANNER_RAW);
}
// We load the template engine // We load the template engine
$this->view = new Tpl; $this->view = new Tpl;
$this->view->objectConfigure($config); $this->view->objectConfigure($config);
@ -87,30 +82,14 @@ class WidgetBase
$this->pure = false; $this->pure = false;
} }
function __() { function __()
{
$args = func_get_args(); $args = func_get_args();
global $translationshash; return call_user_func_array('__', $args);
if(!is_array($this->translations)) $this->translations = array();
$tmp_trans = array_merge_recursive($this->translations, $translationshash);
$arr = explode('.', $args[0]);
if(is_array($tmp_trans)
&& array_key_exists($arr[0], $tmp_trans)
&& array_key_exists($arr[1], $tmp_trans[$arr[0]])) {
$vars = $tmp_trans[$arr[0]][$arr[1]];
if(is_array($vars))
$args[0] = $vars[0];
else
$args[0] = $vars;
return call_user_func_array('t', $args);
} else {
return $args[0];
}
} }
function ___() { function ___()
{
echo call_user_func_array(array(&$this, '__'), func_get_args()); echo call_user_func_array(array(&$this, '__'), func_get_args());
} }
@ -119,7 +98,8 @@ class WidgetBase
return $this->user->isSupported($key); return $this->user->isSupported($key);
} }
function route() { function route()
{
return call_user_func_array('Route::urlize',func_get_args()); return call_user_func_array('Route::urlize',func_get_args());
} }
@ -147,9 +127,7 @@ class WidgetBase
function display() {} function display() {}
/** /**
* Return the template's HTML code * àdesc Return the template's HTML code
* @param a specific template name to load (like Ruby partials)
* @param load the parent template, like for WidgetCommon
*/ */
function draw() function draw()
{ {

View file

@ -89,7 +89,8 @@ article section content em {
/* Some CSS to style the quote XHTML generated by Movim */ /* Some CSS to style the quote XHTML generated by Movim */
article section content blockquote, article section content blockquote,
article section content q { article section content q,
article section content div.quote {
display: block; display: block;
border-radius: 2px; border-radius: 2px;
border: 1px solid rgba(0, 0, 0, 0.12); border: 1px solid rgba(0, 0, 0, 0.12);
@ -97,39 +98,45 @@ article section content q {
box-sizing: border-box; box-sizing: border-box;
} }
article section content q:before, article section content div.quote:before,
article section content q:after { article section content div.quote:after {
content: ''; content: '';
display: none; display: none;
} }
article section content q ul { article section content div.quote ul {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
} }
article section content q li { article section content div.quote li {
flex: 1 25%; flex: 1 25%;
list-style-type: none; list-style-type: none;
padding-left: 0; padding-left: 0;
} }
article section content q li:first-child { article section content div.quote li:first-child {
flex: 1 75%; flex: 1 75%;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
article section content q li { article section content div.quote li {
flex: 1 100%; flex: 1 100%;
} }
} }
article section content q li img { article section content div.quote li img {
max-height: 10rem; max-height: 10rem;
max-width: 100%; max-width: 100%;
float: right; float: right;
} }
article section content img.big_picture {
display: block;
margin: 0rem auto;
margin-bottom: 1rem;
}
article ul li.pic img { article ul li.pic img {
max-width: 30rem; max-width: 30rem;
max-height: 30rem; max-height: 30rem;

View file

@ -218,6 +218,13 @@ form > div .radio > input[type="radio"]:checked + label:hover {
box-shadow: inset 0 0 0rem 0.4rem white, 0 0 0 1.5rem rgba(0, 0, 0, 0.1); box-shadow: inset 0 0 0rem 0.4rem white, 0 0 0 1.5rem rgba(0, 0, 0, 0.1);
} }
/* Disabled */
form > div > input:disabled,
form > div > input:disabled + label {
opacity: 0.5;
}
/* Button */ /* Button */
.button.oppose { .button.oppose {

View file

@ -13,6 +13,7 @@ ul li {
} }
ul > a { ul > a {
max-width: 100%;
display: block; display: block;
} }

View file

@ -152,11 +152,13 @@ body > nav.active {
width: 45rem; width: 45rem;
} }
body > div.dialog:not(:empty) ~ main, @media screen and (min-width: 1024px) {
body > div.dialog:not(:empty) ~ nav, body > div.dialog:not(:empty) ~ main,
body > nav.active + main { body > div.dialog:not(:empty) ~ nav,
opacity: 0.5; body > nav.active + main {
pointer-events: none; opacity: 0.5;
pointer-events: none;
}
} }
body > nav li { /* Little hack for the navbar */ body > nav li { /* Little hack for the navbar */
@ -227,6 +229,7 @@ main {
background-color: white; background-color: white;
-webkit-transition: opacity 0.3s ease-in-out; -webkit-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out;
transform: translateZ(0);
} }
nav + main { nav + main {
@ -708,6 +711,7 @@ main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last
width: 40rem; width: 40rem;
pointer-events: none; pointer-events: none;
transition: opacity 0.2s ease, bottom 0.4s ease; transition: opacity 0.2s ease, bottom 0.4s ease;
transform: translateX(0);
} }
.snackbar p, .snackbar p,
@ -877,6 +881,7 @@ dl dd {
.spinner:before, .spinner:before,
.spinner:after { .spinner:after {
transition: top .3s ease-in-out; transition: top .3s ease-in-out;
transform: translateX(0);
content: ''; content: '';
position: absolute; position: absolute;
left: calc(50% - 3.5rem); left: calc(50% - 3.5rem);
@ -890,8 +895,8 @@ dl dd {
} }
.spinner.on:before { .spinner.on:before {
animation: spinner 1s linear infinite; animation: 1s spinner infinite linear;
-webkit-animation: spinner 1s linear infinite; -webkit-animation: 1s spinner 1s infinite linear;
} }
.spinner:before { .spinner:before {
@ -916,10 +921,12 @@ dl dd {
} }
@keyframes spinner { @keyframes spinner {
from { transform: rotate(0deg); }
to {transform: rotate(360deg);} to {transform: rotate(360deg);}
} }
@-webkit-keyframes spinner { @-webkit-keyframes spinner {
from { transform: rotate(0deg); }
to {-webkit-transform: rotate(360deg);} to {-webkit-transform: rotate(360deg);}
} }