Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 07:04 am EST
Geeklog Forums
Welcome email
Dirk
Sometimes, the welcome mail that Geeklog sends to new users (and which contains their username and password) is just not flexible enough. E.g. you may have some sort of promotion running and want to point new users to it. Or you just want to tell them more about the site in that mail.
Well, here is a simple hack for that problem ...
The idea is to use Geeklog's template class on a text file. This allows the use of variables, e.g. for the username and password as well as for the site name and URL. Other than that, it's just a simple text file you create which contains the email you want to send to new users.
All you need is a modified version of the function emailpassword() from users.php and the actual email file, which I put into /path/to/geeklog/plugins/welcome_email.txt
When the text file does not exist, Geeklog will send the standard email again. So you can simply delete (or rename) the file if you don't need it temporarily.
Have fun.
bye, Dirk
Dirk
I originally suggested putting the welcome text into the language directory. However, that is not a good place since it will then show up in your display preferences where you can select it as a language file ... So I've changed the story and the replacement emailpassword() function to use the plugins directory instead.
bye, Dirk
etegration
http://www.etegration.com.sg
http://www.itcow.com
http://www.ministryofhosting.com
Dirk
Paul
Dirk
Paul
Dirk
Paul
Dirk
function moderateusers()
in admin/moderation.php is very similar to that of function emailpassword()
.
If you replace the part that starts with $mailtext = \"{$LANG04[15]}\\n\\n\";
and ends with $mailtext .= \"{$_CONF[\'site_url\']}\\n\";
with the if (file_exist ...) ... else ...
block from the hacked emailpassword()
function it should work (I think - haven\'t tested it).
bye, Dirk
Paul
Paul
emagin
Dirk
It has been integrated into Geeklog for a while now (since 1.3.10). The file has to be placed in the "data" directory now, but other than that it works as described above.
bye, Dirk
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content