Merge remote branch 'upstream/master'

Conflicts:
	update.php
This commit is contained in:
Michael Vogel 2012-08-02 00:21:14 +02:00
commit 04c31d194f
316 changed files with 18693 additions and 1540 deletions

View file

@ -8,11 +8,12 @@ require_once('include/datetime.php');
require_once('include/pgettext.php');
require_once('include/nav.php');
require_once('include/cache.php');
require_once('library/Mobile_Detect/Mobile_Detect.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1407' );
define ( 'FRIENDICA_VERSION', '3.0.1421' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1153 );
define ( 'DB_UPDATE_VERSION', 1154 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -191,6 +192,7 @@ define ( 'NOTIFY_SUGGEST', 0x0020 );
define ( 'NOTIFY_PROFILE', 0x0040 );
define ( 'NOTIFY_TAGSELF', 0x0080 );
define ( 'NOTIFY_TAGSHARE', 0x0100 );
define ( 'NOTIFY_POKE', 0x0200 );
define ( 'NOTIFY_SYSTEM', 0x8000 );
@ -215,7 +217,7 @@ define ( 'TERM_OBJ_PHOTO', 2 );
* various namespaces we may need to parse
*/
define ( 'NAMESPACE_ZOT', 'http://purl.org/macgirvin/zot' );
define ( 'NAMESPACE_ZOT', 'http://purl.org/zot' );
define ( 'NAMESPACE_DFRN' , 'http://purl.org/macgirvin/dfrn/1.0' );
define ( 'NAMESPACE_THREAD' , 'http://purl.org/syndication/thread/1.0' );
define ( 'NAMESPACE_TOMB' , 'http://purl.org/atompub/tombstones/1.0' );
@ -250,6 +252,8 @@ define ( 'ACTIVITY_UPDATE', NAMESPACE_ACTIVITY_SCHEMA . 'update' );
define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' );
define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' );
define ( 'ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke' );
define ( 'ACTIVITY_OBJ_COMMENT', NAMESPACE_ACTIVITY_SCHEMA . 'comment' );
define ( 'ACTIVITY_OBJ_NOTE', NAMESPACE_ACTIVITY_SCHEMA . 'note' );
define ( 'ACTIVITY_OBJ_PERSON', NAMESPACE_ACTIVITY_SCHEMA . 'person' );
@ -556,7 +560,7 @@ if(! class_exists('App')) {
$interval = 40000;
$this->page['title'] = $this->config['sitename'];
$tpl = file_get_contents('view/head.tpl');
$tpl = get_markup_template('head.tpl');
$this->page['htmlhead'] = replace_macros($tpl,array(
'$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
'$local_user' => local_user(),
@ -569,6 +573,13 @@ if(! class_exists('App')) {
));
}
function init_page_end() {
$tpl = get_markup_template('end.tpl');
$this->page['end'] = replace_macros($tpl,array(
'$baseurl' => $this->get_baseurl() // FIXME for z_path!!!!
));
}
function set_curl_code($code) {
$this->curl_code = $code;
}
@ -744,9 +755,10 @@ if(! function_exists('check_config')) {
// If the update fails or times-out completely you may need to
// delete the config entry to try again.
if(get_config('database','update_' . $x))
$t = get_config('database','update_' . $x);
if($t !== false)
break;
set_config('database','update_' . $x, '1');
set_config('database','update_' . $x, time());
// call the specific update
@ -769,13 +781,14 @@ if(! function_exists('check_config')) {
. 'Content-transfer-encoding: 8bit' );
//try the logger
logger('CRITICAL: Update Failed: '. $x);
break;
}
else
else {
set_config('database','update_' . $x, 'success');
set_config('system','build', $x + 1);
}
}
}
set_config('system','build', DB_UPDATE_VERSION);
}
}
}
@ -1238,6 +1251,12 @@ if(! function_exists('get_birthdays')) {
if(! local_user())
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');
@ -1317,6 +1336,13 @@ if(! function_exists('get_events')) {
if(! local_user())
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');
@ -1438,8 +1464,17 @@ if(! function_exists('current_theme')) {
$a = get_app();
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile) {
$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme);
}
if(!$is_mobile || ($system_theme === '' && $theme_name === '')) {
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
}
if($theme_name &&
(file_exists('view/theme/' . $theme_name . '/style.css') ||
@ -1576,18 +1611,21 @@ if(! function_exists('profile_tabs')){
'url' => $url,
'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''),
'title' => t('Status Messages and Posts'),
'id' => 'status-tab',
),
array(
'label' => t('Profile'),
'url' => $url.'/?tab=profile',
'sel' => ((isset($tab) && $tab=='profile')?'active':''),
'title' => t('Profile Details'),
'id' => 'profile-tab',
),
array(
'label' => t('Photos'),
'url' => $a->get_baseurl() . '/photos/' . $nickname,
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
),
);
@ -1597,12 +1635,14 @@ if(! function_exists('profile_tabs')){
'url' => $a->get_baseurl() . '/events',
'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
);
$tabs[] = array(
'label' => t('Personal Notes'),
'url' => $a->get_baseurl() . '/notes',
'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''),
'title' => t('Only You Can See This'),
'id' => 'notes-tab',
);
}

View file

@ -456,6 +456,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
`hook` char(255) NOT NULL,
`file` char(255) NOT NULL,
`function` char(255) NOT NULL,
`priority` int(11) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View file

@ -192,6 +192,7 @@ function contact_photo_menu($contact) {
$status_link="";
$photos_link="";
$posts_link="";
$poke_link="";
$sparkle = false;
if($contact['network'] === NETWORK_DFRN) {
@ -211,10 +212,12 @@ function contact_photo_menu($contact) {
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
}
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
$posts_link = $a->get_baseurl() . '/network/?cid=' . $contact['id'];
$menu = Array(
t("Poke") => $poke_link,
t("View Status") => $status_link,
t("View Profile") => $profile_link,
t("View Photos") => $photos_link,

File diff suppressed because it is too large Load diff

View file

@ -162,6 +162,49 @@ function localize_item(&$item){
$item['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$Bphoto;
}
if (stristr($item['verb'],ACTIVITY_POKE)) {
$verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
if(! $verb)
return;
if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
$Aname = $item['author-name'];
$Alink = $item['author-link'];
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
$obj = parse_xml_string($xmlhead.$item['object']);
$links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
$Bname = $obj->title;
$Blink = ""; $Bphoto = "";
foreach ($links->link as $l){
$atts = $l->attributes();
switch($atts['rel']){
case "alternate": $Blink = $atts['href'];
case "photo": $Bphoto = $atts['href'];
}
}
$A = '[url=' . zrl($Alink) . ']' . $Aname . '[/url]';
$B = '[url=' . zrl($Blink) . ']' . $Bname . '[/url]';
if ($Bphoto!="") $Bphoto = '[url=' . zrl($Blink) . '][img=80x80]' . $Bphoto . '[/img][/url]';
// we can't have a translation string with three positions but no distinguishable text
// So here is the translate string.
$txt = t('%1$s poked %2$s');
// now translate the verb
$txt = str_replace( t('poked'), t($verb), $txt);
// then do the sprintf on the translation string
$item['body'] = sprintf($txt, $A, $B). "\n\n\n" . $Bphoto;
}
if ($item['verb']===ACTIVITY_TAG){
$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
@ -867,6 +910,7 @@ function item_photo_menu($item){
if(! count($a->contacts))
load_contact_links(local_user());
}
$poke_link="";
$contact_url="";
$pm_url="";
$status_link="";
@ -896,6 +940,7 @@ function item_photo_menu($item){
}
}
if(($cid) && (! $item['self'])) {
$poke_link = $a->get_baseurl($ssl_state) . '/poke/?f=&c=' . $cid;
$contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid;
$posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid;
@ -918,6 +963,7 @@ function item_photo_menu($item){
t("Network Posts") => $posts_link,
t("Edit Contact") => $contact_url,
t("Send PM") => $pm_url,
t("Poke") => $poke_link
);
@ -929,7 +975,7 @@ function item_photo_menu($item){
$o = "";
foreach($menu as $k=>$v){
if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
if ($v!="") $o .= "<li><a href=\"$v\">$k</a></li>\n";
}
return $o;
}}
@ -1009,7 +1055,6 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$plaintext = true;
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true),
@ -1026,6 +1071,23 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
));
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),
'$linkurl' => t('Please enter a link URL:'),
'$vidurl' => t("Please enter a video link/URL:"),
'$audurl' => t("Please enter an audio link/URL:"),
'$term' => t('Tag term:'),
'$fileas' => t('Save to Folder:'),
'$whereareu' => t('Where are you right now?')
));
$tpl = get_markup_template("jot.tpl");
$jotplugins = '';
@ -1101,6 +1163,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
'$preview' => t('Preview'),
'$mobileapp' => t('Friendica mobile web'),
));

View file

@ -2120,7 +2120,6 @@ function diaspora_unshare($me,$contact) {
}
function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$a = get_app();
@ -2154,8 +2153,12 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
}
}
*/
// Removal of tags
$body = preg_replace('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $body);
/**
* Transform #tags, strip off the [url] and replace spaces with underscore
*/
$body = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
), $body);
//if(strlen($title))
// $body = "[b]".html_entity_decode($title)."[/b]\n\n".$body;

View file

@ -147,6 +147,24 @@ function notification($params) {
$itemlink = $params['link'];
}
if($params['type'] == NOTIFY_POKE) {
$subject = sprintf( t('[Friendica:Notify] %1$s poked you') , $params['source_name']);
$preamble = sprintf( t('%1$s poked you at %2$s') , $params['source_name'], $sitename);
$epreamble = sprintf( t('%1$s [url=%2$s]poked you[/url].') ,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]',
$params['link']);
$subject = str_replace('poked', t($params['activity']), $subject);
$preamble = str_replace('poked', t($params['activity']), $preamble);
$epreamble = str_replace('poked', t($params['activity']), $epreamble);
$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) {
$subject = sprintf( t('[Friendica:Notify] %s tagged your post') , $params['source_name']);
$preamble = sprintf( t('%1$s tagged your post at %2$s') , $params['source_name'], $sitename);

View file

@ -2107,6 +2107,118 @@ function local_delivery($importer,$data) {
$feed->enable_order_by_date(false);
$feed->init();
if($feed->error())
logger('local_delivery: Error parsing XML: ' . $feed->error());
// Check at the feed level for updated contact name and/or photo
$name_updated = '';
$new_name = '';
$photo_timestamp = '';
$photo_url = '';
$rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'owner');
if(! $rawtags)
$rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
if($rawtags) {
$elems = $rawtags[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10];
if($elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']) {
$name_updated = $elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated'];
$new_name = $elems['name'][0]['data'];
}
if((x($elems,'link')) && ($elems['link'][0]['attribs']['']['rel'] === 'photo') && ($elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated'])) {
$photo_timestamp = datetime_convert('UTC','UTC',$elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated']);
$photo_url = $elems['link'][0]['attribs']['']['href'];
}
}
if((is_array($contact)) && ($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar-date'])) {
logger('local_delivery: Updating photo for ' . $importer['name']);
require_once("Photo.php");
$photo_failure = false;
$have_photo = false;
$r = q("SELECT `resource-id` FROM `photo` WHERE `contact-id` = %d AND `uid` = %d LIMIT 1",
intval($importer['id']),
intval($importer['importer_uid'])
);
if(count($r)) {
$resource_id = $r[0]['resource-id'];
$have_photo = true;
}
else {
$resource_id = photo_new_resource();
}
$img_str = fetch_url($photo_url,true);
// guess mimetype from headers or filename
$type = guess_image_type($photo_url,true);
$img = new Photo($img_str, $type);
if($img->is_valid()) {
if($have_photo) {
q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `contact-id` = %d AND `uid` = %d",
dbesc($resource_id),
intval($importer['id']),
intval($importer['importer_uid'])
);
}
$img->scaleImageSquare(175);
$hash = $resource_id;
$r = $img->store($importer['importer_uid'], $importer['id'], $hash, basename($photo_url), 'Contact Photos', 4);
$img->scaleImage(80);
$r = $img->store($importer['importer_uid'], $importer['id'], $hash, basename($photo_url), 'Contact Photos', 5);
$img->scaleImage(48);
$r = $img->store($importer['importer_uid'], $importer['id'], $hash, basename($photo_url), 'Contact Photos', 6);
$a = get_app();
q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s'
WHERE `uid` = %d AND `id` = %d LIMIT 1",
dbesc(datetime_convert()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-4.'.$img->getExt()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-5.'.$img->getExt()),
dbesc($a->get_baseurl() . '/photo/' . $hash . '-6.'.$img->getExt()),
intval($importer['importer_uid']),
intval($importer['id'])
);
}
}
if((is_array($contact)) && ($name_updated) && (strlen($new_name)) && ($name_updated > $contact['name-date'])) {
$r = q("select * from contact where uid = %d and id = %d limit 1",
intval($importer['importer_uid']),
intval($importer['id'])
);
$x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
dbesc(notags(trim($new_name))),
dbesc(datetime_convert()),
intval($importer['importer_uid']),
intval($importer['id'])
);
// do our best to update the name on content items
if(count($r)) {
q("update item set `author-name` = '%s' where `author-name` = '%s' and `author-link` = '%s' and uid = %d",
dbesc(notags(trim($new_name))),
dbesc($r[0]['name']),
dbesc($r[0]['url']),
intval($importer['importer_uid'])
);
}
}
/*
// Currently unsupported - needs a lot of work
$reloc = $feed->get_feed_tags( NAMESPACE_DFRN, 'relocate' );
@ -2958,7 +3070,57 @@ function local_delivery($importer,$data) {
$datarray['owner-avatar'] = $importer['thumb'];
}
$r = item_store($datarray);
$posted_id = item_store($datarray);
if(stristr($datarray['verb'],ACTIVITY_POKE)) {
$verb = urldecode(substr($datarray['verb'],strpos($datarray['verb'],'#')+1));
if(! $verb)
continue;
$xo = parse_xml_string($datarray['object'],false);
if(($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) {
// somebody was poked/prodded. Was it me?
$links = parse_xml_string("<links>".unxmlify($xo->link)."</links>",false);
foreach($links->link as $l) {
$atts = $l->attributes();
switch($atts['rel']) {
case "alternate":
$Blink = $atts['href'];
break;
default:
break;
}
}
if($Blink && link_compare($Blink,$a->get_baseurl() . '/profile/' . $importer['nickname'])) {
// send a notification
require_once('include/enotify.php');
notification(array(
'type' => NOTIFY_POKE,
'notify_flags' => $importer['notify-flags'],
'language' => $importer['language'],
'to_name' => $importer['username'],
'to_email' => $importer['email'],
'uid' => $importer['importer_uid'],
'item' => $datarray,
'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id,
'source_name' => stripslashes($datarray['author-name']),
'source_link' => $datarray['author-link'],
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
? $importer['thumb'] : $datarray['author-avatar']),
'verb' => $datarray['verb'],
'otype' => 'person',
'activity' => $verb,
));
}
}
}
continue;
}
}

View file

@ -111,7 +111,7 @@ function reload_plugins() {
if(! function_exists('register_hook')) {
function register_hook($hook,$file,$function) {
function register_hook($hook,$file,$function,$priority=0) {
$r = q("SELECT * FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1",
dbesc($hook),
@ -121,10 +121,11 @@ function register_hook($hook,$file,$function) {
if(count($r))
return true;
$r = q("INSERT INTO `hook` (`hook`, `file`, `function`) VALUES ( '%s', '%s', '%s' ) ",
$r = q("INSERT INTO `hook` (`hook`, `file`, `function`, `priority`) VALUES ( '%s', '%s', '%s', '%s' ) ",
dbesc($hook),
dbesc($file),
dbesc($function)
dbesc($function),
dbesc($priority)
);
return $r;
}}
@ -145,7 +146,7 @@ if(! function_exists('load_hooks')) {
function load_hooks() {
$a = get_app();
$a->hooks = array();
$r = q("SELECT * FROM `hook` WHERE 1");
$r = q("SELECT * FROM `hook` WHERE 1 ORDER BY `priority` DESC");
if(count($r)) {
foreach($r as $rr) {
if(! array_key_exists($rr['hook'],$a->hooks))
@ -255,6 +256,7 @@ function get_theme_info($theme){
'author' => array(),
'maintainer' => array(),
'version' => "",
'credits' => "",
'experimental' => false,
'unsupported' => false
);

View file

@ -706,6 +706,22 @@ function linkify($s) {
return($s);
}}
function get_poke_verbs() {
// index is present tense verb
// value is array containing past tense verb, translation of present, translation of past
$arr = array(
'poke' => array( 'poked', t('poke'), t('poked')),
'ping' => array( 'pinged', t('ping'), t('pinged')),
'prod' => array( 'prodded', t('prod'), t('prodded')),
'slap' => array( 'slapped', t('slap'), t('slapped')),
'finger' => array( 'fingered', t('finger'), t('fingered')),
'rebuff' => array( 'rebuffed', t('rebuff'), t('rebuffed')),
);
call_hooks('poke_verbs', $arr);
return $arr;
}
/**
*
@ -1562,7 +1578,7 @@ function undo_post_tagging($s) {
function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
$s = str_replace("\n\n","\n",$s);
// $s = str_replace("\n\n","\n",$s);
return $s;
}

View file

@ -118,6 +118,12 @@ if(! x($_SESSION,'authenticated'))
$a->init_pagehead();
/**
* Build the page ending -- this is stuff that goes right before
* the closing </body> tag
*/
$a->init_page_end();
if(! x($_SESSION,'sysmsg'))

1
js/acl.min.js vendored Normal file
View file

@ -0,0 +1 @@
function ACL(e,t){that=this,that.url=e,that.kp_timer=null,t==undefined&&(t=[]),that.allow_cid=t[0]||[],that.allow_gid=t[1]||[],that.deny_cid=t[2]||[],that.deny_gid=t[3]||[],that.group_uids=[],that.nw=4,that.list_content=$("#acl-list-content"),that.item_tpl=unescape($(".acl-list-item[rel=acl-template]").html()),that.showall=$("#acl-showall"),t.length==0&&that.showall.addClass("selected"),that.showall.click(that.on_showall),$(".acl-button-show").live("click",that.on_button_show),$(".acl-button-hide").live("click",that.on_button_hide),$("#acl-search").keypress(that.on_search),$("#acl-wrapper").parents("form").submit(that.on_submit),that.get(0,100)}ACL.prototype.on_submit=function(){aclfileds=$("#acl-fields").html(""),$(that.allow_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_allow[]' value='"+t+"'>")}),$(that.allow_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+t+"'>")}),$(that.deny_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_deny[]' value='"+t+"'>")}),$(that.deny_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+t+"'>")})},ACL.prototype.search=function(){var e=$("#acl-search").val();that.list_content.html(""),that.get(0,100,e)},ACL.prototype.on_search=function(e){that.kp_timer&&clearTimeout(that.kp_timer),that.kp_timer=setTimeout(that.search,1e3)},ACL.prototype.on_showall=function(e){return e.preventDefault(),e.stopPropagation(),that.showall.hasClass("selected")?!1:(that.showall.addClass("selected"),that.allow_cid=[],that.allow_gid=[],that.deny_cid=[],that.deny_gid=[],that.update_view(),!1)},ACL.prototype.on_button_show=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_allow($(this).parent().attr("id")),!1},ACL.prototype.on_button_hide=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_deny($(this).parent().attr("id")),!1},ACL.prototype.set_allow=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.allow_gid.indexOf(id)<0?that.allow_gid.push(id):that.allow_gid.remove(id),that.deny_gid.indexOf(id)>=0&&that.deny_gid.remove(id);break;case"c":that.allow_cid.indexOf(id)<0?that.allow_cid.push(id):that.allow_cid.remove(id),that.deny_cid.indexOf(id)>=0&&that.deny_cid.remove(id)}that.update_view()},ACL.prototype.set_deny=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.deny_gid.indexOf(id)<0?that.deny_gid.push(id):that.deny_gid.remove(id),that.allow_gid.indexOf(id)>=0&&that.allow_gid.remove(id);break;case"c":that.deny_cid.indexOf(id)<0?that.deny_cid.push(id):that.deny_cid.remove(id),that.allow_cid.indexOf(id)>=0&&that.allow_cid.remove(id)}that.update_view()},ACL.prototype.update_view=function(){that.allow_gid.length==0&&that.allow_cid.length==0&&that.deny_gid.length==0&&that.deny_cid.length==0?(that.showall.addClass("selected"),$("#jot-perms-icon").removeClass("lock").addClass("unlock"),$("#jot-public").show(),$(".profile-jot-net input").attr("disabled",!1),typeof editor!="undefined"&&editor!=0&&$("#profile-jot-desc").html(ispublic)):(that.showall.removeClass("selected"),$("#jot-perms-icon").removeClass("unlock").addClass("lock"),$("#jot-public").hide(),$(".profile-jot-net input").attr("disabled","disabled"),$("#profile-jot-desc").html("&nbsp;")),$("#acl-list-content .acl-list-item").each(function(){$(this).removeClass("groupshow grouphide")}),$("#acl-list-content .acl-list-item").each(function(){itemid=$(this).attr("id"),type=itemid[0],id=parseInt(itemid.substr(1)),btshow=$(this).children(".acl-button-show").removeClass("selected"),bthide=$(this).children(".acl-button-hide").removeClass("selected");switch(type){case"g":var e="";that.allow_gid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected"),e="groupshow"),that.deny_gid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"),e="grouphide"),$(that.group_uids[id]).each(function(t,n){e=="grouphide"&&$("#c"+n).removeClass("groupshow");if(e!=""){var r=$("#c"+n).attr("class");if(r==undefined)return!0;var i=r.indexOf("grouphide");i==-1&&$("#c"+n).addClass(e)}});break;case"c":that.allow_cid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected")),that.deny_cid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"))}})},ACL.prototype.get=function(e,t,n){var r={start:e,count:t,search:n};$.ajax({type:"POST",url:that.url,data:r,dataType:"json",success:that.populate})},ACL.prototype.populate=function(e){var t=Math.ceil(e.tot/that.nw)*42;that.list_content.height(t),$(e.items).each(function(){html="<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>",html=html.format(this.photo,this.name,this.type,this.id,"",this.network,this.link),this.uids!=undefined&&(that.group_uids[this.id]=this.uids),that.list_content.append(html)}),that.update_view()};

