aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/theme.php
diff options
context:
space:
mode:
authortommy tomson <thomas.bierey@gmx.de>2012-05-01 02:33:55 +0200
committertommy tomson <thomas.bierey@gmx.de>2012-05-01 02:33:55 +0200
commitf35ffa9b6065e351a99c546c6b81a312a93086a4 (patch)
treebeb83d3205e855d97797a1aa46f7d52d732b9906 /view/theme/diabook/theme.php
parent88c77083e679ad06c58721df6d5766b1492f4c43 (diff)
downloadvolse-hubzilla-f35ffa9b6065e351a99c546c6b81a312a93086a4.tar.gz
volse-hubzilla-f35ffa9b6065e351a99c546c6b81a312a93086a4.tar.bz2
volse-hubzilla-f35ffa9b6065e351a99c546c6b81a312a93086a4.zip
diabook-themes: add "last tweets"-box to right_aside, that searches for #friendica on twitter
Diffstat (limited to 'view/theme/diabook/theme.php')
-rwxr-xr-xview/theme/diabook/theme.php36
1 files changed, 29 insertions, 7 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 9a1ac0f68..ffa480f3b 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.023)
+ * Version: (Version: 1.024)
* Author:
*/
//print diabook-version for debugging
-$diabook_version = "Diabook (Version: 1.023)";
+$diabook_version = "Diabook (Version: 1.024)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
//change css on network and profilepages
@@ -266,9 +266,9 @@ if ($a->argv[0] === "network" && local_user()){
}
- $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes'];
+ $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_twitter'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes'];
- if($ccCookie != "7") {
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
@@ -282,7 +282,7 @@ if ($a->argv[0] === "network" && local_user()){
//right_aside at profile pages
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
- if($ccCookie != "7") {
+ if($ccCookie != "8") {
// COMMUNITY
diabook_community_info();
@@ -312,6 +312,10 @@ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></scrip
$autogrowJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.autogrow.textarea.js";
$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $autogrowJS);
+//load jquery.twitter.search.js
+$twitterJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.twitter.search.js";
+$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $twitterJS);
+
//js scripts
//check if community_home-plugin is activated and change css
@@ -343,8 +347,17 @@ $a->page['htmlhead'] .= '
$a->page['htmlhead'] .= '
<script>
+
$(function() {
$("a.lightbox").fancybox(); // Select all links with lightbox class
+ $("#twitter").twitterSearch({
+ term: "friendica",
+ animInSpeed: 250,
+ bird: false,
+ avatar: false,
+ colorExterior: "#fff",
+ title: "Last tweets",
+ timeout: 10000 });
});
$(window).load(function() {
@@ -431,6 +444,7 @@ function restore_boxes(){
$.cookie("close_helpers","2", { expires: 365, path: "/" });
$.cookie("close_services","2", { expires: 365, path: "/" });
$.cookie("close_friends","2", { expires: 365, path: "/" });
+ $.cookie("close_twitter","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: "/" });
@@ -450,7 +464,7 @@ $a->page['htmlhead'] .= '
</script>';
- if($ccCookie != "7") {
+ if($ccCookie != "8") {
$a->page['htmlhead'] .= '
<script>
$("right_aside").ready(function(){
@@ -475,6 +489,10 @@ $("right_aside").ready(function(){
document.getElementById( "close_friends" ).style.display = "none";
};
+ if($.cookie("close_twitter") == "1")
+ {
+ document.getElementById( "twitter" ).style.display = "none";
+ };
if($.cookie("close_lastusers") == "1")
{
@@ -512,7 +530,11 @@ function close_friends(){
document.getElementById( "close_friends" ).style.display = "none";
$.cookie("close_friends","1", { expires: 365, path: "/" });
};
-
+
+function close_twitter(){
+ document.getElementById( "twitter" ).style.display = "none";
+ $.cookie("close_twitter","1", { expires: 365, path: "/" });
+ };
function close_lastusers(){
document.getElementById( "close_lastusers" ).style.display = "none";