1
Whoa9090
Any way to change the directory of modules?
  • 2004/2/3 5:24

  • Whoa9090

  • Just popping in

  • Posts: 13

  • Since: 2004/2/1 6


I was wondering if its possible to change the directory of modules, cuz I think its kindve lame looking having evertyhing go through /modules/, either rename it or just somehow get the modules in the root directory in their own folder.
IE /forum/ instead of /modules/forum/

2
Mithrandir
Re: Any way to change the directory of modules?

Short answer: No, not currently

Longer answer: Since a module is detected by being located as a subfolder to modules containing a file called xoops_version.php, moving them to the root will mean that

a) Lots of code will have to be changed - both in the core and in the modules themselves

b) Whenever the module listing of all modules occur, that is not only the installed modules, XOOPS will have to go through each and every folder in the root looking for a xoops_version.php file instead of confining it to one subfolder - possibly the only problem here is in modules admin, which may take a bit longer to load

3
Whoa9090
Re: Any way to change the directory of modules?
  • 2004/2/3 21:07

  • Whoa9090

  • Just popping in

  • Posts: 13

  • Since: 2004/2/1 6


y not just let users choose where they want to be installed and just keep a file that has all the modules directories in it?

4
davidl2
Re: Any way to change the directory of modules?
  • 2004/2/3 21:17

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Is there any particular reason for having modules in another location?

5
Bunny
Re: Any way to change the directory of modules?
  • 2004/2/3 21:59

  • Bunny

  • XOOPS Advisor

  • Posts: 57

  • Since: 2002/10/21


The main reason would be to have easy, intuitive URLs.

The easiest way to get those with the current version of XOOPS is to use Apache's mod_rewrite to rewire www.example.com/forum to point at www.example.com/modules/forum. If you search this forum for mod_rewrite you should find some info about that.

We're looking into the subject of "friendly" URLs for a future version of Xoops, but don't hold your breath as it might be a while.

6
kahumbu
Re: Any way to change the directory of modules?
  • 2004/2/3 22:30

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


Another thing to consider is the ability to rename the module folder because sometimes the script path or folder names are hard-coded in the files, e.g. mydownloads, mylinks.

This would mean I can't change /modules/mylinks/ to just /modules/links/ easily without changing the PHP code.

7
Mithrandir
Re: Any way to change the directory of modules?

That is true - Modules should really be written so they only need a change of $modconfig['dirname'] in the xoops_version.php (can't remember the actual name if it isn't $modconfig)

8
sunsnapper
Re: Any way to change the directory of modules?

Here's a thread on mod_rewrite with examples and links to additional documentation:
Apache mod_rewrite success

Login

Who's Online

216 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

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

Latest GitHub Commits