6
js/ajaxupload.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -275,7 +275,7 @@ aStates[249]="|'Adan|'Ataq|Abyan|Al Bayda'|Al Hudaydah|Al Jawf|Al Mahrah|Al Mahw
aStates[250]="|Kosovo|Montenegro|Serbia|Vojvodina";
aStates[251]="|Central|Copperbelt|Eastern|Luapula|Lusaka|North-Western|Northern|Southern|Western";
aStates[252]="|Bulawayo|Harare|ManicalandMashonaland Central|Mashonaland East|Mashonaland West|Masvingo|Matabeleland North|Matabeleland South|Midlands";
aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|SPRACI|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";
aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Optimistisch|Recolutionari.es|Sparkling Network|SPRACI|Styliztique|Sysfu Social Club|Trevena|theshi.re|Tumpambae|Uzmiac|Other";
/*
* gArCountryInfo
* (0) Country name

11
js/country.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
js/fk.autocomplete.min.js vendored Normal file
View file

@ -0,0 +1,5 @@
/**
* Friendica people autocomplete
*
* require jQuery, jquery.textareas
*/function ACPopup(e,t){this.idsel=-1,this.element=e,this.searchText="",this.ready=!0,this.kp_timer=!1,this.url=t;var n=530,r=130;if(typeof e.editorId=="undefined")style=$(e).offset(),n=$(e).width(),r=$(e).height();else{var i=e.getContainer();typeof i!="undefined"&&(style=$(i).offset(),n=$(i).width(),r=$(i).height())}style.top=style.top+r,style.width=n,style.position="absolute",style.display="none",this.cont=$("<div class='acpopup'></div>"),this.cont.css(style),$("body").append(this.cont)}function ContactAutocomplete(e,t){this.pattern=/@([^ \n]+)$/,this.popup=null;var n=this;$(e).unbind("keydown"),$(e).unbind("keyup"),$(e).keydown(function(e){n.popup!==null&&n.popup.onkey(e)}),$(e).keyup(function(e){cpos=$(this).getSelection(),cpos.start==cpos.end&&(match=$(this).val().substring(0,cpos.start).match(n.pattern),match!==null?(n.popup===null&&(n.popup=new ACPopup(this,t)),n.popup.ready&&match[1]!==n.popup.searchText&&n.popup.search(match[1]),n.popup.ready||(n.popup=null)):n.popup!==null&&(n.popup.close(),n.popup=null))})}ACPopup.prototype.close=function(){$(this.cont).remove(),this.ready=!1},ACPopup.prototype.search=function(e){var t=this;this.searchText=e,this.kp_timer&&clearTimeout(this.kp_timer),this.kp_timer=setTimeout(function(){t._search()},500)},ACPopup.prototype._search=function(){console.log("_search");var e=this,t={start:0,count:100,search:this.searchText,type:"c"};$.ajax({type:"POST",url:this.url,data:t,dataType:"json",success:function(t){e.cont.html(""),t.tot>0?(e.cont.show(),$(t.items).each(function(){html="<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo,this.name,this.nick),e.add(html,this.nick.replace(" ","")+"+"+this.id+" - "+this.link)})):e.cont.hide()}})},ACPopup.prototype.add=function(e,n){var r=this,i=$("<div class='acpopupitem' title='"+n+"'>"+e+"</div>");i.click(function(e){t=$(this).attr("title").replace(new RegExp(" - .*"),""),typeof r.element.container=="undefined"?(el=$(r.element),sel=el.getSelection(),sel.start=sel.start-r.searchText.length,el.setSelection(sel.start,sel.end).replaceSelectedText(t+" ").collapseSelection(!1),r.close()):(txt=tinyMCE.activeEditor.getContent(),newtxt=txt.replace(r.searchText,t+" "),tinyMCE.activeEditor.setContent(newtxt),tinyMCE.activeEditor.focus(),r.close())}),$(this.cont).append(i)},ACPopup.prototype.onkey=function(e){e.keyCode=="13"&&(this.idsel>-1?(this.cont.children()[this.idsel].click(),e.preventDefault()):this.close()),e.keyCode=="38"&&(cmax=this.cont.children().size()-1,this.idsel--,this.idsel<0&&(this.idsel=cmax),e.preventDefault());if(e.keyCode=="40"||e.keyCode=="9")cmax=this.cont.children().size()-1,this.idsel++,this.idsel>cmax&&(this.idsel=0),e.preventDefault();if(e.keyCode=="38"||e.keyCode=="40"||e.keyCode=="9")this.cont.children().removeClass("selected"),$(this.cont.children()[this.idsel]).addClass("selected");e.keyCode=="27"&&this.close()},function(e){e.fn.contact_autocomplete=function(e){this.each(function(){new ContactAutocomplete(this,e)})}}(jQuery);

6
js/jquery.htmlstream.min.js vendored Normal file
View file

@ -0,0 +1,6 @@
/* jQuery ajax stream plugin
* Version 0.1
* Copyright (C) 2009 Chris Tarquini
* Licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License (http://creativecommons.org/licenses/by-sa/3.0/)
* Permissions beyond the scope of this license may be available by contacting petros000[at]hotmail.com.
*/(function(e){var t=e.ajax,n=e.get,r=e.post,i=!0;e.ajaxSetup({stream:!1,pollInterval:500}),e.enableAjaxStream=function(a){typeof a=="undefined"&&(a=!i),a?(e.ajax=s,e.get=o,e.post=u,i=!0):(e.ajax=t,e.get=n,e.post=r,i=!1)};var s=e.ajax=function(n){n=jQuery.extend(!0,n,jQuery.extend(!0,{},jQuery.ajaxSettings,n));if(n.stream){var r=0,i=0,s=null,o=0,u=!1,a=function(e){s=e,l()},f=function(){c("stream")},l=function(){u||(r=setTimeout(f,n.pollInterval))},c=function(t){typeof t=="undefined"&&(t="stream");if(s.status<3)return;var r=s.responseText;if(t=="stream"){if(r.length<=o){l();return}lastlength=r.length;if(i==r.length){l();return}}var u=r.substr(i);i=r.length,e.isFunction(n.OnDataRecieved)&&n.OnDataRecieved(u,t,s.responseText,s),s.status!=4&&l()},h=function(e,t){clearTimeout(r),u=!0,c(t)};if(e.isFunction(n.success)){var p=n.success;n.success=function(e,t){h(e,t),p(e,t)}}else n.success=h;if(e.isFunction(n.beforeSend)){var d=n.beforeSend;n.beforeSend=function(e){d(e),a(e)}}else n.beforeSend=a}t(n)},o=e.get=function(t,n,r,i,s){if(e.isFunction(n)){var o=r;r=n,e.isFunction(o)&&(s=o),n=null}e.isFunction(i)&&(s=i,i=undefined);var u=e.isFunction(s);return jQuery.ajax({type:"GET",url:t,data:n,success:r,dataType:i,stream:u,OnDataRecieved:s})},u=e.post=function(t,n,r,i,s){if(e.isFunction(n)){var o=r;r=n}e.isFunction(i)&&(s=i,i=undefined);var u=e.isFunction(s);return jQuery.ajax({type:"POST",url:t,data:n,success:r,dataType:i,stream:u,OnDataRecieved:s})}})(jQuery);

View file

@ -641,7 +641,7 @@ Array.prototype.remove = function(item) {
function previewTheme(elm) {
theme = $(elm).val();
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
});
}

1
js/main.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
js/webtoolkit.base64.min.js vendored Normal file
View file

@ -0,0 +1,6 @@
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="",n,r,i,s,o,u,a,f=0;e=Base64._utf8_encode(e);while(f<e.length)n=e.charCodeAt(f++),r=e.charCodeAt(f++),i=e.charCodeAt(f++),s=n>>2,o=(n&3)<<4|r>>4,u=(r&15)<<2|i>>6,a=i&63,isNaN(r)?u=a=64:isNaN(i)&&(a=64),t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return t},decode:function(e){var t="",n,r,i,s,o,u,a,f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length)s=this._keyStr.indexOf(e.charAt(f++)),o=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),a=this._keyStr.indexOf(e.charAt(f++)),n=s<<2|o>>4,r=(o&15)<<4|u>>2,i=(u&3)<<6|a,t+=String.fromCharCode(n),u!=64&&(t+=String.fromCharCode(r)),a!=64&&(t+=String.fromCharCode(i));return t=Base64._utf8_decode(t),t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},_utf8_decode:function(e){var t="",n=0,r=c1=c2=0;while(n<e.length)r=e.charCodeAt(n),r<128?(t+=String.fromCharCode(r),n++):r>191&&r<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((r&31)<<6|c2&63),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63),n+=3);return t}};

