Joomla add component to database - joomla

I'm just starting out on a component for Joomla. I can't figure out how to add an entry in the dB so I can access the component.
I looked at the dB table for components, but some of the columns seem to require some specific info.
This is NOT a finished component, but a new one I want to build.
I am using Joomla 1.7.
take care,
lee

As Jogesh_p suggested, the easy way is to create an xml file like this
http://docs.joomla.org/Components:xml_installfile
If you are just starting out with Joomla development then take a look at the Hello World tutorial.
http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_01
Another option to create a Joomla component quickly is to use EasyCreator, which will create the basic parts of the extension that you can then build on.

Related

adding data directly to a magento database

I am adding regions of a country to the database in Magento so when a user selects their country a relevant list of regions will be available in a drop down menu. To do this I believe I need to add information to directory_country_region and directory_country_region_name.
The tutorial I've been looking at states that I should add them directly to the database using sql, however I remember reading that you should not place information directly into the database using raw sql when working with Magento.
My questions are:
1- to keep in line with best practices do I need to use some magento functions to add the required information to my database or can they be dropped in using raw sql?
2- if I need to use some Magento functions how do I work out which I need to use (I have heard off and noticed the lack of documentation) or is there some online reference, even if it is limited?
3- if I am not to use a sql query why is it considered bad practice to do so in Magento?
Hello, if you want to add the information just once, you can use raw sql (faster and no drawbacks), also you are right about the 2 tables (if the country is already in directory_country). If you want to make something that will be available for more Magento instalations you have to crate a new Magento module and add the sql using the installer you can read more here http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-6-magento-setup-resources
Magento wiki is a good place to start, also there are lots of blog posts.
It's considered a bad practice because Magento has its own ORM and most of the time for your new tables (entities) you only need to create models that extend magento core models and you will have access to CRUD without any development and everyone that uses your new module will understaind what's going on.
Example for a region you can use the class Mage_Directory_Model_Region or for a collection of regions Mage_Directory_Model_Resource_Region_Collection

Add static javascript to every page of joomla

Im completely new to Joomla development. I need to develop Joomla plugin that adds static javascript to the footer of all the pages of a Joomla site. Also, the plugin would need to save 2 fields in database, and access these fields on per page basis. Also, Admin panel is needed.
Now, my questoion is, where do i start? Joomla plugin development is a big task, so if I can get some pointers as to where to start, it would be very supporting.
Im not asking for direct code, but just the right direction to start.
Thanx in advance....
Joomla has three types of extensions (what you refered to as plugin): components, modules and plugins, where each has a different purpose.
If you need to add javascript to all pages, the best place is your template. If you don't have access to template, just building an extension, then you have to create a content plugin.
If you need to create extension with admin panel which also works with database, you need to create a component. The best place to get started is tutorial Developing a MVC component for Joomla 2.5

Joomla 1.5 - Creating SQL tables in components

Joomla 1.5 has JTable, which can be extended to act as an Active Record system (Create/Read/Update/Delete).
However, I can not find any way for this interface to create the table represented by my JTable sub-class.
Every example I have found has started with "manually create the database tables... ", then created a JTable class to work with it. I would like to be able to distribute my plugin and have it create the tables on setup, so that this is not necessary.
Any easy way to do this?
This is usually done in the install.sql of your extension (The link is related to component but I guess for plugins it's the same).

joomla - how can I create new content types in joomla

I'm new to joomla. I have been using Drupal for quite some time.
I would like to created new content types for news and announcements. How may I accomplish creating new content type in Joomla without installing a new module.
You're coming from Drupal so I am thinking that what you're looking for and cannot find in Joomla is something like CCK (Content Construction Kit)
Unfortunately this is not available by default in Joomla. You have to use extensions to create new types of content that contain specific fields.
Best free CCKs available for Joomla :
Form2Content (my favorite)
K2 (most popular, highly recommended)
You can find more in Joomla Extension Directory
I would say the same, for me i always use k2 as it integrates with many plugins and modules also featuring rich content forms
As per the answer from #Ahmad, install a CCK to add new content types.
In your case however, the built in Joomla functionality may suffice such as creating content categories for news and announcements and choosing menu options or modules to suit.
While K2 is a great CCK, there is a table named "jos_content_types", which makes me think, that joomla can handle content-types as well.
With different views, form-xml files and so one.
I found it while looking on this page: https://docs.joomla.org/J3.x:Using_Tags_in_an_Extension
But i didn't find any doc about creating new content-types easily by now. Does someone have more infos, how to create a new content-Type? Or is it just a new component, we have to create?

Joomla module/component for table administration

My client's website runs on Joomla and they would like me to add some custom functionality to the site.
It is a quotation system, so they will just need to be able to update the values that are used to caluclate the quote. So there would only need to be 4 parts to this:
Settings page in the admin section
Database table that stores the settings
Front end form
PHP script to process the form / query the database table
If I was not using a CMS I could easily accomplish this task but my client would like this system to be integrated with Joomla. Can anyone advise how I should approach this?
You should be able to accomplish this easily with Chronoforms and Chrono Connectivity from Chrono Engine. Use the Chronoforms to create the forms that access the data and Connectivity to display and edit the data.
Forms - http://extensions.joomla.org/extensions/contacts-and-feedback/forms/1508
Connectivity - http://extensions.joomla.org/extensions/directory-a-documentation/faq/5661
Try the Joomla Component Creator it will allow you to get started writing your logic.

Resources