PDA


View Full Version : Last posts module: Is this possible?


e-steki
01-30-2006, 09:06 PM
In my cat site, I have some forums for reviews, articles and breeds and all the other ones are for the community. I have integrated the forumdisplay page with the CMPS so that I can have a sidebar but I try to keep the Articles-Reviews-Breeds forums as separate as possible from the rest of the forum (they don't show in the forum page, I have GARS installed for them, etc). I want the last posts module to show:

Inside the articles-reviews-breeds page last posts only from these forums
Inside the rest of the forums last posts that don't include the articles-reviews-breeds forumsHow can I accomplish this? I don't mind if it needs a lot of hacking, I really need it. Just tell me how to do it :o

Thanks in advance~! :)

e-steki
02-02-2006, 12:00 PM
Anyone? Basically what I'm asking is how can I integrate 2 pages that use the same php file and different templates as 2 separate pages...

Brian
02-02-2006, 05:04 PM
How exactly have you integrated these pages? Did you add some type of additional code so that the CMPS side bar is only shown on these specific forums, or is it shown on all forums?

e-steki
02-04-2006, 07:25 PM
It is shown on all the forumdisplay pages. I've added the code as usual, nothing fancy here...

Brian
02-06-2006, 05:13 PM
First, add 2 new CMPS pages for your article and review forums to use, and set the recent threads settings on these pages to the forums you want to use.

Then remove the define('VBA_PAGE', 'whatever'); line that you added to your forumdisplay.php file and replace it with something like this:

$reqforumid = intval($_REQUEST['f']);

if ($_REQUEST['forumid'])
{
$reqforumid = intval($_REQUEST['forumid']);
}

switch ($reqforumid)
{
case 39:
define('VBA_PAGE', 'page_1_here');
break;
case 40:
define('VBA_PAGE', 'page_2_here');
break;

default:
define('VBA_PAGE', 'current_forum_page');

}

The two 'case' statements there will allow you to pick a different CMPS page to include depending on the forumid. I used 39 and 40 just for example purposes, so you'll want to change those to the forumid's of your reviews/articles forums. Then change the 'VBA_PAGE' part just below each to include the identifier for the pages you created for those forums. Then change the 'current_forum_page' part to the name of the page you currently use with your forumdisplay.php.

e-steki
02-07-2006, 12:55 AM
Thanks for the nice idea! I have the condition ready for the forumids of GARS cause I needed it in a plugin I developed! Thanks so much!