1
peterr
Web Hosting module
  • 2004/8/10 3:05

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

I have had a fairly good look through the modules, the 'others', the 'hacks',etc, and there doesn't appear to be a module that will suit my needs.

So, maybe I need to find out how to make a module in XOOPS ?

I want to use the existing db (doh !! ), add some new tables that will contain all the necessary data needed for web hosting plans. Basically .......

* Plan ID
* Plan Name
* Plan Cost (hhm, multiple currencies ??)
* Plan Features

The settings for features may be (yes/no - boolean) or a number, to indicate the number (example - email accounts), so there are many features to a single plan. I don't see any problems with designing the db tables, but would of course want/need this to be developed so that the 'admin/webmaster' can maintain the plan prices/features, and possibly an option to either display the plans within the module (normal I guess), OR display them as a stand-alone block.

That's about it for now, if there is a "how to make an XOOPS module for dummies", pls supply a link, or if you have any ideas, thoughts, suggestions (clone another module ?? ), that will be great.

Thanks, :)

Peter

2
Bassman
Re: Web Hosting module
  • 2004/8/10 3:53

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


peter,
I found a script that might be adaptable to your requirements.... have a look at http://www.bassmanthemes.x8r.com/test.php It doesn't actually do anything,but it may be a good start.

3
peterr
Re: Web Hosting module
  • 2004/8/10 4:08

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

Bassman wrote:
peter,
I found a script that might be adaptable to your requirements.... have a look at http://www.bassmanthemes.x8r.com/test.php It doesn't actually do anything,but it may be a good start.


That would certainly do for the interim period. No doubt all the select/options are calculated in the PHP script and not actually pulled out of a database. However that script would certainly suffice in the interim period, whilst I figure out how to do a module, test it, etc,etc.

Thanks,

Peter

4
Bassman
Re: Web Hosting module
  • 2004/8/10 4:14

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Cool.
You could just drop the script into a custom block - although I don't know if it would work that way. it wouldn't take much to make the script into a module as-is, without any db connections etc.

You can get the script from
http://scripts.franciscocharrua.com/web-hosting-shopping-cart.php

5
peterr
Re: Web Hosting module
  • 2004/8/10 4:23

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

Bassman wrote:
Cool.
You could just drop the script into a custom block - although I don't know if it would work that way. it wouldn't take much to make the script into a module as-is, without any db connections etc.

You can get the script from
http://scripts.franciscocharrua.com/web-hosting-shopping-cart.php


Thanks for the link to the script, that will be a good start. Yes, as you say, put it in a custome block (like at http://www.jehoshua.net/terms.php ), but maybe the POST wouldn't work ??

Do modules always have to go like this .........

http://example.com/module/webhosting

Hmm, I guess I could still use the module approach for installation and admin useage, but maybe just do a 'header/location' in PHP from a link to point to the /module/webhosting path.

Many ways to skin a cat as they say (but who would want to eat a cat ?? )

Thanks for your help, this will be great, even if I rework it a bit to suit the 3 basic plans that we offer, it will save me a lot of work.

Thanks, much apperciated, :)

Peter

6
Bassman
Re: Web Hosting module
  • 2004/8/10 4:27

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


since it's just a one-file script, all you would have to do really is put in the required includes and stick it somewhere as static content.

Gimme 10 mins, I reckon I could modularise it in a jiffy :)

7
peterr
Re: Web Hosting module
  • 2004/8/10 4:41

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

It works as a 'stand-alone' block, see:

http://www.jehoshua.net/web-hosting.php

after I wrapped the necessary XOOPS 'before/after PHP code', it works okay, the POST is working, but of course, I've lost all those bright 'dazzling' colours (just a minor styelsheet change if I _really_ want them.

I didn't have to add it in under admin, that is, as a block, it simply works 'as is'.

Peter

8
Bassman
Re: Web Hosting module
  • 2004/8/10 4:53

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


well, I did it anyhow :P This way, it gives you an entry in the main menu without hacking.

have a look at www.bassmanthemes.x8r.com

9
peterr
Re: Web Hosting module
  • 2004/8/10 4:56

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

That's incredible, how did you make it a module so quickly ?

I'm impressed !!

Peter

10
Bassman
Re: Web Hosting module
  • 2004/8/10 5:00

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Recent intensive practice :) I've converted a few scripts to modules. It's not hard, especially if there's no database access involved. If you want it to have a look at how it's put together, let me know & i'll put it up for download.

Login

Who's Online

61 user(s) are online (22 user(s) are browsing Support Forums)


Members: 0


Guests: 61


more...

Donat-O-Meter

Stats
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