Merge branch 'master' of git://github.com/friendika/friendika

This commit is contained in:
Tobias Diekershoff 2011-06-08 07:21:19 +02:00
commit 9ef5cb1c38
17 changed files with 838 additions and 588 deletions

View file

@ -525,7 +525,7 @@ function facebook_post_hook(&$a,&$b) {
$search_str = $a->get_baseurl() . '/search';
if(preg_match("/\[url=(.+?)\](.+?)\[\/url\]/is",$msg,$matches)) {
if(preg_match("/\[url=(.*?)\](.*?)\[\/url\]/is",$msg,$matches)) {
// don't use hashtags for message link
@ -536,12 +536,12 @@ function facebook_post_hook(&$a,&$b) {
}
}
$msg = preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/is",'$2 $1',$msg);
$msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg);
if(preg_match("/\[img\](.+?)\[\/img\]/is",$msg,$matches))
if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches))
$image = $matches[1];
$msg = preg_replace("/\[img\](.+?)\[\/img\]/is", t('Image: ') . '$1', $msg);
$msg = preg_replace("/\[img\](.*?)\[\/img\]/is", t('Image: ') . '$1', $msg);
if((strpos($link,$a->get_baseurl()) !== false) && (! $image))
$image = $a->get_baseurl() . '/images/friendika-64.jpg';
@ -557,7 +557,7 @@ function facebook_post_hook(&$a,&$b) {
$msg .= "\n";
foreach($arr as $r) {
$matches = false;
$cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
$cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$msg .= $matches[1];
}

View file

@ -4,9 +4,9 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
define ( 'FRIENDIKA_VERSION', '2.2.1003' );
define ( 'FRIENDIKA_VERSION', '2.2.1004' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1061 );
define ( 'DB_UPDATE_VERSION', 1062 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -2574,7 +2574,7 @@ function prepare_body($item,$attach = false) {
foreach($arr as $r) {
$matches = false;
$icon = '';
$cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
$cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$icontype = strtolower(substr($matches[3],0,strpos($matches[3],'/')));
switch($icontype) {

View file

@ -484,6 +484,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`desc` TEXT NOT NULL ,
`location` TEXT NOT NULL ,
`type` CHAR( 255 ) NOT NULL ,
`nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0',
`adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
`allow_cid` MEDIUMTEXT NOT NULL ,
`allow_gid` MEDIUMTEXT NOT NULL ,

View file

@ -28,69 +28,69 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!\+\,]+)/", ' <a href="$2" target="external-link">$2</a>', $Text);
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" target="external-link">$1</a>', $Text);
$Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" target="external-link">$2</a>', $Text);
$Text = preg_replace("(\[url\=([$URLSearchString]*)\](.*?)\[/url\])", '<a href="$1" target="external-link">$2</a>', $Text);
//$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text);
// Perform MAIL Search
$Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '<a href="mailto:$1">$1</a>', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.+?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text);
// Check for bold text
$Text = preg_replace("(\[b\](.+?)\[\/b])is",'<strong>$1</strong>',$Text);
$Text = preg_replace("(\[b\](.*?)\[\/b])is",'<strong>$1</strong>',$Text);
// Check for Italics text
$Text = preg_replace("(\[i\](.+?)\[\/i\])is",'<em>$1</em>',$Text);
$Text = preg_replace("(\[i\](.*?)\[\/i\])is",'<em>$1</em>',$Text);
// Check for Underline text
$Text = preg_replace("(\[u\](.+?)\[\/u\])is",'<u>$1</u>',$Text);
$Text = preg_replace("(\[u\](.*?)\[\/u\])is",'<u>$1</u>',$Text);
// Check for strike-through text
$Text = preg_replace("(\[s\](.+?)\[\/s\])is",'<strike>$1</strike>',$Text);
$Text = preg_replace("(\[s\](.*?)\[\/s\])is",'<strike>$1</strike>',$Text);
// Check for over-line text
$Text = preg_replace("(\[o\](.+?)\[\/o\])is",'<span class="overline">$1</span>',$Text);
$Text = preg_replace("(\[o\](.*?)\[\/o\])is",'<span class="overline">$1</span>',$Text);
// Check for colored text
$Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1;\">$2</span>",$Text);
$Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])is","<span style=\"color: $1;\">$2</span>",$Text);
// Check for sized text
$Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1;\">$2</span>",$Text);
$Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])is","<span style=\"font-size: $1;\">$2</span>",$Text);
// Check for list text
$Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=1\](.+?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=i\](.+?)\[\/list\]/s",'<ul class="listlowerroman">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=I\](.+?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=a\](.+?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=A\](.+?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text);
$Text = preg_replace("/\[list\](.*?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=1\](.*?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=i\](.*?)\[\/list\]/s",'<ul class="listlowerroman">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=I\](.*?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=a\](.*?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=A\](.*?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text);
$Text = str_replace("[*]", "<li>", $Text);
// Check for font change text
$Text = preg_replace("(\[font=(.+?)\](.+?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);
$Text = preg_replace("(\[font=(.*?)\](.*?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);
// Declare the format for [code] layout
$CodeLayout = '<code>$1</code>';
// Check for [code] text
$Text = preg_replace("/\[code\](.+?)\[\/code\]/is","$CodeLayout", $Text);
$Text = preg_replace("/\[code\](.*?)\[\/code\]/is","$CodeLayout", $Text);
// Declare the format for [quote] layout
$QuoteLayout = '<blockquote>$1</blockquote>';
// Check for [quote] text
$Text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","$QuoteLayout", $Text);
$Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is","$QuoteLayout", $Text);
// Images
// [img]pathtoimage[/img]
$Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text);
$Text = preg_replace("/\[img\](.*?)\[\/img\]/", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text);
// html5 video and audio
$Text = preg_replace("/\[video\](.+?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
$Text = preg_replace("/\[audio\](.+?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
// [img=widthxheight]image source[/img]
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){
// use oembed for youtube links
@ -98,11 +98,11 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[\/youtube\]/",'[/embed]',$Text);
} else {
// Youtube extensions
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $Text);
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $Text);
}
// $Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
// $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
// oembed tag
$Text = oembed_bbcode2html($Text);

View file

@ -13,7 +13,7 @@ function format_event_html($ev) {
$o .= '<p class="description">' . bbcode($ev['desc']) . '</p>';
$o .= '<p>' . t('Starts:') . ' <abbr class="dtstart" title="'
. datetime_convert('UTC','UTC',$ev['start'], ATOM_TIME)
. datetime_convert('UTC','UTC',$ev['start'], $ev['adjust'] ? ATOM_TIME : 'Y-m-d\TH:i:s' )
. '" >'
. (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(),
$ev['start'] /*, format */ )
@ -21,8 +21,9 @@ function format_event_html($ev) {
$ev['start'] /*, format */ ))
. '</abbr></p>';
$o .= '<p>' . t('Ends: ') . '<abbr class="dtend" title="'
. datetime_convert('UTC','UTC',$ev['finish'], ATOM_TIME)
if(! $ev['nofinish'])
$o .= '<p>' . t('Finishes:') . ' <abbr class="dtend" title="'
. datetime_convert('UTC','UTC',$ev['finish'], $ev['adjust'] ? ATOM_TIME : 'Y-m-d\TH:i:s' )
. '" >'
. (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(),
$ev['finish'] /*, format */ )
@ -30,6 +31,7 @@ function format_event_html($ev) {
$ev['finish'] /*, format */ ))
. '</abbr></p>';
if(strlen($ev['location']))
$o .= '<p> ' . t('Location:') . '<span class="location">'
. bbcode($ev['location'])
. '</span></p>';
@ -41,3 +43,17 @@ return $o;
function sort_by_date($a) {
usort($a,'ev_compare');
return $a;
}
function ev_compare($a,$b) {
$date_a = (($a['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$a['start']) : $a['start']);
$date_b = (($b['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$b['start']) : $b['start']);
return strcmp($date_a,$date_b);
}

View file

@ -1618,7 +1618,7 @@ function fix_private_photos($s,$uid) {
$a = get_app();
logger('fix_private_photos');
if(preg_match("/\[img\](.+?)\[\/img\]/is",$s,$matches)) {
if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) {
$image = $matches[1];
logger('fix_private_photos: found photo ' . $image);
if(stristr($image ,$a->get_baseurl() . '/photo/')) {
@ -1649,7 +1649,7 @@ function fix_private_photos($s,$uid) {
function item_getfeedtags($item) {
$ret = array();
$matches = false;
$cnt = preg_match_all('|\#\[url\=(.+?)\](.+?)\[\/url\]|',$item['tag'],$matches);
$cnt = preg_match_all('|\#\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
if($cnt) {
for($x = 0; $x < count($matches); $x ++) {
if($matches[1][$x])
@ -1657,7 +1657,7 @@ function item_getfeedtags($item) {
}
}
$matches = false;
$cnt = preg_match_all('|\@\[url\=(.+?)\](.+?)\[\/url\]|',$item['tag'],$matches);
$cnt = preg_match_all('|\@\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
if($cnt) {
for($x = 0; $x < count($matches); $x ++) {
if($matches[1][$x])
@ -1673,7 +1673,7 @@ function item_getfeedattach($item) {
if(count($arr)) {
foreach($arr as $r) {
$matches = false;
$cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
$cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$ret .= '<link rel="enclosure" href="' . xmlify($matches[1]) . '" type="' . xmlify($matches[3]) . '" ';
if(intval($matches[2]))

View file

@ -23,17 +23,23 @@ function events_post(&$a) {
$finishminute = intval($_POST['finishminute']);
$adjust = intval($_POST['adjust']);
$nofinish = intval($_POST['nofinish']);
$start = sprintf('%d-%d-%d %d:%d:0',$startyear,$startmonth,$startday,$starthour,$startminute);
if($nofinish)
$finish = '0000-00-00 00:00:00';
else
$finish = sprintf('%d-%d-%d %d:%d:0',$finishyear,$finishmonth,$finishday,$finishhour,$finishminute);
if($adjust) {
$start = datetime_convert(date_default_timezone_get(),'UTC',$start);
if(! $nofinish)
$finish = datetime_convert(date_default_timezone_get(),'UTC',$finish);
}
else {
$start = datetime_convert('UTC','UTC',$start);
if(! $nofinish)
$finish = datetime_convert('UTC','UTC',$finish);
}
@ -47,7 +53,7 @@ function events_post(&$a) {
$str_group_deny = perms2str($_POST['group_deny']);
$str_contact_deny = perms2str($_POST['contact_deny']);
dbg(1);
if($event_id) {
$r = q("UPDATE `event` SET
`edited` = '%s',
@ -57,6 +63,7 @@ dbg(1);
`location` = '%s',
`type` = '%s',
`adjust` = %d,
`nofinish` = %d,
`allow_cid` = '%s',
`allow_gid` = '%s',
`deny_cid` = '%s',
@ -70,6 +77,7 @@ dbg(1);
dbesc($location),
dbesc($type),
intval($adjust),
intval($nofinish),
dbesc($str_contact_allow),
dbesc($str_group_allow),
dbesc($str_contact_deny),
@ -84,8 +92,8 @@ dbg(1);
$uri = item_new_uri($a->get_hostname(),local_user());
$r = q("INSERT INTO `event` ( `uid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`,
`adjust`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`)
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s' ) ",
`adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`)
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
intval(local_user()),
dbesc($uri),
dbesc(datetime_convert()),
@ -96,6 +104,7 @@ dbg(1);
dbesc($location),
dbesc($type),
intval($adjust),
intval($nofinish),
dbesc($str_contact_allow),
dbesc($str_group_allow),
dbesc($str_contact_deny),
@ -168,17 +177,38 @@ function events_content(&$a) {
$start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
$finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
$start = datetime_convert('UTC','UTC',$start);
$finish = datetime_convert('UTC','UTC',$finish);
$r = q("SELECT * FROM `event` WHERE `start` >= '%s' AND `finish` <= '%s' AND `uid` = %d ",
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
$r = q("SELECT * FROM `event` WHERE `uid` = %d
AND (( `adjust` = 0 AND `start` >= '%s' AND `finish` <= '%s' )
OR ( `adjust` = 1 AND `start` >= '%s' AND `finish` <= '%s' )) ",
intval(local_user()),
dbesc($start),
dbesc($finish),
intval(local_user())
dbesc($adjust_start),
dbesc($adjust_finish)
);
if(count($r))
foreach($r as $rr)
$o .= format_event_html($rr);
$last_date = '';
$fmt = t('l, F j');
if(count($r)) {
$r = sort_by_date($r);
foreach($r as $rr) {
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], $fmt) : datetime_convert('UTC','UTC',$rr['start'],$fmt));
$d = day_translate($d);
if($d !== $last_date)
$o .= '<hr /><div class="event-list-date">' . $d . '</div>';
$last_date = $d;
$o .= format_event_html($rr);
}
}
return $o;
}
@ -195,15 +225,18 @@ function events_content(&$a) {
$o .= replace_macros($tpl,array(
'$post' => $a->get_baseurl() . '/events',
'$e_text' => t('Event details'),
'$s_text' => t('Start: year-month-day hour:minute'),
'$e_desc' => t('Format is year-month-day hour:minute. Starting date and Description are required.'),
'$s_text' => t('Event Starts:') . ' <span class="required">*</span> ',
'$s_dsel' => datesel('start',$year+5,$year,false,$year,$month,$day),
'$s_tsel' => timesel('start',0,0),
'$f_text' => t('Finish: year-month-day hour:minute'),
'$n_text' => t('Finish date/time is not known or not relevant'),
'$n_checked' => '',
'$f_text' => t('Event Finishes:'),
'$f_dsel' => datesel('finish',$year+5,$year,false,$year,$month,$day),
'$f_tsel' => timesel('finish',0,0),
'$a_text' => t('Adjust for viewer timezone'),
'$a_checked' => '',
'$d_text' => t('Description:'),
'$d_text' => t('Description:') . ' <span class="required">*</span>',
'$d_orig' => '',
'$l_text' => t('Location:'),
'$l_orig' => '',

View file

@ -196,7 +196,7 @@ function item_post(&$a) {
$match = null;
if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
foreach($images as $image) {
@ -235,7 +235,7 @@ function item_post(&$a) {
$match = false;
if(preg_match_all("/\[attachment\](.+?)\[\/attachment\]/",$body,$match)) {
if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match)) {
$attaches = $match[1];
if(count($attaches)) {
foreach($attaches as $attach) {

View file

@ -78,7 +78,7 @@ function message_post(&$a) {
$match = null;
if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
foreach($images as $image) {

View file

@ -548,13 +548,13 @@ foreach($_FILES AS $key => $val) {
*
* We create a wall item for every photo, but we don't want to
* overwhelm the data stream with a hundred newly uploaded photos.
* So we will make one photo (the first one uploaded to this album)
* So we will make the first photo uploaded to this album in the last several hours
* visible by default, the rest will become visible over time when and if
* they acquire comments, likes, dislikes, and/or tags
*
*/
$r = q("SELECT * FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
$r = q("SELECT * FROM `photo` WHERE `album` = '%s' AND `uid` = %d AND `created` > UTC_TIMESTAMP() - INTERVAL 3 HOUR ",
dbesc($album),
intval($page_owner_uid)
);

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1061 );
define( 'UPDATE_VERSION' , 1062 );
/**
*
@ -510,3 +510,6 @@ function update_1060() {
q("ALTER TABLE `event` ADD `uri` CHAR( 255 ) NOT NULL AFTER `cid` ");
}
function update_1061() {
q("ALTER TABLE `event` ADD `nofinish` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `type` ");
}

35
view/event_form.tpl Normal file
View file

@ -0,0 +1,35 @@
<h3>$e_text</h3>
<p>
$e_desc
</p>
<form action="$post" method="post" >
<div id="event-start-text">$s_text</div>
$s_dsel $s_tsel
<div id="event-finish-text">$f_text</div>
$f_dsel $f_tsel
<div id="event-datetime-break"></div>
<input type="checkbox" name="nofinish" value="1" id="event-nofinish-checkbox" $n_checked /> <div id="event-nofinish-text">$n_text</div>
<div id="event-nofinish-break"></div>
<input type="checkbox" name="adjust" value="1" id="event-adjust-checkbox" $a_checked /> <div id="event-adjust-text">$a_text</div>
<div id="event-adjust-break"></div>
<div id="event-desc-text">$d_text</div>
<textarea id="event-desc-textarea" name="desc">$d_orig</textarea>
<div id="event-location-text">$l_text</div>
<textarea id="event-location-textarea" name="location">$l_orig</textarea>
<input id="event-submit" type="submit" name="submit" value="$submit" />
</form>

File diff suppressed because it is too large Load diff

View file

@ -22,6 +22,8 @@ $a->strings["Poll/Feed URL"] = "URL Feed";
$a->strings["Submit"] = "Invia";
$a->strings["Help:"] = "Guida:";
$a->strings["Help"] = "Guida";
$a->strings["File exceeds size limit of %d"] = "Il file supera il limite di dimensione di %d";
$a->strings["File upload failed."] = "Caricamento del file non riuscito.";
$a->strings["Cancel"] = "Annulla";
$a->strings["Tag removed"] = "TAg rimosso";
$a->strings["Remove Item Tag"] = "Rimuovi tag dall'elemento";
@ -77,6 +79,7 @@ $a->strings["Edit post"] = "Modifica messaggio";
$a->strings["Post to Email"] = "Invia a Email";
$a->strings["Edit"] = "Modifica";
$a->strings["Upload photo"] = "Carica foto";
$a->strings["Attach file"] = "Allega file";
$a->strings["Insert web link"] = "Inserisci link";
$a->strings["Insert YouTube video"] = "Inserisci video da YouTube";
$a->strings["Insert Vorbis [.ogg] video"] = "Inserisci video Theora [.ogg]";
@ -85,6 +88,7 @@ $a->strings["Set your location"] = "Imposta la tua posizione";
$a->strings["Clear browser location"] = "Cancella la tua posizione data dal browser";
$a->strings["Permission settings"] = "Impostazione permessi";
$a->strings["CC: email addresses"] = "CC: indirizzi email";
$a->strings["Public post"] = "Messaggio pubblico";
$a->strings["Example: bob@example.com, mary@example.com"] = "Esempio: bob@example.com, mary@example.com";
$a->strings["This introduction has already been accepted."] = "Questa presentazione è già stata accettata.";
$a->strings["Profile location is not valid or does not contain profile information."] = "La posizione del profilo non è valida o non contiene informazioni di profilo.";
@ -119,7 +123,7 @@ $a->strings["Administrator"] = "Amministratore";
$a->strings["Friend/Connection Request"] = "Richieste di Amicizia/Connessione";
$a->strings["Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca"] = "Esempi: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca";
$a->strings["Please answer the following:"] = "Rispondi al seguente:";
$a->strings["Does \$name know you?"] = "\$name ti conosce?";
$a->strings["Does \$name know you?"] = "$name ti conosce?";
$a->strings["Yes"] = "Si";
$a->strings["No"] = "No";
$a->strings["Add a personal note:"] = "Aggiungi una nota personale:";
@ -329,11 +333,10 @@ $a->strings["(Toggle between different identities or community/group pages which
$a->strings["Select an identity to manage: "] = "Seleziona una identità da gestire:";
$a->strings["Normal View"] = "Vista normale";
$a->strings["New Item View"] = "Vista Nuovi Elementi";
$a->strings["%d member"] = array(
0 => "%d membro",
1 => "%d membri",
$a->strings["Warning: This group contains %s member from an insecure network."] = array(
0 => "Attenzione: questo gruppo contiene %s membro da un network insicuro.",
1 => "Attenzione: questo gruppo contiene %s membri da un network insicuro.",
);
$a->strings["Warning: This group contains %s from an insecure network."] = "Attenzione: questo gruppo contiente %s da un network insicuro.";
$a->strings["Private messages to this group are at risk of public disclosure."] = "I messaggi privati a questo gruppo sono a rischio di visualizzazione pubblica.";
$a->strings["No such group"] = "Nessun gruppo";
$a->strings["Group is empty"] = "Il gruppo è vuoto";
@ -342,6 +345,10 @@ $a->strings["Contact: "] = "Contatto:";
$a->strings["Private messages to this person are at risk of public disclosure."] = "I messaggi privati a questa persona sono a rischio di divulgazione al pubblico.";
$a->strings["Invalid contact."] = "Contatto non valido.";
$a->strings["Shared content is covered by the <a href=\"http://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution 3.0</a> license."] = "Il contenuto in comune è coperto dalla licenza <a href=\"http://creativecommons.org/licenses/by/3.0/deed.it\">Creative Commons Attribuzione 3.0</a>.";
$a->strings["Private Notes"] = "Note Private";
$a->strings["Save"] = "Salva";
$a->strings["Item not available."] = "Elemento non disponibile.";
$a->strings["Item was not found."] = "Elemento non trovato.";
$a->strings["Group created."] = "Gruppo creato.";
$a->strings["Could not create group."] = "Impossibile creare il gruppo.";
$a->strings["Group not found."] = "Gruppo non trovato.";
@ -405,11 +412,14 @@ $a->strings["No installed plugins/addons/apps"] = "Nessuno plugin/addons/applica
$a->strings["Please login."] = "Accedi.";
$a->strings["Registration revoked for %s"] = "Registrazione revocata per %s";
$a->strings["Account approved."] = "Account approvato.";
$a->strings["[Embedded content - reload page to view]"] = "[Contenuto incorporato - ricarica la pagina per vederlo]";
$a->strings["Unable to locate original post."] = "Impossibile trovare il messaggio originale.";
$a->strings["Empty post discarded."] = "Messaggio vuoto scartato.";
$a->strings["Wall Photos"] = "Foto Bacheca";
$a->strings["%s commented on your item at %s"] = "%s ha commentato un tuo elemento su %s";
$a->strings["%s posted on your profile wall at %s"] = "%s ha scritto sulla tua bacheca su %s";
$a->strings["noreply"] = "nessuna risposta";
$a->strings["Administrator@"] = "Amministratore@";
$a->strings["%s commented on an item at %s"] = "%s ha commentato un elemento su %s";
$a->strings["%s posted to your profile wall at %s"] = "%s ha scritto sulla tua bacheca su %s";
$a->strings["System error. Post not saved."] = "Errore di sistema. Messaggio non salvato.";
$a->strings["This message was sent to you by %s, a member of the Friendika social network."] = "Questo messaggio ti è stato inviato da %s, un membro del social network Friendika.";
$a->strings["You may visit them online at %s"] = "Puoi visitarli online presso %s";
@ -455,6 +465,7 @@ $a->strings["Message not available."] = "Messaggio non disponibile.";
$a->strings["Delete message"] = "Cancella messaggio";
$a->strings["Send Reply"] = "Invia risposta";
$a->strings["No profile"] = "Nessun profilo";
$a->strings["Access to this profile has been restricted."] = "L'accesso a questo profilo è stato limitato.";
$a->strings["Status"] = "Stato";
$a->strings["Photos"] = "Foto";
$a->strings["Login failed."] = "Accesso fallito.";
@ -462,13 +473,14 @@ $a->strings["Welcome "] = "Benvenuto";
$a->strings["Please upload a profile photo."] = "Carica una foto per il profilo.";
$a->strings["Welcome back "] = "Bentornato ";
$a->strings["The profile address specified does not provide adequate information."] = "L'indirizzo del profilo specificato non fornisce adeguate informazioni.";
$a->strings["No compatible communication protocols or feeds were discovered."] = "Non sono stati trovati nessun protocollo di comunicazione o feed compatibili.";
$a->strings["An author or name was not found."] = "Non è stato trovato un nome dell'autore";
$a->strings["No browser URL could be matched to this address."] = "Nessun URL puo' essere associato a questo indirizzo.";
$a->strings["Limited profile. This person will be unable to receive direct/personal notifications from you."] = "Profilo limitato. Questa persona non sarà in grado di ricevere nofiche dirette/personali da te.";
$a->strings["Unable to retrieve contact information."] = "Impossibile recuperare informazioni sul contatto.";
$a->strings["following"] = "segue";
$a->strings["Item has been removed."] = "L'elemento è stato rimosso.";
$a->strings["noreply"] = "nessuna risposta";
$a->strings["New mail received at "] = "Nuova mail ricevuta su ";
$a->strings["%s commented on an item at %s"] = "%s ha commentato un elemento su %s";
$a->strings["Applications"] = "Applicazioni";
$a->strings["Search"] = "Cerca";
$a->strings["No results."] = "Nessun risultato.";
@ -479,7 +491,8 @@ $a->strings["Profile deleted."] = "Profilo elminato.";
$a->strings["Profile-"] = "Profilo-";
$a->strings["New profile created."] = "Nuovo profilo creato.";
$a->strings["Profile unavailable to clone."] = "Impossibile duplicare il plrofilo.";
$a->strings["Hide my contact/friend list from viewers of this profile?"] = "Nascondi la mia lista di contatti/amici dai visitatori di questo profilo";
$a->strings["Hide your contact/friend list from viewers of this profile?"] = "Nascondi la tua lista di contatti/amici ai visitatori di questo profilo?";
$a->strings["Hide profile details and all your messages from unknown viewers?"] = "Nascondi i dettagli del profilo e tutti i tuoi messaggi ai visitatori sconosciuti?";
$a->strings["Edit Profile Details"] = "Modifica i Dettagli del Profilo";
$a->strings["View this profile"] = "Visualizza questo profilo";
$a->strings["Create a new profile using these settings"] = "Crea un nuovo profilo usando queste impostazioni";
@ -526,6 +539,8 @@ $a->strings["Profile Image"] = "Immagine del Profilo";
$a->strings["Visible to everybody"] = "Visibile a tutti";
$a->strings["Edit visibility"] = "Modifica visibilità";
$a->strings["Global Directory"] = "Elenco Globale";
$a->strings["Normal site view"] = "Vista normale";
$a->strings["View all site entries"] = "Visualizza tutte le voci del sito";
$a->strings["Site Directory"] = "Elenco del Sito";
$a->strings["Gender: "] = "Genere:";
$a->strings["No entries (some entries may be hidden)."] = "Nessuna voce (qualche voce potrebbe essere nascosta).";
@ -570,6 +585,9 @@ $a->strings["Post to Facebook"] = "Invia a Facebook";
$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Invio su Facebook annullato per un conflitto nei permessi di accesso.";
$a->strings["Image: "] = "Immagine: ";
$a->strings["View on Friendika"] = "Vedi su Friendika";
$a->strings["Widgets key: "] = "Chiave Widgets: ";
$a->strings["Generate new key"] = "Genera una nuova chiave";
$a->strings["Connect on Friendika!"] = "Connettiti su Friendika!";
$a->strings["Three Dimensional Tic-Tac-Toe"] = "Tic-Tac-Toe tridimensionale";
$a->strings["3D Tic-Tac-Toe"] = "3D Tic-Tac-Toe";
$a->strings["New game"] = "Nuovo gioco";
@ -594,8 +612,17 @@ $a->strings["Uploaded file is empty"] = "Il file caricato è vuoto";
$a->strings["Uploaded file is too large"] = "Il file caricato è troppo grande";
$a->strings["File has an invalid extension, it should be one of "] = "Il file ha una estensione non valida, dovrebbe essere una di ";
$a->strings["Upload was cancelled, or server error encountered"] = "Il caricamento è stato cancellato, o si è verificato un errore sul server";
$a->strings["OEmbed settings updated"] = "Impostazioni OEmbed aggiornate";
$a->strings["Use OEmbed for YouTube videos: "] = "Usa OEmbed per i video da YouTube:";
$a->strings["URL to embed:"] = "URL da incorporare:";
$a->strings["Post to StatusNet"] = "Invia a StatusNet";
$a->strings["Please contact your site administrator.<br />The provided API URL is not valid."] = "Contatta l'amministratore del sito.<br/>L'URL delle API fornito non è valido.";
$a->strings["We could not contact the StatusNet API with the Path you entered."] = "Non possiamo conttattare le API di StatusNet con il percorso che hai inserito.";
$a->strings["StatusNet settings updated."] = "Impostazioni StatusNet aggiornate.";
$a->strings["StatusNet Posting Settings"] = "Impostazioni di invio a StatusNet";
$a->strings["Globally Available StatusNet OAuthKeys"] = "Chiavi OAuth StatusNet disponibili sul sito";
$a->strings["There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance (see below)."] = "Queste sono chiavi OAuth precofigurate disponibili per alcuni server StatusNet. Se stai usando uno di questi server, per favore usa queste credenziali. Altrimenti sei libero di collegarti a un'altra installazione di StatusNet (vedi sotto).";
$a->strings["Provide your own OAuth Credentials"] = "Fornisci le tue credenziali OAuth";
$a->strings["No consumer key pair for StatusNet found. Register your Friendika Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendika installation at your favorited StatusNet installation."] = "Nessuna coppia di chiavi consumer per StatusNet trovata. Regitstra il tuo Account Friendika come un client desktop sul tuo account StatusNet, copia la coppia di chiavi qui e inserisci l'url di base delle API.<br />Prima di registrare la tua coppia di chiavi OAuth, chiedi all'amministratore se esiste già una coppia di chiavi per questa installazione di Friendika sulla installazione di StatusNet che ti interessa.";
$a->strings["OAuth Consumer Key"] = "OAuth Consumer Key";
$a->strings["OAuth Consumer Secret"] = "OAuth Consumer Secret";
@ -603,9 +630,13 @@ $a->strings["Base API Path (remember the trailing /)"] = "Indirizzo di base per
$a->strings["To connect to your StatusNet account click the button below to get a security code from StatusNet which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to StatusNet."] = "Per collegare il tuo account StatusNet, clicca sul bottone qui sotto per ottenere un codice di sicurezza da StatusNet, che dovrai copiare nel box più sotto per poi inviare la form. Solo i tuoi messaggi <strong>pubblci</strong> saranno inviati a StatusNet.";
$a->strings["Log in with StatusNet"] = "Login con StatuNet";
$a->strings["Copy the security code from StatusNet here"] = "Copia il codice di sicurezza da StatusNet qui";
$a->strings["Cancel Connection Process"] = "Annulla il processo di connessione";
$a->strings["Current StatusNet API is"] = "Le API StatusNet correnti sono";
$a->strings["Cancel StatusNet Connection"] = "Annulla la connessione a StatusNet";
$a->strings["Currently connected to: "] = "Al momento collegato con:";
$a->strings["If enabled all your <strong>public</strong> postings will be posted to the associated StatusNet account as well."] = "Se abilitato tutti i tuoi messaggi <strong>pubblici</strong> verranno inviati anche sull'account StatusNet associato.";
$a->strings["Send public postings to StatusNet"] = "Invia messaggi pubblici su StatusNet";
$a->strings["If enabled all your <strong>public</strong> postings will be posted to the associated StatusNet account."] = "Se abilitato tutti i tuoi messaggi <strong>pubblici</strong> saranno inviati all'account StatuNet associato.";
$a->strings["Allow posting to StatusNet"] = "Permetti l'invio a StatusNet";
$a->strings["Send public postings to StatusNet by default"] = "Di default invia i messaggi pubblici a StatusNet";
$a->strings["Clear OAuth configuration"] = "Cancella la configurazione OAuth";
$a->strings["Post to Twitter"] = "Inva a Twitter";
$a->strings["Twitter Posting Settings"] = "Impostazioni Invio a Twitter";
@ -727,9 +758,11 @@ $a->strings["minutes"] = "minuti";
$a->strings["second"] = "secondo";
$a->strings["seconds"] = "secondi";
$a->strings[" ago"] = " fa";
$a->strings["From: "] = "Da: ";
$a->strings["Image/photo"] = "Immagine/foto";
$a->strings["Cannot locate DNS info for database server '%s'"] = "Non trovo le informazioni DNS per il database server '%s'";
$a->strings["Visible To:"] = "Visibile a:";
$a->strings["everybody"] = "tutti";
$a->strings["Groups"] = "Gruppi";
$a->strings["Except For:"] = "Eccetto per:";
$a->strings["(no subject)"] = "(nessun oggetto)";
@ -805,13 +838,7 @@ $a->strings["Birthday Reminders"] = "Promemoria Compleanni";
$a->strings["Birthdays this week:"] = "Compleanni questa settimana:";
$a->strings["(Adjusted for local time)"] = "(Convertiti all'ora locale)";
$a->strings["[today]"] = "[oggi]";
$a->strings["bytes"] = "bytes";
$a->strings["link to source"] = "Collegamento all'originale";
$a->strings[" welcomes "] = " da il benvenuto ";
$a->strings["Facebook status update failed."] = "Aggiornamento dello stato su Facebook fallito.";
$a->strings["Could not save uploaded file."] = "Non posso salvare il file caricato.";
$a->strings["The upload was cancelled, or server error encountered"] = "Il caricamento è stato cancellato, o si è verificato un errore sul server";
$a->strings["Server error. Upload directory isn"] = "Errore sul server.";
$a->strings["Membership list updated."] = "Lista adesioni aggiornata.";
$a->strings["Members:"] = "Membri:";
$a->strings["Not Found"] = "Non Trovato";
$a->strings["Page not found."] = "Pagina non trovata.";

View file

@ -2406,6 +2406,35 @@ a.mail-list-link {
margin: 5px 0px 0px 0px;
}
.required {
color: #FF0000;
}
#event-start-text, #event-finish-text {
margin-top: 10px;
margin-bottom: 5px;
}
#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text {
float: left;
}
#event-datetime-break {
margin-bottom: 10px;
}
#event-nofinish-break, #event-adjust-break {
clear: both;
}
#event-desc-text, #event-location-text {
margin-top: 10px;
margin-bottom: 5px;
}
#event-submit {
margin-top: 10px;
}
#lang-select-icon {
cursor: pointer;
position: absolute;

View file

@ -2419,6 +2419,35 @@ a.mail-list-link {
margin: 5px 0px 0px 0px;
}
.required {
color: #FF0000;
}
#event-start-text, #event-finish-text {
margin-top: 10px;
margin-bottom: 5px;
}
#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text {
float: left;
}
#event-datetime-break {
margin-bottom: 10px;
}
#event-nofinish-break, #event-adjust-break {
clear: both;
}
#event-desc-text, #event-location-text {
margin-top: 10px;
margin-bottom: 5px;
}
#event-submit {
margin-top: 10px;
}
#lang-select-icon {
cursor: pointer;
position: absolute;