commit
0cdc23d9fb
|
@ -23,13 +23,12 @@ function theme_content(&$a){
|
|||
$close_helpers = get_pconfig(local_user(), 'diabook', 'close_helpers' );
|
||||
$close_services = get_pconfig(local_user(), 'diabook', 'close_services' );
|
||||
$close_friends = get_pconfig(local_user(), 'diabook', 'close_friends' );
|
||||
$close_twitter = get_pconfig(local_user(), 'diabook', 'close_twitter' );
|
||||
$close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' );
|
||||
$close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' );
|
||||
$close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' );
|
||||
|
||||
|
||||
return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes);
|
||||
return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_lastusers, $close_lastphotos, $close_lastlikes);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
|
@ -52,7 +51,6 @@ function theme_post(&$a){
|
|||
set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
|
||||
|
@ -76,12 +74,11 @@ function theme_admin(&$a){
|
|||
$close_helpers = get_config('diabook', 'close_helpers' );
|
||||
$close_services = get_config('diabook', 'close_services' );
|
||||
$close_friends = get_config('diabook', 'close_friends' );
|
||||
$close_twitter = get_config('diabook', 'close_twitter' );
|
||||
$close_lastusers = get_config('diabook', 'close_lastusers' );
|
||||
$close_lastphotos = get_config('diabook', 'close_lastphotos' );
|
||||
$close_lastlikes = get_config('diabook', 'close_lastlikes' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes);
|
||||
return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_lastusers, $close_lastphotos, $close_lastlikes);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
|
@ -99,7 +96,6 @@ function theme_admin_post(&$a){
|
|||
set_config('diabook', 'close_helpers', $_POST['diabook_close_helpers']);
|
||||
set_config('diabook', 'close_services', $_POST['diabook_close_services']);
|
||||
set_config('diabook', 'close_friends', $_POST['diabook_close_friends']);
|
||||
set_config('diabook', 'close_twitter', $_POST['diabook_close_twitter']);
|
||||
set_config('diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
|
||||
set_config('diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
|
||||
set_config('diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
|
||||
|
@ -108,7 +104,7 @@ function theme_admin_post(&$a){
|
|||
}
|
||||
|
||||
|
||||
function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes){
|
||||
function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_lastusers, $close_lastphotos, $close_lastlikes){
|
||||
$line_heights = array(
|
||||
"1.3"=>"1.3",
|
||||
"---"=>"---",
|
||||
|
@ -156,7 +152,6 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear
|
|||
'$line_height' => array('diabook_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights),
|
||||
'$resolution' => array('diabook_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),
|
||||
'$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors),
|
||||
'$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm),
|
||||
'$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom),
|
||||
'$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX),
|
||||
'$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY),
|
||||
|
@ -166,7 +161,6 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear
|
|||
'$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_or_not),
|
||||
'$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_or_not),
|
||||
'$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_or_not),
|
||||
'$close_twitter' => array('diabook_close_twitter', t('Last tweets'), $close_twitter, '', $close_or_not),
|
||||
'$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_or_not),
|
||||
'$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_or_not),
|
||||
'$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_or_not),
|
||||
|
|
BIN
view/theme/diabook/icons/preview.png
Normal file
BIN
view/theme/diabook/icons/preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 662 B |
|
@ -1,289 +0,0 @@
|
|||
/*!
|
||||
* jQuery Twitter Search Plugin
|
||||
* Examples and documentation at: http://jquery.malsup.com/twitter/
|
||||
* Copyright (c) 2010 M. Alsup
|
||||
* Version: 1.04 (15-SEP-2011)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
* Requires: jQuery v1.3.2 or later
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
$.fn.twitterSearch = function(options) {
|
||||
if (typeof options == 'string')
|
||||
options = { term: options };
|
||||
return this.each(function() {
|
||||
var grabFlag = false,
|
||||
grabbing = false,
|
||||
$frame = $(this), text, $text, $title, $bird, $cont, height, paused = false,
|
||||
opts = $.extend(true, {}, $.fn.twitterSearch.defaults, options || {}, $.metadata ? $frame.metadata() : {});
|
||||
|
||||
opts.formatter = opts.formatter || $.fn.twitterSearch.formatter;
|
||||
opts.filter = opts.filter || $.fn.twitterSearch.filter;
|
||||
|
||||
if (!opts.applyStyles) { // throw away all style defs
|
||||
for (var css in opts.css)
|
||||
opts.css[css] = {};
|
||||
}
|
||||
|
||||
if (opts.title === null) // user can set to '' to suppress title
|
||||
opts.title = opts.term;
|
||||
|
||||
opts.title = opts.title || '';
|
||||
text = opts.titleLink ? ('<a href="'+ opts.titleLink +'">'+ opts.title + '</a>') : ('<span>' + opts.title +'</span>');
|
||||
$text = $(text);
|
||||
if (opts.titleLink)
|
||||
$text.css(opts.css['titleLink']);
|
||||
$title = $('<div class="twitterSearchTitle"></div>').append($text).appendTo($frame).css(opts.css['title']);
|
||||
if (opts.bird) {
|
||||
$bird = $('<img class="twitterSearchBird" src="'+opts.birdSrc+'" />').appendTo($title).css(opts.css['bird']);
|
||||
if (opts.birdLink)
|
||||
$bird.wrap('<a href="'+ opts.birdLink +'"></a>');
|
||||
}
|
||||
$cont = $('<div class="twitterSearchContainter"></div>').appendTo($frame).css(opts.css['container']);
|
||||
cont = $cont[0];
|
||||
if (opts.colorExterior)
|
||||
$title.css('background-color',opts.colorExterior);
|
||||
if (opts.colorInterior)
|
||||
$cont.css('background-color',opts.colorInterior);
|
||||
|
||||
$frame.css(opts.css['frame']);
|
||||
if (opts.colorExterior)
|
||||
$frame.css('border-color',opts.colorExterior);
|
||||
|
||||
height = $frame.innerHeight() - $title.outerHeight();
|
||||
$cont.height(height);
|
||||
|
||||
if (opts.pause)
|
||||
$cont.hover(function(){paused = true;},function(){paused = false;});
|
||||
|
||||
$('<div class="twitterSearchLoading">Loading tweets..</div>').css(opts.css['loading']).appendTo($cont);
|
||||
|
||||
grabTweets();
|
||||
|
||||
function grabTweets() {
|
||||
var url = opts.url + opts.term;
|
||||
grabFlag = false;
|
||||
grabbing = true;
|
||||
// grab twitter stream
|
||||
$.getJSONP({
|
||||
url: url,
|
||||
timeout: 30000,
|
||||
error: function(xhr, status, e) {
|
||||
failWhale(e);
|
||||
},
|
||||
complete: function() {
|
||||
grabbing = false;
|
||||
if (opts.refreshSeconds)
|
||||
setTimeout(regrab, opts.refreshSeconds * 1000);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json.error) {
|
||||
failWhale(json.error);
|
||||
return;
|
||||
}
|
||||
$cont.fadeOut('fast',function() {
|
||||
$cont.empty();
|
||||
|
||||
// iterate twitter results
|
||||
$.each(json.results, function(i) {
|
||||
if (!opts.filter.call(opts, this))
|
||||
return; // skip this tweet
|
||||
var $img, $text, w,
|
||||
tweet = opts.formatter(this, opts),
|
||||
$tweet = $(tweet);
|
||||
$tweet.css(opts.css['tweet']);
|
||||
$img = $tweet.find('.twitterSearchProfileImg').css(opts.css['img']);
|
||||
$tweet.find('.twitterSearchUser').css(opts.css['user']);
|
||||
$tweet.find('.twitterSearchTime').css(opts.css['time']);
|
||||
$tweet.find('a').css(opts.css['a']);
|
||||
$tweet.appendTo($cont);
|
||||
$text = $tweet.find('.twitterSearchText').css(opts.css['text']);
|
||||
if (opts.avatar) {
|
||||
w = $img.outerWidth() + parseInt($tweet.css('paddingLeft'));
|
||||
$text.css('paddingLeft', w);
|
||||
}
|
||||
});
|
||||
|
||||
$cont.fadeIn('fast');
|
||||
|
||||
if (json.results.length < 2) {
|
||||
if (opts.refreshSeconds)
|
||||
setTimeout(grabTweets, opts.refreshSeconds * 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
// stage first animation
|
||||
setTimeout(go, opts.timeout);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function regrab() {
|
||||
grabFlag = true;
|
||||
}
|
||||
|
||||
function failWhale(msg) {
|
||||
var $fail = $('<div class="twitterSearchFail">' + msg + '</div>').css(opts.css['fail']);
|
||||
$cont.empty().append($fail);
|
||||
};
|
||||
|
||||
function go() {
|
||||
if (paused || grabbing) {
|
||||
setTimeout(go, 500);
|
||||
return;
|
||||
}
|
||||
var h, $el = $cont.children(':first'), el = $el[0];
|
||||
$el.animate(opts.animOut, opts.animOutSpeed, function() {
|
||||
h = $el.outerHeight();
|
||||
$el.animate({ marginTop: -h }, opts.animInSpeed, function() {
|
||||
$el.css({ marginTop: 0, opacity: 1 });
|
||||
/*@cc_on
|
||||
try { el.style.removeAttribute('filter'); } // ie cleartype fix
|
||||
catch(smother) {}
|
||||
@*/
|
||||
$el.css(opts.css['tweet']).show().appendTo($cont);
|
||||
|
||||
setTimeout(grabFlag ? grabTweets : go, opts.timeout);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.twitterSearch.filter = function(tweet) {
|
||||
return true;
|
||||
};
|
||||
|
||||
$.fn.twitterSearch.formatter = function(json, opts) {
|
||||
var str, pretty,
|
||||
text = json.text;
|
||||
if (opts.anchors) {
|
||||
text = json.text.replace(/(http:\/\/\S+)/g, '<a href="$1">$1</a>');
|
||||
text = text.replace(/\@(\w+)/g, '<a href="http://twitter.com/$1">@$1</a>');
|
||||
}
|
||||
str = '<div class="twitterSearchTweet">';
|
||||
if (opts.avatar)
|
||||
str += '<img class="twitterSearchProfileImg" src="' + json.profile_image_url + '" />';
|
||||
str += '<div><span class="twitterSearchUser"><a href="http://www.twitter.com/'+ json.from_user+'/status/'+ json.id_str +'">'
|
||||
+ json.from_user + '</a></span>';
|
||||
pretty = prettyDate(json.created_at);
|
||||
if (opts.time && pretty)
|
||||
str += ' <span class="twitterSearchTime">('+ pretty +')</span>'
|
||||
str += '<div class="twitterSearchText">' + text + '</div></div></div>';
|
||||
return str;
|
||||
};
|
||||
|
||||
$.fn.twitterSearch.defaults = {
|
||||
url: 'http://search.twitter.com/search.json?callback=?&q=',
|
||||
anchors: true, // true or false (enable embedded links in tweets)
|
||||
animOutSpeed: 500, // speed of animation for top tweet when removed
|
||||
animInSpeed: 500, // speed of scroll animation for moving tweets up
|
||||
animOut: { opacity: 0 }, // animation of top tweet when it is removed
|
||||
applyStyles: true, // true or false (apply default css styling or not)
|
||||
avatar: true, // true or false (show or hide twitter profile images)
|
||||
bird: true, // true or false (show or hide twitter bird image)
|
||||
birdLink: false, // url that twitter bird image should like to
|
||||
birdSrc: 'http://cloud.github.com/downloads/malsup/twitter/tweet.gif', // twitter bird image
|
||||
colorExterior: null, // css override of frame border-color and title background-color
|
||||
colorInterior: null, // css override of container background-color
|
||||
filter: null, // callback fn to filter tweets: fn(tweetJson) { /* return false to skip tweet */ }
|
||||
formatter: null, // callback fn to build tweet markup
|
||||
pause: false, // true or false (pause on hover)
|
||||
refreshSeconds: 0, // number of seconds to wait before polling for newer tweets
|
||||
term: '', // twitter search term
|
||||
time: true, // true or false (show or hide the time that the tweet was sent)
|
||||
timeout: 4000, // delay betweet tweet scroll
|
||||
title: null, // title text to display when frame option is true (default = 'term' text)
|
||||
titleLink: null, // url for title link
|
||||
css: {
|
||||
// default styling
|
||||
a: { textDecoration: 'none', color: '#3B5998' },
|
||||
bird: { width: '50px', height: '20px', position: 'absolute', left: '-30px', top: '-20px', border: 'none' },
|
||||
container: { overflow: 'hidden', backgroundColor: '', height: '600px', width: '170px' },
|
||||
fail: { background: '#6cc5c3 url(http://cloud.github.com/downloads/malsup/twitter/failwhale.png) no-repeat 50% 50%', height: '100%', padding: '10px' },
|
||||
frame: { border: '0px solid #C2CFF1', borderRadius: '0px', '-moz-border-radius': '0px', '-webkit-border-radius': '0px' },
|
||||
tweet: { padding: '5px 10px', clear: 'left' },
|
||||
img: { 'float': 'left', margin: '5px', width: '48px', height: '48px' },
|
||||
loading: { padding: '20px', textAlign: 'center', color: '#888' },
|
||||
text: {},
|
||||
time: { fontSize: 'smaller', color: '#888' },
|
||||
title: { 'display': 'none'},
|
||||
titleLink: { textDecoration: 'none', color: '#3B5998' },
|
||||
user: { fontWeight: 'bold' }
|
||||
}
|
||||
};
|
||||
|
||||
// fn to handle jsonp with timeouts and errors
|
||||
// hat tip to Ricardo Tomasi for the timeout logic
|
||||
$.getJSONP = function(s) {
|
||||
s.dataType = 'jsonp';
|
||||
$.ajax(s);
|
||||
|
||||
// figure out what the callback fn is
|
||||
var $script = $(document.getElementsByTagName('head')[0].firstChild);
|
||||
var url = $script.attr('src') || '';
|
||||
var cb = (url.match(/callback=(\w+)/)||[])[1];
|
||||
if (!cb)
|
||||
return; // bail
|
||||
var t = 0, cbFn = window[cb];
|
||||
|
||||
$script[0].onerror = function(e) {
|
||||
$script.remove();
|
||||
handleError(s, {}, "error", e);
|
||||
clearTimeout(t);
|
||||
};
|
||||
|
||||
if (!s.timeout)
|
||||
return;
|
||||
|
||||
window[cb] = function(json) {
|
||||
clearTimeout(t);
|
||||
cbFn(json);
|
||||
cbFn = null;
|
||||
};
|
||||
|
||||
t = setTimeout(function() {
|
||||
$script.remove();
|
||||
handleError(s, {}, "timeout");
|
||||
if (cbFn)
|
||||
window[cb] = function(){};
|
||||
}, s.timeout);
|
||||
|
||||
function handleError(s, xhr, msg, e) {
|
||||
s.error && s.error.call(s.context, xhr, msg, e);
|
||||
s.global && $.event.trigger("ajaxError", [xhr, s, e || msg]);
|
||||
s.complete && s.complete.call(s.context, xhr, e || msg);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* JavaScript Pretty Date
|
||||
* Copyright (c) 2008 John Resig (jquery.com)
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
// converts ISO time to casual time
|
||||
function prettyDate(time){
|
||||
var date = new Date((time || "").replace(/-/g,"/").replace(/TZ/g," ")),
|
||||
diff = (((new Date()).getTime() - date.getTime()) / 1000),
|
||||
day_diff = Math.floor(diff / 86400);
|
||||
|
||||
if ( isNaN(day_diff) || day_diff < 0 || day_diff >= 31 )
|
||||
return;
|
||||
var v = day_diff == 0 && (
|
||||
diff < 60 && "just now" ||
|
||||
diff < 120 && "1 minute ago" ||
|
||||
diff < 3600 && Math.floor( diff / 60 ) + " minutes ago" ||
|
||||
diff < 7200 && "1 hour ago" ||
|
||||
diff < 86400 && Math.floor( diff / 3600 ) + " hours ago") ||
|
||||
day_diff == 1 && "Yesterday" ||
|
||||
day_diff < 7 && day_diff + " days ago" ||
|
||||
day_diff < 31 && Math.ceil( day_diff / 7 ) + " weeks ago";
|
||||
if (!v)
|
||||
window.console && console.log(time);
|
||||
return v ? v : '';
|
||||
}
|
||||
|
||||
})(jQuery);
|
|
@ -141,6 +141,7 @@
|
|||
.icon.language { background-image: url("../../../view/theme/diabook/icons/language.png");}
|
||||
|
||||
|
||||
|
||||
.camera { background-image: url("../../../view/theme/diabook/icons/camera.png");
|
||||
display: block; width: 28px; height: 28px; background-repeat: no-repeat;
|
||||
}
|
||||
|
@ -168,6 +169,10 @@
|
|||
.unglobe { background-image: url("../../../view/theme/diabook/icons/unglobe.png");
|
||||
display: block; width: 28px; height: 28px; background-repeat: no-repeat;
|
||||
}
|
||||
#jot-preview-link .tab { background-image: url("../../../view/theme/diabook/icons/preview.png");
|
||||
display: block; width: 28px; height: 28px; background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.edit {background-image: url("../../../view/theme/diabook/icons/pencil2.png");
|
||||
display: block; width: 28px; height: 28px; background-repeat: no-repeat;}
|
||||
.icon.block {background-image: url("../../../view/theme/diabook/icons/block.png");
|
||||
|
@ -231,7 +236,7 @@
|
|||
.type-unkn { background-position: -80px 0px; }
|
||||
|
||||
.icon.drop, .icon.drophide {
|
||||
float: left;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.icon {
|
||||
|
@ -1044,6 +1049,8 @@ ul.menu-popup .empty {
|
|||
}
|
||||
.menu-profile-list-item{
|
||||
padding-left: 5px;
|
||||
padding-top: 0.6em;
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.menu-profile-list-item:hover{
|
||||
|
@ -1352,6 +1359,15 @@ body .pageheader{
|
|||
clear: both;
|
||||
display: block;
|
||||
}
|
||||
.pager_current a {
|
||||
margin: 3px;
|
||||
color: #000;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.pager_n a {
|
||||
margin: 2px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tabs {
|
||||
|
||||
background-position: 0 -20px;
|
||||
|
@ -1993,11 +2009,8 @@ body .pageheader{
|
|||
}
|
||||
#jot-preview-link {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
margin-top: 2px;
|
||||
font-size: 9px;
|
||||
font-weight: bolder;
|
||||
cursor: pointer;
|
||||
background-image: url("../../../view/theme/diabook/icons/preview.png");
|
||||
display: block; width: 12px; height: 12px; background-repeat: no-repeat;
|
||||
}
|
||||
#profile-jot-perms{
|
||||
float: right;
|
||||
|
@ -2154,6 +2167,10 @@ ul.tabs li .active {
|
|||
box-shadow: 0 1px 1px #CFCFCF;
|
||||
margin-left: 5px;
|
||||
}
|
||||
ul.tabs li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
//settings tabs
|
||||
ul.rs_tabs {
|
||||
list-style-type: none;
|
||||
|
|
|
@ -7,18 +7,7 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$("iframe").each(function(){
|
||||
var ifr_source = $(this).attr("src");
|
||||
var wmode = "wmode=transparent";
|
||||
if(ifr_source.indexOf("?") != -1) {
|
||||
var getQString = ifr_source.split("?");
|
||||
var oldString = getQString[1];
|
||||
var newString = getQString[0];
|
||||
$(this).attr("src",newString+"?"+wmode+"&"+oldString);
|
||||
}
|
||||
else $(this).attr("src",ifr_source+"?"+wmode);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("div#pause").attr("style", "position: fixed;bottom: 43px;left: 5px;");
|
||||
$("div#pause").html("<img src='images/pause.gif' alt='pause' title='pause live-updates (ctrl+space)' style='border: 1px solid black;opacity: 0.2;'>");
|
||||
|
|
|
@ -4,14 +4,6 @@
|
|||
*
|
||||
*}}
|
||||
|
||||
<div id="twittersettings" style="display:none">
|
||||
<form id="twittersettingsform" action="network" method="post" >
|
||||
{{include file="field_input.tpl" field=$TSearchTerm}}
|
||||
<div class="settings-submit-wrapper">
|
||||
<input id="twittersub" type="submit" value="{{$sub}}" class="settings-submit" name="diabook-settings-sub"></input>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="mapcontrol" style="display:none;">
|
||||
<form id="mapform" action="network" method="post" >
|
||||
|
@ -48,7 +40,6 @@ just contact me, if you are intesrested in joining</p>
|
|||
{{include file="field_select.tpl" field=$close_lastusers}}
|
||||
{{include file="field_select.tpl" field=$close_lastphotos}}
|
||||
{{include file="field_select.tpl" field=$close_lastlikes}}
|
||||
{{include file="field_select.tpl" field=$close_twitter}}
|
||||
{{include file="field_select.tpl" field=$close_mapquery}}
|
||||
<div class="settings-submit-wrapper">
|
||||
<input id="boxsub" type="submit" value="{{$sub}}" class="settings-submit" name="diabook-settings-box-sub"></input>
|
||||
|
@ -85,8 +76,6 @@ just contact me, if you are intesrested in joining</p>
|
|||
<a href="http://friendica.com/resources" title="How-to's" style="margin-left: 10px; " target="blank">How-To Guides</a><br>
|
||||
<a href="http://kakste.com/profile/newhere" title="@NewHere" style="margin-left: 10px; " target="blank">NewHere</a><br>
|
||||
<a href="https://helpers.pyxis.uberspace.de/profile/helpers" style="margin-left: 10px; " title="Friendica Support" target="blank">Friendica Support</a><br>
|
||||
<a href="https://letstalk.pyxis.uberspace.de/profile/letstalk" style="margin-left: 10px; " title="Let's talk" target="blank">Let's talk</a><br>
|
||||
<a href="http://newzot.hydra.uberspace.de/profile/newzot" title="Local Friendica" style="margin-left: 10px; " target="blank">Local Friendica</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
@ -160,12 +149,6 @@ just contact me, if you are intesrested in joining</p>
|
|||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div id="close_twitter">
|
||||
<h3 style="height:1.17em">{{$twitter.title.1}}<a id="closeicon" href="#boxsettings" onClick="open_boxsettings(); return false;" style="text-decoration:none;" class="icon close_box" title="{{$close}}"></a></h3>
|
||||
<div id="twitter">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="close_mapquery">
|
||||
{{if $mapquery}}
|
||||
<h3>{{$mapquery.title.1}}<a id="closeicon" href="#boxsettings" onClick="open_boxsettings(); return false;" style="text-decoration:none;" class="icon close_box" title="{{$close}}"></a></h3>
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
{{include file="field_select.tpl" field=$close_lastusers}}
|
||||
{{include file="field_select.tpl" field=$close_lastphotos}}
|
||||
{{include file="field_select.tpl" field=$close_lastlikes}}
|
||||
{{include file="field_select.tpl" field=$close_twitter}}
|
||||
{{include file="field_input.tpl" field=$TSearchTerm}}
|
||||
{{include file="field_select.tpl" field=$close_mapquery}}
|
||||
|
||||
{{include file="field_input.tpl" field=$ELPosX}}
|
||||
|
|
|
@ -45,7 +45,6 @@ $close_friends = get_diabook_config( "close_friends", 0 );
|
|||
$close_lastusers = get_diabook_config( "close_lastusers", 0 );
|
||||
$close_lastphotos = get_diabook_config( "close_lastphotos", 0 );
|
||||
$close_lastlikes = get_diabook_config( "close_lastlikes", 0 );
|
||||
$close_twitter = get_diabook_config( "close_twitter", 1 );
|
||||
$close_mapquery = get_diabook_config( "close_mapquery", 1 );
|
||||
|
||||
//get resolution (wide/normal)
|
||||
|
@ -102,9 +101,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
|
||||
}
|
||||
|
||||
$ccCookie = $close_pages + $close_mapquery + $close_profiles + $close_helpers + $close_services + $close_friends + $close_twitter + $close_lastusers + $close_lastphotos + $close_lastlikes;
|
||||
$ccCookie = $close_pages + $close_mapquery + $close_profiles + $close_helpers + $close_services + $close_friends + $close_lastusers + $close_lastphotos + $close_lastlikes;
|
||||
//if all boxes closed, dont build right-hand-col and dont use special css
|
||||
if($ccCookie != "10") {
|
||||
if($ccCookie != "9") {
|
||||
// COMMUNITY
|
||||
diabook_community_info();
|
||||
|
||||
|
@ -118,7 +117,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
|
||||
//build boxes at right_aside at profile pages
|
||||
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
|
||||
if($ccCookie != "10") {
|
||||
if($ccCookie != "9") {
|
||||
// COMMUNITY
|
||||
diabook_community_info();
|
||||
|
||||
|
@ -137,17 +136,13 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.min.js";
|
||||
$a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $imageresizeJS);
|
||||
//load jquery.ui.js
|
||||
if($ccCookie != "10") {
|
||||
if($ccCookie != "9") {
|
||||
$jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js";
|
||||
$a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $jqueryuiJS);
|
||||
$jqueryuicssJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/jquery-ui-1.8.20.custom.css";
|
||||
$a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $jqueryuicssJS);
|
||||
}
|
||||
//load jquery.twitter.search.js
|
||||
if($close_twitter != "1") {
|
||||
$twitterJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.twitter.search.js";
|
||||
$a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $twitterJS);
|
||||
}
|
||||
|
||||
//load jquery.mapquery.js
|
||||
if($close_mapquery != "1") {
|
||||
$mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js";
|
||||
|
@ -170,7 +165,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
<script>
|
||||
$(function() {
|
||||
$("a.lightbox").colorbox({maxHeight:"90%"}); // Select all links with lightbox class
|
||||
$("a#twittersettings-link").colorbox({inline:true,onClosed: function() { $("#twittersettings").attr("style","display: none;");}} );
|
||||
$("a#mapcontrol-link").colorbox({inline:true,onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} );
|
||||
$("a#closeicon").colorbox({inline:true,onClosed: function() { $("#boxsettings").attr("style","display: none;");}} );
|
||||
});
|
||||
|
@ -234,25 +228,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
};
|
||||
</script>';
|
||||
}
|
||||
//check if twitterbox is active and print
|
||||
if($close_twitter != "1") {
|
||||
$TSearchTerm = get_diabook_config( "TSearchTerm", "friendica" );
|
||||
$a->page['htmlhead'] .= '
|
||||
<script>
|
||||
$(function() {
|
||||
$("#twitter").twitterSearch({
|
||||
term: "'.$TSearchTerm.'",
|
||||
animInSpeed: 250,
|
||||
bird: false,
|
||||
avatar: false,
|
||||
colorExterior: "#fff",
|
||||
timeout: 10000 });
|
||||
});
|
||||
function open_twittersettings() {
|
||||
$("div#twittersettings").attr("style","display: block;");
|
||||
};
|
||||
</script>';}
|
||||
|
||||
|
||||
//check if community_home-plugin is activated and change css.. we need this, that the submit-wrapper doesn't overlay the login-panel if communityhome-plugin is active
|
||||
$nametocheck = "communityhome";
|
||||
$r = q("select id from addon where name = '%s' and installed = 1", dbesc($nametocheck));
|
||||
|
@ -292,7 +268,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
});
|
||||
</script>';
|
||||
|
||||
if($ccCookie != "10") {
|
||||
if($ccCookie != "9") {
|
||||
$a->page['htmlhead'] .= '
|
||||
<script>
|
||||
$("right_aside").ready(function(){
|
||||
|
@ -327,11 +303,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
document.getElementById( "close_friends" ).style.display = "none";
|
||||
};
|
||||
|
||||
if('.$close_twitter.')
|
||||
{
|
||||
document.getElementById( "close_twitter" ).style.display = "none";
|
||||
};
|
||||
|
||||
if('.$close_lastusers.')
|
||||
{
|
||||
document.getElementById( "close_lastusers" ).style.display = "none";
|
||||
|
@ -376,7 +347,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
$close_lastusers = get_diabook_config( "close_lastusers", 0 );
|
||||
$close_lastphotos = get_diabook_config( "close_lastphotos", 0 );
|
||||
$close_lastlikes = get_diabook_config( "close_lastlikes", 0 );
|
||||
$close_twitter = get_diabook_config( "close_twitter", 1 );
|
||||
$close_mapquery = get_diabook_config( "close_mapquery", 1 );
|
||||
|
||||
// comunity_profiles
|
||||
|
@ -600,22 +570,8 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
$aside['$con_services'] = $con_services;
|
||||
}
|
||||
//end connectable services
|
||||
//twitter
|
||||
if($close_twitter != "1") {
|
||||
$twitter = array();
|
||||
$twitter['title'] = Array("", "<a id='twittersettings-link' href='#twittersettings' style='text-decoration:none;' onclick='open_twittersettings(); return false;'>".t('Last Tweets')."</a>", "", "");
|
||||
$aside['$twitter'] = $twitter;
|
||||
$TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' );
|
||||
$aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm);
|
||||
$baseurl = $a->get_baseurl($ssl_state);
|
||||
$aside['$baseurl'] = $baseurl;
|
||||
if (isset($_POST['diabook-settings-sub']) && $_POST['diabook-settings-sub']!=''){
|
||||
set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
|
||||
header("Location: network");
|
||||
}
|
||||
}
|
||||
//end twitter
|
||||
if($ccCookie != "10") {
|
||||
|
||||
if($ccCookie != "9") {
|
||||
$close_pages = get_diabook_config( "close_pages", 1 );
|
||||
$close_profiles = get_diabook_config( "close_profiles", 0 );
|
||||
$close_helpers = get_diabook_config( "close_helpers", 0 );
|
||||
|
@ -624,7 +580,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
$close_lastusers = get_diabook_config( "close_lastusers", 0 );
|
||||
$close_lastphotos = get_diabook_config( "close_lastphotos", 0 );
|
||||
$close_lastlikes = get_diabook_config( "close_lastlikes", 0 );
|
||||
$close_twitter = get_diabook_config( "close_twitter", 1 );
|
||||
$close_mapquery = get_diabook_config( "close_mapquery", 1 );
|
||||
$close_or_not = array('1'=>t("don't show"), '0'=>t("show"),);
|
||||
$boxsettings['title'] = Array("", t('Show/hide boxes at right-hand column:'), "", "");
|
||||
|
@ -635,7 +590,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
$aside['$close_helpers'] = array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_or_not);
|
||||
$aside['$close_services'] = array('diabook_close_services', t('Connect Services'), $close_services, '', $close_or_not);
|
||||
$aside['$close_friends'] = array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_or_not);
|
||||
$aside['$close_twitter'] = array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_or_not);
|
||||
$aside['$close_lastusers'] = array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_or_not);
|
||||
$aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_or_not);
|
||||
$aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_or_not);
|
||||
|
@ -649,7 +603,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
|
|||
set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
|
||||
set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
|
||||
|
|
Loading…
Reference in a new issue