By VinceDee on
I installed logintoboggan and would like to pre-authorize new users to use the site. The message that they currently get right after submitting their new user information is something to the effect of: "you new user name and password have been emailed to you. You must check your email to access this site."
In fact, they already have nearly full access to the site, and I want that message to tell them that.
Is there a php file that needs to be modified for me to change that message?
Thanks,
Vince
Comments
Translate With Locale
This message?
There is not currently a theme function for that. But maybe there should be a setting for what that message says. You could make a feature request for this with some specifics about how you are using the module and how this feature might be implemented.
In the meantime, there is a trick to change ANY text that Drupal displays by using locale.module and creating a new translation language. Then searching for the phrase above and "translating" it to something else.
I'll bet someone has written up this in the handbook. Maybe it's in here? If not, someone should write that!
--= Jeff Robbins | www.lullabot.com =--
Once again, I solved my own problem
I know that that's a good thing, but I think it's worth posting both the question and the answer so that other's can find it without having to resort to trial and error experimentation. I may be comfortable doing that kind of stuff, but I'm sure most Drupal users would just like to get something done.
Anyway, here's how you can change the immediate access message in LoginToboggan:
1. Edit the logintoboggan.module
Line 276 of the logintoboggan.module says
drupal_set_message(t('A validation email has been sent to your e-mail address. You will need to follow the instructions in that message in order to gain full access to the site.'));
Just change it to whatever you want, and save.
Hope this helps someone,
Vince
---------
The hottest Linux distribution? Ubuntu
The place to talk about Ubuntu Web Servers?
http://www.ubuntuwebservers.com
FYI, this is bad advice...
The main advantage of Drupal is that you should never (or very rarely) need to actually go in and hack the PHP of the modules/core files themselves, thanks to features like the locale module and the hooks system.
What happens when you start messing with these files is you need to remember all the changes you made, because when you eventually upgrade your site to 4.7 (or 4.8, or 5.0...) you will need to re-make these changes over and over each time.
Furthermore, things will often change around from version to version, enough so that you'll end up spending A LOT of time trying to find that same spot you changed in the module before it.
So use locale as jjeff pointed out for simple text changes like this. It's the Drupal way. :)
I'm happy that you corrected my mistake
I'm quite used to having to modify stuff on my own, manually. And my solution worked, so no harm, no foul, right?
I would rather stick to "best practices", however, so I'll do it your way.
Is the recommended method the same one as in this post?
http://drupal.org/node/50532
Because I did that exact change ("read more" to "read full article"). Does that mean that all I have to do is go back into that same language "set string" area, search for the phrase that I want to change, and change it?
I'm going to try it out, anyway...be back in a minute.
Vince
EDIT: I'm back, it worked, we're good.
The instructions for other newbs (like myself):
1. Go to this link: http://drupal.org/node/50532#comment-95174
2. follow Richard Eriksson's instructions to change whatever text you're trying to change in Drupal. Note my post just below his if you're having problems figuring out what "populate the strings" means (I still don't know...lol).
---------
The hottest Linux distribution? Ubuntu
http://www.ubuntuwebservers.com
Cool!
Glad you got it figured out. :D I only mentioned it because:
1. Someone might stumble across it and think, "Oh cool, here's a quick fix" without realizing the ramifications of changing around code.
2. I know most peoples' experience comes from web apps where the ONLY way to change something like this is to go in and hack up the file (there are whole sites dedicated to "phpbb hacks" and this kind of thing). So they may not realize there is a cleaner, alternate approach in Drupal.
3. The locale module is very useful but not very well-known, so I figured I'd pimp it a bit. ;)