diff options
-rw-r--r-- | include/nav.php | 24 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | mod/abook.php | 1 | ||||
-rw-r--r-- | mod/acl.php | 21 | ||||
-rw-r--r-- | mod/contacts.php | 1 | ||||
-rw-r--r-- | mod/message.php | 1 | ||||
-rw-r--r-- | mod/network.php | 2 | ||||
-rwxr-xr-x | mod/poke.php | 1 | ||||
-rw-r--r-- | mod/profile.php | 2 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/php/theme_init.php | 1 | ||||
-rw-r--r-- | view/theme/duepuntozero/css/style.css | 35 | ||||
-rw-r--r-- | view/tpl/nav.tpl | 23 |
13 files changed, 90 insertions, 28 deletions
diff --git a/include/nav.php b/include/nav.php index c3ef7f52d..a71f97457 100644 --- a/include/nav.php +++ b/include/nav.php @@ -13,6 +13,25 @@ function nav(&$a) { if(!(x($a->page,'nav'))) $a->page['nav'] = ''; + $base = $a->get_baseurl($ssl_state); + $a->page['htmlhead'] .= <<< EOT + +<script>$(document).ready(function() { + var a; + a = $("#nav-search-text").autocomplete({ + serviceUrl: '$base/acl', + minChars: 2, + width: 250, + }); + a.setOptions({ params: { type: 'x' }}); + +}); + +</script> +EOT; + + + /** * Placeholder div for popup panel */ @@ -53,6 +72,7 @@ function nav(&$a) { // user menu $nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('Status'), "", t('Your posts and conversations')); $nav['usermenu'][] = Array('profile/' . $channel['channel_address']. '?tab=profile', t('Profile'), "", t('Your profile page')); + $nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos')); $nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events')); @@ -153,8 +173,8 @@ function nav(&$a) { $banner = get_config('system','banner'); if($banner === false) - $banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/fred-32.png" alt="logo" /></a>'; - +// $banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/fred-32.png" alt="logo" /></a>'; + $banner = ''; $tpl = get_markup_template('nav.tpl'); @@ -384,12 +384,14 @@ if($a->is_mobile || $a->is_tablet) { else { $link = $a->get_baseurl() . '/toggle_mobile?off=1&address=' . curPageURL(); } - $a->page['footer'] = replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array( + $a->page['footer'] .= replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array( '$toggle_link' => $link, '$toggle_text' => t('toggle mobile') )); } +$a->page['footer'] .= '<div id="powered-by">' . t("Friendica Red") . '</div>'; + $page = $a->page; $profile = $a->profile; diff --git a/mod/abook.php b/mod/abook.php index 7aa4e9e05..5ef43a653 100644 --- a/mod/abook.php +++ b/mod/abook.php @@ -45,7 +45,6 @@ function abook_init(&$a) { $base = $a->get_baseurl(); - $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>'; $a->page['htmlhead'] .= <<< EOT <script>$(document).ready(function() { diff --git a/mod/acl.php b/mod/acl.php index f3e46efa5..51aa7651b 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -4,8 +4,6 @@ require_once("include/acl_selectors.php"); function acl_init(&$a){ - if(!local_user()) - return ""; $start = (x($_REQUEST,'start')?$_REQUEST['start']:0); @@ -22,12 +20,19 @@ function acl_init(&$a){ $search = $_REQUEST['query']; } +logger("acl: $search"); + + if(! (local_user() || $type == 'x')) + return ""; + + if ($search!=""){ $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'"; $sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')"; + $sql_extra3 = "AND ( xchan_name like '%%" . dbesc($search) . "%%' )"; } else { - $sql_extra = $sql_extra2 = ""; + $sql_extra = $sql_extra2 = $sql_extra3 = ""; } // count groups and contacts @@ -142,11 +147,19 @@ function acl_init(&$a){ intval(local_user()) ); } + elseif($type == 'x') { + $r = q("SELECT xchan_name as id, xchan_name as name, xchan_photo_s as micro, xchan_profile as url from xchan + where 1 + $sql_extra3 + ORDER BY `xchan_name` ASC ", + intval(local_user()) + ); + } else $r = array(); - if($type == 'm' || $type == 'a') { + if($type == 'm' || $type == 'a' || $type == 'x') { $x = array(); $x['query'] = $search; $x['photos'] = array(); diff --git a/mod/contacts.php b/mod/contacts.php index 908c348f4..09a4e6c97 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -45,7 +45,6 @@ function contacts_init(&$a) { $base = $a->get_baseurl(); - $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>'; $a->page['htmlhead'] .= <<< EOT <script>$(document).ready(function() { diff --git a/mod/message.php b/mod/message.php index 7ebd4567a..25b3b2813 100644 --- a/mod/message.php +++ b/mod/message.php @@ -18,7 +18,6 @@ function message_init(&$a) { )); $base = $a->get_baseurl(); - $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>'; $a->page['htmlhead'] .= <<< EOT <script>$(document).ready(function() { diff --git a/mod/network.php b/mod/network.php index b431c67a1..8793aa51a 100644 --- a/mod/network.php +++ b/mod/network.php @@ -102,8 +102,6 @@ function network_init(&$a) { $base = $a->get_baseurl(); - $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>'; - $a->page['htmlhead'] .= <<< EOT <script>$(document).ready(function() { diff --git a/mod/poke.php b/mod/poke.php index 739690386..163ef0cd8 100755 --- a/mod/poke.php +++ b/mod/poke.php @@ -156,7 +156,6 @@ function poke_content(&$a) { $base = $a->get_baseurl(); - $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>'; $a->page['htmlhead'] .= <<< EOT <script>$(document).ready(function() { diff --git a/mod/profile.php b/mod/profile.php index 6680636a7..12b494cfe 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -127,7 +127,7 @@ function profile_content(&$a, $update = 0) { if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); - $o.=profile_tabs($a, $is_owner, $a->profile['nickname']); +// $o.=profile_tabs($a, $is_owner, $a->profile['nickname']); if($tab === 'profile') { diff --git a/version.inc b/version.inc index f16d00cfe..c99f6bc96 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-10-23.116 +2012-10-24.117 diff --git a/view/php/theme_init.php b/view/php/theme_init.php index cadc9e9c8..4703022ec 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -17,6 +17,7 @@ head_add_js('js/fk.autocomplete.js'); head_add_js('library/fancybox/jquery.fancybox-1.3.4.pack.js'); head_add_js('library/jquery.timeago.js'); head_add_js('library/jquery.divgrow/jquery.divgrow-1.3.1.js'); +head_add_js('library/jquery_ac/friendica.complete.js'); head_add_js('library/tiptip/jquery.tipTip.minified.js'); head_add_js('library/jgrowl/jquery.jgrowl_minimized.js'); head_add_js('library/tinymce/jscripts/tiny_mce/tiny_mce_src.js'); diff --git a/view/theme/duepuntozero/css/style.css b/view/theme/duepuntozero/css/style.css index 5c41e0b4b..ee13bbeb6 100644 --- a/view/theme/duepuntozero/css/style.css +++ b/view/theme/duepuntozero/css/style.css @@ -243,7 +243,16 @@ nav #nav-link-wrapper .nav-link { footer { text-align: right; padding-bottom: 1em; - padding-right: 3em; + padding-right: 3em; +} + +#powered-by { + position: fixed; + bottom: 1px; + left: 15px; + opacity: 0.3; + filter:alpha(opacity=30); + } .birthday-today, .event-today { @@ -2366,6 +2375,24 @@ aside input[type='text'] { margin-bottom: 25px; } +#nav-searchbar { + float: right; + margin-top: 3px; +} + +#nav-search-text:hover { + background-color: #FFFFFF; +} + +#nav-search-text { + border-radius: 14px; + background-color: #AAAAAA; +} + +#nav-user-linkmenu img { + border-radius: 3px; +} + .location-label, .gender-label, .marital-label, .homepage-label { float: left; text-align: right; @@ -3362,7 +3389,7 @@ nav .nav-menu { border-bottom: 3px solid #888888; } nav .nav-menu.selected { - border-bottom: 3px solid #FF8888; + border-bottom: 4px solid #000000; } nav .nav-notify { display: none; @@ -3520,8 +3547,8 @@ ul.menu-popup { padding: 0px; list-style: none; z-index: 100000; - top: 90px; - left: 400px; +/* top: 90px; */ +/* left: 400px; */ } #nav-notifications-menu { width: 320px; diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index bd0fc2f5a..d36988281 100644 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -54,29 +54,23 @@ <li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a> <ul id="nav-site-menu" class="menu-popup"> + {{ 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.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }} + {{ if $nav.profiles }}<li><a class="$nav.profiles.2" href="$nav.profiles.0" title="$nav.profiles.3">$nav.profiles.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 }} {{ if $nav.logout }}<li><a class="menu-sep $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a></li>{{ endif }} {{ if $nav.login }}<li><a class="$nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a><li>{{ endif }} </ul> </li> - + {{ if $nav.help }} <li id="nav-help-link" class="nav-menu $sel.help"> <a class="$nav.help.2" target="friendika-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a> </li> {{ endif }} - <li id="nav-search-link" class="nav-menu $sel.search"> - <a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a> - </li> - <li id="nav-directory-link" class="nav-menu $sel.directory"> - <a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a> - </li> - {{ if $nav.apps }} <li id="nav-apps-link" class="nav-menu $sel.apps"> <a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a> @@ -87,8 +81,19 @@ </ul> </li> {{ endif }} + + <li id="nav-searchbar"> + <form method="get" action="search"> + <input id="nav-search-text" type="text" value="" placeholder="$nav.search.1" name="search" title="$nav.search.3" onclick="this.submit();" /> + </form> + </li> + + + + </ul> + </nav> <ul id="nav-notifications-template" style="display:none;" rel="template"> <li><a href="{0}"><img src="{1}">{2} <span class="notif-when">{3}</span></a></li> |