diabook-themes: more improvements in theme.php, add titles to bbcode under coment-box

This commit is contained in:
tommy tomson 2012-05-02 16:27:01 +02:00
parent 67471bb534
commit 6875f54647
4 changed files with 47 additions and 28 deletions

View file

@ -13,13 +13,13 @@
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);tautogrow($id);cmtBbOpen($id);" >$comment</textarea>
<div class="comment-edit-bb-$id" style="display:none;">
<a class="icon bb-image" style="cursor: pointer;" onclick="insertFormatting('$comment','img',$id);">img</a>
<a class="icon bb-url" style="cursor: pointer;" onclick="insertFormatting('$comment','url',$id);">url</a>
<a class="icon bb-video" style="cursor: pointer;" onclick="insertFormatting('$comment','video',$id);">video</a>
<a class="icon underline" style="cursor: pointer;" onclick="insertFormatting('$comment','u',$id);">u</a>
<a class="icon italic" style="cursor: pointer;" onclick="insertFormatting('$comment','i',$id);">i</a>
<a class="icon bold" style="cursor: pointer;" onclick="insertFormatting('$comment','b',$id);">b</a>
<a class="icon quote" style="cursor: pointer;" onclick="insertFormatting('$comment','quote',$id);">quote</a>
<a class="icon bb-image" style="cursor: pointer;" title="$edimg" onclick="insertFormatting('$comment','img',$id);">img</a>
<a class="icon bb-url" style="cursor: pointer;" title="$edurl" onclick="insertFormatting('$comment','url',$id);">url</a>
<a class="icon bb-video" style="cursor: pointer;" title="$edvideo" onclick="insertFormatting('$comment','video',$id);">video</a>
<a class="icon underline" style="cursor: pointer;" title="$eduline" onclick="insertFormatting('$comment','u',$id);">u</a>
<a class="icon italic" style="cursor: pointer;" title="$editalic" onclick="insertFormatting('$comment','i',$id);">i</a>
<a class="icon bold" style="cursor: pointer;" title="$edbold" onclick="insertFormatting('$comment','b',$id);">b</a>
<a class="icon quote" style="cursor: pointer;" title="$edquote" onclick="insertFormatting('$comment','quote',$id);">quote</a>
</div>
{{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >

View file

@ -16,7 +16,7 @@
</div>
<div id="close_helpers">
{{ if $lastusers_title }}
{{ if $helpers }}
<h3>$helpers.title.1<a id="close_helpers_icon" onClick="close_helpers()" class="icon close_box" title="close"></a></h3>
<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>
@ -26,7 +26,7 @@
</div>
<div id="close_services">
{{ if $lastusers_title }}
{{ if $con_services }}
<h3>$con_services.title.1<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 16px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook/icons/facebook.png" title="Facebook"></a>

View file

@ -202,7 +202,7 @@
// 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: '360px' },
container: { overflow: 'hidden', backgroundColor: '', height: '600px' },
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' },

View file

@ -109,14 +109,29 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS);
//load jquery.twitter.search.js
if($_COOKIE['close_twitter'] != "1") {
$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);
}
$a->page['htmlhead'] .= '
<script>
$(function() {
$("a.lightbox").fancybox(); // Select all links with lightbox class
});
$(window).load(function() {
var footer_top = $(document).height() - 30;
$("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;");
});
</script>';
//check if twitterbox is active and print
if($_COOKIE['close_twitter'] != "1") {
$a->page['htmlhead'] .= '
<script>
$(function() {
$("#twitter").twitterSearch({
term: "friendica",
animInSpeed: 250,
@ -126,12 +141,8 @@ if ($color=="dark") $color_path = "/diabook-dark/";
title: "Last Tweets",
timeout: 10000 });
});
</script>';}
$(window).load(function() {
var footer_top = $(document).height() - 30;
$("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;");
});
</script>';
//check if community_home-plugin is activated and change css
$nametocheck = "communityhome";
$r = q("select id from addon where name = '%s' and installed = 1", dbesc($nametocheck));
@ -295,6 +306,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
function diabook_community_info() {
$a = get_app();
// comunity_profiles
if($_COOKIE['close_profiles'] != "1") {
$aside['$comunity_profilest_title'] = t('Community Profiles');
$aside['$comunity_profiles_items'] = array();
$r = q("select gcontact.* from gcontact left join glink on glink.gcid = gcontact.id
@ -312,9 +324,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
));
$aside['$comunity_profiles_items'][] = $entry;
}
}
}}
// last 12 users
if($_COOKIE['close_lastusers'] != "1") {
$aside['$lastusers_title'] = t('Last users');
$aside['$lastusers_items'] = array();
$sql_extra = "";
@ -340,10 +353,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
));
$aside['$lastusers_items'][] = $entry;
}
}
}}
// last 10 liked items
if($_COOKIE['close_lastlikes'] != "1") {
$aside['$like_title'] = t('Last likes');
$aside['$like_items'] = array();
$r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM
@ -385,10 +398,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$aside['$like_items'][] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
}
}}
// last 12 photos
if($_COOKIE['close_photos'] != "1") {
$aside['$photos_title'] = t('Last photos');
$aside['$photos_items'] = array();
$r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM
@ -420,10 +433,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$aside['$photos_items'][] = $entry;
}
}
}}
//right_aside FIND FRIENDS
if($_COOKIE['close_friends'] != "1") {
if(local_user()) {
$nv = array();
$nv['title'] = Array("", t('Find Friends'), "", "");
@ -441,9 +454,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
<span class="sbox_r" id="srch_clear"></span>';
$aside['$nv'] = $nv;
};
}}
//Community_Pages at right_aside
if($_COOKIE['close_pages'] != "1") {
if(local_user()) {
$page = '<div id="" >
<h3 style="margin-top:0px;">'.t("Community Pages").'<a id="close_pages_icon" onClick="close_pages()" class="icon close_box" title="close"></a></h3></div>
@ -474,17 +488,22 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$page .= '</ul></div></div>';
//if (sizeof($contacts) > 0)
$aside['$page'] = $page;
}
}}
//END Community Page
//helpers
if($_COOKIE['close_helpers'] != "1") {
$helpers = array();
$helpers['title'] = Array("", t('Help or @NewHere ?'), "", "");
$aside['$helpers'] = $helpers;
}
//end helpers
//connectable services
if($_COOKIE['close_services'] != "1") {
$con_services = array();
$con_services['title'] = Array("", t('Connect Services'), "", "");
$aside['$con_services'] = $con_services;
}
//end connectable services
//get_baseurl
$url = $a->get_baseurl($ssl_state);