]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Mon, 17 Dec 2012 09:32:53 +0000 (10:32 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 17 Dec 2012 09:32:53 +0000 (10:32 +0100)
boot.php
include/bb2diaspora.php
include/bbcode.php
include/nav.php
include/network.php
include/onepoll.php
include/poller.php
mod/photo.php
view/theme/vier/nav.tpl
view/theme/vier/style.css
view/theme/vier/theme.php

index e69b59d707c1e7cf131df94ddb6a22c745eb8c40..023c5807c8a4bb40474198711b25d4746b0dee6c 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -520,6 +520,19 @@ if(! class_exists('App')) {
                        $this->is_tablet = $mobile_detect->isTablet();
                }
 
+               function get_basepath() {
+
+                       $basepath = get_config("system", "basepath");
+
+                       if ($basepath == "")
+                               $basepath = $_SERVER["DOCUMENT_ROOT"];
+
+                       if ($basepath == "")
+                               $basepath = $_SERVER["PWD"];
+
+                       return($basepath);
+               }
+
                function get_baseurl($ssl = false) {
 
                        $scheme = $this->scheme;
@@ -1895,7 +1908,7 @@ function clear_cache($basepath = "", $path = "") {
                        $fullpath = $path."/".$file;
                        if ((filetype($fullpath) == "dir") and ($file != ".") and ($file != ".."))
                                clear_cache($basepath, $fullpath);
-                       if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - $cachetime))
+                       if ((filetype($fullpath) == "file") and (filectime($fullpath) < (time() - $cachetime)))
                                unlink($fullpath);
                }
                closedir($dh);
index 75fe1ef35dd02d7b5aa33d824927faba7811d2fb..ffe6b3b970bd5dbc4137ac8a98e280a6867e9540 100644 (file)
@@ -155,6 +155,9 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
        //      $Text = preg_replace("/\[url\=([^\[\]]*)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\]/ism",
        //                              "[url]$1[/url]\n[img]$2[/img]", $Text);
 
+       // Remove the avatar picture since that isn't looking good on the other side
+       //$Text = preg_replace("/\[share(.*?)avatar\s?=\s?'.*?'\s?(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","\n[share$1$2]$3[/share]",$Text);
+
        // Convert it to HTML - don't try oembed
        $Text = bbcode($Text, $preserve_nl, false);
 
index d83fe6c12f15efcb40e067d8953b46c7082169b4..b3f6aa826b6938390b4b94c62ecf0cd773ed1cfe 100644 (file)
@@ -206,7 +206,59 @@ function bb_replace_images($body, $images) {
        return $newbody;
 }}
 
+function bb_ShareAttributes($match) {
 
+        $attributes = $match[1];
+
+        $author = "";
+        preg_match("/author='(.*?)'/ism", $attributes, $matches);
+        if ($matches[1] != "")
+                $author = $matches[1];
+
+        preg_match('/author="(.*?)"/ism', $attributes, $matches);
+        if ($matches[1] != "")
+                $author = $matches[1];
+
+        $link = "";
+        preg_match("/link='(.*?)'/ism", $attributes, $matches);
+        if ($matches[1] != "")
+                $link = $matches[1];
+
+        preg_match('/link="(.*?)"/ism', $attributes, $matches);
+        if ($matches[1] != "")
+                $link = $matches[1];
+
+        $avatar = "";
+        preg_match("/avatar='(.*?)'/ism", $attributes, $matches);
+        if ($matches[1] != "")
+                $avatar = $matches[1];
+
+        preg_match('/avatar="(.*?)"/ism', $attributes, $matches);
+        if ($matches[1] != "")
+                $avatar = $matches[1];
+
+        $profile = "";
+        preg_match("/profile='(.*?)'/ism", $attributes, $matches);
+        if ($matches[1] != "")
+                $profile = $matches[1];
+
+        preg_match('/profile="(.*?)"/ism', $attributes, $matches);
+        if ($matches[1] != "")
+                $profile = $matches[1];
+
+        $headline = '<div class="shared_header">';
+
+       if ($avatar != "")
+               $headline .= '<img src="'.$avatar.'" height="32" width="32" >';
+
+       $headline .= sprintf(t('<span><a href="%s">%s</a> wrote the following <a href="%s">post</a>:</span>'), $profile, $author, $link);
+
+        $headline .= "</div>";
+
+        $text = "<br />".$headline.'<blockquote class="shared_content">'.trim($match[2])."</blockquote>";
+
+        return($text);
+}
 
        // BBcode 2 HTML was written by WAY2WEB.net
        // extended to work with Mistpark/Friendica - Mike Macgirvin
