1
konadu
Module Rename
  • 2006/11/2 17:39

  • konadu

  • Not too shy to talk

  • Posts: 116

  • Since: 2005/11/27


Good Day,

is it possible to rename a module.

ie: instead of browsing to
localhost/modules/xcgal/

it will be like
localhost/modules/photogallery/

that is to change the name of the module to your chosen name.


Thanks for the help in advance.

2
Will_H
Re: Module Rename
  • 2006/11/2 19:23

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


url rewrite will be here soon.

Until then, you can browse through every file in the xcgallery module folder and change all instances of "xcgallery" to "photogallery". be sure to also rename the folder itself.

Basically, you will wanna read the faq on cloning a module.

3
tripmon
Re: Module Rename
  • 2006/11/2 21:23

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


BTW, modules can be built to support renaming... this will usually be mentioned in the module's readme, but you can check by looking in the top few lines of xoops_version.php for something like this:
(the important part regarding renaming is the first line, second part makes sure you have not renamed the directory with bad characters and may not be there.)
$mydirname basenamedirname__FILE__ ) ) ;
if( ! 
preg_match'/^(D+)(d*)$/' $mydirname ) ) echo ( "invalid dirname: " htmlspecialchars$mydirname ) ) ;


the actual variable name (in above example $mydirname) may not be the same.

IF you see this code, that means you can rename the module simply by changing the folder name before installing the module.

HTH

Login

Who's Online

240 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 240


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