1
Peekay
Update Module - what exactly happens?
  • 2010/5/31 20:24

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I am upgrading an old module and have a question about the Xoops module update process.

This particular module has an 'install_functions.php' file which I can see transfers some category image files from the module folder to the Xoops uploads folder. However, there's also an 'upgrade_functions.php' file which contains an incomplete copy of the install SQL, plus some similar image transfer commands.

I think this file is simply a test for a feature that hasn't been used, but I don't want to delete it in case it has a purpose.

When the 'update module' button is pressed in admin, I can't really see which files are called, so I wondered, does Xoops look for any particular files in the module, or does it just re-run 'sql/mysql.sql' and 'xoops_version.php' ?

Any info would be appreciated.



A thread is for life. Not just for Christmas.

2
Peekay
Re: Update Module - what exactly happens?
  • 2010/6/1 12:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Tiny bump, anyone? Or... can someone point me at the module developer's guide?

I found this in the FAQ

How do I learn about creating my own Xoops module?

But all these links are dead:

Coding Standards
File Structure in a module
Kickstart Guide
How to use the XoopsForm Library
Dev wiki

There's a recommendation to look in dev.xoops.org, but it just has a developer forum, no tutorials. The Xoops classes appear to be listed onhttp://dev.xoofoo.org but this is a technical reference, not a guide.

I saw a very good complete beginners tutorial from Kaotik some time ago, but I could do with something a little more detailed. How are module developers kept up to date with the latest developments, pre-loads etc, etc.?
A thread is for life. Not just for Christmas.

3
Mamba
Re: Update Module - what exactly happens?
  • 2010/6/1 12:50

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


You can try this PDF document

Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

4
Peekay
Re: Update Module - what exactly happens?
  • 2010/6/1 13:07

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Thx mamba. That's a good starting point.

But it's dated 2004.

Are the function calls in this guide likely to be useable with the latest version of Xoops?
A thread is for life. Not just for Christmas.

5
Peekay
Re: Update Module - what exactly happens?
  • 2010/6/1 16:29

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Well, I confess that I cannot find any comprehensive module design guides anywhere, other than the class directory at xoofoo.org and your kind offer of a 6-year old PDF file.

I was rather hoping for something more like this:

http://docs.joomla.org/Developers

Sorry to use the 'j' word to draw the comparison mamba, but be honest... if you were an IT graduate and wanted to build a CMS module today, which CMS would you choose?

For Xoops to compete as a platform for open-source software development, it needs to be accessible to people beyond the small clique of developers who already know how it works.

I appreciate that it is difficult to persuade people to commit time to producing any kind of documentation, but some structured and detailed tutorials on module design are seriously needed here IMHO.
A thread is for life. Not just for Christmas.

6
tcnet
Re: Update Module - what exactly happens?
  • 2010/6/1 19:02

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


The file called during a module update should be defined in the module's xoops_version.php file. Look for something like this:

// Update
$modversion['onUpdate'] = 'include/onupdate.php';

7
Peekay
Re: Update Module - what exactly happens?
  • 2010/6/1 20:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@tcnet

Yes... found it

Quote:
$modversion['onUpdate'] = 'include/update_function.php';

Many thx for that info. Saved me from deleting a required file.
A thread is for life. Not just for Christmas.

Login

Who's Online

93 user(s) are online (71 user(s) are browsing Support Forums)


Members: 0


Guests: 93


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