aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/theme.php
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2012-04-27 22:43:26 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2012-04-27 22:43:26 +0530
commit214ec91a3f2c5fec6cced93f669b3a9725f0e40a (patch)
treed05fd4c7e65cc89cf46d8347a2d0e6df135ed864 /view/theme/diabook/theme.php
parentf1d84c10458986a0a014f844e784617401764b29 (diff)
parent4b92e3543c9af26e590cfecf561ff7483e66e6c9 (diff)
downloadvolse-hubzilla-214ec91a3f2c5fec6cced93f669b3a9725f0e40a.tar.gz
volse-hubzilla-214ec91a3f2c5fec6cced93f669b3a9725f0e40a.tar.bz2
volse-hubzilla-214ec91a3f2c5fec6cced93f669b3a9725f0e40a.zip
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'view/theme/diabook/theme.php')
-rw-r--r--view/theme/diabook/theme.php50
1 files changed, 43 insertions, 7 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index e8518a1c6..c45db9884 100644
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -3,23 +3,28 @@
/*
* Name: Diabook
* Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
- * Version: (Version: 1.021)
+ * Version: (Version: 1.022)
* Author:
*/
//print diabook-version for debugging
-$diabook_version = "Diabook (Version: 1.021)";
+$diabook_version = "Diabook (Version: 1.022)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
//change css on network and profilepages
$cssFile = null;
+
$resolution=false;
$resolution = get_pconfig(local_user(), "diabook", "resolution");
if ($resolution===false) $resolution="normal";
+
$color = false;
-$color = get_pconfig(local_user(), "diabook", "color");
+$site_color = get_config("diabook", "color" );
+if (local_user()) {$color = get_pconfig(local_user(), "diabook", "color");}
+if ($color===false) $color=$site_color;
if ($color===false) $color="diabook";
+
if ($color=="diabook") $color_path = "/";
if ($color=="aerith") $color_path = "/diabook-aerith/";
if ($color=="blue") $color_path = "/diabook-blue/";
@@ -291,7 +296,9 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
// custom css
if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
-
+//footer
+$tpl = get_markup_template('footer.tpl');
+$a->page['footer'] .= replace_macros($tpl, array());
//load jquery.cookie.js
$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.cookie.js";
@@ -354,19 +361,48 @@ $(document).ready(function() {
$(this).attr("src",newString+"?"+wmode+"&"+oldString);
}
else $(this).attr("src",ifr_source+"?"+wmode);
+
});
-
});
function yt_iframe() {
-
+
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
$("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
});
};
+
+function scrolldown(){
+ $("html, body").animate({scrollTop:$(document).height()}, "slow");
+ return false;
+ };
+
+function scrolltop(){
+ $("html, body").animate({scrollTop:0}, "slow");
+ return false;
+ };
+
+$(window).scroll(function () {
+
+
+ var scrollInfo = $(window).scrollTop();
+
+ if (scrollInfo <= "900"){
+ $("a#top").attr("id","down");
+ $("a#down").attr("onclick","scrolldown()");
+ $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png");
+ }
+
+ if (scrollInfo > "900"){
+ $("a#down").attr("id","top");
+ $("a#top").attr("onclick","scrolltop()");
+ $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png");
+ }
+
+ });
</script>';
@@ -480,7 +516,7 @@ function close_lastlikes(){
$a->page['htmlhead'] .= '
<script>
-function insertFormatting(BBcode,id) {
+function insertFormatting(comment,BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {