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

Browsing this Thread:   1 Anonymous Users





How can i clone aticles modules
Just popping in
Joined:
2004/5/22 7:19
Group:
Registered Users
Posts: 3
Level : 1; EXP : 10
HP : 0 / 2
MP : 1 / 168
Offline
I install the Aticles modules in this site http://www.gycc.net for a school department, as the articles modules is easy to manage department informations, another department want get the same function.
So how can i clone the articles module?

Posted on: 2004/5/22 7:29
Transfer the post to other applications Transfer


Re: How can i clone aticles modules
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 15483
Offline
As this was my first Xoops module, cloning was something that was not taken into consideration. So, while it is certainly possible, it will involve some hassle.

To start, the articles directory will have to be given a different name (make sure it's all lower case letters), then in the "xoops_version.php" file, the
"$modversion['dirname'] = 'articles';" setting will have to be changed to refelct the new directory name.

Next, the names of the tables for the database has to be changed; further down in this file, change:


// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "articles_cat";
$modversion['tables'][1] = "articles_main";
$modversion['tables'][2] = "articles_rating";
$modversion['tables'][3] = "articles_prefs";


Perhaps adding a "2", e.g., articles_cat becomes "articles_cat2", etc. These changes also have to be reflected in the SQL file - sql/mysql.sql. The first line for each table contains "CREATE TABLE", then the table name, e.g. "CREATE TABLE `articles_cat`".

The rest is mostly a matter of changing the module's directory name in URLs as required in the rest of the files. The best way would be to open all the files in your favourite text editor and use its Search & Replace function.

I will be making it easier to clone Articles in the future...

Posted on: 2004/5/22 13:38
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