Rozwijany panel uzytkownika

Założony przez  FanaticRPS.

wersja skryptu MyBB: 1.6.9
adres forum: www.nawlasnyuzytek.cba.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):

Witam, jak zrobić rozwijany panel użytkownika? np w topbarze jest mój nick, i chciałvym aby po rozwinięciu jego były określone funkcje, nie znalazłem tutaj takiego tematu, jest ktoś w stanie mi pomóc?
Spróbuj wykorzystać ten kod :
<span id="usercp_button"><a href="#" class="loginbutton 2"><span>Profil<div class="usercp_button_arrow"></div></span></a></span>

<
div id="usercp_menu" class="loginbutton_menu">
    <
div class="usercp_menu">
<
div class="usercpmenu_clock">
{
$lang->welcome_current_time}
<
br class="clearboth" /><br />
        
Welcome back user!</div>
<
br class="clearboth" />
<
div class="usercpmenu_leftblock left"> <a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a><strong>{$modcplink}{$admincplink} </strong> <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a><br />
                </
div><div class="usercpmenu_rightblock left">
                <
a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a>  <a href="#">{$mybb->user['pms_unread']} unread PMs</a><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a></div>
  </
div></div

Jest to kod na rozwijany panel użytkownika ze stylu Luminos_By_DjHehe może uda Ci się go wykorzystać :)
samym kodem szablonu coś zdziałam? do tego chyba trzeba wykorzystać js. a się na tym nie znam
Otwórz szablon header_welcomeblock_member i w nim zamień cały kod na ten:
<div id="menu_toggle" class="show_hide" rel="#main_menu"><a href="#"><span><small>{$lang->welcome_usercp}</small></span></a></div>

<div id="main_menu">
<a href="{$mybb->settings['bburl']}/usercp.php">Panel użytkownika</a><br />
<a href="{$mybb->settings['bburl']}/usercp.php?action=profile">Edytuj profil</a><br />
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar">Edytuj awatar</a><br />
<a href="{$mybb->settings['bburl']}/usercp.php?action=editsig">Edytuj sygnaturę</a><br />
<a href="{$mybb->settings['bburl']}/usercp.php?action=options">Edytuj ustawienia</a>
</div>

Potem znowu otwierasz szablon headerinclude i gdzieś na końcu dodajesz ten kod:
<script src="{$mybb->settings['bburl']}/jscripts/hide.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
    jQuery('.show_hide').showHide({            
         speed: 250,  // speed you want the toggle to happen    
         easing: '',  // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
         changeText: 0, // if you dont want the button text to change, set this to 0
         showText: ' ',// the button text to show when a div is closed
         hideText: ' ' // the button text to show when a div is open
                      
     });
});
</script>

A do CSS wklejasz to:
#main_menu {
     position: relative;
     top: 15px;
     right: 20px;
     z-index: 100;
     display: none;
}

A i jeszcze pobierasz TEN ZAŁĄCZNIK i dodajesz go do głównego katalogu jscipts w twoim forum.
Cytat:It's all about the details.
---------------
PW tylko forum, nie mejl.


@dorman panel się nie rozwija, wszystko dobrze dodane, plik .js wrzucony
@FanaticRPS może źle coś wpisałeś bo firefox kopiuje sformatowany tekst ,a nie oryginalny :D może pomoże przepisz to a nie kopiuj
mam chroma, wszystko dobrze wkleiłem, mam notepada++. Przepisz? no błągam, do jutra bym pisał
Zamień:
<script src="{$mybb->settings['bburl']}/jscripts/hide.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
     jQuery('.show_hide').showHide({            
          speed: 250,  // speed you want the toggle to happen    
          easing: '',  // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
          changeText: 0, // if you dont want the button text to change, set this to 0
          showText: ' ',// the button text to show when a div is closed
          hideText: ' ' // the button text to show when a div is open
                      
      });
});
</script>

na:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="{$mybb->settings['bburl']}/jscripts/hide.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
    jQuery('.show_hide').showHide({            
         speed: 250,  // speed you want the toggle to happen    
         easing: '',  // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
         changeText: 0, // if you dont want the button text to change, set this to 0
         showText: ' ',// the button text to show when a div is closed
         hideText: ' ' // the button text to show when a div is open
                      
     });
});
</script>

@EDIT
A jeżeli nie podziała, to sprawdź w szablonie headerinclude, czy masz taki kod:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
A jeżeli nie, to dodaj go po:
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>

I oczywiście jak nie podziała to tak jak teraz mówiłem i zastosuj się do wersji tego kodu dodając go na sam dół:
<script src="{$mybb->settings['bburl']}/jscripts/hide.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
     jQuery('.show_hide').showHide({            
          speed: 250,  // speed you want the toggle to happen    
          easing: '',  // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
          changeText: 0, // if you dont want the button text to change, set this to 0
          showText: ' ',// the button text to show when a div is closed
          hideText: ' ' // the button text to show when a div is open
                      
      });
});
</script>
Cytat:It's all about the details.
---------------
PW tylko forum, nie mejl.


@dorman o bardzo fajnie działa ;) a wiesz może jak dodać obrazki obok nicku na rozwijanie (strzałki góra/dół) ?



Użytkownicy przeglądający ten wątek:

1 gości