Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Problem] Integracja logowania phpBB2 przemo na stronie., problem
fuqet
post
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 12.12.2008

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


Witam.
mam problem z integracją logowania phpbb na mojej stronie.

Otóż skorzystałem z waszego skryptu i niestety nie wszystko mi działa.

Logowanie na stronie działa, wpisuje login i pw loguje mnie na forum, jednak gdy wejde na strone to jestem wylogowany i tak za każdym razem, strona tak jakby traci sesje. 

Mam nadzieję że da się temu zaradzić.

O to mój początkowy kod:

Kod
<?php

$folder = "/home/clanscri/domains/clanscripts.pl/public_html/";

define('IN_PHPBB', true);

$phpbb_root_path = $folder . 'forum/';

include($phpbb_root_path . 'extension.inc');

include($phpbb_root_path . 'common.' . $phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);

init_userprefs($userdata);

if (!$userdata['session_logged_in']) $userdata['user_level'] = "0";

$redir = '.././' .

str_replace ($folder, "", $_SERVER['DOCUMENT_ROOT'] . $_SERVER['REQUEST_URI']);

?>



Logowanie:

Kod
<?php

if ($userdata['user_id'] > 1)

{

  echo '<span style="font-weight: bold;">' . $userdata['username'] . '</span><br/>

  <a href="http://strona.pl/forum/privmsg.php?folder=inbox">

  Prywatne wiadomości: ' . $userdata['user_unread_privmsg'] . '</a><br/>

  <a href="http://strona.pl/forum/login.php?logout=true">Wyloguj</a>';

}

else

{

  echo '<form action="http://www.forum.clanscripts.pl/login.php" method="post">

  <input type="text" name="username" value="" tabindex="1" />

  <input type="password" name="password" tabindex="2" />

  <br/>

  <input type="hidden" name="autologin" value="on"/>

  <input type="hidden" name="login" value="Zaloguj"/>

  <input type="hidden" name="redirect" value="' . $redir . '"/>

  <input type="submit" name="login" value="Login" tabindex="3" />

  </form><br/>

  <a href="http://strona.pl/forum/profile.php?mode=register">Rejestracja</a>';

}

?>


Dodam ze forum znajduje się w folderze głownym w katalogu /forum - subdomena to forum.clanscripts.pl

Pozdrawiam fuqET.

Ten post edytował fuqet 12.12.2008, 14:27:17
Go to the top of the page
+Quote Post

Posty w temacie


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 Aktualny czas: 21.08.2025 - 04:18