Welcome, Guest
Username: Password: Remember me

TOPIC: Module Creation

Module Creation 01 Nov 2013 20:41 #11519

  • sgower
  • sgower's Avatar
  • Offline
  • New Member
  • Posts: 12
  • Karma: 0
How can I create a module to display latest entries in the component?
The administrator has disabled public write access.

Module Creation 04 Nov 2013 17:34 #11536

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Last Edit: 04 Nov 2013 17:35 by twev.
The administrator has disabled public write access.
The following user(s) said Thank You: jcombuilder

Module Creation 06 Nov 2013 05:29 #11544

  • jcombuilder
  • jcombuilder's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 4
  • Karma: 1
Hi Twev and all my old J Cook friend, I'm baaaack.

Just putting it out there.. Does anyone happen to have an existing Module example that they are using with a J-Cook Component to contribute as an example?

He takes a deep breath, I'll give it a day or so and if no on replies I will put something together in a generic kind of way - obviously it has to be specific to the built Component and it's tables. Will see what I can come up with :)

Ah, it's good to be back Home.

Edward Cox
JComBuilder.net (coming real soon..)
I'mmm Back!
The administrator has disabled public write access.

Module Creation 06 Nov 2013 10:29 #11545

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Welcome back.

I have uploaded a zip file of a module I built to go with one of my Cook Creations.

It is a bit rough and ready and untidy as it has "evolved" :S

You can find it here: http://ashdown-software.com/mod_courses.zip

The application is a Course Database and I wanted a module to display the courses coming up for a particular category.

To see it in action look here: http://www.solent-training.co.uk/tm-cpc/road-haulage-cpc
The main component can be found here: http://www.solent-training.co.uk/course-calendar/

To install the module I uploaded it using ftp and used the Joomla 'Discover' facility to install it.

I found this tutorial very easy to follow: www.slideshare.net/vishwashgaur/simple-m...lopment-in-joomla-25

Hope that helps a little.

Trevor
The administrator has disabled public write access.
The following user(s) said Thank You: jcombuilder

Module Creation 11 Nov 2013 20:00 #11574

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
I've been working on a module as well and the code looks pretty much like the example posted here but I thought others might also be interested in knowing that you can use the models from your j-cook components.

Copying from your main component file (e.g. mycomponent.php found in the site folder or in the admin folder of your project) a line that looks something like this (note the comment to help you find it):
//Copy this line to be able to call the application from outside (Module, Plugin, Third component, ...)
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_mycomponent'.DS.'helpers'.DS.'loader.php');

Once you have copied that line to your module file, you can then just use your component's model with code something like this:
$model = CkJModel::getInstance('modelname', 'MycomponentModel');
$model->setState( .... ); // TODO: Set any state variables you want to use
$items = $model->getItems();

Dave

PS. If I'm missing anything hopefully admin will add his thoughts ...
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Module Creation 16 May 2014 17:27 #12444

Hello twev,

can you re-post the link for the module?

thanks
The administrator has disabled public write access.

Module Creation 16 May 2014 19:36 #12445

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Hi Jeffry
I will upload it again when I get back from holiday at the end of the month.
Trevor
The administrator has disabled public write access.

Module Creation 19 May 2014 09:58 #12451

  • omost0m
  • omost0m's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: -2
Thanks for the examples. I was just wondering how you achieved the Category filter on the component frontend page. That's really cool.

It will be very helpful to me if you could give me the detail step by step. I'm struggling with filters (categories, companies, shops etc.) for this site www.bazoolo.at. The forntend you see is totally customized to give that view on the default page. Building filters for it, has been challenging for me as I'm not too familiar with J-Cook.
The administrator has disabled public write access.

Module Creation 02 Jun 2014 20:59 #12464

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
jeffryreed wrote:
Hello twev,

can you re-post the link for the module?

thanks

I have uploaded the example again:
ashdown-software.com/mod_courses.zip

Trevor
The administrator has disabled public write access.
The following user(s) said Thank You: jeffryreed
Time to create page: 0.106 seconds

Get Started