Component Installer Help

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
brandontlyon
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Sep 24, 2007 9:23 pm

Component Installer Help

Post by brandontlyon » Mon Sep 24, 2007 9:32 pm

I have a working component and decided to make an installer to distribute the component... so I used other components as guides to do this.  The _VALID_MOS check is spewing errors on the install.component.php.  Everything above line 20 (sans

Code: Select all


19:// no direct access
20:defined( '_VALID_MOS' ) or die( 'Restricted access' );
21:
22:function com_install() {




Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /mypath/install.mycomponent.php on line 20


User avatar
ianmac
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 237
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Component Installer Help

Post by ianmac » Tue Sep 25, 2007 10:20 pm

well, if you are developing for 1.0 (as it appears since you are using _VALID_MOS), you should have instead:
defined( _VALID_MOS ) or die( 'Restricted access' );

(notice the lack of quotes - PHP is expecting here a constant not a string)

In 1.5, it should be _JEXEC instead of _VALID_MOS.

Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!

brandontlyon
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Sep 24, 2007 9:23 pm

Re: Component Installer Help

Post by brandontlyon » Wed Sep 26, 2007 3:18 am

ugh, always something obvious  :P
thanks


Post Reply