PDA

View Full Version : cmps_index.php and articles.php


RSimpson
06-06-2004, 09:19 AM
Hi folks,

I want to have cmps_index.php work as normal but I'd like to make a copy of it and call it articles.php, I would like this file to pick up another page, how would I go about this without using a request query?

Any help would be greatly appreciated. :)


Cheers,
Robert

Brian
06-06-2004, 10:46 AM
Just copy the file, rename it, and then look for this line in the new file:

define('VBA_PAGE', 'articles');

Then create a new page with an identifier of 'articles', and set the options on that page as you wish. :)

Our Sponsors
 

RSimpson
06-06-2004, 03:16 PM
Nice one :D

Much thanky-yous Brian

RSimpson
06-06-2004, 03:30 PM
Hmmm, that line didn't appear in the file, here's the contents:<?php
// ++=========================================================================++
// || vBadvanced CMPS v1.0 RC2 ||
// || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved ||
// || This file may not be redistributed in whole or significant part. ||
// || http://vbadvanced.com ||
// ++ ========================================================================++

error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);

// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

chdir('./forums');

// ============================================
// No Further Editing Necessary!
// ============================================

require_once('./global.php');

print_portal_output($home);

?>Did you mean to add the line?


Cheers,
Robert

Our Sponsors
 

RSimpson
06-06-2004, 03:32 PM
That must've been it, got it now :)

RSimpson
06-06-2004, 03:33 PM
With this new file can I still use ?variable=pagename to load pagename or will that variable be defined by define('VBA_PAGE', 'articles');?


Cheers,
Robert

RSimpson
06-06-2004, 03:40 PM
Seemingly not, but I worked my way around it using this:if(!$action) {define('VBA_PAGE', 'articles');}Is there any way I can have the file pick up the name of the variable I'm using for the request query?


Cheers,
Robert