Having trouble creating a new module

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
brianjwagner
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Aug 16, 2010 7:19 pm

Having trouble creating a new module

Post by brianjwagner » Mon Aug 16, 2010 7:43 pm

When I activate the module I just created and navigate to the page its on, the page is completely blank, no errors (even in debug mode). Its doing it right away at the line:

Code: Select all

defined('_JEXEC') or die('Direct Access to this location is not allowed.');
I've removed that for testing purposes and it then dies at the next line:

Code: Select all

require_once(dirname(__FILE__).DS.'helper.php');
I've included the helper file and checked the paths in my module XML config and everything looks good. I've even used the require_once with a direct path map and still have come up empty.

part of the XML:

Code: Select all

<files>
          <filename module="mod_stocks_data">mod_stocks_data.php</filename>
          ...
          <filename>helper.php</filename>
          <filename>tmpl/default.php</filename>
          <filename>tmpl/index.html</filename>
What am I missing?

Thanks.

triman101
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Aug 25, 2010 8:59 am

Re: Having trouble creating a new module

Post by triman101 » Wed Aug 25, 2010 11:45 am

Try looking at some simple module that comes with joomla installation like mod_stats and see how its done properly. I think you are going to need at least 6 files.

Regards

simonaardpress
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 111
Joined: Fri Jul 17, 2009 9:09 am

Re: Having trouble creating a new module

Post by simonaardpress » Wed Aug 25, 2010 1:09 pm

You only need 2 files for a very simple component.

Could you point me to the page you are having trouble with?

brianjwagner
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Aug 16, 2010 7:19 pm

Re: Having trouble creating a new module

Post by brianjwagner » Wed Aug 25, 2010 1:51 pm

Thank you both for your time in reading this question, but I have already corrected the matter. To be honest, I'm not entirely sure what it was that I did to make it work, but I believe I was missing a few files that were to "come first" before I got to the point in my initial post.

@simanaardpress: this is a module in question, not a component.

Thanks for your time.

simonaardpress
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 111
Joined: Fri Jul 17, 2009 9:09 am

Re: Having trouble creating a new module

Post by simonaardpress » Wed Aug 25, 2010 2:25 pm

Sorry, I was thinking module but wrote component :S


Locked

Return to “Joomla! 1.5 Coding”