Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> punBB-integracja, Czyli jak zintegrować punBB ze stroną.
macius
post 26.02.2005, 15:28:59
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 24.02.2005

Ostrzeżenie: (0%)
-----


Chciałbym zintegrować punBB 1.1.5 z moją stroną internetową. Czy ktoś wie jak sprawdzić czy użytkownik jest zalogowany i jakie ma uprawnienia, oraz jak wrzucić na stronę okienko logowania?
Go to the top of the page
+Quote Post
_Mateo
post 4.03.2005, 21:22:16
Post #2





Grupa: Zarejestrowani
Postów: 189
Pomógł: 0
Dołączył: 4.03.2005
Skąd: Jaworzno

Ostrzeżenie: (0%)
-----


Wydaje mi się, że trzeba wziąść jakąś część pliku login.php. Spróbój wkleić to:

  1. <form id="login" method="post" action="login.php?action=in" onsubmit="return process_form(this)">
  2. <div class="inform">
  3. <legend><?php echo $lang_login['Login legend'] ?></legend>
  4. <div class="infldset">
  5. <input type="hidden" name="form_sent" value="1" />
  6. <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
  7. <label class="conl"><strong><?php echo $lang_common['Username'] ?></strong><br /><input type="text" name="req_username" size="25" maxlength="25" tabindex="1" /><br /></label>
  8. <label class="conl"><strong><?php echo $lang_common['Password'] ?></strong><br /><input type="password" name="req_password" size="16" maxlength="16" tabindex="2" /><br /></label>
  9. <p class="clearb"><?php echo $lang_login['Login info'] ?></p>
  10. <p><a href="register.php" tabindex="4"><?php echo $lang_login['Not registered'] ?></a>&nbsp;&nbsp;
  11. <a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a></p>
  12. </div>
  13. </div>
  14. <p><input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>" tabindex="3" /></p>
  15. </form>


To jest chyba to, acz nie jestem pewien. Ale spróbować zawsze można smile.gif

EDIT:

i pamiętaj, że jak jest

  1. ]<form id="login" method="post" action="login.php?action=in" onsubmit="return process_form(this)">


musisz zmienic sciezke do pliku login(jesli masz forum w innym katalogu niz strona, na ktorej wyswieltasz formularz), czyli

  1. <form id="login" method="post" action="SCIEZKA_DO_KATALOGU_Z_FORUM/login.php?action=in" onsubmit="return process_form(this)">


Pozdro, Mateo smile.gif

Ten post edytował _Mateo 4.03.2005, 21:25:16


--------------------
Go to the top of the page
+Quote Post
macius
post 7.03.2005, 20:58:04
Post #3





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 24.02.2005

Ostrzeżenie: (0%)
-----


Dostalem odpowiedź na forum punbb.

Okienko logowania:
  1. <form id="login" method="post" action="forumroot/login.php?action=in" onsubmit="return process_form(this)">
  2. <div class="infldset">
  3. <input type="hidden" name="form_sent" value="1" /> <input type="hidden" name="redirect_url" value="index.php" />
  4. <label class="conl"><strong>Username</strong>
  5. <br />
  6. <input type="text" name="req_username" size="10" maxlength="25" tabindex="1" />
  7. <br /></label>
  8. <label class="conl"><strong>Password</strong>
  9. <br />
  10. <input type="password" name="req_password" size="10" maxlength="16" tabindex="2" /><br /></label>
  11. <a href="forumroot/register.php" tabindex="4">Not registered yet?</a><br />
  12. <a href="forumroot/login.php?action=forget" tabindex="5">Forgotten your password?</a>
  13. <br />
  14. <input type="submit" name="login" value="Login" tabindex="3" />
  15. </div>
  16. </form>

Wszystkie forumroot trzeba zamienić na adres forum.

Żeby sprawdzić czy jest gościem:
  1. <?php
  2. define('PUN_ROOT', './forums/');
  3. define('PUN_TURN_OFF_MAINT', 1);
  4. define('PUN_QUIET_VISIT', 1);
  5. require PUN_ROOT.'include/common.php';
  6.  
  7. if ($pun_user['is_guest'])
  8. exit('Sorry you must login to view this page');
  9. ?>


Sprawdzawnie działa tylko w wersja 1.2 i wyższych.
Go to the top of the page
+Quote Post
Riklaunim
post 9.03.2005, 17:37:26
Post #4





Grupa: Zarejestrowani
Postów: 640
Pomógł: 44
Dołączył: 8.02.2004

Ostrzeżenie: (0%)
-----


punbb wygląda ładnie ale jeżeli chodzi o kod to masakra sad.gif ani klas ani funkcji... integracja tego czy coś to masakra tongue.gif a szkoda.


--------------------
Biblioteki: Skrypty, CMS | Kurs PHP | Python
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 3.06.2024 - 06:32