Strona logowania

Inne  Założony przez  Wulfgorim.

Czołem, potrzebuję kogoś doświadczonego kto mi pomoże zrobić stronę logowania do forum, lecz chodzi mi o to gdy wpisze się na adres forum w wyszukiwarce, to wyskoczy strona do logania, login hasło bez możliwości przeskoczenia na forum bez zalogowania się. Jedynie osoby które się na początku zalogują przeskoczą dalej. Bardziej chodzi mi o skrypt php i co pozmieniać w silniku mybb, bo sprawą wizualną to już sobie poradzę.
Jest opcja do ustawienia aby wymusic zalogowanie użytkownika.
Cytat:w pół dnia stałeś się lepszym pytonistą niż kawenanowo kiedykolwiek programisto :3 ~ Riess 13.11.2018 16:28
Cytat:ale z tą nazwą to fyeem ma racje  ~ Divir 29.07.2019 16:08
spróbuj tego https://community.mybb.com/thread-117646...=login+box
Nie do końca o to mi chodziło
(24.11.2016, 19:16)vabos napisał(a): spróbuj tego https://community.mybb.com/thread-117646...=login+box

Chodzi mi aby quest wchodząc na adres forum był z góry przekierowywany na adres http://anohax.cf/member.php?action=login a gdy sam fizycznie spróbuje wejść na forum, dopisując index.php to wywali go ponownie pod ten link.

Myślałem aby się pobawić .htaccess może : /
To co pisze @"Fyeem" + kwestia dostosowania styli i szablonów tak naprawdę ci wystarczy.

Tutaj masz podobny przykład: http://imm.xaa.pl
Kodowanie, edycja i tworzenie styli, for, stron, poszczególnych elementów - polecane szczególnie dla osób, które nie potrafią sobie poradzić z problemami.
Teraz to coś narąbałem w .htaccess'sie i mi non stop z głównej domeny na logowanie przenosi pomimo że .htaccess usunąłem xD RIP me

//
Dobra naprawiłem.

(24.11.2016, 19:56)Divir napisał(a): To co pisze @"Fyeem" + kwestia dostosowania styli i szablonów tak naprawdę ci wystarczy.

Tutaj masz podobny przykład: http://imm.xaa.pl
No tak trochę lipa bo index.php jest dzielony z welcome_block_quest jak i resztą, także nawet jak wywalę wszystko z error_nopermission i wstawię swoje logowanie, to ono się wyświetla w tym całym indexie. Także przykład który mi pokazałeś musi być inaczej zrobiony trochę. Z użyciem .htaccess na pewno, chyba że swoje klasy dopisał, to co innego.
Powyższy przykład sam tworzyłem, sam html i css jest tutaj akurat.

Moje szablony (to co cię powinno interesować) wyglądają tak
header

<header>

<div id="panel">
<div class="upper">
<div class="wrapper">
   <div id="logo">
       <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
                       </div>
                       
                       <div id="alerts">
                           {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            {$pending_joinrequests}
            {$awaitingusers}
        </div>
       
{$welcomeblock}
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
</div>

</header>

header_welcomeblock_guest


</div>
</div>

<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 style="width: 100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
<tr>
<td class="thead" colspan="2"><span style="font-weight: bold">{$lang->login}</span></td>
</tr>
<tr>
<td class="trow1" style="width: 25%"><span style="font-weight: bold">{$login_username}</span></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"><span style="font-weight: bold">{$lang->password}</span></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">
<section align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></section>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
$("#quick_login input[name='url']").val($(location).attr('href'));
</script>

error

<html>
<head>
<title>{$title}</title>
{$headerinclude}
</head>
<body>
{$header}

{$error}
{$footer}
</body>
</html>

error_nopermission

<div class="red_alert alert">
   {$lang->error_nopermission_guest_1}
   <ol>
       <li>{$lang->error_nopermission_guest_2}</li>
       <li>{$lang->error_nopermission_guest_3}</li>
       <li>{$lang->error_nopermission_guest_4}</li>
       <li>{$lang->error_nopermission_guest_5}</li>
   </ol>
</div>

<div id="login">
   <form action="member.php" method="post">
       <input type="hidden" name="action" value="do_login">
       <input type="hidden" name="url" value="{$redirect_url}">
       
       <input type="text" class="textbox" name="username" placeholder="{$lang_username}" tabindex="1"><br>
       <input type="password" class="textbox" name="password" placeholder="{$lang->password}" tabindex="2"><br>
       <input type="submit" class="button" value="{$lang->login}" tabindex="3">
       <a href="member.php?action=register"><input type="button" class="button" role="register" value="{$lang->need_reg}"></a><br>
       <a href="member.php?action=lostpw"><input type="button" class="button" role="forgotten" value="{$lang->forgot_password}"></a><br>

   </form>
</div>
<!-- fix for shitty templates -->
<style>
   #navigation { display: none; }
   #content > .wrapper {
       background: transparent!important;
       width: 35%;
   }
</style>

Wzorując się na tym możesz takie coś uzyskać. Wszystko jest kwestią odpowiedniego ułożenia kodu w szablonach + ewentualnych fixach w css lub js jeśli trzeba, ale obejdzie się bez tego.
Kodowanie, edycja i tworzenie styli, for, stron, poszczególnych elementów - polecane szczególnie dla osób, które nie potrafią sobie poradzić z problemami.
(24.11.2016, 21:01)Divir napisał(a): Powyższy przykład sam tworzyłem, sam html i css jest tutaj akurat.

Moje szablony (to co cię powinno interesować) wyglądają tak
header

