1
dean_hughes
Using parts of modules in a block
  • 2009/3/2 16:56

  • dean_hughes

  • Just popping in

  • Posts: 6

  • Since: 2009/3/2 1


Hi all,

New to XOOPS and I was wondering if it is possible to include some of the features of installed modules into blocks for displaying on the home page?

Im using the job list module and I would really like to create a block that is a list of all the categories and sub categories from the job list module for quick easy browsing but im really stuck of where to start for learning how all the different includes work and how I would reference from the module in a block. Are there any white papers around that could help me on this? I have a basic php understanding for writing and reading code.

Look forward to any replies.

site : http://www.timetomoveon.co.uk

Thanks,
Dean

2
zyspec
Re: Using parts of modules in a block
  • 2009/3/2 18:34

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


dean,

Yes this can be done by adding blocks to the module. This will require some coding since this block doesn't currently exist (at least not in the version of Jobs that I looked at).

There's a category block very similar to this that was created for the MX-Directory module. It should be relatively straight forward to modify that code to create the block you're looking for. What you'll need to do is:

- Modify ./jobs/xoops_version
- create ./jobs/blocks/jobs_cats.php (or a similar name you prefer)
- create ./jobs/templates/jobs_blocks_cats.html (or a similar name you prefer)
- probably add a few defines to the ./jobs/language/english/blocks.php file

3
dean_hughes
Re: Using parts of modules in a block
  • 2009/3/3 11:17

  • dean_hughes

  • Just popping in

  • Posts: 6

  • Since: 2009/3/2 1


Hi Zyspec,

Thanks for the quick reply. With your advice and a couple of random documents i found on the net i have managed to get my own module published on my site. Now all there i need to do is edit the php to show the cats rather than the latest 5 jobs.

Thanks again for your help!
Dean

Login

Who's Online

457 user(s) are online (177 user(s) are browsing Support Forums)


Members: 0


Guests: 457


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