http://www.xoops.org/
Main Menu
Latest Articles
Popular Articles

Browsing this Thread:   2 Anonymous Users





Cloneable
Just popping in
Joined:
2005/8/8 19:17
Group:
Registered Users
Posts: 10
Level : 2; EXP : 0
HP : 0 / 25
MP : 3 / 1371
Offline
Is the articles module cloneable (ie. installing more than 1 copy with different names)? If not, could it be?

Posted on: 2005/8/26 2:18
Transfer the post to other applications Transfer


Re: Cloneable
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14625
Offline
It should be - I believe I've removed all of the hard coded path names from the main files since I started it.

The main things to change are:

1) In "xoops_version.php" change "$modversion['dirname']" to reflect the new directory name, and change the three SQL table names "$modversion['tables']" so they will not clash with the default Articles install.

2) In sql/mysql.sql, change the table names to match those you chose in xoops_version.php

3) The only hard coded paths that should be left are in the blocks (these have to be hard coded, it seems), so the directory name should be changed in the four block files in the "blocks/" directory.

When I get chance, I will try cloning it and then write an article on how to do it...

Posted on: 2005/8/26 13:39
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: Cloneable
Just popping in
Joined:
2005/8/8 19:17
Group:
Registered Users
Posts: 10
Level : 2; EXP : 0
HP : 0 / 25
MP : 3 / 1371
Offline
Thanks, Andy.

Posted on: 2005/8/26 18:49
Transfer the post to other applications Transfer


Re: Cloneable
Just popping in
Joined:
2005/8/8 19:17
Group:
Registered Users
Posts: 10
Level : 2; EXP : 0
HP : 0 / 25
MP : 3 / 1371
Offline
I made an attempt but the cloned version simply showed the articles from the origianl version.

Posted on: 2005/8/31 14:19
Transfer the post to other applications Transfer


Re: Cloneable
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14625
Offline
Oh, I know what I had forgotten - the table names also have to be changed in the SQL code...

For example "articles_main" in:
$sql = ("SELECT * FROM " . $xoopsDB->prefix("articles_main") . " WHERE id=" . $id . " AND art_validated=1 AND art_showme=1 ORDER BY id LIMIT 1");

THese should be renamed to reflect the changes made in xoops_version.php and mysql.sql. The best thing would perhaps be to use a search and replace function in a text editor, as any file using the database will have at least one that will need to be changed.

I shall try and make future versions more "clone friendly".

Posted on: 2005/8/31 14:50
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Login
Username:

Password:

Remember me



Lost Password?

Register now!
Donate!
Please consider donating to help continued development of my XOOPs modules. Read more here.

Search
Advertisements
Copyright © 2001-2009 sirium.net