1
TurkClub
dublicating a module with different dbs?
  • 2004/1/13 4:35

  • TurkClub

  • Just popping in

  • Posts: 44

  • Since: 2003/10/28


how can i dublicate and use same module with different databases in very same site? and those two same module will create different tables in db..(news1,news2;mydownloads1,mydownloads2)

for example,for my site I use a lot of rss files in headlines module..i want this module work differently(headline1 and headline2)..headline1 module will work for business rss,headline2 will work for sport rss.. in this way i will be able to give permissions to user how i want it..

2
TurkClub
Re: dublicating a module with different dbs?
  • 2004/1/13 19:03

  • TurkClub

  • Just popping in

  • Posts: 44

  • Since: 2003/10/28


i read wiki's mod guide but couldn't understand..
can someone simply guide me on this,,

thanks..

3
DonXoop
Re: dublicating a module with different dbs?

I'm no expert but have duplicated a module and a block. This isn't for the light hearted. Depending on the module you have to make some changes in version.php and a few other files before installing the dupe. You can cause headaches in the original module/block/database if you miss something.

Don't you mean you want unique tables in the database vs another database? Unique tables in a dupe module is possible and likely what you have to do anyway unless the two share the same data.

Search the Forums for a long thread that discussed this. Each module will have it's own changes required to duplicate.

4
ppy2x9
Re: dublicating a module with different dbs?
  • 2004/1/13 23:43

  • ppy2x9

  • Just popping in

  • Posts: 1

  • Since: 2004/1/13


Sure, I want know how to do this too, I want make large project modules on XOOPS which will use alot of tables.
so this will be good for me to know how I can work with XOOPS with different DB's for each module ?
Is it possible adding something like
$modversion['base'] = "mybase";
or mabeybe another way with $db->selectDB("mydase") or osmething else ?
I newbie in XOOPS and just learn it but have some expiriense in PHP. could you help with it ?

5
TurkClub
Re: dublicating a module with different dbs?
  • 2004/1/14 7:07

  • TurkClub

  • Just popping in

  • Posts: 44

  • Since: 2003/10/28


some subjects about this topic..
dublicating module 1
dublicating module 2

As DonXoop says,it seems to require individual hardcoding for each module that u want to dublicate..and that is beyond of my knowlegde..

maybe a stupid question but cant learn without asking..
lets say i download a module to my site..if i start renaming all tables that the module created in my database..then i edit module files and replace all orijinal names to what i've changedin db..is that module will work? if it does,then i can download the orijinal module and it can work because the database tables will not come cross..

as i said my php and db knowledge is very limited..
just wondering..Is it possible?

thanks to all XOOPS community..

6
Anonymous
Re: dublicating a module with different dbs?
  • 2004/1/14 8:01

  • Anonymous

  • Posts: 0

  • Since:


Quote:
maybe a stupid question but cant learn without asking..
lets say i download a module to my site..if i start renaming all tables that the module created in my database..then i edit module files and replace all orijinal names to what i've changedin db..is that module will work? if it does,then i can download the orijinal module and it can work because the database tables will not come cross..


You have some more things to duplicate a module:

- change sql-table names and queries to them
- adapting paths reflecting the name of your duplicated module
- changing the templates/template-names if any
- make some tests with the debug-modes, because sometimes functions/classes could only be used once
- change the language constants for the duplicated module, otherwise you get a long list of notices

Did I miss something?

7
TurkClub
Re: dublicating a module with different dbs?
  • 2004/1/15 6:06

  • TurkClub

  • Just popping in

  • Posts: 44

  • Since: 2003/10/28


Quote:

- adapting paths reflecting the name of your duplicated module

i didnt get this part..
can u be more specific on that if its possible..

thanks again..

8
Anonymous
Re: dublicating a module with different dbs?
  • 2004/1/15 7:05

  • Anonymous

  • Posts: 0

  • Since:


...of course:

Example headline-module admin/index.php:

include XOOPS_ROOT_PATH.'/modules/[color=FF0000]xoopsheadline[/color]/include/functions.php';


has to be changed to

include XOOPS_ROOT_PATH.'/modules/[color=FF0000]xoopsheadlinenew[/color]/include/functions.php';


for your duplicated module called (perhaps) xoopsheadlinenew.

9
TurkClub
Re: dublicating a module with different dbs?
  • 2004/1/16 6:32

  • TurkClub

  • Just popping in

  • Posts: 44

  • Since: 2003/10/28


understood..
thank you very much again francis..

Login

Who's Online

146 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits