Rainforest

Sankuru

Implementeren, customiseren, uitbreiden, en troubleshooten van Joomla/Virtuemart

Views: 11960

Wij helpen met ...

Virtuemart
Joomfish
Andere extensies
SocialTwist Tell-a-Friend

Automatische vertaling

English Arabic Chinese (Simplified) German Japanese Russian Spanish



Hergebruik open source

Datgene wat U nodig hebt, bestaat vaak al, en dekt 80% van Uw behoeften. Wij zorgen voor de ontbrekende 20%.

Gratis offerte

Vraag vandaag nog gratis een offerte aan.

Simplifying the Joomla login module PDF Afdrukken E-mail
Waardering: / 14
SlechtZeer goed 
Geschreven door erik   
maandag 10 november 2008 08:57
There are no translations available.

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".


blog comments powered by Disqus
 
 
Joomla 1.5 Templates by Joomlashack