Login verlinkung

delete
Hi, eine Frage:

Wenn ich mich hier bei your-wbb.de auf der Startseite (Portal) anmelde, werde ich automatisch auf die board.php verlinkt. Ich möchte das bei mir genauso machen, d.h. wenn man sich auf der Index.php anmeldet kommt man automatisch auf die board.php.

Wie ist das möglich? Hier der code aus der index.php (ich denke die Stelle müsste es sein):

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
<tr>
    <td class="tablea"><table cellpadding="0" cellspacing="5" align="center" class="tableb_fc">
     <tr>
      <td><span class="smallfont">{$lang->items['LANG_START_USERNAME']}</span></td>
      <td><span class="smallfont"><input type="text" name="l_username" maxlength="50" size="20" class="input" tabindex="1" />&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
      <td><span class="smallfont">{$lang->items['LANG_START_PASSWORD']} (<a href="forgotpw.php{$SID_ARG_1ST}">{$lang->items['LANG_START_LOSTPW']}</a>):</span></td>
      <td><span class="smallfont"><input type="password" name="l_password" maxlength="30" size="20" class="input" tabindex="2" />&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
	  <if($allowloginencryption==1)><then>
      <td><span class="smallfont"><label for="checkbox1">{$lang->items['LANG_GLOBAL_ENCRYPT_TRANSFER']}</label></span></td>
      <td><span class="smallfont"><input type="checkbox" id="checkbox1" name="activateencryption" onclick="activate_loginencryption(document.loginform);" />&nbsp;&nbsp;&nbsp;&nbsp;</span></td></then></if>
      <td><input type="submit" value="{$lang->items['LANG_START_LOGIN']}" class="input" tabindex="3" /></td>
     </tr>
    </table></td>
   </tr>
  </table></form>
  <if($allowloginencryption==1)><then>
  <script type="text/javascript">
   <!--
    activate_loginencryption(document.loginform);
   //-->
  </script></then></if>
 </then>
</if>
chrime
Der Code ist überflüssig, du musst das in der login.php ändern, schau mal kurz vor dem ende, oder suche in der datei nach .php dann findest du den passenden eintrag!
delete
Danke für den Tipp, aber wenn ich statt index.php board.php eingebe, funktioniert die Verlinkung nicht. Keine Ahnung wieso.


php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
<?php
$filename 'login.php';
require('./global.php');
$lang->load('USERCP');

if ($wbbuserdata['userid']) access_error();

if (isset($_POST['send'])) {
    $result getwbbuserdata($_POST['l_username'], "username");
    if ($allowloginencryption == && $_POST['crypted'] == "true" && $result['sha1_password']) {
        $authentificationcode sha1(sha1($session['authentificationcode']).$result['sha1_password']);
        if (!$result['userid'] || $authentificationcode != $_POST['authentificationcode']) {
            unset($result);
            unset($authentificationcode);
        }
        else $wbb_userpassword $result['password'];
    }
    else {
        $wbb_userpassword md5($_POST['l_password']);
        if (!$result['userid'] || $result['password'] != $wbb_userpassword) unset($result);
        else {
            if (!$result['sha1_password']) $db->unbuffered_query("UPDATE bb".$n."_users SET sha1_password='".sha1($_POST['l_password'])."' WHERE userid='$result[userid]'");
        }
    }
    
    if (isSet($result['userid']) && $result['userid']) {
        $wbb_username htmlconverter($result['username']);
        if ($result['usecookies'] == 1) {
            bbcookie("userid""$result[userid]"time() + 3600 24 365);
            bbcookie("userpassword""$wbb_userpassword"time() + 3600 24 365);
        }
        $db->unbuffered_query("DELETE FROM bb".$n."_sessions WHERE userid = '$result[userid]'"1);
        $db->unbuffered_query("UPDATE bb".$n."_sessions SET userid = '$result[userid]', authentificationcode='', styleid='".$result['styleid']."' WHERE sessionhash = '$sid'"1); 
        unset($session['authentificationcode']);
        
        /** convert url -> remove session hash **/
        function convert_url($url$hash) {
             return preg_replace("/[0-9a-z]{32}/", (($hash != '') ? ($hash) : ("")), $url);
        } 
                
        if (isset($_POST['url']) && $_POST['url'] && strstr($_POST['url'], "?")) $url convert_url($_POST['url'], $session['hash']);
        else $url "index.php" $SID_ARG_1ST;
        
        redirect($lang->get("LANG_USERCP_LOGIN_REDIRECT", array('$wbb_username' => $wbb_username)), $url);
        exit;
    }
    else {
        $db->unbuffered_query("UPDATE bb".$n."_sessions SET authentificationcode='' WHERE sessionhash = '$sid'"1);
        unset($session['authentificationcode']);
        error($lang->items['LANG_USERCP_LOGIN_ERROR']);
    }
}
else {
    eval("\$tpl->output(\"".$tpl->get("login")."\");"); 
}
?>
chrime
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
<?php
$filename = 'login.php';
require('./global.php');
$lang->load('USERCP');

