aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/theme.php
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/diabook/theme.php')
-rwxr-xr-xview/theme/diabook/theme.php61
1 files changed, 40 insertions, 21 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 9ad378b21..269015d0a 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -3,13 +3,13 @@
/*
* 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
@@ -25,6 +25,8 @@ if ($color=="aerith") $color_path = "/diabook-aerith/";
if ($color=="blue") $color_path = "/diabook-blue/";
if ($color=="red") $color_path = "/diabook-red/";
if ($color=="pink") $color_path = "/diabook-pink/";
+if ($color=="green") $color_path = "/diabook-green/";
+if ($color=="dark") $color_path = "/diabook-dark/";
/**
@@ -145,7 +147,6 @@ function diabook_community_info(){
}
}
-
//right_aside FIND FRIENDS
if(local_user()) {
@@ -290,7 +291,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";
@@ -328,6 +331,7 @@ $a->page['htmlhead'] .= '
</script>';
+
$a->page['htmlhead'] .= '
<script type="text/javascript">
@@ -353,12 +357,18 @@ $(document).ready(function() {
}
else $(this).attr("src",ifr_source+"?"+wmode);
});
+
+ $("a[href=#top]").click(function() {
+ $("html, body").animate({scrollTop:0}, "slow");
+ return false;
+ });
});
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");
@@ -368,6 +378,22 @@ function yt_iframe() {
</script>';
+if($a->argv[0] === "settings" && local_user()) {
+$a->page['htmlhead'] .= '
+<script>
+function restore_boxes(){
+ $.cookie("close_pages","2", { expires: 365, path: "/" });
+ $.cookie("close_helpers","2", { expires: 365, path: "/" });
+ $.cookie("close_services","2", { expires: 365, path: "/" });
+ $.cookie("close_friends","2", { expires: 365, path: "/" });
+ $.cookie("close_lastusers","2", { expires: 365, path: "/" });
+ $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
+ $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
+ alert("Right-hand column was restored. Please refresh your browser");
+ }
+</script>';}
+
+
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
@@ -457,22 +483,7 @@ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie("close_lastlikes","1", { expires: 365, path: "/" });
};
-</script>';}
-
-$a->page['htmlhead'] .= '
-<script>
-function restore_boxes(){
- $.cookie("close_pages","2", { expires: 365, path: "/" });
- $.cookie("close_helpers","2", { expires: 365, path: "/" });
- $.cookie("close_services","2", { expires: 365, path: "/" });
- $.cookie("close_friends","2", { expires: 365, path: "/" });
- $.cookie("close_lastusers","2", { expires: 365, path: "/" });
- $.cookie("close_lastphotos","2", { expires: 365, path: "/" });
- $.cookie("close_lastlikes","2", { expires: 365, path: "/" });
- alert("Right-hand column was restored. Please refresh your browser");
- }
-</script>';}
-
+</script>';}}
$a->page['htmlhead'] .= '
@@ -505,4 +516,12 @@ function insertFormatting(comment,BBcode,id) {
}
return true;
}
+
+function cmtBbOpen(id) {
+ $(".comment-edit-bb-" + id).show();
+}
+function cmtBbClose(id) {
+ $(".comment-edit-bb-" + id).hide();
+}
+
</script> '; \ No newline at end of file