I was wondering how can you change the text on the Joomla Login Form.
For example:
From Username to Usr,
from Password to Pwd,
and other text also.
Maybe this question has been asked before but I couldn't find anything.
Does anyone know how to do this?
You could do this with a template override, but that won't gracefully handle changes to the template from an upgrade, and you it assumes putting the new strings directly in the template - which won't allow multi-language easily.
The correct way to do this is (as alluded by adjamaflip), through language files.
The main login page for Joomla is through the 'com_users' component, although there is also the 'mod_login' module mentioned by hbit. This process will work for both, they'll just have slightly different files and strings to override (you'll probably want to override both).
If you look at the templates for any component or module, you'll see they have code sections like so:
<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?>
<?php echo JText::_('COM_USERS_LOGIN_USERNAME_LABEL') ?>
This is basically saying 'insert the translated text for WHATEVERSTRING here'. This translated text is stored in the appropriate language file, which will be in '/language/LANG/LANG.com_users.ini' for the 'com_users' component, etc. LANG by default is 'en-GB', so probably for you in '/language/en-GB/en-GB.com_users.ini' you'll find a line like:
COM_USERS_LOGIN_USERNAME_LABEL="User Name"
Now, you could edit that file right there. This will appear straight away on your site, and will handle multi-language properly. But again, this wouldn't survive upgrades very well (if Joomla releases a new version that changes that language file, it'll nuke your changes).
To handle upgrades, they added a new feature in Joomla 1.6 for language overrides. You can add overrides for ANY language file (any component/module/etc) into a separate overrides location, in '/language/overrides/LANG.override.ini'. For example, add the line:
COM_USERS_LOGIN_USERNAME_LABEL="Usr"
Now you've overridden that language string. Add lines for 'MOD_LOGIN_VALUE_USERNAME' etc as well to override the login module and other strings as needed.
Now if you upgrade Joomla, you'll get any changes to those login templates, but won't lose your text changes. You can apply this same process for each language your site is provided in, the overrides will live happily side by side. This will also work for 3rd party components and modules, as long as they're using 'JText::_()' for string output - which they should be.
You do this with so called template overrides. You basically copy a file (where the output of your form happens) to the template directory of your active template. For the login form you it should be like this:
Copy
[joomla]/modules/mod_login/tmpl/default.php
to
[joomla]/templates/[the template you use]/html/mod_login/default.php
It is important to create (if not present) and use the "html" directory in your template directory. Then you edit the new default.php the way you want. The idea is that you do not edit the core files as this is bad practice.
Here is additional information on template overrides: How to override the output from the Joomla! core
Related
My client is using the module Je Quick Contact in their site, in Joomla 3.7.3
As default, the sender email is user's one, but in that way sometimes email goes in spams.
We would like to change it to have a generic send contact#domain.fr, seems we can't handle it in Back-office.
So I tried to override the module to change the sender email.
The module was in modules/mod_je_quickcontact and there there is files mod_je_quickcontact.php, index.html, mod_je_quickcontact.xml and folder CSS, JavaScript, PHP, images
In my template I created a folder mod_je_quickcontact and I put there all thoses elements, and I changed the file mod_je_quickcontact.php
But it's not working, it's still default data which are displayed.
I looked at Internet to see how to override, but for all example I found, in default module there is tmpl/default.php file to override. I don't have such folder and file.
Maybe I missed something or I did it wrong... I don't know what to do know, so, if someone has an idea, it would be great!
I think in Joomla there is only a way to override a template or layout of modules. The module you used is not best practice, because there are not using a default template (tmpl/default.php) to display the output of the module.
Like in Joomla docs mentioned:
The directory structure you need is: TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php
(Source: Joomla override documentation)
What I would do: Copy the module, change it in the way you need it. That´s it.
There have to be a difference between paid and free modules :-P
I have tirelessly tried to create and save an email template to no avail. I have tried different locales and all the templates load fine. But whenever I try to save the template I get this error message - "The template Name must not be empty." although the template name field is filled. What could be the problem?
I strongly recommend the Yireo Email Override extenson (see https://www.yireo.com/software/magento-extensions/email-override). One advantage is templates are stored as files and so can be managed through source control (such as git).
Your problem is mod_security. A fast way to see if that is the problem disable mod_security and try again (http://www.inmotionhosting.com/support/website/modsecurity/disable-mod-security-via-modsec-manager).
Remember to enable again mod_security then find which rule make you problems
http://www.inmotionhosting.com/support/website/modsecurity/find-and-disable-specific-modsecurity-rules
and then make changes to your files (file permission etc.) or you can disable that rules (not recommended).
I had the same issue and addressed it as follows. I deleted most of the content I wanted to have in the email leaving behind just our logo (I suspected the system was rejecting something in the content). I saved the template without most of the content. It saved properly. I then opened up the template and pasted in the rest of my html and saved it.
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 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.
I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in magento. Both the sites are 90% over, last night when i planned to customize the login page i was shocked. The reason is the changes made in first store login page also reflecting in second store also. The login page is curently calling from
frontend/default/default/template/persistent/customer/form/login.phtml
Is it possible to give any custom login page? PLz guide me magento experts......
Please update your post with your frontend/ folder structure down to each theme template folder. It might be that you don't have a copy of login.phtml in the second theme. Moreover you should follow templates best practices as:
Always create for a new shop different packaga. So not
frontend/default
but
frontend/yourcustompackage
Always have default theme left as much untouched, as possible. So in the
frontend/package/default
Should be some basic changes and rules of your package. It means for example in the putting reset.css for all of your themes. Or something like this.
As for me, each store view should have own theme. So, for example, storeview1
frontend/package/storeview1/
There you copy and change files specific for this theme. So, for example, in default you might have login.phtml. But you want storeview1 to have another login.phtml and in storeview2 it should be the same as in default. Therefore you copy the login.phtml from default to storeview1 and change it there. Don't forget to change package and theme in System->Configuration->Design. Package should be change for whole shop and theme should be specified for every store view or left untouched for default.
P.S. Magento theme fallbacks
P.P.S. Try this tutorial or google another one
P.P.P.S. I hope, you got the answer for your question.