1
zer0fill
Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/12 7:57

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Hi all,

I'm going to attempt to write up a Jokes Module (tentatively labeled xJokes) but at the same time write up a tutorial step-by-step(ish) on how to properly implement the XOOPS API when building a module from scratch. Hopefully this can serve as a starting point for new developers for XOOPS, such as myself, than going from place to place on the WiKi (it's still awesome for modular additions, don't get me wrong). The current crash course is fine, which is where I learned a lot of the basics, but, as we all know, the complete documentation is still much to be desired.

In this tutorial, I want to try to go though as many XOOPS API classes as possible so the would-be dev can see how it is implemented in a familar module, assuming they read from the start.

Anyways, here is what I have so far
Quote:
Here are some requirements limecity and I thought this jokes module should have:
• User submission
• Ratings
• Categories (and sub-sub...sub cats)
• Jokes
• Searchable
• Add comments
• Sort by: rank, views, comments
• Move jokes to different categories (owner/admin can do it)
• Approval system (can set groups to auto-approved)
• Notifications (by category and/or global)
• Blocks (latest joke, most popular, what else?)
What other XOOPS API classes do you think I can add in terms of the tutorial, not so much the module itself?

[edit]
Another thing that will be used is the XOOPS form generator in the admin area
[/edit]

One thing when it is done (i hope it gets done): I'm no graphics artist by any means, so it'll look quite...ugly unless the community can help with the templates.

2
Mithrandir
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)

you have more or less found everything

Notifications, comments, group permissions... Some blocks too, I guess.

XoopsForm classes is a must. Apart from that, it's just a matter of coding style, where you can use classes, extending XoopsObject and XoopsObjectHandler.

This is really a suitable discussion to have on dev.xoops.org - we have your application and I'll make sure you get an account soon.

Regarding the tutorial you want to write, better coordinate with Carnuke from the documentation team to avoid double work.

3
zer0fill
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/12 8:09

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


ah, thanks. didn't know there was already a documentation team.

for coding style, i'm too used to the vertical curley-braces. After having been taught that way, it's really hard to adjust to the other method.

//vertical
function curley()
{

}

// not-vertical
function curley(){

}

4
Mithrandir
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)

I didn't really mean that - more like how object oriented etc. you programmed.

dev.xoops.org Module Standards wiki <-- check it out... there is quite a lot of information on that page and in the rest of the wiki.

5
zer0fill
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/12 21:12

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


I've started the program requirements and would like some feedback about the current feature list. Ignore the layout as I'm just typing it out in word and converting it to html (so more people can view it).

6
Mithrandir
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)

suggestion: Use the core XoopsTopic to do categories - it has the tree structure you desire already in it. Could be interesting looking into, I think.

7
zer0fill
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/12 23:05

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Thanks for the tip about XOOPS topics, I'll be using that and renaming the category table & its fields to be compatible with topics

I've been trying to follow the way the news module uses this in combination with XoopsTree. Is it XT that's responsible for using recursion to keep every sub-cat sorted alpha-numeric?


8
sottwell
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/23 17:13

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


I had a similar idea, only I am trying to make a recipe exchange module. I've done corporate in-house documentation and tutorials and online programming lessons before, but I'm new to Xoops. The kickstart "greeter" module was fine, and I've managed to modify a few module themes to please myself, but now I'm totally stuck on getting a simple form to work from scratch, using "contact" as my model. I can display the form, per the wiki documentation, but can't seem to get it to pass through Smarty as "contact" does. I'm trying to learn to walk before I try to run, and so far I'm not even crawling - but then I only heard of XOOPS for the first time a few days ago. I will be following your tutorial with great interest.

As soon as I figure out how to get forms to work in a simple demo module I'll write up a basic tutorial similar to the "greeter" module.

9
zer0fill
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/23 18:11

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Quote:

sottwell wrote:
...As soon as I figure out how to get forms to work in a simple demo module I'll write up a basic tutorial similar to the "greeter" module.


Thanks. Unfortunately, this project of mine is being put on a lower priority since work has me on something new that'll take up a lot of my free time.

10
sottwell
Re: Most extensive module you can think of (I'm going to attempt at a tutorial)
  • 2004/6/25 13:49

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


In that case, since I'm not working at the moment (except to take the puppy out enough so she doesn't pee on the floor), maybe I'll actually get mine done first! Although I still have to figure out how to print out a &%^^&* form! The backend logic is a piece of cake. I can do it fine without using Smarty, but I'm patient (or stubborn) and will do it properly or not at all. I requested an account in the Sourceforge forums, I suppose I'll hear from them eventually.

Login

Who's Online

200 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 200


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