PDA

View Full Version : Custom Page for specific forum number


Powerbook
03-09-2007, 09:30 PM
Hi,

I would like to know if it is possible to have a custom page for a forum number instead of the raw (showthread.php or forumdisplay.php, etc, etc)...

What I would like to achieve is to show just certain modules on certain forums.

Example: When a member visit the "Introduce Yourself" forum or f=3 I would like to show a different navigation module than what I would use on the rest of the site. In this case it would be based on forumdisplay.php?f=3

I know it is a simple example but just to give the idea of what I'd like to try and achieve...

Thanks

Brian
03-10-2007, 02:58 PM
http://www.vbadvanced.com/forum/showpost.php?p=32578&postcount=2 ;)

Our Sponsors
 

Powerbook
03-10-2007, 03:47 PM
Thanks for that :)

Powerbook
03-18-2007, 04:46 PM
I tried to understand what I need to do but can't get it...

I understand where the ForumName should go in but where do you actually specify the pagename and are you supposed to fill anything after case:?

In the standard version "define('VBA_PAGE', 'include');" you just add the name of the page at the back but below the forumname is in it's place... Can't seem to get it...

if (isset($_REQUEST['f']))
{
$_REQUEST['forumid'] = intval($_REQUEST['f']);
}
switch($_REQUEST['forumid'])
{
// Quick example for just one forumid
case 1:
define('VBA_PAGE', 'forum1');
break;
// Quick example for multiple forumids that should use the same page
case 2:
case 3:
case 4:
define('VBA_PAGE', 'forum2');
break;
// And now your default page
default:
define('VBA_PAGE', 'forumdefault');
}