Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Example of Module from Component 29 Jun 2013 12:10 #7750

Hello coders,

Please provide some examples of [How to create a Module] from J-Cook Component.

What are the first steps for this ?
What files are required to be included ?

Thank you in advance...

Please Log in or Create an account to join the conversation.

Example of Module from Component 29 Jun 2013 12:24 #7752

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Let's say your component is called 'Awesome'
define('JPATH_ADMIN_AWESOME', JPATH_ADMINISTRATOR .DS. 'components' .DS. 'com_awesome');
@require_once(JPATH_ADMIN_AWESOME.DS.'helpers'.DS.'loader.php');

This is the minimalist code to include your component classes where you want.
Then the best is to check if the component exists, and do not execute anything if the component is missing.

Note : DS must be defined. You can use DIRECTORY_SEPARATOR instead.
Once your component loaded, DS will be defined.

Also : since and thanks to JLoader, when you include these lines, almost nothing is loaded in memory until you start to effectively instance your classes.
A jewel ...
Coding is now a piece of cake
The following user(s) said Thank You: Pantelis

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Example of Module from Component 29 Jun 2013 18:38 #7753

Dear Admin,

Thank you for the information,

We need a complete [How to] example from one J-Cook Component View to show inside a Module.

Can you or anybody help with this ?

Please Log in or Create an account to join the conversation.

Example of Module from Component 30 Jun 2013 18:35 #7774

Thanks Admin..

It works great except for the way to access image.While using below to show the image.

<?php echo JDom::_('html.fly.file', array(
'attrs' => array('center','fit','format:png'),
'dataKey' => 'icon',
'dataObject' => $row,
'height' => 26,
'indirect' => true,
'root' => '[DIR_XXXXXCATEGORIES_IMAGE]',
'route' => array('view' => 'xxxxcontent','layout' => 'contentd','filter_category_id' => $row->id),
'width' => 26
));?>

Class ContentImages not found
Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/xxxx/administrator/components/com_xxxxx/dom/html/fly/file/image.php on line 74


Regards
Vivek

Please Log in or Create an account to join the conversation.

Example of Module from Component 24 Jul 2013 21:10 #10569

As i m getting the text fields nicely i have the same error as vivek when i try to get images...

Is there something we can do about this error ?

Please Log in or Create an account to join the conversation.

Example of Module from Component 25 Jul 2013 06:52 #10574

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Interresting. I will have a look.
Class ContentImages not found
This is not a component Class.

Moved in tickets.
Coding is now a piece of cake
The following user(s) said Thank You: Pantelis

Please Log in or Create an account to join the conversation.

Example of Module from Component 28 Jul 2013 13:24 #10615

Any news with the fix for the Photos ?

Please Log in or Create an account to join the conversation.

Example of Module from Component 12 Aug 2013 14:13 #10769

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.073 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started