ich fummel gerade am mambo in verbindung mit phpbb herrum und möchte den link: nickpage.php?user= außerhalb von phpbb integrieren. nun kommt natürlich die meldung:
Eine Nickpage ist in folgender Form aufzurufen:
nickpage.php?user=NicknamedeinerWahl
wie kann ich im adresscode ihn nun anweisen die userid auszulesen
nickpage.php?user=userdata funzt nicht (zugriff auf die seite verweigert).
das selbe mit nickpage.php?admin=userdata...
mit der profil.php gehts als profil.php?mode=profiledit mit diesem code wohl irgentwie - keine ahnung:
Code: Alles auswählen
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
}
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
exit;
}
else if ( $mode == 'confirm' )
{
// Visual Confirmation
if ( $userdata['session_logged_in'] )
{
exit;
}
include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
exit;
}
else if ( $mode == 'sendpassword' )
{
include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
exit;
}
else if ( $mode == 'activate' )
{
include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
exit;
}
else if ( $mode == 'email' )
{
include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
exit;
}
}Code: Alles auswählen
//
//Nickpagelink zeigen?
//
if ( $userdata['session_logged_in'] )
{
//Nickpage vorhanden?
$sql = "SELECT COUNT(uid) AS zaehle FROM ".NICKPAGE_TABLE." WHERE uid='".$userdata['user_id']."'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Konnte Querrie nicht ausführen!', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
//Konfiguration (ab wieviel posts...)
$sql = "SELECT anzahl_posts FROM ".NICKPAGECONFIG_TABLE;
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Konnte Querrie nicht ausführen!', '', __LINE__, __FILE__, $sql);
}
$row2 = $db->sql_fetchrow($result2);
if($row['zaehle'] == "1" OR $row2['anzahl_posts'] <= $userdata['user_posts'])
{
$template->assign_block_vars('Shownickpagebutton',array(
'U_NICKPAGE' => append_sid('nickpage.'.$phpEx.'?admin='.$userdata['username']),));}}
lieben dank stephan