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
Related
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.
I am working on magento 1.9 version.I want to add a custom image field in drop down of custom options.
I added a text field using following guide
http://magento.ikantam.com/qa/how-add-custom-attributes-custom-options
which is working fine.but when I add a file field then it shows in admin but not save image field value in database.
please help me to solve this.
Neeraj,
Did you specifically click "flush cache storage" By following this guide and adding new tables directly to the database, Magento already has this record in cache. By flushing cache storage, you will allow magento to recognize the new structure and be able to save the record. I have accidentally forgotten to do this quite a few times and you end up with the inability to save a record even though your structure is there.
I have downloaded Youama Ajax Login and Register magento extension.
Its working perfectly.But it has less fields in registration. I want to add more fields in the magento extension like phone no,pincode etc..how to edit magento extension?
Hello check below path & more fields.
app/design/frontend/base/default/template/youama/ajaxlogin/ajaxlogin.phtml
To keep extension more or less upgradeable and do some customization in same time you should copy key .phtml files to your theme folder and do customization over there.
For example copy
app/design/frontend/base/default/template/youama/ajaxlogin/ajaxlogin.phtml
to
app/design/frontend/default/{yourtheme}/template/youama/ajaxlogin/ajaxlogin.phtml
and edit it there (only files you want to edit).
On the other side blocks, models, helpers and controllers should be overridden if customization is needed. You can check overriding process in this article by one of my colleagues.
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
I tried to override profile.xml file along with edit.php (view file) by placing them within templates/template_name/html/com_users/profile folder, and also made sure the edit.php file know about new profile.xml ($this->form->loadFile( dirname(__FILE__) . DS . "profile.xml");) but i cant seem to make it work while updating custom fields from profile editing page at the front end. Also i can see that custom fields are not in order as it should be with respect to profile.xml. Please somebody help me...
You can't override an Joomla xml file. You need to create a user plugin to install separately for the form fields to appear. There is a profile plugin that comes with the default Joomla installation. Further details on this can be found here.