if ($wbbuserdata['userid']) access_error();

if (isset($_POST['send'])) {
    $result = getwbbuserdata($_POST['l_username'], "username");
    if ($allowloginencryption == 1 && $_POST['crypted'] == "true" && $result['sha1_password']) {
        $authentificationcode = sha1(sha1($session['authentificationcode']).$result['sha1_password']);
        if (!$result['userid'] || $authentificationcode != $_POST['authentificationcode']) {
            unset($result);
            unset($authentificationcode);
        }
        else $wbb_userpassword = $result['password'];
    }
    else {
        $wbb_userpassword = md5($_POST['l_password']);
        if (!$result['userid'] || $result['password'] != $wbb_userpassword) unset($result);
        else {
            if (!$result['sha1_password']) $db->unbuffered_query("UPDATE bb".$n."_users SET sha1_password='".sha1($_POST['l_password'])."' WHERE userid='$result[userid]'");
        }
    }
    
    if (isSet($result['userid']) && $result['userid']) {
        $wbb_username = htmlconverter($result['username']);
        if ($result['usecookies'] == 1) {
            bbcookie("userid", "$result[userid]", time() + 3600 * 24 * 365);
            bbcookie("userpassword", "$wbb_userpassword", time() + 3600 * 24 * 365);
        }
        $db->unbuffered_query("DELETE FROM bb".$n."_sessions WHERE userid = '$result[userid]'", 1);
        $db->unbuffered_query("UPDATE bb".$n."_sessions SET userid = '$result[userid]', authentificationcode='', styleid='".$result['styleid']."' WHERE sessionhash = '$sid'", 1); 
        unset($session['authentificationcode']);
        
        /** convert url -> remove session hash **/
        function convert_url($url, $hash) {
             return preg_replace("/[0-9a-z]{32}/", (($hash != '') ? ($hash) : ("")), $url);
        } 
                
        if (isset($_POST['url']) && $_POST['url'] && strstr($_POST['url'], "?")) $url = convert_url($_POST['url'], $session['hash']);
        else $url = "board.php" . $SID_ARG_1ST;
        
        redirect($lang->get("LANG_USERCP_LOGIN_REDIRECT", array('$wbb_username' => $wbb_username)), $url);
        exit;
    }
    else {
        $db->unbuffered_query("UPDATE bb".$n."_sessions SET authentificationcode='' WHERE sessionhash = '$sid'", 1);
        unset($session['authentificationcode']);
        error($lang->items['LANG_USERCP_LOGIN_ERROR']);
    }
}
else {
    eval("\$tpl->output(\"".$tpl->get("login")."\");"); 
}
?>
delete
Ok danke, der Fehler lag darin, dass man direkt auf ein Board verlinken muss (board.php?boardid=XY, wobei XY für eine Nummer steht).
Airwaver
Hallo ich habe auch ein Forum von WBB!
Ich möchte gerne einstelle, das die Startseite meines Forums "www.lost-board.de", das Portal ist. (/hmportal.php).

