|
I am currently the only user submitting content to this website, and therefore, the only one who needs to log in. Since I do not really need the Remember me?, Forgot your password?, or Forgot your username? options in the login module, I started figuring out how to get rid of these options. Of course, I could have gone to the modules/mod_login module folder, and start hacking there, but the 1.5 Joomla has a better way. The modules/mod_login folder belongs to the core Joomla distribution. It will normally be overwritten during the next upgrade. Even though it is sometimes inevitable, it is always better not to modify core distribution files. Therefore, instead of modifying the core mod_login module, I followed the steps explained in the Joomla template overrides tutorial and copied the internal template, tmpl/default.php for mod_login to the templates folder, in order to modify it there: $ mkdir -p templates/js_jamba/html/mod_login $ cp modules/mod_login/tmpl/default.php templates/js_jamba/html/mod_login Note: js_jamba is my default template. Replace this part with your default template. As I noticed in the default.php file, it is not necessary to modify the template in order to take away the "Remember me?" field. You can take away this field in the administrator's Plugin Manager, by disabling the "Remember me" system plugin. No such luck for the "Forgot your password?" and "Forgot your username?" fields. There is no other way to get rid of them, than commenting out (or deleting) the following lines of code: <!-- <?php echo JRoute::_("index.php?option=com_user&view=reset"); echo JRoute::_("index.php?option=com_user&view=remind"); $usersConfig = &JComponentHelper::getParams( 'com_users' ); if ($usersConfig->get('allowUserRegistration')) : echo JRoute::_("index.php?option=com_user&task=register"); --> This system of template overrides is applicable to any module or component internal templates, on the condition that they are written in the Joomla 1.5 MVC style (Model-View-Controller). Note: 21.MAY.2009. After installing the Agora forum extension, I had to re-introduce "Remember Me?", "Forgot your password?" and "Forgot your username?" for this site. Reversing these changes can easily be done, simply by re-activating the Remember Me plugin and renaming the "mod_login" template override to something else, such as "mod_login_old".
|