xoops forums

Mamba

Moderator
Posted on: 2011/4/12 11:10
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#1

Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

We've talked in the past about releasing updated “XOOPS Module Packs” for our users, focusing on some basic functionalities of the Website, e.g. Personal Website Pack, Community Website Pack, etc.

We are now working on a “XOOPS Basic Module Packs” and our goal is to modify existing modules so all of them have the same consistent GUI and thus increase the user productivity, especially for the first-time users.

Originally we took the GUI idea from the TDM Team's modules, but while we were working on implementing it, Mage came up with a ModuleAdmin class that generates the whole Admin GUI based solely on the Menu definitions in /admin/menu.php and data in xoops_version.php file - see the simplified diagram:

Resized Image

In order to make it easier for other developers to convert their module to this new GUI utilizing Mage's ModuleAdmin class, I've created a set of files helping with this conversion, and a short tutorial showing how to convert xDirectory (you can download the converted module here)..

Files:

1) Tutorial as PDF file: view it here

2) Conversion Files incl. Tutorial as Zip file: download it here


NOTE:

a) This is just a 1st Draft of the Tutorial, so your feedback and improvement suggestions are appreciated. Please help us to make it simple and easy to read and follow.

b) Please also let us know any ideas/suggestions that you might have about improving the Module GUI:

- beginners and first-time XOOPS users: how can we make it simpler and more user friendly to use for you?

- experienced module developers: how can we make it better? Is this ModuleAdmin class making module development easier?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

timgno

Module Developer
Posted on: 2011/4/12 12:09
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#2

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

hello thanks for this work mamba

What do you think of this
// About.php 
define("_ABOUT_RELEASEDATE""Released: ");
define("_ABOUT_UPDATEDATE""Updated: "); 
define("_ABOUT_AUTHOR""Author: "); 
define("_ABOUT_CREDITS""Credits: "); 
define("_ABOUT_LICENSE""License: "); 
define("_ABOUT_MODULE_STATUS""Status: "); 
define("_ABOUT_WEBSITE""Website: "); 
define("_ABOUT_AUTHOR_NAME""Author name: "); 
define("_ABOUT_CHANGELOG""Change Log"); 
define("_ABOUT_MODULE_INFO""Module Info");
define("_ABOUT_AUTHOR_INFO""Author Info"); 
define("_ABOUT_DESCRIPTION""Description: "); 
// Configuration 
define("_CONFIG_CHECK","Configuration Check"); 
define("_CONFIG_PHP","Minimum PHP required: %s (your version is %s)"); 
define("_CONFIG_XOOPS","Minimum XOOPS required: %s (your version is %s)");

place in the core language?

so lighten the structure, rather than enter into any module?

maybe creating a about.php file in language folder

Mamba

Moderator
Posted on: 2011/4/12 12:12
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#3

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

Core is pretty much frozen by DJ, so we cannot touch it except for fixing bugs.

But I agree that if all modules had been converted, it would make sense to add it to the Core.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

timgno

Module Developer
Posted on: 2011/4/12 12:15
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#4

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

and in the future for the next release?

Mamba

Moderator
Posted on: 2011/4/12 12:21
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#5

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

Hmm, language constants don't really have any impact on code, so maybe we could add it in 2.5.2, but we'll need to talk to him.

He is very much concerned about compatibility to X3, and I totally understand it. Every change in 2.5.x that would impact X3 Legacy, will cause extra work for him and that's not what we want.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

timgno

Module Developer
Posted on: 2011/4/12 12:57
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#6

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

I hope that these ideas can still help in some way to incorporate in X3

timgno

Module Developer
Posted on: 2011/4/20 10:32
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#7

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

mamba a curiosity, but the line:
require_once '../../../include/cp_header.php';


has not required in the index file, if it is inserted in the header file

fdeconiac

Quite a regular
Posted on: 2011/4/26 12:37
fdeconiac
fdeconiac (Show more)
Quite a regular
Posts: 278
Since: 2008/11/29
#8

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

Thanks for the new GUI !

Would it be possible to update videotube and evennews. These modules just have a main link page but no tabs...

Regards

Mamba

Moderator
Posted on: 2011/4/26 21:33
Mamba
Mamba (Show more)
Moderator
Posts: 10750
Since: 2004/4/23
#9

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

Yes, it's doable, but after we finish the Basic Module Pack
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

fdeconiac

Quite a regular
Posted on: 2011/6/23 7:05
fdeconiac
fdeconiac (Show more)
Quite a regular
Posts: 278
Since: 2008/11/29
#10

Re: Converting old modules GUI to XOOPS 2.5.0 Standard: Tutorial

just realise that profile module would also need a refreshing GUI... Would it be posible ?

bye