How can i display login error message in login module

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
indevo
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Sun Aug 16, 2009 9:22 am

How can i display login error message in login module

Post by indevo » Tue Sep 22, 2009 3:31 pm

I wanted to display the error message above the username and password fields.

Currently, its displaying in a right area where content is displayed. Its irrelevant, and not user friendly. So i wanted to display the login error message within the module itself.

Can anybody help me. I have been struggling to do it. even i tried including the jdoc message component in my login form, but its css is not configurable.


please help!!!!!!

Thanks in advance

looshster
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 13, 2009 11:28 am

Re: How can i display login error message in login module

Post by looshster » Wed Oct 14, 2009 5:33 pm

Hey,

Did you ever find a solution for this? I'm looking to do the same thing. Thanks!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26020
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How can i display login error message in login module

Post by Per Yngve Berg » Wed Oct 14, 2009 6:54 pm

The error messages are printet in the message area. Look for this code "<jdoc:include type="message" />" in your template.

looshster
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 13, 2009 11:28 am

Re: How can i display login error message in login module

Post by looshster » Wed Oct 14, 2009 7:00 pm

Thank you so much for your time. But then what do I do with that? I'm a newbie. Thanks again.

looshster
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 13, 2009 11:28 am

Re: How can i display login error message in login module

Post by looshster » Wed Oct 14, 2009 7:05 pm

Ok, so I have this. Obviously it indicates that the message will be displayed in the contentpane. Is there another class (ex. class="modulepane") that I can use? And how would I specify which module? Thanks a bunch for your time.

<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
</head>
<body class="contentpane">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>
<?php endif; ?>

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26020
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How can i display login error message in login module

Post by Per Yngve Berg » Thu Oct 15, 2009 1:33 pm

The message is printed above the component area. You must move <jdoc:include type="message" /> to another location in your template.

The modules are printed with <jdoc:include type="modules" name="left" style="xhtml" />, where name is the position where you publish a module.

Which class names that exists is entirely up to the template. They are defined in the css file.

looshster
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 13, 2009 11:28 am

Re: How can i display login error message in login module

Post by looshster » Thu Oct 15, 2009 2:06 pm

Nice. I'll try it out and see how it goes. Thanks!

User avatar
amymattian
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Wed Aug 12, 2009 5:09 pm
Location: Helsinki
Contact:

How can i display login error message in login module

Post by amymattian » Thu May 20, 2010 6:53 am

Hi,

is it possible to add styling to the message:
<jdoc:include type="message" />

How would I include a colour code and/or font size to that message? Now it is very small and not so clearly visible!

Amy
http://www.kotisivutohtori.fi/
Website Doctor to the rescue...

User avatar
amymattian
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Wed Aug 12, 2009 5:09 pm
Location: Helsinki
Contact:

How can i display login error message in login module

Post by amymattian » Thu May 20, 2010 7:12 am

Hi,

will the message display in all those modules in that specific position? Can I somehow define that it will show only in that module position if there is certain class-suffix.

Here is the code for the module position user1. I have a module-suffix -hilite1 that I could use for the purpose. I just don't know how to add the message line (<jdoc:include type="message" />) and the module-suffix to this code:

<?php if ($this->countModules('user1') or ($subnav and $splitmenu_col=="secondcol")) : ?>
<td class="secondcol">
<div id="secondcol">
<div class="accent"><div class="accent-left"></div><div class="accent-right"></div></div>
<?php if($subnav and $splitmenu_col=="secondcol") : ?>
<div id="sub-menu">
<?php echo $subnav; ?>
</div>
<?php endif; ?>
<jdoc:include type="modules" name="user1" style="xhtml" />
</div>
</td>

Greetings,
Amy
http://www.kotisivutohtori.fi/
Website Doctor to the rescue...

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 27258
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: How can i display login error message in login module

Post by imanickam » Thu May 20, 2010 7:20 am

Yes, you could change the color of the system message by adding appropriate css entry.

For example, in the MilkyWay template, the following css entries are being used for controlling the look and feel of the system messages.

Code: Select all

/* System Standard Messages */
#system-message { margin-bottom: 20px; }

#system-message dd.message ul { background: #C3D2E5 url(../../system/images/notice-info.png) 4px center no-repeat;border-top: 3px solid #DE7A7B; border-bottom: 3px solid #DE7A7B; margin:0px; padding-left: 40px; text-indent:0px;}

/* System Error Messages */
#system-message dd.error ul { color: #c00; background: #E6C0C0 url(../../system/images/notice-alert.png) 4px center no-repeat; border-top: 3px solid #DE7A7B; border-bottom: 3px solid #DE7A7B; margin:0px; padding-left: 40px; text-indent:0px;}

/* System Notice Messages */
#system-message dd.notice ul { color: #c00; background: #EFE7B8 url(../../system/images/notice-note.png) 4px center no-repeat; border-top: 3px solid #F0DC7E; border-bottom: 3px solid #F0DC7E; margin:0px; padding-left: 40px; text-indent:0px;}
For changing the color of the message text all we have to do is add the css entry color to the above css entries.

Other templates have adapted the same technique. Review other templates such as JA Purity for similar kind of informaiton.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Translations Coordination Team | Tamil (தமிழ்) Translation Team

Eegan - Support the poor and underprivileged

User avatar
amymattian
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Wed Aug 12, 2009 5:09 pm
Location: Helsinki
Contact:

How can i display login error message in login module

Post by amymattian » Fri May 21, 2010 9:09 am

Thanks for the info, but I cannot find such lines in any css. Seems that RT Dimentions light does not use separate code for error messages. The font looks exactly the same as the content font.

Would there be possible to add such code to template.css e.g. and what exactly should be added (I dont do coding...so have no idea what to use from that code)?

Thanks for your help!

Amy
http://www.kotisivutohtori.fi/
Website Doctor to the rescue...

User avatar
amymattian
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Wed Aug 12, 2009 5:09 pm
Location: Helsinki
Contact:

How can i display login error message in login module

Post by amymattian » Mon May 24, 2010 7:27 am

Hi,

seems that the template I was using did not have any definitions for system-messages. I tried first editing the template/system files but did not work. Then I added system-message lines to the Template.css file. Actual font-color did not change (came directly from the template.css) but I could change the font size, weight and background color, so that worked.
I added these lines:
/* System Standard Messages */
#system-message dd.message ul {
background: #006699;
border: none;
font-weight: bold;
font-size: 120%;
font-color: #C00000;
}

/* System Error Messages */
#system-message dd.error ul {
background: #BA7C94;
border: none;
font-weight: bold;
font-size: 120%;
font-color: #C00000;
}

/* System Notice Messages */
#system-message dd.notice ul {
background: #EE9600;
border: none;
font-weight: bold;
font-size: 120%;
font-color: #C00000;
}
Otherwise it works but the font-color part did not work but by using a suitable background the error message becomes more visible!

Amy
http://www.kotisivutohtori.fi/
Website Doctor to the rescue...


Locked

Return to “Templates for Joomla! 1.5”