Understanding the Joomla Component File Structure / from URL - joomla

I'm new to joomla and have got a problem with a website.
I need to modify a view and I've been told it is in
http://www.example.com/index.php?option=com_user&view=register&Itemid=68
It has a registration form and i need to modify its field. I've access to FTP only. I need to know where are these files to modify the registration form. If one can describe the meaning of this url structure then it would be very helpful.

You will find the template files in /components/com_user/views/register/tmpl.
However, you should create an html/com_user folder in your template directory with a copy of those files and use a template override ("never" edit core files).
Here are a couple resources that will point you in the right direction:
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Introduction
http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core

com_user means use the user component register view.
Itemid 68 refers to the id of the menu item it is linked from.
You don't want to directly modify any joomla files.
If you want to add a field to registration activate the user plugin or create your own user plugin along the same design but with the fields you want.

It is advisable not to modify the core files directly, they will get overridden whenever the Joomla is updated.
However what you are looking for is available at components\com_users\models\forms\registration.xml file. you can change the default fields of the registration form in this file.
If you would like to add additional fields to registration form, there is a better way:
http://docs.joomla.org/Creating_a_profile_plugin

Related

Joomla - How to create overrides for component files not in view

I am making changes to the JbusinessDirectory in joomla.
I have added some extra fields to the contact form on the business listing using code changes in the companies view. But now I need to send these field inputs by email.
I am trying to add the values to the email template but I can't find a view that I can edit to do this. The files are located at htdocs/components/com_jbusinessdirectory/classes/services/EmailService.php
htdocs/components/com_jbusinessdirectory/assets/defines.php
How can I create an override for this?
I am not even sure these are the exact files I need to work with but they seem to contain the code that creates the email template.

Adding new fields in joomla 2.5 article component

Anybody know how to add custom fields, new fields to enter some values with joomla 2.5 articles in backend.
I want to add some values when i create an article and want to get these values in frontend.
Is there any way i can do this??
Any help will be appreciated.
Thanks in Advance
Tibin Mathew
I think Joomla team predicted that in some way:
Joomla step by step
you would have to
Modify the _content database table
_content is the suffix name of the table that contains all the articles. If you want to add new fields you have to modify this database table to reflect those new fields.
com_content files
com_content is the component in control of articles in both the frontend and backend. It can be found under the components folder under the main directory, and in the administrator/components folder under the main directory. The files in com_content control how the articles are displayed how the form is displayed how actions like save unpublish etc work. So these files will have to be edited to work with your new fields
xml files in the models/forms models/fields
There are XML files under these folders within the com_content folder that tell how the edit form of articles are supposed to be viewed, what type of fields are used, etc. These will have to be modified to reflect your new fields
then you have to do it all again
Each update has updates to the core files (com_content is a core component so all its files are core files). If you go about editing the files in com_content and then do an update these files are more then likely will be overwritten by the update basically losing your modifications. So you would have to redo the modifications.
It is better to make your own component

File location of phtml file of backend admin page

I installed an extension to add custom fields to customer registration form.I want to add some option value in dropdown menu box of input validation in backend admin page..could you plz tell me the path of the folder where can I find the phtml file which is responsible for that part ?
-Thanks.
The files you are looking for are in:
app/design/adminhtml/default/default/template
But just changing the .phtml file won't do the job. The customer model itself should be extended to provide for your extra field. Therefore i highly recommend you to write a module for this instead of altering Magento core code. This to make sure that you can still use updates in the future.
Writing such an module requires more in depth knowledge of Magento. For more information on custom adminhtml see here.
For information on extending the core functionality look here.
If you don't feel like programming this all yourself take a look at customer attribute modules on Magento Connect.

Automatically generating Customer Attribute Form Fields

When you add customer attributes, Magento's admin dashboard for customer's automatically generates the relative form element for that new attribute.
Is there a way to do the same thing on the front end via a controller in a module?
nope, the frontend customer fields are hard coded, check out the phtml inside customer/form to see it.
What are you trying to achieve? Customer attributes are displayed on the form if "Show on frontend" is enabled. However those fields aren't saved from frontend by default. You need to extend fieldsets in your module for that, see config.xml in core Mage/Customer module
EDIT: actually that is true for enterprise edition, on CE you have to edit register.phtml (preferably by making a copy in your theme)

Magento - How to rewrite /app/design/frontend/default/default/template/customer/form/register.phtml

I want to add new field in registration form, should I rewrite /app/design/frontend/default/default/template/customer/form/register.phtml
If yes, how can I do this ??
Well if you want simple, then you can use this module from AITOC - http://www.aitoc.com/en/magentomods_checkoutfieldsmanager.html It allows you to add fields to the registration and store the information in the users profile.
If you're going to do it yourself, you'll have to do more than rewrite the phtml file, you'll have to create a whole extension that allows you to save the data somewhere and associate it with the users profile.

Resources