@@ -248,6 +300,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
        $Text = str_replace("<", "&lt;", $Text);
        $Text = str_replace(">", "&gt;", $Text);
 
+       // remove some newlines before the general conversion
+       $Text = preg_replace("/\s?\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","[share$1]$2[/share]",$Text);
+
+       // when the content is meant exporting to other systems then remove the avatar picture since this doesn't really look good on these systems
+       if (!$tryoembed)
+               $Text = preg_replace("/\[share(.*?)avatar\s?=\s?'.*?'\s?(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","\n[share$1$2]$3[/share]",$Text);
+
        // Convert new line chars to html <br /> tags
 
        // nlbr seems to be hopelessly messed up
@@ -271,7 +330,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
        // Perform URL Search
 
-       $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="external-link">$2</a>', $Text);
+       $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="external-link">$2</a>', $Text);
 
        if ($tryoembed)
                $Text = preg_replace_callback("/\[bookmark\=([^\]]*)\].*?\[\/bookmark\]/ism",'tryoembed',$Text);
@@ -422,7 +481,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
        // [img]pathtoimage[/img]
        $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text);
 
-
+       // Shared content
+       $Text = preg_replace_callback("/\[share(.*?)\](.*?)\[\/share\]/ism","bb_ShareAttributes",$Text);
 
        $Text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism",'<br/><img src="' .$a->get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . t('Encrypted content') . '" /><br />', $Text);
        $Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism",'<br/><img src="' .$a->get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
