PDA


View Full Version : Multiple Home Pages?


interfx
12-07-2005, 07:01 PM
I am trying to develop a site that has different levels... ie. A Mian home page for the entire site, and different team home pages - just pulling from the team discussion forums...

Any ideas? Is this possible?

For example

Main Site: ExampleNFL.com/cmps_index.php

This site would have all of the news, links, gallery for all of the information. It would pull from all of the VB discussion forums for news items...

SubSite: ExampleNFL.com/cmps_index2.php

This site would have the specific news of just one of the teams... It would only pull news items from the discussion forum related to that specific team...

Would this also work for the Links module also? I think I can do this in basic CMPS, but not sure about Links module...

Brian
12-08-2005, 05:51 PM
1). Create a new page with the options and such that you would like.
2). Make a copy of your current cmps_index.php file, rename it to whatever you would like.
3). Near the top of your new file, just below define('VBA_PORTAL', true); add something like this:

define('VBA_PAGE', 'your_page_identifier_here');

Then just replace the part in bold with whatever you used for the page identifier option when you created the page. This will force that file to always pull the page you specify.

CSS59
12-15-2005, 05:55 PM
1). Create a new page with the options and such that you would like.
2). Make a copy of your current cmps_index.php file, rename it to whatever you would like.
3). Near the top of your new file, just below define('VBA_PORTAL', true); add something like this:

define('VBA_PAGE', 'your_page_identifier_here');

Then just replace the part in bold with whatever you used for the page identifier option when you created the page. This will force that file to always pull the page you specify.

Brian, Can you explain #1? What kind of page do we need to make? Modular one?

tomshawk
12-15-2005, 06:35 PM
The Online manual shows you how to make a new page
http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=3

On that page you create, scroll down to the news section and hightlight which forums to pull news from.

;)

then continue on with Brians instructions ;)

Brian
12-16-2005, 01:10 PM
Brian, Can you explain #1? What kind of page do we need to make? Modular one?
It doesn't really matter. Unless you have a reason to display a template, php file, or HTML file though, I would suggest the module page.

JacobiB
12-17-2005, 05:21 PM
I'm interested in doing something to this extent. What I'm trying to do is have two seperate vBa sites linked to the same forum and with the exact same style with only one exception: A different header. So if I follow these instructions to create a new page, how do I keep the style the same as my other vBa site only with a different header image?

http://www.thecollectiveguild.com/

interfx
12-17-2005, 06:09 PM
Here's how I did it...

http://www.vbadvanced.com/forum/showthread.php?t=12190

I have 3 different domains which redorect to different pages, with all different headers...

Hope this helps you out...

INterFX

JacobiB
12-17-2005, 06:21 PM
So you're saying I should insert this script to use multiple headers?

<if condition="$pages['nameofhomepage1'] == 2">

<img border="0" src="logo_page1.gif"></a>

<else />

<if condition="$pages['nameofhomepage2'] == 3">

<img border="0" src="logo_page2.gif"></a>

<else />

</if>
</if>
And where would I insert that code into? Thanks.

interfx
12-17-2005, 06:36 PM
NO, you need to only change the page id (the number only), not the $[page] variable... ie..

<if condition="$pages['pageid'] == 2">

You can find the page number, inside of the edit page menu, and move your mouse over the different pages... (look in your status bar)...

You then put this into your header template (under Styles/Templates)

Hope this helps...

JacobiB
12-17-2005, 08:17 PM
Alright, so the page identifier doesn't matter? So if my identifier was "home2" and my page id number was "35", it would look like this?

<if condition="$pages['pageid'] == 35">

Also, will I have to add a conditional statement for every single page with this header?

EDIT: I should also note that these are on the same domain, if that matters in any of this. I want to have two vBa sites on the same domain linked to the same exact forum. I don't know if it's possible to have two completely seperate admin panels for each of the two sites.

interfx
12-17-2005, 09:53 PM
I think that should work...

JacobiB
12-17-2005, 10:44 PM
Cool; do I have to add that line for every single page with that header, or just one? Because I must have about 80 pages. =P

Brian
12-18-2005, 03:12 PM
That's going to be quite a bit of work. If you're going to have different logos for that many pages then you might want to use something like this instead:

<img src="/path/to/image/image_$pages[pageid].gif" />

Then just create some images called image_1.gif, image_2.gif, and etc.

CSS59
12-18-2005, 11:57 PM
This is so cool! Thank you Brian!

CSS59
02-26-2006, 04:42 PM
1). Create a new page with the options and such that you would like.
2). Make a copy of your current cmps_index.php file, rename it to whatever you would like.
3). Near the top of your new file, just below define('VBA_PORTAL', true); add something like this:

define('VBA_PAGE', 'your_page_identifier_here');

Then just replace the part in bold with whatever you used for the page identifier option when you created the page. This will force that file to always pull the page you specify.


Brian, This worked well till I did your Left side bar on my forum index (from the manual)

The sidebar works well, but my additional pages i made don't work anymore now
Fatal error: Cannot redeclare order_mods() (previously declared in /home/jonelz/public_html/forums/includes/vba_cmps_include_bottom.php:181) in /home/jonelz/public_html/forums/includes/vba_cmps_include_bottom.php on line 181

I'm thinking it does not like the mods in the global or the includes/functions from the sidebar hack?

How can I fix this

Brian
02-27-2006, 11:23 PM
Try adding this to the top of the additional files you made, right below the <?php tag, and that should take care of the problem.

define('SKIP_OUTPUT', true);

CSS59
02-28-2006, 12:52 AM
Try adding this to the top of the additional files you made, right below the <?php tag, and that should take care of the problem.

define('SKIP_OUTPUT', true);


Thanks for the reply, i will redo the sidebar and let you know if it works

CSS59
03-18-2006, 03:55 PM
Brian, I have a lot of these pages now, how can I make them searchable?

Something like this guys (http://www.ultimatecarpage.com/frame.php?file=brandlist.php) is doing. You can seach the forums, or you can search "cars"

CSS59
04-03-2006, 02:06 AM
Brian, I have a lot of these pages now, how can I make them searchable?

Something like this guys (http://www.ultimatecarpage.com/frame.php?file=brandlist.php) is doing. You can seach the forums, or you can search "cars"


any help at all Brian?

CSS59
04-09-2006, 01:44 PM
anyone here???

CSS59
04-13-2006, 05:58 PM
any help admins and mods?? It has been almost a month :(

Zachery
04-13-2006, 08:22 PM
Sorry, I wasn't aware that vBa has any default search system for its pages, possibly its a customized script.

CSS59
04-14-2006, 07:03 PM
can one fo you help me with the code to make them searchable?

Zachery
04-14-2006, 07:25 PM
No, if you didn't find it here its probally custom.

warlock40
05-05-2006, 01:09 AM
could you not jsut make a copy of the style of your choice..and then use it as a default change the header etc in the header template?