View file

@ -0,0 +1,221 @@
<?php
/**
* Mobile Detect
* $Id: Mobile_Detect.php 49 2012-06-06 20:46:30Z serbanghita@gmail.com $
*
* @usage require_once 'Mobile_Detect.php';
* $detect = new Mobile_Detect();
* $detect->isMobile() or $detect->isTablet()
*
* For more specific usage see the documentation navigate to:
* http://code.google.com/p/php-mobile-detect/wiki/Mobile_Detect
*
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
class Mobile_Detect {
protected $detectionRules;
protected $userAgent = null;
protected $accept = null;
// Assume the visitor has a desktop environment.
protected $isMobile = false;
protected $isTablet = false;
protected $phoneDeviceName = null;
protected $tabletDevicename = null;
protected $operatingSystemName = null;
protected $userAgentName = null;
// List of mobile devices (phones)
protected $phoneDevices = array(
'iPhone' => '(iPhone.*Mobile|iPod|iTunes)',
'BlackBerry' => 'BlackBerry|rim[0-9]+',
'HTC' => 'HTC|HTC.*(6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT',
'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus',
'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35',
'Motorola' => '\bDroid\b.*Build|DROIDX|HRI39|MOT\-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT909|XT910|XT912|XT928',
'Samsung' => 'Samsung|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9300 |GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-P6810|GT-P7100|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100',
'Sony' => 'E10i|SonyEricsson|SonyEricssonLT15iv',
'Asus' => 'Asus.*Galaxy',
'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ; @todo - complete the regex.
'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;)
'GenericPhone' => '(mmp|pocket|psp|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|wap|nokia|Series40|Series60|S60|SonyEricsson|N900|PPC;|MAUI.*WAP.*Browser|LG-P500)'
);
// List of tablet devices.
protected $tabletDevices = array(
'BlackBerryTablet' => 'PlayBook|RIM Tablet',
'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
'Kindle' => 'Kindle|Silk.*Accelerated',
'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|GT-P1000|GT-P1010|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P1000|GT-P3100|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7300|GT-P7320|GT-P7500|GT-P7510|GT-P7511',
'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200',
'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
'AsusTablet' => 'Transformer|TF101',
'NookTablet' => 'NookColor|nook browser|BNTV250A|LogicPD Zoom2',
'AcerTablet' => 'Android.*\b(A100|A101|A200|A500|A501|A510|W500|W500P|W501|W501P)\b',
'YarvikTablet' => 'Android.*(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468)',
'GenericTablet' => 'Tablet(?!.*PC)|ViewPad7|LG-V909|MID7015|BNTV250A|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b',
);
// List of mobile Operating Systems.
protected $operatingSystems = array(
'AndroidOS' => '(android.*mobile|android(?!.*mobile))',
'BlackBerryOS' => '(blackberry|rim tablet os)',
'PalmOS' => '(avantgo|blazer|elaine|hiptop|palm|plucker|xiino)',
'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|\bS60\b',
'WindowsMobileOS' => 'IEMobile|Windows Phone|Windows CE.*(PPC|Smartphone)|MSIEMobile|Window Mobile|XBLWP7',
'iOS' => '(iphone|ipod|ipad)',
'FlashLiteOS' => '',
'JavaOS' => '',
'NokiaOS' => '',
'webOS' => '',
'badaOS' => '\bBada\b',
'BREWOS' => '',
);
// List of mobile User Agents.
protected $userAgents = array(
'Chrome' => '\bCrMo\b|Chrome\/[.0-9]* Mobile',
'Dolfin' => '\bDolfin\b',
'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera',
'Skyfire' => 'skyfire',
'IE' => 'IEMobile|MSIEMobile',
'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile',
'Bolt' => 'bolt',
'TeaShark' => 'teashark',
'Blazer' => 'Blazer',
'Safari' => 'Mobile.*Safari|Safari.*Mobile',
'Midori' => 'midori',
'GenericBrowser' => 'NokiaBrowser|OviBrowser|SEMC.*Browser'
);
function __construct(){
// Merge all rules together.
$this->detectionRules = array_merge(
$this->phoneDevices,
$this->tabletDevices,
$this->operatingSystems,
$this->userAgents
);
$this->userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$this->accept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null;
if (
isset($_SERVER['HTTP_X_WAP_PROFILE']) ||
isset($_SERVER['HTTP_X_WAP_CLIENTID']) ||
isset($_SERVER['HTTP_WAP_CONNECTION']) ||
isset($_SERVER['HTTP_PROFILE']) ||
isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) || // Reported by Nokia devices (eg. C3)
isset($_SERVER['HTTP_X_NOKIA_IPADDRESS']) ||
isset($_SERVER['HTTP_X_NOKIA_GATEWAY_ID']) ||
isset($_SERVER['HTTP_X_ORANGE_ID']) ||
isset($_SERVER['HTTP_X_VODAFONE_3GPDPCONTEXT']) ||
isset($_SERVER['HTTP_X_HUAWEI_USERID']) ||
isset($_SERVER['HTTP_UA_OS']) || // Reported by Windows Smartphones
(isset($_SERVER['HTTP_UA_CPU']) && $_SERVER['HTTP_UA_CPU'] == 'ARM') // Seen this on a HTC
) {
$this->isMobile = true;
} elseif (!empty($this->accept) && (strpos($this->accept, 'text/vnd.wap.wml') !== false || strpos($this->accept, 'application/vnd.wap.xhtml+xml') !== false)) {
$this->isMobile = true;
} else {
$this->_detect();
}
}
public function getRules()
{
return $this->detectionRules;
}
/**
* Magic overloading method.
*
* @method boolean is[...]()
* @param string $name
* @param array $arguments
* @return mixed
*/
public function __call($name, $arguments)
{
$key = substr($name, 2);
return $this->_detect($key);
}
/**
* Private method that does the detection of the
* mobile devices.
*
* @param string $key
* @return boolean|null
*/
private function _detect($key='')
{
if(empty($key)){
// Begin general search.
foreach($this->detectionRules as $_regex){
if(empty($_regex)){ continue; }
if(preg_match('/'.$_regex.'/is', $this->userAgent)){
$this->isMobile = true;
return true;
}
}
return false;
} else {
// Search for a certain key.
// Make the keys lowecase so we can match: isIphone(), isiPhone(), isiphone(), etc.
$key = strtolower($key);
$_rules = array_change_key_case($this->detectionRules);
if(array_key_exists($key, $_rules)){
if(empty($_rules[$key])){ return null; }
if(preg_match('/'.$_rules[$key].'/is', $this->userAgent)){
$this->isMobile = true;
return true;
} else {
return false;
}
} else {
trigger_error("Method $key is not defined", E_USER_WARNING);
}
return false;
}
}
/**
* Check if the device is mobile.
* Returns true if any type of mobile device detected, including special ones
* @return bool
*/
public function isMobile()
{
return $this->isMobile;
}
/**
* Check if the device is a tablet.
* Return true if any type of tablet device is detected.
* @return boolean
*/
public function isTablet()
{
foreach($this->tabletDevices as $_regex){
if(preg_match('/'.$_regex.'/is', $this->userAgent)){
$this->isTablet = true;
return true;
}
}
return false;
}
}

File diff suppressed because one or more lines are too long

View file

