Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums How To Multiple N13's on a single site?
Rayc
Posted on 25 Oct 2010, 03:19:52

Access: Member
Total Posts: 74
Joined: 2010-06-13

Just wondering...

If I wanted to run two independent instances of N13 News on a single site, would I need TWO separate installs?

I'm thinking, say, one instance for a "news" page, and maybe another for a "blog" type page.

It might work with clever use of categories, but otherwise, what might the options be?

-RayC
#2992
Chris
Posted on 25 Oct 2010, 12:21:06

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

It is possible to install multiple instances but I wouldn't recommend doing so because it's both tedious to do and isn't needed in most circumstances.

To install it twice you first need to decide if you're going to use 2 separate databases or using the one you already have. If using 2 separate databases then simply uploading the script a second time to a new directory and installing should work.

To install to the same database requires a bit more effort. Assuming you already have one script installed, use a program like phpmyadmin so that you can rename the database tables, once you've renamed them you need to edit functions.php, near the top you'll see all of the names used for the database tables, change them here to what you've renamed them to.

Code:
define('NEWS_ARTICLES',        'news30_story');
define('NEWS_USERS',        'news30_users');
...


Once you've renamed both the tables and changed the names in functions.php, the script should work normally again. Now you should be able to upload another copy of it and perform the install again.

Like I said this isn't really needed as doing what you described is possible with categories. Create 2 categories, "News" & "Blog", assign your news articles to the appropriate categories. Then wherever you want your "News" articles to be displayed use this code

Code:
<?php
$cat
[] = "News";
include 
'news/index.php';
?>


And for the blog

Code:
<?php
$cat
[] = "Blog";
include 
'news/index.php';
?>
#2993
Last edited by Chris at 2010-10-25 12:23:39 Reason:
Rayc
Posted on 25 Oct 2010, 13:35:23

Access: Member
Total Posts: 74
Joined: 2010-06-13

Quote:
It is possible to install multiple instances but I wouldn't recommend doing so because it's both tedious to do and isn't needed in most circumstances.

To install it twice you first need to decide if you're going to use 2 separate databases or using the one you already have. If using 2 separate databases then simply uploading the script a second time to a new directory and installing should work.

Thanks, Chris.

That's kind of what I figured. I guess I was wondering if a single install could access two distinct databases, perhaps specified via the "include". I suppose it's no big deal to have two copies installed if that sort of thing was required.

I tend to shy away from modifying the script as that causes problems when updating to a newer version.

Cheers,
-Ray
#2994
Network-13.com © 2013