Query in package

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.
Locked
polleke
Joomla! Intern
Joomla! Intern
Posts: 82
Joined: Thu Aug 31, 2006 6:32 pm

Query in package

Post by polleke » Thu Aug 21, 2008 12:04 pm

Hi
i made a component only for frontend use.
I made an installationpackage. But to install a component without a backend-part i use a query to register the component.
Here i use the following in my package:

Code: Select all

  
<queries>
	<query>
      INSERT INTO `#__components` (name, link, admin_menu_link) VALUES ('JBDateConv', 'option=com_jbdateconv', 'option=com_jbdateconv');
	</query>
  </queries>
But the link and the admin_menu-link are not filled in in the table jos_components, only the name.
This worked fine in joomla 1.1 and now it doesnot in joomla 1.5
What did i do wrong. Or is there a better way to register a frontend-only component?

kind regards
Jan

polleke
Joomla! Intern
Joomla! Intern
Posts: 82
Joined: Thu Aug 31, 2006 6:32 pm

Re: Query in package

Post by polleke » Thu Aug 21, 2008 12:45 pm

After debugging i saw the following:
INSERT INTO jos_components VALUES( "", 'JBdateconv', '', 0, 0, '', 'JBdateconv', 'com_jbdateconv', 0, '', 0, '', 1 )

the XML-file says:

INSERT INTO `#__components` VALUES ('', 'JBDateConv', 'option=com_jbdateconv', 0, 0, '', '', 'com_jbdateconv', 0, '', 1, '',1);

So the third field (link) is left blank by the installer. And thats one i need if i want to use in one of the front-end-menus.
Also it insert a value in the seventh field.

Why is this ?

kind regards Jan


Locked

Return to “Joomla! Coding 101”