Webboard

Pełna wersja: Przeniesienie buttona logowania
Aktualnie przeglądasz uproszczoną wersję forum. Kliknij tutaj, by zobaczyć wersję z pełnym formatowaniem.
wersja skryptu MyBB: 1.8.x
adres forum: LmTeam.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):

Witam, otóż, chciałbym przenieść przyciski "zaloguj" "Zarejestruj sie" do menu górnego z tego miejsca:
http://prntscr.com/6n84z9
Próbowałem dodać jako nowy button i działać działało, ale po zalogowaniu nie znikało.

Da rade to jakoś ustawić? ;p
Wulfgorim napisał(a):Próbowałem dodać jako nowy button i działać działało, ale po zalogowaniu nie znikało.
Dlatego, że użyłeś najprawdopodobniej w header, zamiast header_welcomeblock_*.
Podaj tutaj zawartość szablonu header_welcomeblock_guest.
Kod:
<div>
  
<a class="btn" href="http://lmteam.pl/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;"><font color="white"><i style="font-size: 16px;" class="fa fa-check-circle-o fa-fw"></i> Zaloguj Się</font></a>
  
<a class="btn" href="http://lmteam.pl/member.php?action=register">
<font color="white"><i style="font-size: 16px;" class="fa fa-plus-circle fa-fw"></i>  Zarejestruj się!</font></a>
  
</div>


  <br />  

                <div class="modal" id="quick_login" style="display: none;">
                    <form method="post" action="{$mybb->settings['bburl']}/member.php">
                        <input name="action" type="hidden" value="do_login" />
                        <input name="url" type="hidden" value="" />
                        <input name="quick_login" type="hidden" value="1" />
                        <table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
                            <tr>
                                <td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
                            </tr>
                            <tr>
                                <td class="trow1" width="25%"><strong>{$login_username}</strong></td>
                                <td class="trow1"><input name="quick_username" id="quick_login_username" type="text" value="" class="textbox initial_focus" /></td>
                            </tr>
                            <tr>
                                <td class="trow2"><strong>{$lang->password}</strong></td>
                                <td class="trow2">
                                    <input name="quick_password" id="quick_login_password" type="password" value="" class="textbox" /> <a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password">{$lang->lost_password}</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="trow1">&nbsp;</td>
                                <td class="trow1 remember_me">
                                    <input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
                                    <label for="quick_login_remember">{$lang->remember_me}</label>
                                </td>
                            </tr>
                            <tr>
                                <td class="trow2" colspan="2">
                                    <div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
                <script type="text/javascript">
                    $("#quick_login input[name='url']").val($(location).attr('href'));
                </script>

:)
Do global.css (np.) dodaj:
Kod PHP:
.positionButtons {
    
positionabsolute;
    
top10px;
    
right200px;

+ szablon:
Kod PHP:
<div class="positionButtons">
  
<
class="btn" href="http://lmteam.pl/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;"><font color="white"><i style="font-size: 16px;" class="fa fa-check-circle-o fa-fw"></iZaloguj Się</font></a>
  
<
class="btn" href="http://lmteam.pl/member.php?action=register">
<
font color="white"><i style="font-size: 16px;" class="fa fa-plus-circle fa-fw"></i>  Zarejestruj się!</font></a>
  
</
div


  <
br />  

                <
div class="modal" id="quick_login" style="display: none;">
                    <
form method="post" action="{$mybb->settings['bburl']}/member.php">
                        <
input name="action" type="hidden" value="do_login" />
                        <
input name="url" type="hidden" value="" />
                        <
input name="quick_login" type="hidden" value="1" />
                        <
table width="100%" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}border="0" class="tborder">
                            <
tr>
                                <
td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
                            </
tr>
                            <
tr>
                                <
td class="trow1" width="25%"><strong>{$login_username}</strong></td>
                                <
td class="trow1"><input name="quick_username" id="quick_login_username" type="text" value="" class="textbox initial_focus" /></td>
                            </
tr>
                            <
tr>
                                <
td class="trow2"><strong>{$lang->password}</strong></td>
                                <
td class="trow2">
                                    <
input name="quick_password" id="quick_login_password" type="password" value="" class="textbox" /> <a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password">{$lang->lost_password}</a>
                                </
td>
                            </
tr>
                            <
tr>
                                <
td class="trow1">&nbsp;</td>
                                <
td class="trow1 remember_me">
                                    <
input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
                                    <
label for="quick_login_remember">{$lang->remember_me}</label>
                                </
td>
                            </
tr>
                            <
tr>
                                <
td class="trow2" colspan="2">
                                    <
div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}/></div>
                                </
td>
                            </
tr>
                        </
table>
                    </
form>
                </
div>
                <
script type="text/javascript">
                    $(
"#quick_login input[name='url']").val($(location).attr('href'));
                </
script
Hm, a da się zrobić to tak, aby wsadzić te buttony w tego diva http://prntscr.com/6ptl8o w sesnie tak, aby po wylogowaniu przycisk wyloguj zniknął ale aby ten przycisk był w tym divie u góry.

Bo jak ustawiam ten przycisk za pomocą css to ustawiłem "pod siebie" ale za to inni uzytkownicy mieli ten przycisk w różnych miejscach.