News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Add Password Message below Password on Registration page

Started by laural4705, April 21, 2014, 02:56:55 PM

Previous topic - Next topic

laural4705

I hope I am posting this in the right location...

On the registration page to my forum the password (which is set to high) has a yellow alert triangle next to it, when you mouseover the triangle, there is a message that tells the user what must be included in the password.  I would like to have that message displayed below the password fields so that it is always available and in view for the user.  I am not sure where to add this line of text and was hoping someone could point me in the right direction... thanks!

margarett

It should be possible and should not be too difficult. For anyone who understands JS, which is clearly not my case :(

There is already the function that rewrites the image properties, so it should be more or less easy to take the already processed data and to stuff the text in a field somewhere.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

I think there's more to it, because it needs to change dynamically when the "alt" text of the image changes ;)
So it needs to be done in JS...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

???   What?

Where do you get a request for a dynamic change from the original request?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

The text in the yellow triangle, that changes while you are entering the password (too short, don't match, is valid...)

At least, that was what I understood...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

laural4705

Thanks for the replies.   I had intended on putting a static statement in the register file, but I have not been able to figure out where in that file I could place the message.  I have tried a few places and have not had success.  I could see how this may need to be a dynamic solution, but in this particular case, the forum will always require the highest password, so the message can be static.

If anyone knows where in the register file I can place this static text, please let me know :)  Thanks!

margarett

An easy fix:

Register.template.php, find:

<span id="smf_autov_pwmain_div" style="display: none;">
<img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
</span>

Add after:
<br />
<span class="smalltext" style="font-weight: bold;">Please define a strong password!</span>
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: