Merge remote-tracking branch 'friendica/master' into mobile

This commit is contained in:
Fabio Comuni 2012-02-13 09:46:42 +01:00
commit 850560519a
46 changed files with 8965 additions and 4072 deletions

View file

@ -107,6 +107,11 @@ one shown, substituting for your unique paths and settings:
You can generally find the location of PHP by executing "which php". If you You can generally find the location of PHP by executing "which php". If you
have troubles with this section please contact your hosting provider for have troubles with this section please contact your hosting provider for
assistance. Friendika will not work correctly if you cannot perform this step. assistance. Friendika will not work correctly if you cannot perform this step.
You should also be sure that $a->config['php_path'] is set correctly, it should
look like (changing it to the correct PHP location)
$a->config['php_path'] = '/usr/local/php53/bin/php'
Alternative: You may be able to use the 'poormancron' plugin to perform this Alternative: You may be able to use the 'poormancron' plugin to perform this
step if you are using a recent Friendika release. 'poormancron' may result in step if you are using a recent Friendika release. 'poormancron' may result in

View file

@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1245' ); define ( 'FRIENDICA_VERSION', '2.3.1250' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1120 ); define ( 'DB_UPDATE_VERSION', 1121 );
define ( 'EOL', "<br />\r\n" ); define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -125,14 +125,15 @@ define ( 'ZCURL_TIMEOUT' , (-1));
* email notification options * email notification options
*/ */
define ( 'NOTIFY_INTRO', 0x0001 ); define ( 'NOTIFY_INTRO', 0x0001 );
define ( 'NOTIFY_CONFIRM', 0x0002 ); define ( 'NOTIFY_CONFIRM', 0x0002 );
define ( 'NOTIFY_WALL', 0x0004 ); define ( 'NOTIFY_WALL', 0x0004 );
define ( 'NOTIFY_COMMENT', 0x0008 ); define ( 'NOTIFY_COMMENT', 0x0008 );
define ( 'NOTIFY_MAIL', 0x0010 ); define ( 'NOTIFY_MAIL', 0x0010 );
define ( 'NOTIFY_SUGGEST', 0x0020 ); define ( 'NOTIFY_SUGGEST', 0x0020 );
define ( 'NOTIFY_PROFILE', 0x0040 ); define ( 'NOTIFY_PROFILE', 0x0040 );
define ( 'NOTIFY_TAGSELF', 0x0080 );
define ( 'NOTIFY_TAGSHARE', 0x0100 );
/** /**
* various namespaces we may need to parse * various namespaces we may need to parse
@ -818,7 +819,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
} }
$r = null; $r = null;
if($profile) { if($profile) {
$profile_int = intval($profile); $profile_int = intval($profile);
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
@ -828,7 +829,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
intval($profile_int) intval($profile_int)
); );
} }
if(! count($r)) { if((! $r) && (! count($r))) {
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1", WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1",
@ -841,6 +842,16 @@ function profile_load(&$a, $nickname, $profile = 0) {
$a->error = 404; $a->error = 404;
return; return;
} }
// fetch user tags if this isn't the default profile
if(! $r[0]['is-default']) {
$x = q("select `pub_keywords` from `profile` where uid = %d and `is-default` = 1 limit 1",
intval($profile_uid)
);
if($x && count($x))
$r[0]['pub_keywords'] = $x[0]['pub_keywords'];
}
$a->profile = $r[0]; $a->profile = $r[0];

View file

@ -226,6 +226,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`pubmail` tinyint(1) NOT NULL DEFAULT '0', `pubmail` tinyint(1) NOT NULL DEFAULT '0',
`moderated` tinyint(1) NOT NULL DEFAULT '0', `moderated` tinyint(1) NOT NULL DEFAULT '0',
`visible` tinyint(1) NOT NULL DEFAULT '0', `visible` tinyint(1) NOT NULL DEFAULT '0',
`spam` tinyint(1) NOT NULL DEFAULT '0',
`starred` tinyint(1) NOT NULL DEFAULT '0', `starred` tinyint(1) NOT NULL DEFAULT '0',
`bookmark` tinyint(1) NOT NULL DEFAULT '0', `bookmark` tinyint(1) NOT NULL DEFAULT '0',
`unseen` tinyint(1) NOT NULL DEFAULT '1', `unseen` tinyint(1) NOT NULL DEFAULT '1',
@ -247,6 +248,7 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `received` (`received`), KEY `received` (`received`),
KEY `moderated` (`moderated`), KEY `moderated` (`moderated`),
KEY `visible` (`visible`), KEY `visible` (`visible`),
KEY `spam` (`spam`),
KEY `starred` (`starred`), KEY `starred` (`starred`),
KEY `bookmark` (`bookmark`), KEY `bookmark` (`bookmark`),
KEY `deleted` (`deleted`), KEY `deleted` (`deleted`),

View file

@ -11,7 +11,7 @@ function stripcode_br_cb($s) {
function tryoembed($match){ function tryoembed($match){
$url = ((count($match)==2)?$match[1]:$match[2]); $url = ((count($match)==2)?$match[1]:$match[2]);
logger("tryoembed: $url"); // logger("tryoembed: $url");
$o = oembed_fetch_url($url); $o = oembed_fetch_url($url);
@ -24,13 +24,40 @@ function tryoembed($match){
} }
// [noparse][i]italic[/i][/noparse] turns into
// [noparse][ i ]italic[ /i ][/noparse],
// to hide them from parser.
function bb_spacefy($st) {
$whole_match = $st[0];
$captured = $st[1];
$spacefied = preg_replace("/\[(.*?)\]/", "[ $1 ]", $captured);
$new_str = str_replace($captured, $spacefied, $whole_match);
return $new_str;
}
// The previously spacefied [noparse][ i ]italic[ /i ][/noparse],
// now turns back and the [noparse] tags are trimed
// returning [i]italic[/i]
function bb_unspacefy_and_trim($st) {
$whole_match = $st[0];
$captured = $st[1];
$unspacefied = preg_replace("/\[ (.*?)\ ]/", "[$1]", $captured);
return $unspacefied;
}
// BBcode 2 HTML was written by WAY2WEB.net // BBcode 2 HTML was written by WAY2WEB.net
// extended to work with Mistpark/Friendica - Mike Macgirvin // extended to work with Mistpark/Friendica - Mike Macgirvin
function bbcode($Text,$preserve_nl = false) { function bbcode($Text,$preserve_nl = false) {
// Hide all [noparse] contained bbtags spacefying them
$Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text);
$Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_spacefy',$Text);
$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text);
// Extract a single private image which uses data url's since preg has issues with // Extract a single private image which uses data url's since preg has issues with
// large data sizes. Stash it away while we do bbcode conversion, and then put it back // large data sizes. Stash it away while we do bbcode conversion, and then put it back
@ -111,25 +138,34 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","<span style=\"color: $1;\">$2</span>",$Text); $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","<span style=\"color: $1;\">$2</span>",$Text);
// Check for sized text // Check for sized text
// [size=50] --> font-size: 50px (with the unit).
$Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1px;\">$2</span>",$Text);
$Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text); $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text);
// Check for centered text
$Text = preg_replace("(\[center\](.*?)\[\/center\])ism","<div style=\"text-align:center;\">$1</div>",$Text);
// Check for list text // Check for list text
$Text = str_replace("[*]", "<li>", $Text);
if(stristr($Text,'[/list]')) $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '<li>$1</li>' ,$Text);
$Text = str_replace("[*]", "<li>", $Text);
if(stristr($Text,'[/list]'))
$Text = str_replace("[*]", "<li>", $Text);
$Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text); $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
$Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>'
,$Text);
$Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>' ,$Text); $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>'
$Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>' ,$Text); ,$Text);
$Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>' ,$Text); $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'<ul class="listlowerroman" style="list-style-type:
$Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>' ,$Text); lower-roman;">$2</ul>' ,$Text);
$Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '<li>$1</li>' ,$Text); $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '<ul class="listupperroman" style="list-style-type:
upper-roman;">$2</ul>' ,$Text);
$Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '<ul class="listloweralpha" style="list-style-type:
lower-alpha;">$2</ul>' ,$Text);
$Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '<ul class="listupperalpha" style="list-style-type:
upper-alpha;">$2</ul>' ,$Text);
$Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '<th>$1</th>' ,$Text);
$Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text);
$Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>' ,$Text); $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>' ,$Text);
$Text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '<table>$1</table>' ,$Text); $Text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '<table>$1</table>' ,$Text);
@ -157,7 +193,15 @@ function bbcode($Text,$preserve_nl = false) {
$QuoteLayout = '<blockquote>$1</blockquote>'; $QuoteLayout = '<blockquote>$1</blockquote>';
// Check for [quote] text // Check for [quote] text
$Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text);
// Check for [quote=Author] text
$t_wrote = t('$1 wrote:');
$Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism",
"<blockquote><strong>" . $t_wrote . "</strong> $2</blockquote>",
$Text);
// [img=widthxheight]image source[/img] // [img=widthxheight]image source[/img]
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text); $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
@ -219,6 +263,13 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text);
} }
// Unhide all [noparse] contained bbtags unspacefying them
// and triming the [noparse] tag.
$Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_unspacefy_and_trim',$Text);
$Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim',$Text);
$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim',$Text);
// fix any escaped ampersands that may have been converted into links // fix any escaped ampersands that may have been converted into links
$Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
if(strlen($saved_image)) if(strlen($saved_image))

View file

@ -262,15 +262,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else else
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
$location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''); $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
$coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : ''); call_hooks('render_location',$locate);
if($coord) {
if($location)
$location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
else
$location = '<span class="smalltext">' . $coord . '</span>';
}
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
localize_item($item); localize_item($item);
if($mode === 'network-new') if($mode === 'network-new')
@ -594,16 +589,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
$dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : ''); $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
$location = (($item['location']) ? '<a target="map" title="' . $item['location'] $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
. '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''); call_hooks('render_location',$locate);
$coord = (($item['coord']) ? '<a target="map" title="' . $item['coord']
. '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : ''); $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
if($coord) {
if($location)
$location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
else
$location = '<span class="smalltext">' . $coord . '</span>';
}
$indent = (($toplevelpost) ? '' : ' comment'); $indent = (($toplevelpost) ? '' : ' comment');
@ -1014,3 +1003,17 @@ function find_thread_parent_index($arr,$x) {
return $k; return $k;
return false; return false;
} }
function render_location_google($item) {
$location = '';
$location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
$coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
if($coord) {
if($location)
$location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
else
$location = '<span class="smalltext">' . $coord . '</span>';
}
return $location;
}

View file

@ -260,10 +260,11 @@ function relative_date($posted_date) {
); );
foreach ($a as $secs => $str) { foreach ($a as $secs => $str) {
$d = $etime / $secs; $d = $etime / $secs;
if ($d >= 1) { if ($d >= 1) {
$r = round($d); $r = round($d);
return $r . ' ' . (($r == 1) ? $str[0] : $str[1]) . t(' ago'); // translators - e.g. 22 hours ago, 1 minute ago
return sprintf( t('%1$d %2$s ago'),$r, (($r == 1) ? $str[0] : $str[1]));
} }
} }
}} }}

View file

@ -54,6 +54,24 @@ function notification($params) {
$itemlink = $params['link']; $itemlink = $params['link'];
} }
if($params['type'] == NOTIFY_TAGSELF) {
$preamble = $subject = sprintf( t('%s tagged you at %s') , $params['source_name'], $sitename);
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
$itemlink = $params['link'];
}
if($params['type'] == NOTIFY_TAGSHARE) {
$preamble = $subject = sprintf( t('%s tagged your post at %s') , $params['source_name'], $sitename);
$sitelink = t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf( $sitelink, $siteurl );
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
$itemlink = $params['link'];
}
if($params['type'] == NOTIFY_INTRO) { if($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('Introduction received at %s'), $sitename); $subject = sprintf( t('Introduction received at %s'), $sitename);
$preamble = sprintf( t('You\'ve received an introduction from \'%s\' at %s'), $params['source_name'], $sitename); $preamble = sprintf( t('You\'ve received an introduction from \'%s\' at %s'), $params['source_name'], $sitename);

View file

@ -905,7 +905,7 @@ function item_store($arr,$force_parent = false) {
); );
} }
tgroup_deliver($arr['uid'],$current_post); tag_deliver($arr['uid'],$current_post);
return $current_post; return $current_post;
} }
@ -923,22 +923,22 @@ function get_item_contact($item,$contacts) {
} }
function tgroup_deliver($uid,$item_id) { function tag_deliver($uid,$item_id) {
// look for mention tags and setup a second delivery chain for forum/community posts if appropriate
// setup a second delivery chain for forum/community posts if appropriate
$a = get_app(); $a = get_app();
$deliver_to_tgroup = false; $mention = false;
$u = q("select * from user where uid = %d and `page-flags` = %d limit 1", $u = q("select uid, nickname, language, username, email, `page-flags`, `notify-flags` from user where uid = %d limit 1",
intval($uid), intval($uid)
intval(PAGE_COMMUNITY)
); );
if(! count($u)) if(! count($u))
return; return;
$community_page = (($u[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
$i = q("select * from item where id = %d and uid = %d limit 1", $i = q("select * from item where id = %d and uid = %d limit 1",
intval($item_id), intval($item_id),
intval($uid) intval($uid)
@ -948,13 +948,6 @@ function tgroup_deliver($uid,$item_id) {
$item = $i[0]; $item = $i[0];
// prevent delivery looping - only proceed
// if the message originated elsewhere and is a top-level post
if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent']))
return;
$link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']); $link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']);
// Diaspora uses their own hardwired link URL in @-tags // Diaspora uses their own hardwired link URL in @-tags
@ -966,13 +959,41 @@ function tgroup_deliver($uid,$item_id) {
if($cnt) { if($cnt) {
foreach($matches as $mtch) { foreach($matches as $mtch) {
if(link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) { if(link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) {
$deliver_to_tgroup = true; $mention = true;
logger('tgroup_deliver: local group mention found: ' . $mtch[2]); logger('tag_deliver: mention found: ' . $mtch[2]);
} }
} }
} }
if(! $deliver_to_tgroup) if(! $mention)
return;
// send a notification
require_once('include/enotify.php');
notification(array(
'type' => NOTIFY_TAGSELF,
'notify_flags' => $u[0]['notify-flags'],
'language' => $u[0]['language'],
'to_name' => $u[0]['username'],
'to_email' => $u[0]['email'],
'item' => $item,
'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item['id'],
'source_name' => $item['author-name'],
'source_link' => $item['author-link'],
'source_photo' => $item['author-avatar'],
'verb' => ACTIVITY_TAG,
'otype' => 'item'
));
if(! $community_page)
return;
// tgroup delivery - setup a second delivery chain
// prevent delivery looping - only proceed
// if the message originated elsewhere and is a top-level post
if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent']))
return; return;
// now change this copy of the post to a forum head message and deliver to all the tgroup members // now change this copy of the post to a forum head message and deliver to all the tgroup members
@ -1047,7 +1068,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$final_dfrn_id = ''; $final_dfrn_id = '';
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']);
openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']); openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']);
} }
@ -1090,7 +1111,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if($dfrn_version >= 2.1) { if($dfrn_version >= 2.1) {
if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) {
openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']);
} }
else { else {
@ -1486,7 +1507,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if(count($r)) { if(count($r)) {
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($datarray['title']),
dbesc($datarray['body']), dbesc($datarray['body']),
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
dbesc($item_id), dbesc($item_id),
@ -1616,7 +1638,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if(count($r)) { if(count($r)) {
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($datarray['title']),
dbesc($datarray['body']), dbesc($datarray['body']),
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
dbesc($item_id), dbesc($item_id),
@ -2167,7 +2190,8 @@ function local_delivery($importer,$data) {
if(count($r)) { if(count($r)) {
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($datarray['title']),
dbesc($datarray['body']), dbesc($datarray['body']),
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
dbesc($item_id), dbesc($item_id),
@ -2309,7 +2333,8 @@ function local_delivery($importer,$data) {
if(count($r)) { if(count($r)) {
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($datarray['title']),
dbesc($datarray['body']), dbesc($datarray['body']),
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
dbesc($item_id), dbesc($item_id),
@ -2805,7 +2830,7 @@ function drop_item($id,$interactive = true) {
// delete the item // delete the item
$r = q("UPDATE `item` SET `deleted` = 1, `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", $r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc(datetime_convert()), dbesc(datetime_convert()),
intval($item['id']) intval($item['id'])
@ -2838,7 +2863,7 @@ function drop_item($id,$interactive = true) {
// If it's the parent of a comment thread, kill all the kids // If it's the parent of a comment thread, kill all the kids
if($item['uri'] == $item['parent-uri']) { if($item['uri'] == $item['parent-uri']) {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = ''
WHERE `parent-uri` = '%s' AND `uid` = %d ", WHERE `parent-uri` = '%s' AND `uid` = %d ",
dbesc(datetime_convert()), dbesc(datetime_convert()),
dbesc(datetime_convert()), dbesc(datetime_convert()),

View file

@ -579,6 +579,9 @@ function fetch_xrd_links($url) {
if(! function_exists('validate_url')) { if(! function_exists('validate_url')) {
function validate_url(&$url) { function validate_url(&$url) {
// no naked subdomains
if(strpos($url,'.') === false)
return false;
if(substr($url,0,4) != 'http') if(substr($url,0,4) != 'http')
$url = 'http://' . $url; $url = 'http://' . $url;
$h = @parse_url($url); $h = @parse_url($url);

View file

@ -56,25 +56,29 @@ function reload_plugins() {
if(count($parr)) { if(count($parr)) {
foreach($parr as $pl) { foreach($parr as $pl) {
$pl = trim($pl); $pl = trim($pl);
$t = filemtime('addon/' . $pl . '/' . $pl . '.php');
foreach($installed as $i) {
if(($i['name'] == $pl) && ($i['timestamp'] != $t)) {
logger('Reloading plugin: ' . $i['name']);
@include_once('addon/' . $pl . '/' . $pl . '.php');
if(function_exists($pl . '_uninstall')) { $fname = 'addon/' . $pl . '/' . $pl . '.php';
$func = $pl . '_uninstall';
$func(); if(file_exists($fname)) {
$t = @filemtime($fname);
foreach($installed as $i) {
if(($i['name'] == $pl) && ($i['timestamp'] != $t)) {
logger('Reloading plugin: ' . $i['name']);
@include_once($fname);
if(function_exists($pl . '_uninstall')) {
$func = $pl . '_uninstall';
$func();
}
if(function_exists($pl . '_install')) {
$func = $pl . '_install';
$func();
}
q("UPDATE `addon` SET `timestamp` = %d WHERE `id` = %d LIMIT 1",
intval($t),
intval($i['id'])
);
} }
if(function_exists($pl . '_install')) {
$func = $pl . '_install';
$func();
}
q("UPDATE `addon` SET `timestamp` = %d WHERE `id` = %d LIMIT 1",
intval($t),
intval($i['id'])
);
} }
} }
} }

View file

@ -44,6 +44,8 @@ function advanced_profile(&$a) {
if($a->profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify($a->profile['homepage']) ); if($a->profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify($a->profile['homepage']) );
if($a->profile['pub_keywords']) $profile['pub_keywords'] = array( t('Tags:'), $a->profile['pub_keywords']);
if($a->profile['politic']) $profile['politic'] = array( t('Political Views:'), $a->profile['politic']); if($a->profile['politic']) $profile['politic'] = array( t('Political Views:'), $a->profile['politic']);
if($a->profile['religion']) $profile['religion'] = array( t('Religion:'), $a->profile['religion']); if($a->profile['religion']) $profile['religion'] = array( t('Religion:'), $a->profile['religion']);

View file

@ -428,8 +428,10 @@ if(! function_exists('logger')) {
function logger($msg,$level = 0) { function logger($msg,$level = 0) {
// turn off logger in install mode // turn off logger in install mode
global $a; global $a;
if ($a->module == 'install') return; global $db;
if(($a->module == 'install') || (! ($db && $db->connected))) return;
$debugging = get_config('system','debugging'); $debugging = get_config('system','debugging');
$loglevel = intval(get_config('system','loglevel')); $loglevel = intval(get_config('system','loglevel'));
$logfile = get_config('system','logfile'); $logfile = get_config('system','logfile');
@ -538,8 +540,10 @@ function contact_block() {
$a = get_app(); $a = get_app();
$shown = get_pconfig($a->profile['uid'],'system','display_friend_count'); $shown = get_pconfig($a->profile['uid'],'system','display_friend_count');
if(! $shown) if($shown === false)
$shown = 24; $shown = 24;
if($shown == 0)
return;
if((! is_array($a->profile)) || ($a->profile['hide-friends'])) if((! is_array($a->profile)) || ($a->profile['hide-friends']))
return $o; return $o;
@ -678,9 +682,9 @@ function smilies($s) {
$a = get_app(); $a = get_app();
$s = str_replace( $s = str_replace(
array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ':)', ';-)', ';)', ':-(', ':(', ':-P', ':P', ':-"', ':-&quot;', ':-x', ':-X', ':-D', ':D', '8-|', '8-O', ':-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/',
':beer', ':homebrew', ':coffee', ':beer', ':homebrew', ':coffee',
'~friendika', '~friendica', 'Diaspora*' ), '~friendika', '~friendica', 'Diaspora*' ),
array( array(
'<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />', '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />', '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
@ -688,21 +692,26 @@ function smilies($s) {
'<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />', '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":)" />', '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />', '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";)"/>',
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />', '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />', '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />', '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":P" />', '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":P" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />', '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />', '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />', '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":D"/>',
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />', '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />', '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />', '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />', '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />', '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\.../" />', '<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\.../" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\ooo/" />', '<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\ooo/" />',
'<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />', '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
'<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />', '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
'<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />', '<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',

View file

@ -153,7 +153,7 @@ class Slinky {
public function set_service_from_url( $url = false ) { public function set_service_from_url( $url = false ) {
if ( !$url ) if ( !$url )
$url = $this->url; $url = $this->url;
$host = parse_url( $url, PHP_URL_HOST ); $host = parse_url( $url, PHP_URL_HOST );
switch ( str_replace( 'www.', '', $host ) ) { switch ( str_replace( 'www.', '', $host ) ) {
case 'bit.ly': case 'bit.ly':
@ -181,6 +181,11 @@ class Slinky {
$this->service = new Slinky_Fongs(); $this->service = new Slinky_Fongs();
break; break;
} }
case $this->get( 'yourls-url' ):
if ( class_exists( 'Slinky_YourLS' ) ) {
$this->service = new Slinky_YourLS();
break;
}
case 'micurl.com': case 'micurl.com':
if ( class_exists( 'Slinky_Micurl' ) ) { if ( class_exists( 'Slinky_Micurl' ) ) {
$this->service = new Slinky_Micurl(); $this->service = new Slinky_Micurl();
@ -574,6 +579,31 @@ class Slinky_Fongs extends Slinky_Service {
} }
} }
// yourls
class Slinky_YourLS extends Slinky_Service {
function url_is_short( $url ) {
return stristr( $url, 'shit.li/' );
}
function url_is_long( $url ) {
return !stristr( $url, 'shit.li/' );
}
function make_short( $url ) {
echo $this->get( 'username' );
$use_ssl = $this->get( 'ssl' );
if ( $use_ssl )
$use_ssl = 's';
else
$use_ssl = '';
$result = $this->url_get( 'http'. $use_ssl . '://' . $this->get( 'yourls-url' ) . '/yourls-api.php?username=' . $this->get( 'username' ) . '&password=' . $this->get( 'password' ) . '&action=shorturl&format=simple&url=' . urlencode( $url ) );
if ( 1 != $result && 2 != $result )
return $result;
else
return $url;
}
}
// Micu.rl // Micu.rl
class Slinky_Micurl extends Slinky_Service { class Slinky_Micurl extends Slinky_Service {
function url_is_short( $url ) { function url_is_short( $url ) {

View file

@ -80,12 +80,10 @@ function community_content(&$a, $update = 0) {
// we behave the same in message lists as the search module // we behave the same in message lists as the search module
$o .= conversation($a,$r,'community',false); $o .= conversation($a,$r,'community',$update);
$o .= paginate($a); $o .= paginate($a);
// $o .= '<div class="cc-license">' . t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.') . '</div>';
return $o; return $o;
} }

View file

@ -42,6 +42,7 @@ function contacts_init(&$a) {
$a->page['aside'] .= findpeople_widget(); $a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
} }
function contacts_post(&$a) { function contacts_post(&$a) {
@ -99,6 +100,14 @@ function contacts_post(&$a) {
info( t('Contact updated.') . EOL); info( t('Contact updated.') . EOL);
else else
notice( t('Failed to update contact record.') . EOL); notice( t('Failed to update contact record.') . EOL);
$r = q("select * from contact where id = %d and uid = %d limit 1",
intval($contact_id),
intval(local_user())
);
if($r && count($r))
$a->data['contact'] = $r[0];
return; return;
} }
@ -111,7 +120,6 @@ function contacts_content(&$a) {
$o = ''; $o = '';
nav_set_selected('contacts'); nav_set_selected('contacts');
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
if(! local_user()) { if(! local_user()) {
notice( t('Permission denied.') . EOL); notice( t('Permission denied.') . EOL);
@ -211,7 +219,10 @@ function contacts_content(&$a) {
contact_remove($orig_record[0]['id']); contact_remove($orig_record[0]['id']);
info( t('Contact has been removed.') . EOL ); info( t('Contact has been removed.') . EOL );
goaway($a->get_baseurl() . '/contacts'); if(x($_SESSION,'return_url'))
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
else
goaway($a->get_baseurl() . '/contacts');
return; // NOTREACHED return; // NOTREACHED
} }
} }
@ -354,19 +365,30 @@ function contacts_content(&$a) {
} }
$blocked = false;
$_SESSION['return_url'] = $a->query_string;
if(($a->argc == 2) && ($a->argv[1] === 'all')) if(($a->argc == 2) && ($a->argv[1] === 'all'))
$sql_extra = ''; $sql_extra = '';
else else {
$sql_extra = " AND `blocked` = 0 "; if(($a->argc == 2) && ($a->argv[1] === 'blocked')) {
$sql_extra = " AND `blocked` = 1 ";
$blocked = true;
}
else
$sql_extra = " AND `blocked` = 0 ";
}
$search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');
$nets = ((x($_GET,'nets')) ? notags(trim($_GET['nets'])) : '');
$tpl = get_markup_template("contacts-top.tpl"); $tpl = get_markup_template("contacts-top.tpl");
$o .= replace_macros($tpl,array( $o .= replace_macros($tpl,array(
'$header' => t('Contacts'), '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
'$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ), '$hide_url' => (($blocked) ? 'contacts' : 'contacts/blocked'),
'$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')), '$hide_text' => (($blocked) ? t('Show Unblocked Contacts') : t('Show Blocked Contacts')),
'$all_url' => 'contacts/all',
'$all_text' => t('Show All Contacts'),
'$search' => $search, '$search' => $search,
'$desc' => t('Search your contacts'), '$desc' => t('Search your contacts'),
'$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""), '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""),
@ -380,6 +402,9 @@ function contacts_content(&$a) {
$search = dbesc($search.'*'); $search = dbesc($search.'*');
$sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : ""); $sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : "");
if($nets)
$sql_extra .= sprintf(" AND network = '%s' ", dbesc($nets));
$sql_extra2 = ((($sort_type > 0) && ($sort_type <= CONTACT_IS_FRIEND)) ? sprintf(" AND `rel` = %d ",intval($sort_type)) : ''); $sql_extra2 = ((($sort_type > 0) && ($sort_type <= CONTACT_IS_FRIEND)) ? sprintf(" AND `rel` = %d ",intval($sort_type)) : '');

View file

@ -35,6 +35,7 @@ function editpost_content(&$a) {
$a->page['htmlhead'] .= replace_macros($tpl, array( $a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'), '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag, '$geotag' => $geotag,
'$nickname' => $a->user['nickname'] '$nickname' => $a->user['nickname']
@ -108,11 +109,14 @@ function editpost_content(&$a) {
'$emailcc' => t('CC: email addresses'), '$emailcc' => t('CC: email addresses'),
'$public' => t('Public post'), '$public' => t('Public post'),
'$jotnets' => $jotnets, '$jotnets' => $jotnets,
'$title' => $itm[0]['title'],
'$placeholdertitle' => t('Set title'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'), '$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate, '$lockstate' => $lockstate,
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb), '$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
'$bang' => (($group) ? '!' : ''), '$bang' => (($group) ? '!' : ''),
'$profile_uid' => $_SESSION['uid'], '$profile_uid' => $_SESSION['uid'],
'$preview' => t('Preview'),
'$jotplugins' => $jotplugins, '$jotplugins' => $jotplugins,
)); ));

View file

@ -186,8 +186,8 @@ function install_content(&$a) {
check_keys($checks); check_keys($checks);
if(x($_POST,'phppath')) if(x($_POST,'phpath'))
$phpath = notags(trim($_POST['phppath'])); $phpath = notags(trim($_POST['phpath']));
check_php($phpath, $checks); check_php($phpath, $checks);
@ -210,6 +210,7 @@ function install_content(&$a) {
'$next' => t('Next'), '$next' => t('Next'),
'$reload' => t('Check again'), '$reload' => t('Check again'),
'$phpath' => $phpath, '$phpath' => $phpath,
'$baseurl' => $a->get_baseurl(),
)); ));
return $o; return $o;
}; break; }; break;
@ -220,7 +221,7 @@ function install_content(&$a) {
$dbuser = notags(trim($_POST['dbuser'])); $dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass'])); $dbpass = notags(trim($_POST['dbpass']));
$dbdata = notags(trim($_POST['dbdata'])); $dbdata = notags(trim($_POST['dbdata']));
$phpath = notags(trim($_POST['phppath'])); $phpath = notags(trim($_POST['phpath']));
$tpl = get_markup_template('install_db.tpl'); $tpl = get_markup_template('install_db.tpl');
@ -258,7 +259,7 @@ function install_content(&$a) {
$dbuser = notags(trim($_POST['dbuser'])); $dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass'])); $dbpass = notags(trim($_POST['dbpass']));
$dbdata = notags(trim($_POST['dbdata'])); $dbdata = notags(trim($_POST['dbdata']));
$phpath = notags(trim($_POST['phppath'])); $phpath = notags(trim($_POST['phpath']));
$adminmail = notags(trim($_POST['adminmail'])); $adminmail = notags(trim($_POST['adminmail']));
$timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles');
@ -322,7 +323,7 @@ function check_php(&$phpath, &$checks) {
$help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL;
$tpl = get_markup_template('field_input.tpl'); $tpl = get_markup_template('field_input.tpl');
$help .= replace_macros($tpl, array( $help .= replace_macros($tpl, array(
'$field' => array('phppath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable')),
)); ));
$phpath=""; $phpath="";
} }

View file

@ -649,7 +649,8 @@ function item_post(&$a) {
if($orig_post) { if($orig_post) {
$r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($title),
dbesc($body), dbesc($body),
dbesc(datetime_convert()), dbesc(datetime_convert()),
intval($post_id), intval($post_id),

View file

@ -56,7 +56,9 @@ function saved_searches($search) {
. ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '')
. ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '') . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '')
. ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '') . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '')
. ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : ''); . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '')
. ((x($_GET,'cmin')) ? '?cmin=' . $_GET['cmin'] : '')
. ((x($_GET,'cmax')) ? '?cmax=' . $_GET['cmax'] : '');
$o = ''; $o = '';
@ -222,6 +224,8 @@ function network_content(&$a, $update = 0) {
$conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0); $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
$spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0); $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0);
$nets = ((x($_GET,'nets')) ? $_GET['nets'] : ''); $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
$cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0);
$cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99);
if(($a->argc > 2) && $a->argv[2] === 'new') if(($a->argc > 2) && $a->argv[2] === 'new')
$nouveau = true; $nouveau = true;
@ -358,6 +362,8 @@ function network_content(&$a, $update = 0) {
. ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '') . ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '')
. ((x($_GET,'spam')) ? '&spam=' . $_GET['spam'] : '') . ((x($_GET,'spam')) ? '&spam=' . $_GET['spam'] : '')
. ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '') . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '')
. ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '')
. ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '')
. "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n"; . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
} }

View file

@ -2,11 +2,26 @@
require_once("include/oembed.php"); require_once("include/oembed.php");
function oembed_content(&$a){ function oembed_content(&$a){
// logger('mod_oembed ' . $a->query_string, LOGGER_ALL);
if ($a->argv[1]=='b2h'){
$url = array( "", trim(hex2bin($_REQUEST['url'])));
echo oembed_replacecb($url);
killme();
}
if ($a->argv[1]=='h2b'){
$text = trim(hex2bin($_REQUEST['text']));
echo oembed_html2bbcode($text);
killme();
}
if ($a->argc == 2){ if ($a->argc == 2){
echo "<html><body>"; echo "<html><body>";
$url = base64url_decode($a->argv[1]); $url = base64url_decode($a->argv[1]);
$j = oembed_fetch_url($url); $j = oembed_fetch_url($url);
echo $j->html; echo $j->html;
// logger('mod-oembed ' . $j->html, LOGGER_ALL);
echo "</body></html>"; echo "</body></html>";
} }
killme(); killme();

View file

@ -818,6 +818,7 @@ function settings_content(&$a) {
'$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''), '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''),
'$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''), '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''),
'$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''), '$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''),
'$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''),
'$h_advn' => t('Advanced Page Settings'), '$h_advn' => t('Advanced Page Settings'),

View file

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1120 ); define( 'UPDATE_VERSION' , 1121 );
/** /**
* *
@ -1021,3 +1021,19 @@ q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTE
q("update contact set closeness = 0 where self = 1"); q("update contact set closeness = 0 where self = 1");
q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) "); q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
} }
function update_1120() {
// item table update from 1119 did not get into database.sql file.
// might be missing on new installs. We'll check.
$r = q("describe item");
if($r && count($r)) {
foreach($r as $rr)
if($rr['Field'] == 'spam')
return;
}
q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
}

8
util/fpostit/README Normal file
View file

@ -0,0 +1,8 @@
fpostit
original author: Devlon Duthied
see his blog posting:
http://blog.duthied.com/2011/09/13/node-agnostic-friendika-bookmarklet/
original published at github https://github.com/duthied/Friendika-Bookmarklet

11
util/fpostit/fpostit.js Normal file
View file

@ -0,0 +1,11 @@
javascript: (function() {
the_url = 'http://testbubble.com/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent('' (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text));
a_funct = function() {
if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url;
};
if (/Firefox/.test(navigator.userAgent)) {
setTimeout(a_funct, 0)
} else {
a_funct()
}
})()

129
util/fpostit/fpostit.php Normal file
View file

@ -0,0 +1,129 @@
<?php
if (($_POST["friendika_acct_name"] != '') && ($_POST["friendika_password"] != '')) {
setcookie("username", $_POST["friendika_acct_name"], time()+60*60*24*300);
setcookie("password", $_POST["friendika_password"], time()+60*60*24*300);
}
?>
<html>
<head>
<style>
body {
font-family: arial, Helvetica,sans-serif;
margin: 0px;
}
.wrap1 {
padding: 2px 5px;
background-color: #729FCF;
margin-bottom: 10px;
}
.wrap2 {
margin-left: 10px;
font-size: 12px;
}
.logo {
margin-left: 3px;
margin-right: 5px;
float: left;
}
h2 {
color: #ffffff;
}
.error {
background-color: #FFFF66;
font-size: 12px;
margin-left: 10px;
}
</style>
</head>
<body>
<?php
if (isset($_GET['title'])) {
$title = $_GET['title'];
}
if (isset($_GET['text'])) {
$text = $_GET['text'];
}
if (isset($_GET['url'])) {
$url = $_GET['url'];
}
if ((isset($title)) && (isset($text)) && (isset($url))) {
$content = "$title\nsource:$url\n\n$text";
} else {
$content = $_POST['content'];
}
if (isset($_POST['submit'])) {
if (($_POST["friendika_acct_name"] != '') && ($_POST["friendika_password"] != '')) {
$acctname = $_POST["friendika_acct_name"];
$tmp_account_array = explode("@", $acctname);
if (isset($tmp_account_array[1])) {
$username = $tmp_account_array[0];
$hostname = $tmp_account_array[1];
}
$password = $_POST["friendika_password"];
$content = $_POST["content"];
$url = "http://" . $hostname . '/api/statuses/update';
$data = array('status' => $content);
// echo "posting to: $url<br/>";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_USERPWD, "$username:$password");
curl_setopt($c, CURLOPT_POSTFIELDS, $data);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
$c_result = curl_exec($c);
if(curl_errno($c)){
$error = curl_error($c);
showForm($error, $content);
}
curl_close($c);
if (!isset($error)) {
echo '<script language="javascript" type="text/javascript">window.close();</script>';
}
} else {
$error = "Missing account name and/or password...try again please";
showForm($error, $content);
}
} else {
showForm(null, $content);
}
function showForm($error, $content) {
$username_cookie = $_COOKIE['username'];
$password_cookie = $_COOKIE['password'];
echo <<<EOF
<div class='wrap1'>
<h2><img class='logo' src='friendika-32.png' align='middle';/>
Friendika Bookmarklet</h2>
</div>
<div class="wrap2">
<form method="post" action="{$_SERVER['PHP_SELF']}">
Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)<br /><br />
Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br />
Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br />
<textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br />
<input type="submit" value="PostIt!" name="submit" />&nbsp;&nbsp;<span class='error'>$error</span>
</form>
<p></p>
</div>
EOF;
}
?>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because it is too large Load diff

View file

@ -14,5 +14,6 @@ $finding
<div id="contacts-main" > <div id="contacts-main" >
<a href="$hide_url" id="contacts-show-hide-link">$hide_text</a> <a href="$hide_url" id="contacts-show-hide-link">$hide_text</a><br />
<a href="$all_url" id="contacts-show-all-link">$all_text</a><br />
</div> </div>

View file

@ -79,7 +79,7 @@
<a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a> <a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a>
<ul id="nav-apps-menu" class="menu-popup"> <ul id="nav-apps-menu" class="menu-popup">
{{ for $apps as $ap }} {{ for $apps as $ap }}
<li><a href="$ap.url">$ap.name</a></li> <li>$ap</li>
{{ endfor }} {{ endfor }}
</ul> </ul>
</li> </li>

View file

@ -40,6 +40,13 @@
</dl> </dl>
{{ endif }} {{ endif }}
{{ if $profile.pub_keywords }}
<dl id="aprofile-tags" class="aprofile">
<dt>$profile.pub_keywords.0</dt>
<dd>$profile.pub_keywords.1</dd>
</dl>
{{ endif }}
{{ if $profile.homepage }} {{ if $profile.homepage }}
<dl id="aprofile-homepage" class="aprofile"> <dl id="aprofile-homepage" class="aprofile">
<dt>$profile.homepage.0</dt> <dt>$profile.homepage.0</dt>

View file

@ -108,6 +108,7 @@ $suggestme
{{inc field_intcheckbox.tpl with $field=$notify4 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify4 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify5 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify5 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify6 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify6 }}{{endinc}}
{{inc field_intcheckbox.tpl with $field=$notify7 }}{{endinc}}
</div> </div>

View file

@ -824,6 +824,7 @@ input#dfrn-url {
.contact-entry-name { .contact-entry-name {
float: left; float: left;
margin-left: 0px; margin-left: 0px;
margin-right: 10px;
width: 120px; width: 120px;
overflow: hidden; overflow: hidden;
} }

View file

@ -318,7 +318,51 @@ aside {
} }
} }
/* group member */
#contact-edit-drop-link,
.mail-list-delete-wrapper,
.group-delete-wrapper {
float: right;
margin-right: 50px;
.drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block; width: 22px; height: 22px;
opacity: 0.3;
position: relative;
top: -50px;
}
.drop {
background-image: url('../../../images/icons/22/delete.png');
display: block; width: 22px; height: 22px;
position: relative;
top: -50px;
}
}
#group-members {
margin-top: 20px;
padding: 10px;
height: 250px;
overflow: auto;
border: 1px solid #ddd;
}
#group-members-end {
clear: both;
}
#group-all-contacts {
padding: 10px;
height: 450px;
overflow: auto;
border: 1px solid #ddd;
}
#group-all-contacts-end {
clear: both;
margin-bottom: 10px;
}
.contact-block-div {
float: left;
width: 52px;
height: 52px;
}
/* widget */ /* widget */
.widget { .widget {
margin-bottom: 2em; margin-bottom: 2em;
@ -969,3 +1013,4 @@ footer { height: 100px; display: table-row; }
margin-top: 25px; margin-top: 25px;
clear: both; clear: both;
} }