@ -471,6 +471,9 @@ function admin_page_dbsync(&$a) {
if($a->argc > 3 && intval($a->argv[3]) && $a->argv[2] === 'mark') {
set_config('database', 'update_' . intval($a->argv[3]), 'success');
$curr = get_config('system','build');
if(intval($curr) == intval($a->argv[3]))
set_config('system','build',intval($curr) + 1);
info( t('Update has been marked successful') . EOL);
goaway($a->get_baseurl(true) . '/admin/dbsync');
}

View file

@ -45,22 +45,16 @@ function contacts_init(&$a) {
$a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
var a;
a = $("#contacts-search").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
});
a.setOptions({ params: { type: 'a' }});
});
</script>
EOT;
$tpl = get_markup_template("contacts-head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
$tpl = get_markup_template("contacts-end.tpl");
$a->page['end'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
}
@ -247,6 +241,10 @@ function contacts_content(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
require_once('include/contact_selectors.php');

View file

@ -16,15 +16,7 @@ function display_content(&$a) {
$o = '<div id="live-display"></div>' . "\r\n";
$a->page['htmlhead'] .= <<<EOT
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
});
</script>
EOT;
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
$nick = (($a->argc > 1) ? $a->argv[1] : '');
@ -126,7 +118,7 @@ EOT;
}
else {
$r = q("SELECT `id` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
$r = q("SELECT `id`,`deleted` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);

View file

@ -36,7 +36,6 @@ function editpost_content(&$a) {
$o .= '<h2>' . t('Edit post') . '</h2>';
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@ -45,6 +44,15 @@ function editpost_content(&$a) {
'$nickname' => $a->user['nickname']
));
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
));
$tpl = get_markup_template("jot.tpl");
@ -124,6 +132,7 @@ function editpost_content(&$a) {
'$profile_uid' => $_SESSION['uid'],
'$preview' => t('Preview'),
'$jotplugins' => $jotplugins,
'$mobileapp' => t('Friendica mobile web'),
));
return $o;

View file

@ -145,6 +145,9 @@ function events_content(&$a) {
$htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
$etpl = get_markup_template('event_end.tpl');
$a->page['end'] .= replace_macros($etpl,array('$baseurl' => $a->get_baseurl()));
$o ="";
// tabs
$tabs = profile_tabs($a, True);

View file

@ -18,24 +18,17 @@ function message_init(&$a) {
));
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
$head_tpl = get_markup_template('message-head.tpl');
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
<script>$(document).ready(function() {
var a;
a = $("#recip").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
onSelect: function(value,data) {
$("#recip-complete").val(data);
}
});
});
</script>
EOT;
$end_tpl = get_markup_template('message-end.tpl');
$a->page['end'] .= replace_macros($end_tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
}
@ -242,7 +235,6 @@ function message_content(&$a) {
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@ -250,6 +242,14 @@ function message_content(&$a) {
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
@ -399,12 +399,17 @@ function message_content(&$a) {
require_once("include/bbcode.php");
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$nickname' => $a->user['nickname'],
'$baseurl' => $a->get_baseurl(true)
));
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$nickname' => $a->user['nickname'],
'$baseurl' => $a->get_baseurl(true)
));
$mails = array();
$seen = 0;

View file

@ -302,11 +302,16 @@ function parse_url_content(&$a) {
$image = "";
foreach ($siteinfo["images"] as $imagedata)
if($siteinfo["image"] != ""){
/*
Execute below code only if image is present in siteinfo
*/
foreach ($siteinfo["images"] as $imagedata)
if($textmode)
$image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
$image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
else
$image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
$image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
}
if(strlen($text)) {
if($textmode)

View file

@ -69,30 +69,11 @@ function photos_init(&$a) {
$a->page['aside'] .= $o;
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
$tpl = get_markup_template("photos_head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$ispublic' => t('everybody')
));
$a->page['htmlhead'] .= <<< EOT
$(document).ready(function() {
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>
EOT;
}
return;
@ -962,7 +943,7 @@ function photos_content(&$a) {
$selname = (($datum) ? hex2bin($datum) : '');
$albumselect = '<select id="photos-upload-album-select" name="album" size="4">';
$albumselect = '';
$albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>';
@ -977,8 +958,6 @@ function photos_content(&$a) {
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
$albumselect .= '</select>';
$uploader = '';
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
@ -988,7 +967,7 @@ function photos_content(&$a) {
call_hooks('photo_upload_form',$ret);
$default_upload = '<input type="file" name="userfile" /> <div class="photos-upload-submit-wrapper" >
$default_upload = '<input id="photos-upload-choose" type="file" name="userfile" /> <div class="photos-upload-submit-wrapper" >
<input type="submit" name="submit" value="' . t('Submit') . '" id="photos-upload-submit" /> </div>';
@ -1195,15 +1174,12 @@ function photos_content(&$a) {
}
if(! $cmd !== 'edit') {
$a->page['htmlhead'] .= '<script>
$(document).keydown(function(event) {' . "\n";
if($prevlink)
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = \'' . $prevlink . '\'; }' . "\n";
if($nextlink)
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = \'' . $nextlink . '\'; }' . "\n";
$a->page['htmlhead'] .= '});</script>';
if( $cmd === 'edit') {
$tpl = get_markup_template('photo_edit_head.tpl');
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$prevlink' => $prevlink,
'$nextlink' => $nextlink
));
}
if($prevlink)

206
mod/poke.php Normal file
View file

@ -0,0 +1,206 @@
<?php
require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
function poke_init(&$a) {
if(! local_user())
return;
$uid = local_user();
$verb = notags(trim($_GET['verb']));
if(! $verb)
return;
$verbs = get_poke_verbs();
if(! array_key_exists($verb,$verbs))
return;
$activity = ACTIVITY_POKE . '#' . urlencode($verbs[$verb][0]);
$contact_id = intval($_GET['cid']);
if(! $contact_id)
return;
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0);
logger('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG);
$r = q("SELECT * FROM `contact` WHERE `id` = %d and `uid` = %d LIMIT 1",
intval($contact_id),
intval($uid)
);
if(! count($r)) {
logger('poke: no contact ' . $contact_id);
return;
}
$target = $r[0];
if($parent) {
$r = q("select uri, private, allow_cid, allow_gid, deny_cid, deny_gid
from item where id = %d and parent = %d and uid = %d limit 1",
intval($parent),
intval($parent),
intval($uid)
);
if(count($r)) {
$parent_uri = $r[0]['uri'];
$private = $r[0]['private'];
$allow_cid = $r[0]['allow_cid'];
$allow_gid = $r[0]['allow_gid'];
$deny_cid = $r[0]['deny_cid'];
$deny_gid = $r[0]['deny_gid'];
}
}
else {
$private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
$allow_cid = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']);
$allow_gid = (($private) ? '' : $a->user['allow_gid']);
$deny_cid = (($private) ? '' : $a->user['deny_cid']);
$deny_gid = (($private) ? '' : $a->user['deny_gid']);
}
$poster = $a->contact;
$uri = item_new_uri($a->get_hostname(),$owner_uid);
$arr = array();
$arr['uid'] = $uid;
$arr['uri'] = $uri;
$arr['parent-uri'] = (($parent_uri) ? $parent_uri : $uri);
$arr['type'] = 'activity';
$arr['wall'] = 1;
$arr['contact-id'] = $poster['id'];
$arr['owner-name'] = $poster['name'];
$arr['owner-link'] = $poster['url'];
$arr['owner-avatar'] = $poster['thumb'];
$arr['author-name'] = $poster['name'];
$arr['author-link'] = $poster['url'];
$arr['author-avatar'] = $poster['thumb'];
$arr['title'] = '';
$arr['allow_cid'] = $allow_cid;
$arr['allow_gid'] = $allow_gid;
$arr['deny_cid'] = $deny_cid;
$arr['deny_gid'] = $deny_gid;
$arr['last-child'] = 1;
$arr['visible'] = 1;
$arr['verb'] = $activity;
$arr['private'] = $private;
$arr['object-type'] = ACTIVITY_OBJ_PERSON;
$arr['origin'] = 1;
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $target['name'] . '</title><id>' . $a->get_baseurl() . '/contact/' . $target['id'] . '</id>';
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $target['url'] . '" />' . "\n");
$arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
$arr['object'] .= '</link></object>' . "\n";
$item_id = item_store($arr);
if($item_id) {
q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
intval($uid),
intval($item_id)
);
proc_run('php',"include/notifier.php","tag","$item_id");
}
call_hooks('post_local_end', $arr);
proc_run('php',"include/notifier.php","like","$post_id");
return;
}
function poke_content(&$a) {
if(! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}
$name = '';
$id = '';
if(intval($_GET['c'])) {
$r = q("select id,name from contact where id = %d and uid = %d limit 1",
intval($_GET['c']),
intval(local_user())
);
if(count($r)) {
$name = $r[0]['name'];
$id = $r[0]['id'];
}
}
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
var a;
a = $("#poke-recip").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
onSelect: function(value,data) {
$("#poke-recip-complete").val(data);
}
});
a.setOptions({ params: { type: 'a' }});
});
</script>
EOT;
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
$verbs = get_poke_verbs();
$shortlist = array();
foreach($verbs as $k => $v)
if($v[1] !== 'NOTRANSLATION')
$shortlist[] = array($k,$v[1]);
$tpl = get_markup_template('poke_content.tpl');
$o = replace_macros($tpl,array(
'$title' => t('Poke/Prod'),
'$desc' => t('poke, prod or do other things to somebody'),
'$clabel' => t('Recipient'),
'$choice' => t('Choose what you wish to do to recipient'),
'$verbs' => $shortlist,
'$parent' => $parent,
'$prv_desc' => t('Make this post private'),
'$submit' => t('Submit'),
'$name' => $name,
'$id' => $id
));
return $o;
}

View file

@ -7,10 +7,16 @@ function pretheme_init(&$a) {
$info = get_theme_info($theme);
if($info) {
// unfortunately there will be no translation for this string
$desc = $info['description'] . ' ' . $info['version'];
$desc = $info['description'];
$version = $info['version'];
$credits = $info['credits'];
}
else $desc = '';
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc));
else {
$desc = '';
$version = '';
$credits = '';
}
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
}
killme();
}

