![]() |
New User Welcome PM [v2]
This hack will send any new users a welcome PM. This will work in vB3 Gold and probably RC versions as well. I will give support for this hack (if it's needed) in this thread.
If you upgraded your vB version and you are using a hack version prior to July 8, 2004: If you have upgraded vB and your hack version is not July 8, 2004 or newer, run this query (there was a problem with the prior instructions): Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmtext', 'register', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'textarea', 150, 0, 0); This update has a new on/off switch. Update includes: vB 3.0.2/3.0.3 instructions To install follow the instructions in the attached file. Installation Information Files to Edit: 1 Queries to Run: 11 Upgrade Instructions: Open ./register.php and remove the hack (to find the old hack see below). And re-add the updated hack found in the Installation Instructions file. To upgrade to the December 5th release, you'll need to run these three queries: Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmon', 'register', '1', '1', 'yesno', 135, 0, 0); Run the queries in this post, and then remove the hack in register.php (see below). Look for: PHP Code:
Attached is a screen grab of the PM by default and text instructions. If the file appears corrupt, please see this post. |
Can we get a screenshot of what the pm would look like? ;)
And could you please put the code in a text file for anyone that wants that? ;) |
Quote:
|
Thank you, sir. ;)
I was going to do a hack like this myself, but had to stop and remember that I'm an idiot and wouldn't have known where to add this. ;) Clicks install! |
Quote:
It's been on my list of things to do over spring break since the end of my winter holiday; and I'm now finally getting around to it. *feels happy about releasing first hack to public* |
Really nice hack and very friendly to the new users that doesn't know what to do after.
This is your hack, but is it possible to change the welcome text and also translate it to another language, Spanish in my case :D See Ya |
Quote:
Just translate the variable $pmtext and it will change. If you want to use the user's username, you can use $username, and if you want their user ID, use $userid. When you edit the message, make sure you leave it outdented like it is in the default state otherwise your PM will look very strange :eek: I do plan to make these things in the phrase system (or admin cp) in a later version, but I'll need to do some exploration of how do it. |
Quote:
|
Quote:
|
Is there a way to set this up to test it without a new registration?
|
Quote:
|
That's ok, I just realized that I can check my sent message folder after the next new registration. See? I warned you I was an idiot. ;)
|
Quote:
|
Well, I'll just have to hope the next new user saves the message. ;)
Congratulations on your first hack! An excellent job! ;) |
this would be even better if we could set the txt via the acp :)
|
:) seems useful
|
/me Loves this hack! I wille be clicking install when I get home, just getting a list together of the hacks I am going to be installing tonight.
- SpeedysWorld PS: I also think that it should be intergrated into the admincp, it would be better, the vB2 version had that, maybe you should look at the code for that to get some ideas on how to do it, but ovisouly write your own code for it. Great hack for your first release. |
Works great on my forum. I logged off and created a new acct and it sent the PM just fine ;)
|
I'm glad you all enjoy it... I'm looking into the Admin CP integration as we speak.. I hope I can get an update out very shortly :)
|
Nice touch :)
[high]* Beermonster clicks install[/high] |
Nice one.
|
I have updated the hack, and it now has three admin CP options:
PM From, PM Text, and PM Title, all of these are found in the User Registration Options in the Admin CP. |
you should rename it as version two.
|
Great, will definitely add this one :)
|
what about turning it on and off ?
|
Quote:
*puts it on to-do list* |
Quote:
especially since we are going into admin cp changes i thought might aswell make it complete |
Quote:
So, I'm switching hosts; I hope that all goes well :eek: |
Nice Work Robert!
/me feels special as I asked for this mod. Co-owns site with Rob! :P |
i get this when runnin the first query.
SQL-query : INSERT INTO `setting` VALUES ( 'regpmfrom', 'register', '1', '1', '', 140, 0, 0 ) MySQL said: #1136 - Column count doesn't match value count at row 1 |
/me clicks install, great update! works great!
- SpeedysWorld |
Quote:
Code:
INSERT INTO `setting` (`varname`, `groupttitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmfrom', 'register', '1', '1', '', 140, 0, 0); |
I"m using the updated hack..and have no admcp options in user reg? What have I done wrong?
|
I'm using that query u gave me rob and i get
INSERT INTO `setting` ( `varname` , `groupttitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` ) VALUES ( 'regpmfrom', 'register', '1', '1', '', 140, 0, 0 ) MySQL said: #1054 - Unknown column 'groupttitle' in 'field list' |
Quote:
Vivi Ornitier: My bad.. an extra `t` slipped in: Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmfrom', 'register', '1', '1', '', 140, 0, 0); Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmtext', 'register', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'textarea', 150, 0, 1); Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmtitle', 'register', 'Welcome to $bbtitle!', 'Welcome to $bbtitle!', '', 160, 0, 0); |
You might want to let them know how to turn smilies on for the pms (changing the 0 to 1). ;)
Also, can this be set up to only send the pm on activation? I don't allow pms until they are activated. ;) |
Quote:
|
Those all worked rob, yet when i run the 4th query from the install file it gives me
SQL-query : INSERT INTO `setting` VALUES ( 'regpmtext', 'register', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'Hi $username and welcome to $bbtitle!\r\n\r\nWe appreciate you taking the time to register on our site and we hope you enjoy your stay.\r\n\r\nIf you have any questions, you can ask an administrator for assistance.\r\n\r\nWe hope to see you around.\r\n\r\nSincerely,\r\nThe $bbtitle staff', 'textarea', 150, 0, 1 ) MySQL said: #1136 - Column count doesn't match value count at row 1 |
i ran all the queries, have no settings in the ACP under 'User Registration Options'.
|
and now, after saving the settings even though the new ones were not there we have this when trying to register:
Database error in vBulletin 3.0.0: Invalid SQL: SELECT username,userid FROM user WHERE userid=register mysql error: Unknown column 'register' in 'where clause' mysql error number: 1054 Date: Friday 02nd of April 2004 02:54:23 AM Script: http://www.gamers-gateway.com/vb/register.php Referer: http://www.gamers-gateway.com/vb/register.php i have had to shut my board because of this, i trust somebody will be kind enough to help.... |
All times are GMT. The time now is 01:37 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|