+
+
+ //right_aside at profile pages
+ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
+ if($ccCookie != "9") {
+ // COMMUNITY
+ diabook_community_info();
+
+ // CUSTOM CSS
+ if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook".$color_path."style-profile.css";}
+ if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook".$color_path."style-profile-wide.css";}
+
+ }
+ }
+
+ //js scripts
+ //load jquery.cookie.js
+ $cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.cookie.js";
+ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s"></script>', $cookieJS);
+
+ //load jquery.ae.image.resize.js
+ $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.js";
+ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS);
+
+ //load jquery.ui.js
+ if($ccCookie != "9") {
+ $jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js";
+ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $jqueryuiJS);
+ }
+
+ //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,
+ bird: false,
+ avatar: false,
+ colorExterior: "#fff",
+ title: "Last Tweets",
+ timeout: 10000 });
+ });
+ </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));
+ if(count($r) == "1") {
+
+ $a->page['htmlhead'] .= '
+ <script>
+ $(document).ready(function() {
+ $("div#login-submit-wrapper").attr("style","padding-top: 120px;");
+ });
+ </script>';
+ }
+ //comment-edit-wrapper on photo_view
+ if ($a->argv[0].$a->argv[2] === "photos"."image"){
+ $a->page['htmlhead'] .= '
+ <script>
+ $(function(){
+ $(".comment-edit-form").css("display","table");
+ });
+ </script>';
+ }
+ //restore right hand col at settingspage
+ 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_profiles","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: "/" });
+ $.cookie("Boxorder",null, { 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'] .= '
+ <script>
+
+ $(function() {
+ $(".oembed.photo img").aeImageResize({height: 400, width: 400});
+ });
+ </script>';
+
+ if($ccCookie != "9") {
+ $a->page['htmlhead'] .= '
+ <script>
+ $("right_aside").ready(function(){
+
+ if($.cookie("close_pages") == "1")
+ {
+ document.getElementById( "close_pages" ).style.display = "none";
+ };
+
+ if($.cookie("close_profiles") == "1")
+ {
+ document.getElementById( "close_profiles" ).style.display = "none";
+ };
+
+ if($.cookie("close_helpers") == "1")
+ {
+ document.getElementById( "close_helpers" ).style.display = "none";
+ };
+
+ if($.cookie("close_services") == "1")
+ {
+ document.getElementById( "close_services" ).style.display = "none";
+ };
+
+ if($.cookie("close_friends") == "1")
+ {
+ document.getElementById( "close_friends" ).style.display = "none";
+ };
+
+ if($.cookie("close_twitter") == "1")
+ {
+ document.getElementById( "twitter" ).style.display = "none";
+ };
+
+ if($.cookie("close_lastusers") == "1")
+ {
+ document.getElementById( "close_lastusers" ).style.display = "none";
+ };
+
+ if($.cookie("close_lastphotos") == "1")
+ {
+ document.getElementById( "close_lastphotos" ).style.display = "none";
+ };
+
+ if($.cookie("close_lastlikes") == "1")
+ {
+ document.getElementById( "close_lastlikes" ).style.display = "none";
+ };}
+
+ );
+
+ function close_pages(){
+ document.getElementById( "close_pages" ).style.display = "none";
+ $.cookie("close_pages","1", { expires: 365, path: "/" });
+ };