<header>

<div id="panel">
<div class="upper">
<div class="wrapper">
  <div id="logo">
      <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
                      </div>
                     
                      <div id="alerts">
                          {$pm_notice}
           {$bannedwarning}
           {$bbclosedwarning}
           {$unreadreports}
           {$pending_joinrequests}
           {$awaitingusers}
       </div>
       
{$welcomeblock}
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
</div>

</header>

header_welcomeblock_guest


</div>
</div>

<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 style="width: 100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
<tr>
<td class="thead" colspan="2"><span style="font-weight: bold">{$lang->login}</span></td>
</tr>
<tr>
<td class="trow1" style="width: 25%"><span style="font-weight: bold">{$login_username}</span></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"><span style="font-weight: bold">{$lang->password}</span></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"> </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">
<section align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></section>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
$("#quick_login input[name='url']").val($(location).attr('href'));
</script>

error

<html>
<head>
<title>{$title}</title>
{$headerinclude}
</head>
<body>
{$header}

{$error}
{$footer}
</body>
</html>

error_nopermission

<div class="red_alert alert">
  {$lang->error_nopermission_guest_1}
  <ol>
      <li>{$lang->error_nopermission_guest_2}</li>
      <li>{$lang->error_nopermission_guest_3}</li>
      <li>{$lang->error_nopermission_guest_4}</li>
      <li>{$lang->error_nopermission_guest_5}</li>
  </ol>
</div>

<div id="login">
  <form action="member.php" method="post">
      <input type="hidden" name="action" value="do_login">
      <input type="hidden" name="url" value="{$redirect_url}">
     
      <input type="text" class="textbox" name="username" placeholder="{$lang_username}" tabindex="1"><br>
      <input type="password" class="textbox" name="password" placeholder="{$lang->password}" tabindex="2"><br>
      <input type="submit" class="button" value="{$lang->login}" tabindex="3">
      <a href="member.php?action=register"><input type="button" class="button" role="register" value="{$lang->need_reg}"></a><br>
      <a href="member.php?action=lostpw"><input type="button" class="button" role="forgotten" value="{$lang->forgot_password}"></a><br>

  </form>
</div>
<!-- fix for shitty templates -->
<style>
  #navigation { display: none; }
  #content > .wrapper {
      background: transparent!important;
      width: 35%;
  }
</style>

Wzorując się na tym możesz takie coś uzyskać. Wszystko jest kwestią odpowiedniego ułożenia kodu w szablonach + ewentualnych fixach w css lub js jeśli trzeba, ale obejdzie się bez tego.
Dzięki, jutro coś ogarnę, bo dzisiaj już odlatuje. : P

(24.11.2016, 21:01)Divir napisał(a): Powyższy przykład sam tworzyłem, sam html i css jest tutaj akurat.

Moje szablony (to co cię powinno interesować) wyglądają tak
header

<header>

<div id="panel">
<div class="upper">
<div class="wrapper">
   <div id="logo">
       <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
                       </div>
                       
                       <div id="alerts">
                           {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            {$pending_joinrequests}
            {$awaitingusers}
        </div>
       
{$welcomeblock}
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
<!-- </div> in header_welcomeblock_member and header_welcomeblock_guest -->
</div>

</header>

header_welcomeblock_guest


</div>
</div>

<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 style="width: 100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
<tr>
<td class="thead" colspan="2"><span style="font-weight: bold">{$lang->login}</span></td>
</tr>
<tr>
<td class="trow1" style="width: 25%"><span style="font-weight: bold">{$login_username}</span></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"><span style="font-weight: bold">{$lang->password}</span></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">
<section align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></section>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
$("#quick_login input[name='url']").val($(location).attr('href'));
</script>

error

<html>
<head>
<title>{$title}</title>
{$headerinclude}
</head>
<body>
{$header}

{$error}
{$footer}
</body>
</html>

error_nopermission

<div class="red_alert alert">
   {$lang->error_nopermission_guest_1}
   <ol>
       <li>{$lang->error_nopermission_guest_2}</li>
       <li>{$lang->error_nopermission_guest_3}</li>
       <li>{$lang->error_nopermission_guest_4}</li>
       <li>{$lang->error_nopermission_guest_5}</li>
   </ol>
</div>

<div id="login">
   <form action="member.php" method="post">
       <input type="hidden" name="action" value="do_login">
       <input type="hidden" name="url" value="{$redirect_url}">
       
       <input type="text" class="textbox" name="username" placeholder="{$lang_username}" tabindex="1"><br>
       <input type="password" class="textbox" name="password" placeholder="{$lang->password}" tabindex="2"><br>
       <input type="submit" class="button" value="{$lang->login}" tabindex="3">
       <a href="member.php?action=register"><input type="button" class="button" role="register" value="{$lang->need_reg}"></a><br>
       <a href="member.php?action=lostpw"><input type="button" class="button" role="forgotten" value="{$lang->forgot_password}"></a><br>

   </form>
</div>
<!-- fix for shitty templates -->
<style>
   #navigation { display: none; }
   #content > .wrapper {
       background: transparent!important;
       width: 35%;
   }
</style>

Wzorując się na tym możesz takie coś uzyskać. Wszystko jest kwestią odpowiedniego ułożenia kodu w szablonach + ewentualnych fixach w css lub js jeśli trzeba, ale obejdzie się bez tego.
http://www.anohax.cf/ Dzięki ;)
Ardex napisał 24.11.2016, 22:31:
Pamiętaj aby oznaczać temat jako rozwiązany, wybierając najlepsze posty



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

1 gości