PDA


View Full Version : Create separate News Sections on the main page


Edric
06-24-2004, 08:32 AM
Hello. I would like to know whether it is possible to create separates News Sections on the main page. Let us say I want to create 2 Sections, Section 1 and Section 2.

What I would like to do is this:

Create two Forums in my Message Board so that I separate the News that go into Section 1 and Section 2.

Have a sort of header for each section (which I already did successfully).

Put the Section 1 News and News Archive below the Section 1 Header and the Section 2 News and News Archive below the Section 2 Header.


Is such a setup possible? If yes, how can I go around creating it?

Brian
06-24-2004, 12:28 PM
That could be done, but would require a little work. You would need to copy the news.php file, change the $vba_options[portal_news_forumid] variable to the other forumid, and possibly comment out the archive stuff, depending on whether you plan to use that.

Edric
06-24-2004, 12:33 PM
I want to keep the archives, defnitely for both news sections.

How do you suggest I go around creating what I desire? (Consider that I am a bit rusty on code, only programming experience I have is Visual Basic 6.0) If there is a lot of work, I have time to experiment.

Polo
06-24-2004, 12:34 PM
yeah, i'm looking for something like this as well...

Brian
06-24-2004, 12:41 PM
I think you can get away with just hardcoding the forumid(s) in place of the variable I mentioned above. Then rename the file, and add a new module using the same values as your news module, except with the different file.

Edric
06-24-2004, 01:05 PM
Will try it out and inform you of the progress.

BoNfiRe
06-24-2004, 02:09 PM
would you not need to change the template name in the php file, and add a template of that name to you current style just using the content of your current news template over, or can they actually use the same template ?

Polo
06-24-2004, 02:51 PM
I think you can get away with just hardcoding the forumid(s) in place of the variable I mentioned above. Then rename the file, and add a new module using the same values as your news module, except with the different file.

yeah, that is what i did Brian :)

Edric
06-24-2004, 02:53 PM
I managed to get the News from the second Forum to appear but it appears above the Section 2 Header Module and above the News Archive of Section 1. I want it to appear below those, how do I go ahead in doing this?

Is it a problem with the templates?

Edric
06-26-2004, 04:59 AM
I have managed to create three sections as needed by creating three different files based on news.php and basically replicating the News Module, but I still face some problems.

Problem 1:
Notwithstanding how I set the Display Order in the Admin CP the Section Headings apart from the first appear below the News of the 3 Sections.

Problem 2:
How do I create separate News Archives for each separate section?


I hope someone can help, if I get the knowledge of how to sort this out I might have the perfect setup.

Brian
06-26-2004, 05:18 PM
Can you post a link to the CMPS so I can have a look and get a better understanding of what the problem is?

Edric
06-27-2004, 10:24 AM
Sure I will. But right now I have deleted the modules that weren't appearing well. So basically I will recreate them tomorrow as today I have a bit of a busy day.

However my site is http://www.avemelita.com (that is the location of CMPS), it is probably a controversial political site for certain people, being it a Nationalist and Radical site.

I will recreate the Modules tomorrow and post again here. I hope to receive replies. Thanks again for the technical support.

Best Regards & Be Well,
Edric.

cougaz
06-27-2004, 01:11 PM
I tried this as well. Copied the new.php file to new name, created new template and news forumid. I just hard coded the new forumid in the sql select statement in the new news php file. This works fine it pulls the correct news, but I can't get this new module to display in any column other than the center column. ideas??

irishfreakout2
07-26-2004, 09:11 PM
Bump

I have the same problem, other news modules are shown in the same column as the original. Is there a way around this?

irishfreakout2
07-26-2004, 09:31 PM
I seem to have fixed it myself.

I changed
$newsid = $omods['modid'];
to
$newsid = 13;

13 is the modid for my second news post. I found it by browsing the "adv_modules" table in the mySQL database. If you don't change it, that line basically is telling the script to use the properties for the regular news category.

tomshawk
01-24-2005, 04:07 AM
I realize this thread is pretty old, but.

Would someone be willing to type the instructnios for this up.

This looks like an awesome idea

and until vbAdvanced 2.0 comes out I need this!

Itworx4me
01-27-2005, 03:21 AM
I would also be interested in someone explaining how to add the second news module. I have played with this but never seem to get it to work.

Thanks,
Itworx4me

Brian
01-27-2005, 11:08 AM
I think you can get away with just hardcoding the forumid(s) in place of the variable I mentioned above. Then rename the file, and add a new module using the same values as your news module, except with the different file.

I seem to have fixed it myself.

I changed
$newsid = $omods['modid'];
to
$newsid = 13;

13 is the modid for my second news post. I found it by browsing the "adv_modules" table in the mySQL database. If you don't change it, that line basically is telling the script to use the properties for the regular news category.

That should be all that's needed.

tomshawk
01-29-2005, 03:41 AM
Thank you Brian, with this, I was able to get it working! ;)

Just so people know, for those that may want to have the amount of posts in this block to be different then the standard vba news display option

In your new file you create

Look for

$newslimit");

change to something like

LIMIT 4");

Changing the 4 to the number posts you want it to show. ;)