Developing my own module? Or do it in perl?
  • 2006/11/30 6:14

  • BadAngler

  • Just popping in

  • Posts: 36

  • Since: 2006/11/28


I'm a long time perl programmer looking to add functionality to a new XOOPS site. I need to collect reports from members with various widgets and a corresponding count for each. I need to summarize the counts in a total on the masthead which is shown to all vistors - anonymous and members.

This is mind boggling simple in OO perl CGI.pm code. While in development I'm running XOOPS on one of my servers and know it's quick to add in a cgi page to collect my stats and present around the masthead. But likely it's best to do this in a module. Sometime in the near future we will host the developed site elsewhere with php/xoops people and I'd like local support if needed.

I've looked around for a module developers guide and found old posts from 2003. Looking for docs at Module Dev Forge I see that site is down and will be back up sometime this month (one day left or we need to change the message).

In perl module would work like this.

I present a form to a user with a two textfields per widget (description and count). One or many widgets can be input.

When I receive the form I taint check/validate and if all is good I connect via odbc, insert my variables into a table (adding the user id,date,ip address) and close the database handle.

My counts would be displayed in a block using a sql count.

I'd like some advice on how hard this is to do in XOOPS coding. A pointer to a developers guide would be great if it's not too involved.


Re: Developing my own module? Or do it in perl?
  • 2006/11/30 6:25

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4

I know of a perl forum system that plugs right into xoops. bbBoard. The module itself is pretty simple. The forum runs on a seperate database and you just configure one file and it plugs it right in. If you want to take a look at the module it might help you with a framework to plug in your own perl mods.

Download it here:
Magick can never be restrained, but when freely given is thrice regained!

Re: Developing my own module? Or do it in perl?
  • 2006/11/30 6:47

  • chippyash

  • Friend of XOOPS

  • Posts: 501

  • Since: 2004/1/29

Retrieving and presenting data in Xoops/PHP is a doddle. Writing code for it isn't even if you know PHP. However, if you were to persevere, (and it sound like you might if you write Perl code ) it's not too much of a challenge. Use the XBS Modgen module (find it in download section of this site) to create a module shell with a main page and some block pages. Then edit those pages and insert the code required to retrieve and display the data you want. Have a look at the source of some XOOPS modules to see data retrieval and display going on.

You won't find a mod developers guide I'm afraid.


Re: Developing my own module? Or do it in perl?
  • 2006/11/30 7:21

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20

Module Dev Forge is up. You can go in Dev Wiki there for some information.
You can search for ModuleBuilding.pdf - old and simple, but most of it is still true.
As akitson said, you can use modgen for automaiting some of the tasks.


you could give a try to "Formulize" (http://dev.xoops.org/modules/xfmod/project/?formulize) to see if it will do the job.

Re: Developing my own module? Or do it in perl?


Thanks for the plug Stefan. Our module, Formulize, could be used to do this. You would create a form for your widgets, with two textboxes as you describe. Then users can fill in the form multiple times if necessary (for multiple widgets). You would not need to manually do anything in the DB, since Formulize does that for you.

To display the counts, you could write a page in the companion "Pageworks" module, where you can use a function called
"getData" to gather information from your form. You can then display that data however you need to in the page.

To display the page as a block, you just create a PHP block in XOOPS with this code in it:

include XOOPS_ROOT_PATH . "/modules/pageworks/index.php";

And that's about it. Obviously there's more details in how you actually use the getData function and so on, but that's probably the only tricky bit of this process. The creation of the form and having users fill it in is all "out-of-the-box" functionality that Formulize provides.

If you have any questions about using Formulize, please check out our area on dev.xoops.org, where you can also download the latest versions. It's conveniently accessible through this URL:


Technical Architect - Freeform Solutions
Formulize - custom registration forms, ad hoc forms and reports


Who's Online

58 user(s) are online (30 user(s) are browsing Support Forums)

Members: 0

Guests: 58



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

Latest GitHub Commits