aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rwxr-xr-xview/theme/diabook/communityhome.tpl11
-rw-r--r--view/theme/diabook/js/jquery.twitter.search.js4
-rwxr-xr-xview/theme/diabook/theme.php24
3 files changed, 34 insertions, 5 deletions
diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl
index 9bd4ad8bc..3c6fb5a82 100755
--- a/view/theme/diabook/communityhome.tpl
+++ b/view/theme/diabook/communityhome.tpl
@@ -99,8 +99,19 @@ $nv.search
{{ endif }}
</div>
+<div id="close_twitter">
+<h3 style="height:1.17em">$twitter.title.1<a id="close_twitter_icon" onClick="close_twitter()" class="icon close_box" title="$close"></a></h3>
<div id="twitter">
</div>
+<div id="twittersettings" style="display:none;">
+<form id="twittersettings-form" action="network" method="post" autocomplete="off">
+{{inc field_input.tpl with $field=$TSearchTerm}}{{endinc}}
+<div class="settings-submit-wrapper">
+<input type="submit" value="$submit" class="settings-submit" name="diabook-settings-submit" />
+</div>
+</form>
+</div>
+</div>
<div id="close_mapquery">
{{ if $mapquery }}
diff --git a/view/theme/diabook/js/jquery.twitter.search.js b/view/theme/diabook/js/jquery.twitter.search.js
index 85ff620f1..d3ccfe68e 100644
--- a/view/theme/diabook/js/jquery.twitter.search.js
+++ b/view/theme/diabook/js/jquery.twitter.search.js
@@ -31,7 +31,7 @@
opts.title = opts.term;
opts.title = opts.title || '';
- text = opts.titleLink ? ('<a href="'+ opts.titleLink +'">'+ opts.title + '</a>') : ('<span>' + opts.title +'<a id="close_friends_icon" onClick="close_twitter()" class="icon close_box" title="$close"></a>'+ '</span>');
+ text = opts.titleLink ? ('<a href="'+ opts.titleLink +'">'+ opts.title + '</a>') : ('<span>' + opts.title +'</span>');
$text = $(text);
if (opts.titleLink)
$text.css(opts.css['titleLink']);
@@ -210,7 +210,7 @@
loading: { padding: '20px', textAlign: 'center', color: '#888' },
text: {},
time: { fontSize: 'smaller', color: '#888' },
- title: { 'border-bottom': '1px solid #D2D2D2', 'padding-top': '5px', 'padding-bottom': '0px', 'padding-left': '9px', 'margin-bottom': '0px', 'margin-top': '30px' , 'display': 'block', 'font-size': '1.17em', 'font-weight': 'bold'},
+ title: { 'display': 'none'},
titleLink: { textDecoration: 'none', color: '#3B5998' },
user: { fontWeight: 'bold' }
}
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index aef74519f..afc8983db 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -145,7 +145,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$(function() {
$("a.lightbox").fancybox(); // Select all links with lightbox class
- $("div.lightbox").fancybox();
+ $("a.#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} );
});
$(window).load(function() {
@@ -191,9 +191,11 @@ if ($color=="dark") $color_path = "/diabook-dark/";
bird: false,
avatar: false,
colorExterior: "#fff",
- title: "Last Tweets",
timeout: 10000 });
});
+ function open_twittersettings() {
+ $("div#twittersettings").attr("style","display: block;");
+ };
</script>';}
//check if community_home-plugin is activated and change css
@@ -579,6 +581,21 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$aside['$con_services'] = $con_services;
}
//end connectable services
+ //twitter
+ if($_COOKIE['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['$submit'] = t('Submit');
+ $aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm);
+ $baseurl = $a->get_baseurl();
+ $aside['$baseurl'] = $baseurl;
+ if (isset($_POST['diabook-settings-submit'])){
+ set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
+ }
+ }
+ //end twitter
$close = t('Close');
$aside['$close'] = $close;
//get_baseurl
@@ -599,4 +616,5 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
$a->page['footer'] = $a->page['footer'].replace_macros($tpl, $bottom);
}
-
+
+