A More Informative Title About A phpBB Admin Module Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

A More Informative Title About A phpBB Admin Module Problem

Post by Majoraslayer »

I'm trying to create an administration page for my phpBB's administration panel, but for some reason my conditional statements are doing NOTHING. Since I know absolutely nothing about PHP, have at look at it and tell me whats wrong :(

Code: Select all

<?php
/***************************************************************************
File:			admin_mainsite.php
Created:		11/28/05
Description:	phpBB Integrated Site Administration
Notes:		[None as of yet ^_~]
 
 ***************************************************************************/

define('IN_PHPBB', 1); 
if( !empty($setmodules) ) 
{ 
$filename = basename(__FILE__); 

	$module['ZD Site']['Plesk CP'] = $file;
	$module['ZD Site']['File Manager'] = "$file?mode=fileman";
	$module['ZD Site']['phpMyAdmin'] = "$file?mode=phpMyAdmin";
	$module['ZD Site']['Edit Content'] = "$file?mode=contentedit";
	$module['ZD Site']['Edit Links'] = "$file?mode=linkedit";
	$module['ZD Site']['Admin Notepad'] = "$file?mode=notepad";
	$module['ZD Site']['Configuration'] = "$file?mode=baseconfig";
	$module['ZD Site']['Utilities'] = "$file?mode=utilitylist";

return; 
}


if( $mode == "fileman" )
{
echo 'This is the place for the file manager scripts.';
}

if( $mode == "phpMyAdmin")
{
echo 'This is the place for the phpMyAdmin redirection.';
}

if( $mode == "contentedit")
{
echo 'This is the place for the content editor script.';
}

if( $mode == "linkedit")
{
echo "This is where I figure out how the hell I'm going to do link administration.";
}

if( $mode == "notepad")
{
echo 'Just a simple script to write to a file for a notepad...also tests the editor script.';
}

if( $mode == "baseconfig")
{
echo 'Change basic configuration information for the site.';
}

if( $mode == "utilitylist")
{
echo 'Some basic utilities that will help with site administration.';
}

?>
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Where is $mode defined?

In any case, if $setmodules is not defined (and assigned a value) the no, your conditional statements will not do anything.
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post by trukfixer »

Code: Select all

$mode = $_GET['mode'];
//add the above line to set $mode from request_uri string 

define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
probably have register_globals = off gotta be explicit.
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

Post by Majoraslayer »

Well, I finally got the script working, and I appreciate all the help. However, now I'm having a new problem. Does anyone know how to apply the template system to phpBB's ACP module pages? Any suggestions would be much appreciated :D
Post Reply