index 3c058e04f62b736ffc150199918c2eb1ef7b170d..d94bf03be11fa11f0a3fded2c55698167c439821 100644 (file)
@@ -44,14 +44,14 @@ function nav(&$a) {
 
        if(local_user()) {
                $nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
-               
+
                // user menu
                $nav['usermenu'][] = Array('profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations'));
                $nav['usermenu'][] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
                $nav['usermenu'][] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
                $nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events'));
                $nav['usermenu'][] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
-               
+
                // user info
                $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
                $userinfo = array(
@@ -130,11 +130,13 @@ function nav(&$a) {
                $nav['messages']['inbox'] = array('message', t('Inbox'), "", t('Inbox'));
                $nav['messages']['outbox']= array('message/sent', t('Outbox'), "", t('Outbox'));
                $nav['messages']['new'] = array('message/new', t('New Message'), "", t('New Message'));
-               
+
                if(is_array($a->identities) && count($a->identities) > 1) {
                        $nav['manage'] = array('manage', t('Manage'), "", t('Manage other pages'));
                }
 
+               $nav['delegations'] = Array('delegate', t('Delegations'), "", t('Delegate Page Management'));
+
                $nav['settings'] = array('settings', t('Settings'),"", t('Account settings'));
                if(feature_enabled(local_user(),'multi_profiles'))
                        $nav['profiles'] = array('profiles', t('Profiles'),"", t('Manage/Edit Profiles'));
index 599088a2daeace1ab0e4b37170e8b3c8939011b3..5877dda41b876651810cc8e76e3766b0bd475cb7 100644 (file)
@@ -854,8 +854,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
        }
 
        // replace the special char encoding
-
-       $s = htmlspecialchars($s,ENT_QUOTES,'UTF-8');
+       $s = htmlspecialchars($s,ENT_NOQUOTES,'UTF-8');
        return $s;
 }
 
index 8fabede11c9b67800a982d4f45e0ee3cff8a3aeb..10707ea9601dd40bfcd8452d8e800f57553ccd74 100644 (file)
@@ -2,6 +2,13 @@
 
 require_once("boot.php");
 
+function RemoveReply($subject) {
+       while (in_array(strtolower(substr($subject, 0, 3)), array("re:", "aw:")))
+               $subject = trim(substr($subject, 4));
+
+       return($subject);
+}
+
 function onepoll_run(&$argv, &$argc){
        global $a, $db;
 
@@ -374,10 +381,6 @@ function onepoll_run(&$argv, &$argc){
        //                                                      $datarray['parent-uri'] = $r[0]['uri'];
                                                }
 
-
-                                               if(! x($datarray,'parent-uri'))
-                                                       $datarray['parent-uri'] = $datarray['uri'];
-
                                                // Decoding the header
                                                $subject = imap_mime_header_decode($meta->subject);
                                                $datarray['title'] = "";
@@ -392,11 +395,26 @@ function onepoll_run(&$argv, &$argc){
                                                //$datarray['title'] = notags(trim($meta->subject));
                                                $datarray['created'] = datetime_convert('UTC','UTC',$meta->date);
 
-                                               // Is it  reply?
+                                               // Is it a reply?
                                                $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") or
                                                        (substr(strtolower($datarray['title']), 0, 3) == "re-") or
                                                        (raw_refs != ""));
 
+                                               // Remove Reply-signs in the subject
+                                               $datarray['title'] = RemoveReply($datarray['title']);
+
+                                               // If it seems to be a reply but a header couldn't be found take the last message with matching subject
+                                               if(!x($datarray,'parent-uri') and $reply) {
+                                                       $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE MATCH (`title`) AGAINST ('".'"%s"'."' IN BOOLEAN MODE) ORDER BY `created` DESC LIMIT 1",
+                                                               besc(protect_sprintf($datarray['title'])));
+                                                       if(count($r))
+                                                               $datarray['parent-uri'] = $r[0]['parent-uri'];
+                                               }
+
+                                               if(! x($datarray,'parent-uri'))
+                                                       $datarray['parent-uri'] = $datarray['uri'];
+
+
                                                $r = email_get_msg($mbox,$msg_uid, $reply);
                                                if(! $r) {
                                                        logger("Mail: can't fetch msg ".$msg_uid." for ".$mailconf[0]['user']);
index 6f2eeed822b80f757adafaf269caac0c656ee91e..4eb5e8a2b912bd2b22df8cfec3c1822adbc9c1d1 100644 (file)
@@ -105,6 +105,9 @@ function poller_run(&$argv, &$argc){
        // clear old item cache files
        clear_cache();
 
+       // clear cache for photos
+       clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
+
        $manual_id  = 0;
        $generation = 0;
        $hub_update = false;
index e37b9273859e940e8ca13e5cd4ac5f13f4d44e49..93db82a6418c9dc789e9678c7be505340c7330be 100644 (file)
@@ -7,6 +7,7 @@ function photo_init(&$a) {
        global $_SERVER;
 
        $prvcachecontrol = false;
+       $file = "";
 
        switch($a->argc) {
                case 4:
@@ -20,6 +21,7 @@ function photo_init(&$a) {
                        break;
                case 2:
                        $photo = $a->argv[1];
+                       $file = $photo;
                        break;
                case 1:
                default:
@@ -42,7 +44,6 @@ function photo_init(&$a) {
                exit;
        }
 
-
        $default = 'images/person-175.jpg';
 
        if(isset($type)) {
@@ -94,7 +95,7 @@ function photo_init(&$a) {
                foreach( Photo::supportedTypes() as $m=>$e){
                        $photo = str_replace(".$e",'',$photo);
                }
-       
+
                if(substr($photo,-2,1) == '-') {
                        $resolution = intval(substr($photo,-1,1));
                        $photo = substr($photo,0,-2);
@@ -115,6 +116,8 @@ function photo_init(&$a) {
                                intval($resolution)
                        );
 
+                       $public = ($r[0]['allow_cid'] == '') AND ($r[0]['allow_gid'] == '') AND ($r[0]['deny_cid']  == '') AND ($r[0]['deny_gid']  == '');
+
                        if(count($r)) {
                                $data = $r[0]['data'];
                                $mimetype = $r[0]['type'];
@@ -198,6 +201,12 @@ function photo_init(&$a) {
                header("Cache-Control: max-age=31536000");
        }
        echo $data;
+
+       // If the photo is public and there is an existing photo directory store the photo there
+       if ($public and ($file != ""))
+               if (is_dir($_SERVER["DOCUMENT_ROOT"]."/photo"))
+                       file_put_contents($_SERVER["DOCUMENT_ROOT"]."/photo/".$file, $data);
+
        killme();
        // NOTREACHED
 }
index b2b6cc785556c2c7862eee3d54ca76253b8ee7b6..f615be85f0a34e3b7f474367ec50d539c63ed8cc 100644 (file)
@@ -41,6 +41,7 @@
                                {{ if $nav.help }} <li><a class="$nav.help.2" target="friendica-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a></li>{{ endif }}
                                <li><a class="$nav.search.2" href="friendica" title="Site Info / Impressum" >Info/Impressum</a></li>
                                <li><a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a></li>
+                               {{ if $nav.delegations }}<li><a class="$nav.delegations.2" href="$nav.delegations.0" title="$nav.delegations.3">$nav.delegations.1</a></li>{{ endif }}
                                {{ if $nav.settings }}<li><a class="$nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
                                {{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
 
@@ -74,7 +75,6 @@
                                        {{ for $nav.usermenu as $usermenu }}
                                                <li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
                                        {{ endfor }}
-                                       
                                        {{ if $nav.notifications }}<li><a class="$nav.notifications.2" href="$nav.notifications.0" title="$nav.notifications.3" >$nav.notifications.1</a></li>{{ endif }}
                                        {{ if $nav.messages }}<li><a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a></li>{{ endif }}
                                        {{ if $nav.contacts }}<li><a class="$nav.contacts.2" href="$nav.contacts.0" title="$nav.contacts.3" >$nav.contacts.1</a></li>{{ endif }}        
index f5e64ca4785bc7d59b0407b44837e183ea503fe8..6a0cbb28500cc5dbff7f16caf9db4daa7e2e24e8 100644 (file)
        cursor: url('lock.cur'), pointer;
 }
 
+.shared_header {
+  height: 32px;
+  color: #999;
+  border-top: 1px solid #D2D2D2;
+  padding-top: 16px;
+  margin-top: 16px;
+}
+
+.shared_header img {
+  float: left;
+}
+
+.shared_header span {
+  margin-left: 9px;
+}
+
+blockquote.shared_content {
+  margin-left: 32px;
+  color: #000;
+  border: none;
+}
 
 #contact-edit-links ul {
   list-style: none;
 /* global */
 body {
   font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
+  font-size: 14px;
   background-color: #ffffff;
   color: #2d2d2d;
-  margin: 50px 0px 0px 0px;
+  margin: 37px 0px 0px 0px;
   display: table;
 }
 h4 {
@@ -345,7 +366,8 @@ h4 {
 a {
        /*  color: #36C; */
        /* color: #3e3e8c; */
-       color: #3465A4;
+       /* color: #3465A4; */
+       color: #3E3E8C;
        text-decoration: none;
 }
 a:hover {
@@ -379,7 +401,8 @@ a:hover {
 .fakelink {
   /* color: #36c; */
   /* color: #3e3e8c; */
-  color: #3465A4;
+  /* color: #3465A4; */
+  color: #3E3E8C;
   text-decoration: none;
   cursor: pointer;
 }
@@ -580,7 +603,7 @@ nav .nav-menu {
   padding-left: 5px;
   padding-right: 5px;
   margin: 3px 3px 0px;
-  font-size: 13px;
+  font-size: 14px;
   border-bottom: 3px solid #364A84;
 }
 nav .nav-menu.selected {
@@ -790,6 +813,8 @@ aside {
   width: 185px;
   padding: 0px 10px 0px 20px;
   border-right: 1px solid #D2D2D2;
+  background-color: #ECECF2;
+  font-size: 14px;
   /* background: #F1F1F1; */
 }
 aside .vcard .fn {
@@ -1006,7 +1031,7 @@ section {
   display: table-row;
 }
 .wall-item-bottom {
-  font-size: 13px;
+  font-size: 14px;
 }
 .wall-item-container .wall-item-bottom {
   opacity: 0.5;
@@ -1045,10 +1070,10 @@ section {
 }
 
 .wall-item-container .wall-item-content {
-  font-size: 13px;
+  font-size: 14px;
   max-width: 660px;
   word-wrap: break-word;
-  line-height: 1.4;
+  line-height: 1.36;
 }
 
 .wall-item-container .wall-item-content img {
@@ -1620,15 +1645,51 @@ section {
 ul.tabs {
   list-style-type: none;
   padding-bottom: 10px;
-  font-size: 13px;
+  font-size: 14px;
 }
 ul.tabs li {
   float: left;
   margin-left: 7px;
 }
-ul.tabs li .active {
+/*ul.tabs li .active {
   border-bottom: 1px solid #005c94;
+}*/
+ul.tabs a {
+    display: block;
+    float: left;
+    padding: 0px 10px 1px 10px;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    border: 1px solid #ECECF2;
+    font-weight: bold;
+    line-height: 1.4em;
+    color: #3e3e8c;
+    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.9);
+    background: #ececf2;
+    background: -moz-linear-gradient(top, #ffffff 0%, #ececf2 100%);
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ececf2));
+    background: -webkit-linear-gradient(top, #ffffff 0%,#ececf2 100%);
+    background: -o-linear-gradient(top, #ffffff 0%,#ececf2 100%);
+    background: -ms-linear-gradient(top, #ffffff 0%,#ececf2 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ececf2',GradientType=0 );
+    background: linear-gradient(top, #ffffff 0%,#ececf2 100%);
+}
+ul.tabs li .active, ul.tabs a:hover {
+    color: #fff;
+    text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
+    border: 1px solid #ececf2;
+    background: #364a84;
+    background: -moz-linear-gradient(top, #7b8dbb 0%, #364a84 100%);
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7b8dbb), color-stop(100%,#364a84));
+    background: -webkit-linear-gradient(top, #7b8dbb 0%,#364a84 100%);
+    background: -o-linear-gradient(top, #7b8dbb 0%,#364a84 100%);
+    background: -ms-linear-gradient(top, #7b8dbb 0%,#364a84 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7b8dbb', endColorstr='#364a84',GradientType=0 );
+    background: linear-gradient(top, #7b8dbb 0%,#364a84 100%);
+    text-decoration: none;
 }
+
 /**
  * Form fields
  */
index 7dd3797ef2c8cd10cf7d3c13d953ed76fbf513ad..5e483c5adc9cf04e0b8ca28d98991ddf4c1bc0dd 100644 (file)
@@ -6,4 +6,101 @@
  * Author: Ike <http://pirati.ca/profile/heluecht>
  * Maintainer: Ike <http://pirati.ca/profile/heluecht>
  */
+
+$a->theme_info = array();
+
+function vier_init(&$a) {
+$a->page['htmlhead'] .= <<< EOT
+<script>
+/*function insertFormatting(comment,BBcode,id) {
+
+               var tmpStr = $("#comment-edit-text-" + id).val();
+               if(tmpStr == comment) {
+                       tmpStr = "";
+                       $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
+                       $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
+                       openMenu("comment-edit-submit-wrapper-" + id);
+                       $("#comment-edit-text-" + id).val(tmpStr);
+               }
+
+       textarea = document.getElementById("comment-edit-text-" +id);
+       if (document.selection) {
+               textarea.focus();
+               selected = document.selection.createRange();
+               if (BBcode == "url"){
+                       selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
+                       } else                  
+               selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
+       } else if (textarea.selectionStart || textarea.selectionStart == "0") {
+               var start = textarea.selectionStart;
+               var end = textarea.selectionEnd;
+               if (BBcode == "url"){
+                       textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
+                       } else
+               textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
+       }
+       return true;
+}
+*/
+
+function showThread(id) {
+       $("#collapsed-comments-" + id).show()
+       $("#collapsed-comments-" + id + " .collapsed-comments").show()
+}
+function hideThread(id) {
+       $("#collapsed-comments-" + id).hide()
+       $("#collapsed-comments-" + id + " .collapsed-comments").hide()
+}
+
+/*
+function cmtBbOpen(id) {
+       $("#comment-edit-bb-" + id).show();
+}
+function cmtBbClose(id) {
+       $("#comment-edit-bb-" + id).hide();
+}
+$(document).ready(function() {
+
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
+$('.group-edit-icon').hover(
+       function() {
+               $(this).addClass('icon'); $(this).removeClass('iconspacer');},
+       function() {
+               $(this).removeClass('icon'); $(this).addClass('iconspacer');}
+       );
+
+$('.sidebar-group-element').hover(
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
+
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
+       );
+
+
+$('.savedsearchdrop').hover(
+       function() {
+               $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
+       function() {
+               $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
+       );
+
+$('.savedsearchterm').hover(
+       function() {
+               id = $(this).attr('id');
+               $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
+
+       function() {
+               id = $(this).attr('id');
+               $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
+       );
+
+});
+
+*/
+</script>
+EOT;
+}