Seite 1 von 1
Contentnutzung erst ab Registration
Verfasst: 25.01.2006 20:57
von Rey
Nun, erstmals möchte ich mich im Vorraus entschuldigen, wenn's das falsche Unterforum ist, wusste nicht genau wo es hingehört. ; )
So, meine Frage ist folgende:
Wie kann ich es so einstellen, dass man im Forum On sein muss, damit man auf der Page rumstöbern kann?
Also ich meine das so, dass man sich erst im Forum registrieren muss, damit
man den Content auf meiner Homepage benutzen kann!
Kann mir einer erklären wie sowas funktioniert, ich bin nicht gut in PHP oder so,
also bitte mit Code. ; )
Danke vielmals.
Verfasst: 25.01.2006 23:15
von Pyramide
KB:phpbb_seite Abschnitt "Prüfung der Benutzerrechte"
Verfasst: 26.01.2006 16:36
von Rey
Hm, ich hab mir das anguckt und ein wenig rumprobiert, aber ich versteh das nicht so richtig, was muss ich
z.B mit diesem Code hier machen ?
Code: Alles auswählen
<?php
//Benötigte Dateien und Variablen von phpBB
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//Session auslesen und Benutzer-Informationen laden
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//Dieser Block kann weggelassen werden, wenn du nur den die Userdaten brauchst und auf den phpBB-Header verzichen möchtest
$page_title = 'Meine Seite';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
/***** Inhaltsbereich ******/
//Footer - nur dann weglassen, wenn du auch den Header weglässt
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Verfasst: 26.01.2006 16:56
von fanrpg
bei Inhaltsbereich folgendes einfügen:
Code: Alles auswählen
if(!$userdata['session_logged_in'])
{
message_die(GENERAL_MESSAGE, 'Gäste haben keine Berechtigung diesen Content zu benutzen, bitte regestriere dich');
}
So könnte das aussehen oder auch anders..
Verfasst: 26.01.2006 17:22
von Rey
Ich habe den Code eingefügt, weiß aber nicht was ich dort verändern muss, damit diese Fehlermeldung nicht mehr erscheint:
Code: Alles auswählen
Warning: include() [function.include]: Unable to access ./extension.inc in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 148
Warning: include(./extension.inc) [function.include]: failed to open stream: No such file or directory in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 148
Warning: include() [function.include]: Failed opening './extension.inc' for inclusion (include_path='.:/srv/www/httpd/phost/c/net/pytalhost/xxx/web/') in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 148
Warning: include() [function.include]: Unable to access ./common. in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 149
Warning: include(./common.) [function.include]: failed to open stream: No such file or directory in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 149
Warning: include() [function.include]: Failed opening './common.' for inclusion (include_path='.:/srv/www/httpd/phost/c/net/pytalhost/xxx/web/') in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 149
Fatal error: Call to undefined function session_pagestart() in /srv/www/httpd/phost/c/net/pytalhost/xxx/web/hp_style/fonts.php on line 153