View file

@ -564,6 +564,53 @@ aside #profiles-menu {
widht: 48px; widht: 48px;
height: 58px; height: 58px;
} }
/* group member */
#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
float: right;
margin-right: 50px;
}
#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
height: 22px;
opacity: 0.3;
position: relative;
top: -50px;
}
#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
height: 22px;
position: relative;
top: -50px;
}
#group-members {
margin-top: 20px;
padding: 10px;
height: 250px;
overflow: auto;
border: 1px solid #ddd;
}
#group-members-end {
clear: both;
}
#group-all-contacts {
padding: 10px;
height: 450px;
overflow: auto;
border: 1px solid #ddd;
}
#group-all-contacts-end {
clear: both;
margin-bottom: 10px;
}
.contact-block-div {
float: left;
width: 52px;
height: 52px;
}
/* widget */ /* widget */
.widget { .widget {
margin-bottom: 2em; margin-bottom: 2em;

View file

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

View file

@ -0,0 +1,21 @@
<div class="contact-wrapper" id="contact-entry-wrapper-$id" >
<div class="contact-photo-wrapper" >
<div class="contact-photo mframe" id="contact-entry-photo-$id"
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('contact-photo-menu-button-$id')" onmouseout="t$id=setTimeout('closeMenu(\'contact-photo-menu-button-$id\'); closeMenu(\'contact-photo-menu-$id\');',200)" >
<a href="$url" title="$img_hover" /><img src="$thumb" $sparkle alt="$name" /></a>
<a href="#" rel="#contact-photo-menu-$id" class="contact-photo-menu-button icon s16 menu" id="contact-photo-menu-button-$id">menu</a>
<ul class="contact-photo-menu menu-popup" id="contact-photo-menu-$id">
$contact_photo_menu
</ul>
</div>
</div>
<div class="contact-name" id="contact-entry-name-$id" >$name</div>
</div>

View file

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

BIN
view/theme/vier/icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

1463
view/theme/vier/icons.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -0,0 +1,833 @@
// Quattro Theme LESS file
/* global */
body {
font-family: Liberation Sans,helvetica,arial,clean,sans-serif;
font-size: 10px;
background-color: @BodyBackground;
color: @BodyColor;
margin: 50px 0px 0px 0px;
display:table;
}
h4 { font-size: 1.1em }
.shadow(@x: 0px, @y: 5px){
-webkit-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7);
box-shadow:@x @y 10px rgba(0, 0, 0, 0.7);
}
.rounded(@tr: 5px, @tl: 5px, @bl: 5px, @br: 5px){
-moz-border-radius: @arguments;
-webkit-border-radius: @arguments;
border-radius: @arguments;
}
.roundbottom (@radius: 5px){ .rounded(0, 0, @radius, @radius); }
.roundtop (@radius: 5px){ .rounded(@radius, @radius, 0, 0); }
.opaque(@v: 0.5){
opacity: @v;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
a, a:link { color: @Link; text-decoration: none; }
a:visited { color: @LinkVisited; text-decoration: none; }
a:hover {color: @LinkHover; text-decoration: underline; }
.left { float: left; }
.right { float: right; }
.hidden { display: none; }
.clear { clear: both; }
code {
font-family: Courier, monospace;
white-space: pre;
display: block;
overflow: auto;
border: 1px solid #444;
background: #EEE;
color: #444;
padding: 10px;
margin-top: 20px;
}
/* tool */
.tool {
height: auto; overflow: auto;
.label { float: left;}
.action { float: right; }
}
/* popup notifications */
div.jGrowl div.notice {
background: @NoticeBackgroundColor url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: @NoticeColor;
padding-left: 58px;
}
div.jGrowl div.info {
background: @InfoBackgroundColor url("../../../images/icons/48/info.png") no-repeat 5px center;
color: @InfoColor;
padding-left: 58px;
}
/* header */
header {
position: fixed; left: 43%; right: 43%; top: 0px;
margin: 0px; padding: 0px;
/*width: 100%; height: 12px; */
z-index: 110;
color: @Grey1;
#site-location {
display: none;
}
#banner {
overflow: hidden;
text-align: center;
width: 100%;
a, a:active, a:visited, a:link, a:hover { color: @Grey1; text-decoration: none; outline: none; vertical-align: bottom; }
#logo-img { height: 22px; margin-top:5px;}
#logo-text { font-size: 22px }
}
}
/* nav */
nav {
width: 100%; height: 32px;
position: fixed; left: 0px; top: 0px;
padding: 0px;
background-color: @NavbarBackground;
color: @Grey1;
z-index: 100;
.shadow(0px, 0px);
a, a:active, a:visited, a:link, a:hover { color: @Banner; text-decoration: none; outline: none; }
ul {
margin: 0px;
padding: 0px 20px;
li {
list-style: none;
margin: 0px; padding: 0px;
float: left;
.menu-popup{ left: 0px; right: auto; }
}
}
.nav-menu-icon {
position: relative;
height: 22px;
padding: 5px;
margin: 0px 10px;
.roundtop();
&.selected {
background-color: @NavbarSelectedBg;
}
img { width: 22px; height: 22px; }
.nav-notify { top: 3px; }
}
.nav-menu {
position: relative;
height: 16px;
padding: 5px;
margin: 3px 15px 0px;
font-size: 14px;
border-bottom: 3px solid @NavbarBackground;
&.selected {
border-bottom: 3px solid @NavbarSelectedBorder;
}
}
.nav-notify {
display: none;
position: absolute;
background-color: @NavbarNotifBg;
.rounded();
font-size: 10px;
padding: 1px 3px;
top: 0px;
right: -10px;
min-width: 15px;
text-align: right;
&.show{ display: block; }
}
#nav-help-link,
#nav-search-link,
#nav-directory-link,
#nav-apps-link,
#nav-site-linkmenu {
float: right;
.menu-popup{ right: 0px; left: auto; }
}
#nav-notifications-linkmenu.on .icon.s22.notify,
#nav-notifications-linkmenu.selected .icon.s22.notify { background-image: url("../../../images/icons/22/notify_on.png") }
#nav-apps-link.selected { background-color: @NavbarSelectedBg; }
}
ul.menu-popup {
position: absolute;
display: none;
width: 10em;
background: @MenuBg;
color: @Menu;
margin: 0px;
padding: 0px;
list-style: none;
border: 3px solid @MenuBorder;
z-index: 100000;
.shadow();
a { display: block; color: @MenuItem; padding: 5px 10px; text-decoration: none;}
a:hover { background-color: @MenuItemHoverBg; }
.menu-sep { border-top: 1px solid @MenuItemSeparator; }
li { float: none; overflow: auto; height: auto; display: block; }
li img { float: left; width: 16px; height: 16px; padding-right: 5px;}
.empty {
padding: 5px;
text-align: center;
color: @MenuEmpty;
}
}
/* autocomplete popup */
.acpopup {
max-height:150px;
background-color:@MenuBg;
color: @Menu;
border:1px solid #MenuBorder;
overflow:auto;
z-index:100000;
.shadow();
}
.acpopupitem {
color: @MenuItem; padding: 4px;
clear:left;
img {
float: left;
margin-right: 4px;
}
&.selected{
background-color: @MenuItemHoverBg;
}
}
#nav-notifications-menu {
width: 400px;
img { float: left; margin-right: 5px; }
.contactname { font-weight: bold; }
.notif-when { font-size: 10px; color: @MenuItemDetail; display: block; }
}
/* aside */
aside {
display: table-cell;
vertical-align: top;
width: 200px;
padding:0px 10px 0px 20px;
border-right: 1px solid @AsideBorder;
.vcard {
.fn { font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.title { margin-bottom: 5px; }
dl { height: auto; overflow: auto; }
dt {float: left; margin-left: 0px; width: 35%; text-align: right; color: @VCardLabelColor; }
dd {float: left; margin-left: 4px; width: 60%;}
}
#profile-extra-links {
ul { padding: 0px; margin: 0px; }
li { padding: 0px; margin: 0px; list-style: none; }
}
#dfrn-request-link {
display: block;
.rounded();
color: @AsideConnect;
background: @AsideConnectBg url('../../../images/connect-bg.png') no-repeat left center;
font-weight: bold;
text-transform:uppercase;
padding: 4px 2px 2px 35px;
&:hover { text-decoration: none; background-color: @AsideConnectHoverBg; }
}
#profiles-menu { width: 20em; }
}
#contact-block {
overflow: auto; height: auto;
.contact-block-h4 { float: left; margin: 5px 0px; }
.allcontact-link { float: right; margin: 5px 0px; }
.contact-block-content {
clear: both;
overflow: auto; height: auto;
}
.contact-block-link {
float: left;
margin: 0px 2px 2px 0px;
img { widht: 48px; height: 58px; }
}
}
/* widget */
.widget {
margin-bottom: 2em;
h3 { padding: 0px; margin: 2px;}
.action { .opaque(0.1); }
input.action { .opaque(0.5); }
&:hover .title .action { .opaque(1); }
.tool:hover .action { .opaque(1); }
.tool:hover .action.ticked { .opaque(1); }
ul { padding: 0px;}
ul li {padding-left: 16px; min-height: 16px; list-style: none; }
.tool.selected {
background: url('../../../images/selected.png') no-repeat left center;
}
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
}
/* widget: search */
#add-search-popup {
width: 200px;
top: 18px;
}
/* section */
section {
display: table-cell;
vertical-align: top;
width: 800px;
padding:0px 20px 0px 10px;
}
/* wall item */
.tread-wrapper {
background-color: @ThreadBackgroundColor;
position: relative;
padding: 10px;
margin-bottom: 20px;
width: 780px;
}
.wall-item-decor { position: absolute; left: 790px; top: -10px; width: 16px;}
.unstarred { display: none; }
.wall-item-container {
display: table;
width: 780px;
.wall-item-item,
.wall-item-bottom { display: table-row; }
.wall-item-bottom { .opaque(0.5); }
&:hover .wall-item-bottom { .opaque(1); }
.wall-item-info {
display: table-cell;
vertical-align: top;
text-align: left;
width: 60px;
}
.wall-item-location {
word-wrap: break-word;
width: 50px;
}
.wall-item-content {
display: table-cell;
font-size: 12px;
max-width: 720px;
word-wrap: break-word;
}
.wall-item-content img { max-width: 710px; }
.wall-item-links,
.wall-item-actions {
display: table-cell;
vertical-align: middle;
.icon {
.opaque(0.5);
}
.icon:hover {
.opaque(1.0);
}
}
.wall-item-ago { padding-right: 40px; }
.wall-item-name { font-weight: bold; }
.wall-item-actions-author { float: left; width: 20em; margin-top: 0.5em; }
.wall-item-actions-social { float: left; margin-top: 0.5em;
a { margin-right: 3em; }
}
.wall-item-actions-tools { float: right; width: 15%;
a { float: right; }
input { float: right; }
}
}
.wall-item-container.comment {
/*margin-top: 50px;*/
.contact-photo { width: 32px; height: 32px; margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
}
.contact-photo-menu-button {
top: 15px !important;
left: 15px !important;
}
.wall-item-links { padding-left: 12px; }
}
.wall-item-comment-wrapper {
margin: 30px 2em 2em 60px;
.comment-edit-photo { display: none; }
textarea {
height: 1em; width: 100%; font-size: 10px;
color: @CommentBoxEmptyColor;
border: 1px solid @CommentBoxEmptyBorderColor;
padding:0.3em;
}
.comment-edit-text-full {
font-size: 14px;
height: 4em;
color: @CommentBoxFullColor;
border: 1px solid @CommentBoxFullBorderColor;
}
}
.wall-item-tags { padding-top: 5px; }
.tag {
background: url("../../../images/tag_b.png") no-repeat center left;
color: @TagColor;
padding-left: 3px;
a {
padding-right: 8px;
background: url("../../../images/tag.png") no-repeat center right;
color: @TagColor;
}
}
/* contacts menu */
.contact-photo-wrapper { position: relative; }
.contact-photo {
width: 48px; height: 48px;
img { width: 48px; height: 48px; }
overflow: hidden;
display: block;
}
.contact-photo-menu-button {
display: none;
position: absolute;
left: -2px;
top: 31px;
}
.contact-wrapper {
float: left;
width: 90px;
height: 90px;
.contact-photo {
width: 80px; height: 80px;
img { width: 80px; height: 80px; }
}
.contact-photo-menu-button {
left: 0px;
top: 63px;
}
}
.directory-item {
float: left;
width: 200px;
height: 200px;
.contact-photo {
width: 175px; height: 175px;
img { width: 175px; height: 175px; }
}
}
.contact-name { text-align: center; font-weight: bold; }
.contact-details { color: @Grey3;}
/* editor */
.jothidden { display: none; }
#jot {
width: 100%;
margin: 0px 2em 20px 0px;
.profile-jot-text {
height: 1em; width: 99%; font-size: 10px;
color: @CommentBoxEmptyColor;
border: 1px solid @CommentBoxEmptyBorderColor;
padding:0.3em;
}
#jot-tools {
margin: 0px; padding: 0px;
height: 40px; overflow: none;
width: 800px;
background-color: @JotToolsBackgroundColor;
border-bottom: 2px solid @JotToolsBorderColor;
li {
list-style: none;
float: left;
width: 80px;
height: 40px;
border-bottom: 2px solid @JotToolsBorderColor;
a {
display: block;
color: @JotToolsText;
width: 100%;
height:40px;
text-align: center;
line-height: 40px;
overflow: hidden;
}
}
li:hover {
background-color: @JotToolsOverBackgroundColor;
border-bottom: 2px solid @JotToolsOverBorderColor;
}
li.perms {
float: right;
width: 40px;
a.unlock {
width: 30px;
border-left: 10px solid @JotPermissionUnlockBackgroundColor;
background-color: @JotPermissionUnlockBackgroundColor;
}
a.lock {
width: 30px;
border-left: 10px solid @JotPermissionLockBackgroundColor;
background-color: @JotPermissionLockBackgroundColor;
}
}
li.submit {
float: right;
background-color: @JotSubmitBackgroundColor;
border-bottom: 2px solid @JotSubmitBackgroundColor;
border-right: 1px solid @Grey4;
border-left: 1px solid @Grey4;
input {
border: 0px; margin: 0px; padding: 0px;
background-color: @JotSubmitBackgroundColor;
color: @JotSubmitText;
width: 80px; height: 40px;
line-height: 40px;
}
input:hover {
background-color: @JotSubmitOverBackgroundColor;
color: @JotSubmitOverText;
}
}
li.loading {
float: right;
background-color: @JotLoadingBackgroundColor;
width: 20px;
vertical-align: center;
text-align: center;
img { margin-top: 10px; }
border-top: 2px solid @JotToolsBorderColor;
height: 38px;
}
}
#jot-title {
border: 0px;
margin: 0px;
height: 20px;
width: 700px;
font-weight: bold;
border: 1px solid @BodyBackground;
&:-webkit-input-placeholder {
font-weight: normal;
}
&:-moz-placeholder {
font-weight: normal;
}
&:hover { border: 1px solid @CommentBoxEmptyBorderColor }
&:focus { border: 1px solid @CommentBoxEmptyBorderColor }
}
#character-counter {
width: 80px;
float: right;
text-align: right;
height: 20px;
line-height: 20px;
padding-right: 20px;
}
}
/** buttons **/
/*input[type="submit"] {
border: 0px;
background-color: @ButtonBackgroundColor;
color: @ButtonColor;
padding: 0px 10px;
.rounded(5px);
height: 18px;
}*/
/** acl **/
#photo-edit-perms-select,
#photos-upload-permissions-wrapper,
#profile-jot-acl-wrapper{
display:block!important;
}
#acl-wrapper {
width: 690px;
float:left;
}
#acl-search {
float:right;
background: #ffffff url("../../../images/search_18.png") no-repeat right center;
padding-right:20px;
}
#acl-showall {
float: left;
display: block;
width: auto;
height: 18px;
background-color: #cccccc;
background-image: url("../../../images/show_all_off.png");
background-position: 7px 7px;
background-repeat: no-repeat;
padding: 7px 5px 0px 30px;
color: #999999;
.rounded(5px);
}
#acl-showall.selected {
color: #000000;
background-color: #ff9900;
background-image: url("../../../images/show_all_on.png");
}
#acl-list {
height: 210px;
border: 1px solid #cccccc;
clear: both;
margin-top: 30px;
overflow: auto;
}
#acl-list-content {
}
.acl-list-item {
display: block;
width: 150px;
height: 30px;
border: 1px solid #cccccc;
margin: 5px;
float: left;
}
.acl-list-item img{
width:22px;
height: 22px;
float: left;
margin: 4px;
}
.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;}
.acl-list-item a {
font-size: 8px;
display: block;
width: 40px;
height: 10px;
float: left;
color: #999999;
background-color: #cccccc;
background-position: 3px 3px;
background-repeat: no-repeat;
margin-right: 5px;
-webkit-border-radius: 2px ;
-moz-border-radius: 2px;
border-radius: 2px;
padding-left: 15px;
}
#acl-wrapper a:hover {
text-decoration: none;
color:#000000;
}
.acl-button-show { background-image: url("../../../images/show_off.png"); }
.acl-button-hide { background-image: url("../../../images/hide_off.png"); }
.acl-button-show.selected {
color: #000000;
background-color: #9ade00;
background-image: url("../../../images/show_on.png");
}
.acl-button-hide.selected {
color: #000000;
background-color: #ff4141;
background-image: url("../../../images/hide_on.png");
}
.acl-list-item.groupshow { border-color: #9ade00; }
.acl-list-item.grouphide { border-color: #ff4141; }
/** /acl **/
/** tab buttons **/
ul.tabs {
list-style-type: none;
padding-bottom: 10px;
li {
float: left;
margin-left: 20px;
.active {
border-bottom: 1px solid @LinkVisited;
}
}
}
/**
* Form fields
*/
.field {
margin-bottom: 10px;
padding-bottom: 10px;
overflow: auto;
width: 100%;
label {
float: left;
width: 200px;
}
input,
textarea {
width: 400px;
}
textarea { height: 100px; }
.field_help {
display: block;
margin-left: 200px;
color: #666666;
}
.onoff {
float: left;
width: 80px;
}
.onoff a {
display: block;
border:1px solid #666666;
background-image:url("../../../images/onoff.jpg");
background-repeat: no-repeat;
padding: 4px 2px 2px 2px;
height: 16px;
text-decoration: none;
}
.onoff .off {
border-color:#666666;
padding-left: 40px;
background-position: left center;
background-color: #cccccc;
color: #666666;
text-align: right;
}
.onoff .on {
border-color:#204A87;
padding-right: 40px;
background-position: right center;
background-color: #D7E3F1;
color: #204A87;
text-align: left;
}
.hidden { display: none!important; }
&.radio .field_help { margin-left: 0px; }
}
#profile-edit-links li {
list-style: none;
}
/* oauth */
.oauthapp {
height: auto; overflow: auto;
border-bottom: 2px solid #cccccc;
padding-bottom: 1em;
margin-bottom: 1em;
}
.oauthapp img {
float: left;
width: 48px; height: 48px;
margin: 10px;
}
.oauthapp img.noicon {
background-image: url("../../../images/icons/48/plugin.png");
background-position: center center;
background-repeat: no-repeat;
}
.oauthapp a {
float: left;
}
/* contacts */
.contact-entry-wrapper {
width: 50px; float: left;
}
/* photo */
.lframe {
float: left;
margin: 0px 10px 10px 0px;
}
/* page footer */
footer { height: 100px; display: table-row; }

87
view/theme/vier/search_item.tpl Executable file
View file

@ -0,0 +1,87 @@
<div class="wall-item-decor">
<span class="icon s22 star $isstarred" id="starred-$id" title="$star.starred">$star.starred</span>
{{ if $lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$id);" title="$lock">$lock</span>{{ endif }}
<img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
<div class="wall-item-container $indent">
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper"
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
<a href="$profile_url" target="redir" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
<img src="$thumb" class="contact-photo$sparkle" id="wall-item-photo-$id" alt="$name" />
</a>
<a href="#" rel="#wall-item-photo-menu-$id" class="contact-photo-menu-button icon s16 menu" id="wall-item-photo-menu-button-$id">menu</a>
<ul class="wall-item-menu menu-popup" id="wall-item-photo-menu-$id">
$item_photo_menu
</ul>
</div>
</div>
<div class="wall-item-actions-author">
<a href="$profile_url" target="redir" title="$linktitle" class="wall-item-name-link"><span class="wall-item-name$sparkle">$name</span></a>
<span class="wall-item-ago">- &nbsp;
{{ if $plink }}<a class="link" title="$plink.title" href="$plink.href" style="color: #999">$ago</a>{{ else }} $ago {{ endif }}
</span>
</div>
<div class="wall-item-content">
{{ if $title }}<h2><a href="$plink.href">$title</a></h2>{{ endif }}
$body
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
</div>
<div class="wall-item-tags">
{{ for $tags as $tag }}
<span class='tag'>$tag</span>
{{ endfor }}
</div>
</div>
<div class="wall-item-bottom">
<div class="">
{{ if $plink }}<a class="icon s16 link" title="$plink.title" href="$plink.href">$plink.title</a>{{ endif }}
</div>
<div class="wall-item-actions">
<div class="wall-item-location">$location&nbsp;</div>
<div class="wall-item-actions-social">
{{ if $star }}
<a href="#" id="star-$id" onclick="dostar($id); return false;" class="$star.classdo" title="$star.do">$star.do</a>
<a href="#" id="unstar-$id" onclick="dostar($id); return false;" class="$star.classundo" title="$star.undo">$star.undo</a>
<a href="#" id="tagger-$id" onclick="itemTag($id); return false;" class="$star.classtagger" title="$star.tagger">$star.tagger</a>
{{ endif }}
{{ if $vote }}
<a href="#" id="like-$id" title="$vote.like.0" onclick="dolike($id,'like'); return false">$vote.like.1</a>
<a href="#" id="dislike-$id" title="$vote.dislike.0" onclick="dolike($id,'dislike'); return false">$vote.dislike.1</a>
{{ endif }}
{{ if $vote.share }}
<a href="#" id="share-$id" title="$vote.share.0" onclick="jotShare($id); return false">$vote.share.1</a>
{{ endif }}
</div>
<div class="wall-item-actions-tools">
{{ if $drop.dropping }}
<input type="checkbox" title="$drop.select" name="itemselected[]" class="item-select" value="$id" />
<a href="item/drop/$id" onclick="return confirmDelete();" class="icon delete s16" title="$drop.delete">$drop.delete</a>
{{ endif }}
{{ if $edpost }}
<a class="icon edit s16" href="$edpost.0" title="$edpost.1"></a>
{{ endif }}
</div>
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-$id">$like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$id">$dislike</div>
</div>
</div>

1451
view/theme/vier/style.css Normal file

File diff suppressed because it is too large Load diff

View file

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

View file

@ -0,0 +1,90 @@
{{ if $indent }}{{ else }}
<div class="wall-item-decor">
<span class="icon s22 star $isstarred" id="starred-$id" title="$star.starred">$star.starred</span>
{{ if $lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$id);" title="$lock">$lock</span>{{ endif }}
<img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
{{ endif }}
<div class="wall-item-container $indent">
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper"
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
<a href="$profile_url" target="redir" title="$linktitle" class="contact-photo-link" id="wall-item-photo-link-$id">
<img src="$thumb" class="contact-photo$sparkle" id="wall-item-photo-$id" alt="$name" />
</a>
<a href="#" rel="#wall-item-photo-menu-$id" class="contact-photo-menu-button icon s16 menu" id="wall-item-photo-menu-button-$id">menu</a>
<ul class="contact-menu menu-popup" id="wall-item-photo-menu-$id">
$item_photo_menu
</ul>
</div>
</div>
<div class="wall-item-actions-author">
<a href="$profile_url" target="redir" title="$linktitle" class="wall-item-name-link"><span class="wall-item-name$sparkle">$name</span></a>
<span class="wall-item-ago">- &nbsp;
{{ if $plink }}<a class="link" title="$plink.title" href="$plink.href" style="color: #999">$ago</a>{{ else }} $ago {{ endif }}
</span>
</div>
<div class="wall-item-content">
{{ if $title }}<h2><a href="$plink.href">$title</a></h2>{{ endif }}
$body
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
</div>
<div class="wall-item-tags">
{{ for $tags as $tag }}
<span class='tag'>$tag</span>
{{ endfor }}
</div>
</div>
<div class="wall-item-bottom">
<div class="">
{{ if $plink }}<a class="icon s16 link" title="$plink.title" href="$plink.href">$plink.title</a>{{ endif }}
</div>
<div class="wall-item-actions">
<div class="wall-item-location">$location&nbsp;</div>
<div class="wall-item-actions-social">
{{ if $star }}
<a href="#" id="star-$id" onclick="dostar($id); return false;" class="$star.classdo" title="$star.do">$star.do</a>
<a href="#" id="unstar-$id" onclick="dostar($id); return false;" class="$star.classundo" title="$star.undo">$star.undo</a>
<a href="#" id="tagger-$id" onclick="itemTag($id); return false;" class="$star.classtagger" title="$star.tagger">$star.tagger</a>
{{ endif }}
{{ if $vote }}
<a href="#" id="like-$id" title="$vote.like.0" onclick="dolike($id,'like'); return false">$vote.like.1</a>
<a href="#" id="dislike-$id" title="$vote.dislike.0" onclick="dolike($id,'dislike'); return false">$vote.dislike.1</a>
{{ endif }}
{{ if $vote.share }}
<a href="#" id="share-$id" title="$vote.share.0" onclick="jotShare($id); return false">$vote.share.1</a>
{{ endif }}
</div>
<div class="wall-item-actions-tools">
{{ if $drop.dropping }}
<input type="checkbox" title="$drop.select" name="itemselected[]" class="item-select" value="$id" />
<a href="item/drop/$id" onclick="return confirmDelete();" class="icon delete s16" title="$drop.delete">$drop.delete</a>
{{ endif }}
{{ if $edpost }}
<a class="icon edit" href="$edpost.0" title="$edpost.1"></a>
{{ endif }}
</div>
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-$id">$like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$id">$dislike</div>
</div>
</div>
<div class="wall-item-comment-wrapper" >
$comment
</div>

View file

@ -0,0 +1,97 @@
{{ if $indent }}{{ else }}
<div class="wall-item-decor">
<span class="icon s22 star $isstarred" id="starred-$id" title="$star.starred">$star.starred</span>
{{ if $lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$id);" title="$lock">$lock</span>{{ endif }}
<img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
{{ endif }}
<div class="wall-item-container $indent">
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper mframe wwto" id="wall-item-ownerphoto-wrapper-$id" >
<a href="$owner_url" target="redir" title="$olinktitle" class="contact-photo-link" id="wall-item-ownerphoto-link-$id">
<img src="$owner_photo" class="contact-photo $osparkle" id="wall-item-ownerphoto-$id" alt="$owner_name" />
</a>
</div>
<div class="contact-photo-wrapper mframe wwfrom"
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
<a href="$profile_url" target="redir" title="$linktitle" class="contact-photo-link" id="wall-item-photo-link-$id">
<img src="$thumb" class="contact-photo $sparkle" id="wall-item-photo-$id" alt="$name" />
</a>
<a href="#" rel="#wall-item-photo-menu-$id" class="contact-photo-menu-button icon s16 menu" id="wall-item-photo-menu-button-$id">menu</a>
<ul class="contact-menu menu-popup" id="wall-item-photo-menu-$id">
$item_photo_menu
</ul>
</div>
</div>
<div class="wall-item-actions-author">
<a href="$profile_url" target="redir" title="$linktitle" class="wall-item-name-link"><span class="wall-item-name$sparkle">$name</span></a>
$to <a href="$owner_url" target="redir" title="$olinktitle" class="wall-item-name-link"><span class="wall-item-name$osparkle" id="wall-item-ownername-$id">$owner_name</span></a>
$vwall <span class="wall-item-ago">- &nbsp;
{{ if $plink }}<a class="link" title="$plink.title" href="$plink.href" style="color: #999">$ago</a>{{ else }} $ago {{ endif }}
</span>
</div>
<div class="wall-item-content">
{{ if $title }}<h2><a href="$plink.href">$title</a></h2>{{ endif }}
$body
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
</div>
<div class="wall-item-tags">
{{ for $tags as $tag }}
<span class='tag'>$tag</span>
{{ endfor }}
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
{{ if $plink }}<a class="icon s16 link" title="$plink.title" href="$plink.href">$plink.title</a>{{ endif }}
</div>
<div class="wall-item-actions">
<div class="wall-item-location">$location&nbsp;</div>
<div class="wall-item-actions-social">
{{ if $star }}
<a href="#" id="star-$id" onclick="dostar($id); return false;" class="$star.classdo" title="$star.do">$star.do</a>
<a href="#" id="unstar-$id" onclick="dostar($id); return false;" class="$star.classundo" title="$star.undo">$star.undo</a>
{{ endif }}
{{ if $vote }}
<a href="#" id="like-$id" title="$vote.like.0" onclick="dolike($id,'like'); return false">$vote.like.1</a>
<a href="#" id="dislike-$id" title="$vote.dislike.0" onclick="dolike($id,'dislike'); return false">$vote.dislike.1</a>
{{ endif }}
{{ if $vote.share }}
<a href="#" id="share-$id" title="$vote.share.0" onclick="jotShare($id); return false">$vote.share.1</a>
{{ endif }}
</div>
<div class="wall-item-actions-tools">
{{ if $drop.dropping }}
<input type="checkbox" title="$drop.select" name="itemselected[]" class="item-select" value="$id" />
<a href="item/drop/$id" onclick="return confirmDelete();" class="icon delete s16" title="$drop.delete">$drop.delete</a>
{{ endif }}
{{ if $edpost }}
<a class="icon edit s16" href="$edpost.0" title="$edpost.1"></a>
{{ endif }}
</div>
</div>
</div>
<div class="wall-item-bottom">
<div class="wall-item-links"></div>
<div class="wall-item-like" id="wall-item-like-$id">$like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$id">$dislike</div>
</div>
</div>
<div class="wall-item-comment-wrapper" >
$comment
</div>