external page login error

Discussion forum for MOD Writers regarding MOD Development.
Registered User
Posts: 32
Joined: Tue Jul 04, 2006 12:37 pm
Location: Belgium |GMT+1|

external page login error

Post by kickasgamer »

i have a layout where i want to have that if a user is logged in on the forum he will see link to edit his profile, check pm's,... and if the user isn't logged in he will see a login panel, i made a little script and i include it in a div

but now i made a basic system to test if the script works. If the user is logged in he does the de echo i placed but when he isn't logged in the whole forum is include in that specific div tag :s

so how can i show the echo after the }else{ instead of the forum login page ?

this is my code:

Code: Select all

define('IN_PHPBB', true);
define('ROOT_PATH', "../forum/");

if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {

$phpEx = "php";
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
include($phpbb_root_path . 'common.' . $phpEx);


if($user->data['user_id'] != ANONYMOUS){
	echo "Show the edit loinks";
	echo "Login please";
thanks in advance
some blind fool
Registered User
Posts: 409
Joined: Sat Aug 19, 2006 5:28 pm

Re: external page login error

Post by some blind fool »

maybe you're looking for something more like this? http://www.phpbb.com/community/viewtopi ... 5#p6049095
the thread it's in is great for asking about custom logins and what not, and finding code snippets. :)
please do not PM me to ask for help. thanks.

Return to “[3.0.x] MOD Writers Discussion”