View file

@ -279,6 +279,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
$a->config['imagecrop_resolution'] = $smallest;
$a->config['imagecrop_ext'] = $ph->getExt();
$a->page['htmlhead'] .= get_markup_template("crophead.tpl");
$a->page['end'] .= get_markup_template("cropend.tpl");
return;
}}

View file

@ -546,6 +546,10 @@ function profiles_content(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
@ -557,9 +561,6 @@ function profiles_content(&$a) {
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
));
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";

View file

@ -12,7 +12,7 @@ function register_post(&$a) {
call_hooks('register_post', $arr);
$max_dailies = intval(get_config('system','max_daily_registrations'));
if($max_dailes) {
if($max_dailies) {
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if($r && $r[0]['total'] >= $max_dailies) {
return;
@ -182,7 +182,7 @@ function register_content(&$a) {
}
$max_dailies = intval(get_config('system','max_daily_registrations'));
if($max_dailes) {
if($max_dailies) {
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if($r && $r[0]['total'] >= $max_dailies) {
logger('max daily registrations exceeded.');

View file

@ -18,30 +18,10 @@ function settings_init(&$a) {
// These lines provide the javascript needed by the acl selector
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
$a->page['htmlhead'] .= <<< EOT
$(document).ready(function() {
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>
EOT;
$tpl = get_markup_template("settings-head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$ispublic' => t('everybody')
));
@ -373,6 +353,8 @@ function settings_post(&$a) {
$notify += intval($_POST['notify6']);
if(x($_POST,'notify7'))
$notify += intval($_POST['notify7']);
if(x($_POST,'notify8'))
$notify += intval($_POST['notify8']);
$email_changed = false;
@ -779,6 +761,11 @@ function settings_content(&$a) {
'$theme_config' => $theme_config,
));
$tpl = get_markup_template("settings_display_end.tpl");
$a->page['end'] .= replace_macros($tpl, array(
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes)
));
return $o;
}
@ -1025,6 +1012,7 @@ function settings_content(&$a) {
'$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, ''),
'$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''),
'$notify8' => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''),
'$h_advn' => t('Advanced Account/Page Type Settings'),

View file

@ -116,34 +116,41 @@ function wallmessage_content(&$a) {
$tpl = get_markup_template('wallmsg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/',
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/',
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('wallmsg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/',
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('wallmessage.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),
'$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']),
'$to' => t('To:'),
'$subject' => t('Subject:'),
'$recipname' => $user['username'],
'$nickname' => $user['nickname'],
'$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''),
'$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
'$readonly' => '',
'$yourmessage' => t('Your message:'),
'$select' => $select,
'$parent' => '',
'$upload' => t('Upload photo'),
'$insert' => t('Insert web link'),
'$wait' => t('Please wait')
));
$tpl = get_markup_template('wallmessage.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),
'$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']),
'$to' => t('To:'),
'$subject' => t('Subject:'),
'$recipname' => $user['username'],
'$nickname' => $user['nickname'],
'$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''),
'$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
'$readonly' => '',
'$yourmessage' => t('Your message:'),
'$select' => $select,
'$parent' => '',
'$upload' => t('Upload photo'),
'$insert' => t('Insert web link'),
'$wait' => t('Please wait')
));
return $o;
}
return $o;
}

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1153 );
define( 'UPDATE_VERSION' , 1154 );
/**
*
@ -1336,3 +1336,10 @@ function update_1152() {
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}
function update_1153() {
$r = q("ALTER TABLE `hook` ADD `priority` INT(11) UNSIGNED NOT NULL DEFAULT '0'");
if(!$r) return UPDATE_FAILED;
return UPDATE_SUCCESS;
}

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
$("nav").bind('nav-update', function(e,data){
var elm = $('#pending-update');
var register = $(data).find('register').text();
if (register=="0") { reigster=""; elm.hide();} else { elm.show(); }
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
elm.html(register);
});
});

View file

@ -5,6 +5,6 @@
{{ for $events as $event }}
<div class="birthday-list" id="birthday-$event.id"></a> <a href="$event.link">$event.title</a> $event.date </div>
{{ endfor }}
</div></div>
</div>
{{ endif }}

View file

@ -1,5 +1,5 @@
<ul class="tabs">
{{ for $tabs as $tab }}
<li><a href="$tab.url" class="tab button $tab.sel"{{ if $tab.title }} title="$tab.title"{{ endif }}>$tab.label</a></li>
<li id="$tab.id"><a href="$tab.url" class="tab button $tab.sel"{{ if $tab.title }} title="$tab.title"{{ endif }}>$tab.label</a></li>
{{ endfor }}
</ul>

0
view/contact_end.tpl Normal file
View file

0
view/contacts-end.tpl Normal file
View file

17
view/contacts-head.tpl Normal file
View file

@ -0,0 +1,17 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.js" ></script>
<script>
$(document).ready(function() {
var a;
a = $("#contacts-search").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
});
a.setOptions({ params: { type: 'a' }});
});
</script>

0
view/cropend.tpl Normal file
View file

8
view/display-head.tpl Normal file
View file

@ -0,0 +1,8 @@
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
});
</script>

0
view/end.tpl Normal file
View file

0
view/event_end.tpl Normal file
View file

View file

@ -5,6 +5,6 @@
{{ for $events as $event }}
<div class="event-list" id="event-$event.id"></a> <a href="events/$event.link">$event.title</a> $event.date </div>
{{ endfor }}
</div></div>
</div>
{{ endif }}

View file

@ -23,4 +23,5 @@ $msg_text
<input type="submit" name="submit" value="$submit" />
</div>
</div>
</form>

0
view/jot-end.tpl Normal file
View file

View file

@ -283,9 +283,9 @@ function enableOnUser(){
if(reply && reply.length) {
commentBusy = true;
$('body').css('cursor', 'wait');
$.get('filer/' + id + '?term=' + reply);
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,3000);
$.get('filer/' + id + '?term=' + reply, NavUpdate);
// if(timer) clearTimeout(timer);
// timer = setTimeout(NavUpdate,3000);
liking = 1;
$.fancybox.close();
} else {

0
view/message-end.tpl Normal file
View file

17
view/message-head.tpl Normal file
View file

@ -0,0 +1,17 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.js" ></script>
<script>$(document).ready(function() {
var a;
a = $("#recip").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
onSelect: function(value,data) {
$("#recip-complete").val(data);
}
});
});
</script>

0
view/msg-end.tpl Normal file
View file

View file

@ -28,7 +28,7 @@
<div id="photo-edit-rotate-end"></div>
<div id="photo-edit-perms" class="photo-edit-perms" >
<a href="#photo-edit-perms-select" id="photo-edit-perms-menu" class="button" title="$permissions"/>
<a href="#photo-edit-perms-select" id="photo-edit-perms-menu" class="button popupbox" title="$permissions"/>
<span id="jot-perms-icon" class="icon $lockstate" ></span>$permissions
</a>
<div id="photo-edit-perms-menu-end"></div>
@ -47,9 +47,4 @@
<div id="photo-edit-end"></div>
</form>
<script>
$("a#photo-edit-perms-menu").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none'
});
</script>

11
view/photo_edit_head.tpl Normal file
View file

@ -0,0 +1,11 @@
<script>
$(document).keydown(function(event) {
if("$prevlink" != '') { if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = "$prevlink"; }}
if("$nextlink" != '') { if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = "$nextlink"; }}
});
</script>

26
view/photos_head.tpl Normal file
View file

@ -0,0 +1,26 @@
<script>
var ispublic = "$ispublic";
$(document).ready(function() {
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>

View file

@ -12,7 +12,9 @@
<div id="photos-upload-new-end"></div>
<div id="photos-upload-exist-wrapper">
<div id="photos-upload-existing-album-text">$existalbumtext</div>
<select id="photos-upload-album-select" name="album" size="4">
$albumselect
</select>
</div>
<div id="photos-upload-exist-end"></div>
@ -23,9 +25,10 @@
<div id="photos-upload-perms" class="photos-upload-perms" >
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button" />
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button popupbox" />
<span id="jot-perms-icon" class="icon $lockstate" ></span>$permissions
</a>
</div>
<div id="photos-upload-perms-end"></div>
<div style="display: none;">
@ -43,9 +46,3 @@
<div class="photos-upload-end" ></div>
</form>
<script>
$("a#photos-upload-perms-menu").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none'
});
</script>

32
view/poke_content.tpl Normal file
View file

@ -0,0 +1,32 @@
<h3>$title</h3>
<div id="poke-desc">$desc</div>
<form action="poke" method="get">
<br />
<br />
<div id="poke-recip-label">$clabel</div>
<br />
<input id="poke-recip" type="text" size="64" maxlength="255" value="$name" name="pokename" autocomplete="off" />
<input id="poke-recip-complete" type="hidden" value="$id" name="cid" />
<input id="poke-parent" type="hidden" value="$parent" name="parent" />
<br />
<br />
<div id="poke-action-label">$choice</div>
<br />
<br />
<select name="verb" id="poke-verb-select" >
{{ for $verbs as $v }}
<option value="$v.0">$v.1</option>
{{ endfor }}
</select>
<br />
<br />
<div id="poke-private-desc">$prv_desc</div>
<input type="checkbox" name="private" {{ if $parent }}disabled="disabled"{{ endif }} value="1" />
<br />
<br />
<input type="submit" name="submit" value="$submit" />
</form>

0
view/profed_end.tpl Normal file
View file

View file

@ -1,3 +1,5 @@
<script type="text/javascript" src="js/country.js" ></script>
<script language="javascript" type="text/javascript"
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">

View file

@ -172,7 +172,6 @@ $lbl_about
</div>
<div id="about-jot-end"></div>
</div>
<div id="interest-jot-wrapper" >
@ -184,7 +183,6 @@ $lbl_hobbies
</div>
<div id="interest-jot-end"></div>
</div>
<div id="likes-jot-wrapper" >
@ -196,7 +194,6 @@ $lbl_likes
</div>
<div id="likes-jot-end"></div>
</div>
<div id="dislikes-jot-wrapper" >
@ -208,7 +205,6 @@ $lbl_dislikes
</div>
<div id="dislikes-jot-end"></div>
</div>
<div id="contact-jot-wrapper" >
@ -220,7 +216,6 @@ $lbl_social
</div>
<div id="contact-jot-end"></div>
</div>
<div class="profile-edit-submit-wrapper" >
@ -238,7 +233,6 @@ $lbl_music
</div>
<div id="music-jot-end"></div>
</div>
<div id="book-jot-wrapper" >
<p id="book-jot-desc" >
@ -249,7 +243,6 @@ $lbl_book
</div>
<div id="book-jot-end"></div>
</div>
@ -262,7 +255,6 @@ $lbl_tv
</div>
<div id="tv-jot-end"></div>
</div>
@ -275,7 +267,6 @@ $lbl_film
</div>
<div id="film-jot-end"></div>
</div>
<div class="profile-edit-submit-wrapper" >
@ -293,7 +284,6 @@ $lbl_love
</div>
<div id="romance-jot-end"></div>
</div>
@ -306,7 +296,6 @@ $lbl_work
</div>
<div id="work-jot-end"></div>
</div>
@ -319,7 +308,6 @@ $lbl_school
</div>
<div id="education-jot-end"></div>
</div>

0
view/settings-end.tpl Normal file
View file

25
view/settings-head.tpl Normal file
View file

@ -0,0 +1,25 @@
<script>
var ispublic = "$ispublic";
$(document).ready(function() {
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>

View file

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

View file

View file

@ -25,6 +25,7 @@
<!-- in dispy-dark -->
<script>
var updateInterval = $update_interval;
var localUser = {{ if $local_user }}$local_user{{ else }}false{{ endif }};
function confirmDelete() { return confirm("$delitem"); }
function commentOpen(obj,id) {
@ -32,6 +33,7 @@
obj.value = '';
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
openMenu("comment-edit-submit-wrapper-" + id);
}
}
@ -40,6 +42,7 @@
obj.value = '$comment';
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide();
closeMenu("comment-edit-submit-wrapper-" + id);
}
}
@ -74,6 +77,7 @@
ins = ins.replace('&amp;','&');
ins = ins.replace('&quot;','"');
$("#comment-edit-text-" + id).val(tmpStr + ins);
$(obj).val('');
}
function showHideComments(id) {

View file

@ -9,7 +9,7 @@ $parent
<div id="prvmail-to-label">$to</div>
{{ if $showinputs }}
<input type="text" id="recip" name="messageto" value="$prefill" maxlength="255" size="64" tabindex="10" />
<input type="text" id="recip" name="messagerecip" value="$prefill" maxlength="255" size="64" tabindex="10" />
<input type="hidden" id="recip-complete" name="messageto" value="$preid">
{{ else }}
$select

View file

@ -0,0 +1,24 @@
Photo album display?
- The "lock" icon for private items
- change it to black?
- when clicked, the popup window displays poorly
- Edit photo page: bottom buttons are off-center in Dolphin Mini
- Pager: looks weird when only "prev" is there
- BB code buttons for status updates
- Get "add contact" back on contacts page
- Admin: access to more pages than summary?
- Embedded video playback is way too big
- Needs to be faster!
- Reduce DOM elements (~2400 for 10 items, ~8400 for 40 items)
- Automatically set limit of 10 items for Network and Profile?

View file

@ -0,0 +1,22 @@
<div id="acl-wrapper">
<input id="acl-search">
<a href="#" id="acl-showall">$showall</a>
<div id="acl-list">
<div id="acl-list-content">
</div>
</div>
<span id="acl-fields"></span>
</div>
<div class="acl-list-item" rel="acl-template" style="display:none">
<img src="{0}"><p>{1}</p>
<a href="#" class='acl-button-show'>$show</a>
<a href="#" class='acl-button-hide'>$hide</a>
</div>
<script>
window.allowCID = $allowcid;
window.allowGID = $allowgid;
window.denyCID = $denycid;
window.denyGID = $denygid;
</script>

View file

@ -0,0 +1,31 @@
<h4><a href="$admurl">$admtxt</a></h4>
<ul class='admin linklist'>
<li class='admin button $admin.site.2'><a href='$admin.site.0'>$admin.site.1</a></li>
<li class='admin button $admin.users.2'><a href='$admin.users.0'>$admin.users.1</a><span id='pending-update' title='$h_pending'></span></li>
<li class='admin button $admin.plugins.2'><a href='$admin.plugins.0'>$admin.plugins.1</a></li>
<li class='admin button $admin.themes.2'><a href='$admin.themes.0'>$admin.themes.1</a></li>
<li class='admin button $admin.dbsync.2'><a href='$admin.dbsync.0'>$admin.dbsync.1</a></li>
</ul>
{{ if $admin.update }}
<ul class='admin linklist'>
<li class='admin button $admin.update.2'><a href='$admin.update.0'>$admin.update.1</a></li>
<li class='admin button $admin.update.2'><a href='https://kakste.com/profile/inthegit'>Important Changes</a></li>
</ul>
{{ endif }}
{{ if $admin.plugins_admin }}<h4>$plugadmtxt</h4>{{ endif }}
<ul class='admin linklist'>
{{ for $admin.plugins_admin as $l }}
<li class='admin button $l.2'><a href='$l.0'>$l.1</a></li>
{{ endfor }}
</ul>
<h4>$logtxt</h4>
<ul class='admin linklist'>
<li class='admin button $admin.logs.2'><a href='$admin.logs.0'>$admin.logs.1</a></li>
</ul>

View file

@ -0,0 +1,56 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<form action="$baseurl/admin/site" method="post">
<input type='hidden' name='form_security_token' value='$form_security_token'>
{{ inc field_input.tpl with $field=$sitename }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$banner }}{{ endinc }}
{{ inc field_select.tpl with $field=$language }}{{ endinc }}
{{ inc field_select.tpl with $field=$theme }}{{ endinc }}
{{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$registration</h3>
{{ inc field_input.tpl with $field=$register_text }}{{ endinc }}
{{ inc field_select.tpl with $field=$register_policy }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$upload</h3>
{{ inc field_input.tpl with $field=$maximagesize }}{{ endinc }}
<h3>$corporate</h3>
{{ inc field_input.tpl with $field=$allowed_sites }}{{ endinc }}
{{ inc field_input.tpl with $field=$allowed_email }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$block_public }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$diaspora_enabled }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }}
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$advanced</h3>
{{ inc field_checkbox.tpl with $field=$no_utf }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$verifyssl }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxy }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }}
{{ inc field_input.tpl with $field=$timeout }}{{ endinc }}
{{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }}
{{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }}
{{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }}
{{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
</form>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

View file

@ -0,0 +1,74 @@
<!-- <script>
$(document).ready( function () {
$(document).mouseup(function(e) {
var container = $("#comment-edit-wrapper-$id");
if( container.has(e.target).length === 0) {
commentClose(document.getElementById('comment-edit-text-$id'),$id);
cmtBbClose($id);
}
});
});
</script>-->
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;" >
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;" >
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<!--<div class="comment-edit-photo" id="comment-edit-photo-$id" >-->
<a class="comment-edit-photo comment-edit-photo-link" id="comment-edit-photo-$id" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
<!--</div>-->
<!--<div class="comment-edit-photo-end"></div>-->
<ul class="comment-edit-bb-$id">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold"
onclick="insertFormatting('$comment','b', $id);"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="$editalic"
onclick="insertFormatting('$comment','i', $id);"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="$eduline"
onclick="insertFormatting('$comment','u', $id);"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="$edquote"
onclick="insertFormatting('$comment','quote', $id);"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="$edcode"
onclick="insertFormatting('$comment','code', $id);"></a></li>
<!-- <li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="$edimg"
onclick="insertFormatting('$comment','img', $id);"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="$edurl"
onclick="insertFormatting('$comment','url', $id);"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li>-->
</ul>
<!--<div class="comment-edit-bb-end"></div>-->
<!-- <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);cmtBbClose($id);" >$comment</textarea>-->
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" >$comment</textarea>
{{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option>
{{ for $qcomment as $qc }}
<option value="$qc">$qc</option>
{{ endfor }}
</select>
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<!--<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="preview-link fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>-->
</div>
<!--<div class="comment-edit-end"></div>-->
</form>
</div>

View file

@ -0,0 +1,88 @@
<h2>$header</h2>
<div id="contact-edit-wrapper" >
$tab_str
<div id="contact-edit-drop-link" >
<a href="contacts/$contact_id/drop" class="icon drophide" id="contact-edit-drop-link" onclick="return confirmDelete();" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
</div>
<div id="contact-edit-drop-link-end"></div>
<div id="contact-edit-nav-wrapper" >
<div id="contact-edit-links">
<ul>
<li><div id="contact-edit-rel">$relation_text</div></li>
<li><div id="contact-edit-nettype">$nettype</div></li>
{{ if $lost_contact }}
<li><div id="lost-contact-message">$lost_contact</div></li>
{{ endif }}
{{ if $insecure }}
<li><div id="insecure-message">$insecure</div></li>
{{ endif }}
{{ if $blocked }}
<li><div id="block-message">$blocked</div></li>
{{ endif }}
{{ if $ignored }}
<li><div id="ignore-message">$ignored</div></li>
{{ endif }}
{{ if $archived }}
<li><div id="archive-message">$archived</div></li>
{{ endif }}
<li>&nbsp;</li>
{{ if $common_text }}
<li><div id="contact-edit-common"><a href="$common_link">$common_text</a></div></li>
{{ endif }}
{{ if $all_friends }}
<li><div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div></li>
{{ endif }}
<li><a href="network/?cid=$contact_id" id="contact-edit-view-recent">$lblrecent</a></li>
{{ if $lblsuggest }}
<li><a href="fsuggest/$contact_id" id="contact-edit-suggest">$lblsuggest</a></li>
{{ endif }}
</ul>
</div>
</div>
<div id="contact-edit-nav-end"></div>
<form action="contacts/$contact_id" method="post" >
<input type="hidden" name="contact_id" value="$contact_id">
{{ if $poll_enabled }}
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext <span id="contact-edit-last-updated">$last_update</span></div>
<span id="contact-edit-poll-text">$updpub $poll_interval</span> <span id="contact-edit-update-now" class="button"><a id="update_now_link" href="contacts/$contact_id/update" >$udnow</a></span>
</div>
{{ endif }}
<div id="contact-edit-end" ></div>
{{inc field_checkbox.tpl with $field=$hidden }}{{endinc}}
<div id="contact-edit-info-wrapper">
<h4>$lbl_info1</h4>
<textarea id="contact-edit-info" rows="8" cols="35" name="info">$info</textarea>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</div>
<div id="contact-edit-info-end"></div>
<div id="contact-edit-profile-select-text">
<h4>$lbl_vis1</h4>
<p>$lbl_vis2</p>
</div>
$profile_select
<div id="contact-edit-profile-select-end"></div>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</form>
</div>

View file

View file

@ -0,0 +1,30 @@
<div class="contact-entry-wrapper" id="contact-entry-wrapper-$contact.id" >
<div class="contact-entry-photo-wrapper" >
<div class="contact-entry-photo mframe" id="contact-entry-photo-$contact.id"
onmouseover="if (typeof t$contact.id != 'undefined') clearTimeout(t$contact.id);"
onmouseout="t$contact.id=setTimeout('closeMenu(\'contact-photo-menu-$contact.id\');',200)" >
<!-- <a href="$contact.url" title="$contact.img_hover" /><img src="$contact.thumb" $contact.sparkle alt="$contact.name" /></a>-->
<span onclick="openClose('contact-photo-menu-$contact.id');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-$contact.id">
<img src="$contact.thumb" $contact.sparkle alt="$contact.name" />
</span>
{{ if $contact.photo_menu }}
<!-- <span onclick="openClose('contact-photo-menu-$contact.id');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-$contact.id">menu</span>-->
<div class="contact-photo-menu" id="contact-photo-menu-$contact.id">
<ul>
$contact.photo_menu
</ul>
</div>
{{ endif }}
</div>
</div>
<div class="contact-entry-photo-end" ></div>
<div class="contact-entry-name" id="contact-entry-name-$contact.id" >$contact.name</div><br />
{{ if $contact.alt_text }}<div class="contact-entry-details" id="contact-entry-rel-$contact.id" >$contact.alt_text</div>{{ endif }}
<div class="contact-entry-network" id="contact-entry-network-$contact.id" >$contact.network</div>
<div class="contact-entry-end" ></div>
</div>

View file

@ -0,0 +1,4 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>

View file

@ -0,0 +1,5 @@
<script>
window.autocompleteType = 'contacts-head';
</script>

View file

@ -0,0 +1,28 @@
<h1>$header{{ if $total }} ($total){{ endif }}</h1>
{{ if $finding }}<h4>$finding</h4>{{ endif }}
<div id="contacts-search-wrapper">
<form id="contacts-search-form" action="$cmd" method="get" >
<span class="contacts-search-desc">$desc</span>
<input type="text" name="search" id="contacts-search" class="search-input" onfocus="this.select();" value="$search" />
<input type="submit" name="submit" id="contacts-search-submit" value="$submit" />
</form>
</div>
<div id="contacts-search-end"></div>
$tabs
<div id="contacts-display-wrapper">
{{ for $contacts as $contact }}
{{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
</div>
<div id="contact-edit-end"></div>
$paginate

View file

@ -0,0 +1,27 @@
{{ for $threads as $thread }}
<div id="tread-wrapper-$thread.id" class="tread-wrapper">
{{ for $thread.items as $item }}
{{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer">
<span id="hide-comments-total-$thread.id" class="hide-comments-total">$thread.num_comments</span> <span id="hide-comments-$thread.id" class="hide-comments fakelink" onclick="showHideComments($thread.id);">$thread.hide_text</span>
</div>
<div id="collapsed-comments-$thread.id" class="collapsed-comments" style="display: none;">
{{endif}}
{{if $item.comment_lastcollapsed}}</div>{{endif}}
{{ inc $item.template }}{{ endinc }}
{{ endfor }}
</div>
{{ endfor }}
<div id="conversation-end"></div>
<!--{{ if $dropping }}
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-desc" >$dropping</div>
</div>
<div id="item-delete-selected-end"></div>-->
{{ endif }}

View file

@ -0,0 +1,27 @@
<h1>$title</h1>
<p id="cropimage-desc">
$desc
</p>
<div id="cropimage-wrapper">
<img src="$image_url" id="croppa" class="imgCrop" alt="$title" />
</div>
<div id="cropimage-preview-wrapper" >
<div id="previewWrap" ></div>
</div>
<form action="profile_photo/$resource" id="crop-image-form" method="post" />
<input type='hidden' name='form_security_token' value='$form_security_token'>
<input type="hidden" name="cropfinal" value="1" />
<input type="hidden" name="xstart" id="x1" />
<input type="hidden" name="ystart" id="y1" />
<input type="hidden" name="xfinal" id="x2" />
<input type="hidden" name="yfinal" id="y2" />
<input type="hidden" name="height" id="height" />
<input type="hidden" name="width" id="width" />
<div id="crop-image-submit-wrapper" >
<input type="submit" name="submit" value="$done" />
</div>
</form>

View file

@ -0,0 +1,4 @@
<script type="text/javascript" src="library/cropper/lib/prototype.js" language="javascript"></script>
<script type="text/javascript" src="library/cropper/lib/scriptaculous.js?load=effects,builder,dragdrop" language="javascript"></script>
<script type="text/javascript" src="library/cropper/cropper.js" language="javascript"></script>
<script type="text/javascript" language="javascript">initCrop();</script>

View file

@ -0,0 +1 @@
<link rel="stylesheet" href="library/cropper/cropper.css" type="text/css" />

View file

@ -0,0 +1,42 @@
<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
<?php if( $a->module === 'home' ) { ?>
<center>
<div class="login-button">
<a href="login" class="login-button-link"><img class="login-button-image" src="/images/friendika-1600.png" title="Click to log in"></a>
</div>
</center>
<?php } elseif ( $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
?>
<div class='section-wrapper'>
<section><?php if(x($page,'content')) echo $page['content']; ?>
</section>
</div>
<?php } else {
if(x($page,'nav')) echo $page['nav']; ?>
<div class='main-container'>
<div class='main-content-container'>
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<div class='section-wrapper'>
<section><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
</div>
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</div>
</div>
<?php } ?>
<?php if(x($page,'end')) echo $page['end']; ?>
</body>
</html>

View file

@ -0,0 +1,4 @@
<script>
window.autoCompleteType = 'display-head';
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

@ -0,0 +1,19 @@
<!--[if IE]>
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
<script type="text/javascript">
tinyMCE.init({ mode : "none"});
</script>-->
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
<script type="text/javascript">var $j = jQuery.noConflict();</script>
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/fk.autocomplete.min.js" ></script>
<!--<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>-->
<!--<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>-->
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/acl.min.js" ></script>
<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.min.js" ></script>
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/theme.min.js"></script>
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/main.min.js" ></script>

View file

@ -0,0 +1,4 @@
<script language="javascript" type="text/javascript"
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>

View file

@ -0,0 +1,6 @@
<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
<script language="javascript" type="text/javascript">
window.aclType = 'event_head';
</script>

View file

View file

@ -0,0 +1,6 @@
<div class='field checkbox'>
<label id='label_id_$field.0' for='id_$field.0'>$field.1</label>
<input type="checkbox" name='$field.0' id='id_$field.0' value="1" {{ if $field.2 }}checked="checked"{{ endif }}><br />
<span class='field_help' id='help_id_$field.0'>$field.3</span>
</div>

View file

@ -0,0 +1,6 @@
<div class='field input' id='wrapper_$field.0'>
<label for='id_$field.0'>$field.1</label><br />
<input name='$field.0' id='id_$field.0' value="$field.2">
<span class='field_help'>$field.3</span>
</div>

View file

@ -0,0 +1,6 @@
<div class='field input openid' id='wrapper_$field.0'>
<label for='id_$field.0'>$field.1</label><br />
<input name='$field.0' id='id_$field.0' value="$field.2">
<span class='field_help'>$field.3</span>
</div>

View file

@ -0,0 +1,6 @@
<div class='field password' id='wrapper_$field.0'>
<label for='id_$field.0'>$field.1</label><br />
<input type='password' name='$field.0' id='id_$field.0' value="$field.2">
<span class='field_help'>$field.3</span>
</div>

View file

@ -0,0 +1,9 @@
<div class='field select'>
<label for='id_$field.0'>$field.1</label>
<select name='$field.0' id='id_$field.0' onchange="previewTheme(this);" >
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
</select>
<span class='field_help'>$field.3</span>
<div id="theme-preview"></div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Some files were not shown because too many files have changed in this diff Show more