Wie und wo kann ich das einstellen? Müde
chrime
nirgendswo, du nimmst dafür am leichtesten eine htaccess datei.

Wenn du Linux hast:
lege eine Datei mit dem namen .htaccess an und schreibe dorthinein:
DirectoryIndex hmportal.php
Nun noch Hochladenins hauptverzeichniss

Wenn du Windoof hast:
a.htaccess anlegen
DirectoryIndex hmportal.php
hochladen und auf dem server in .htaccess umbenenen
Airwaver
Hmm..... es funzt nicht.
Ich habe die Datei ".htaccess" über den ftp ins hauptverzeichnis gelegt.


Inhalt der Datei:
DirectoryIndex hmportal.php

Wo kann noch der Fehler liegen?
batida444
also wenn du das in der datei drinstehen hast, die datei .htaccess heißt (mit dem punkt davor !!!!!!) und du die datei hochgeladen hast, sollte es eigentlich klappen.

prüf das nochmal genau

greetz
günni
Airwaver
Ja ich bin mir sicher, das ich die Schritte alle korrekt ausgeführt habe.
Das was ihr mir beschrieben habt, habe ich auch umgesetzt. Freude

Die Frage ist jetzt, wo könnte der Fehler sein. Augen rollen
sourceforge
leg einfach eine index.html mit folgendem inhalt an:
code:
1:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  <html>  <head>  <title>deineseitenbeschreibung</title>        <meta http-equiv="expires" content="0"><meta name="robots" content="noindex"><meta http-equiv="refresh" content="0;   URL=http://deineurl.de/wbb2/hmportal.php"></head>  </body></html>


hab ich bei mir auch und funzt super
Airwaver
Und was willst du mit den metatags in der Syntax! Müde

Achja und wo soll ich das html.-Document einfügen?
sourceforge
statt der htaccess nimmst den inhalt als index.htm /.html /.php



Mit <meta http-equiv="expires" content="0"> veranlassen Sie, dass diese HTML-Datei in jedem Fall von der Originaladresse geladen wird (expires = fällig werden).

also kein caching

Mit <meta name="robots" content="noindex"> verbieten Sie einem Suchprogramm, Inhalte aus der HTML-Datei an seine Suchdatenbank zu übermitteln (robots = Suchprogramme, content = Inhalt, noindex = keine Indizierung).

warum denn auch iss ne umleitung


Mit <meta http-equiv="refresh" content="..."> veranlassen Sie die Weiterleitung zu einer anderen Adresse. Mit content="5; bestimmen Sie, nach wie viel Sekunden die Weiterleitung starten soll. Die 5 im Beispiel bedeutet also, dass die aktuelle Seite, nachdem sie geladen ist, 5 Sekunden lang angezeigt wird. Danach wird die Adresse aufgerufen, die mit url=..." angegeben wird. Bei lokalen Adressen auf dem gleichen Server können Sie absolute oder relative Pfadangaben ohne Angabe von http:// und Domain notieren. Bei Weiterleitung zu Dateien im gleichen Verzeichnis genügt der Dateiname. Bei einer Wartezeit von 0 wird die angegebene nächste Datei sofort geladen.

also unsere umleitung in ein anderes verzeichniss oder andere domain

und einfügen des dokuments würde ich das mal ins root verzeichniss falls da nichts liegt was wichtig ist und über ne index. läuft und ins wbb verzeichniss wobei ich dann das ganze index.html oder .htm nennen würde weil die eigentliche index.php vom forum brauchst ja noch. als erstes sucht der server beim aufruf nach einem index dokument. hat er mehrere gefunden fängt der mit dem aufruf der .html an danach die .htm etc.