vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   New User Welcome PM [v2] (https://vborg.vbsupport.ru/showthread.php?t=63269)

rob_daemon 05-10-2004 04:29 AM

If the queries mess up, they can not be undone in the sense of "Control + Z" but there are queries that you can run to undo their action.

And run it via the manual query; copy and paste each line (full line, not word-wrapped ones) into the box and run the query.

bloodcult 05-11-2004 10:30 AM

nice hack, thanks!

ranger2kxlt 05-12-2004 04:47 PM

Not working for me. I installed it and the actual file hack is the problem. I did do the edit user registration options in the admincp and saved it but still have an sql error. When i remove the edit from register.php everything works fine (no pm of coarse, but also no errors). Any idea?

rob_daemon 05-12-2004 11:31 PM

What's the error?

ranger2kxlt 05-13-2004 05:17 AM

Doesnt give an exact error, just says sql error.

rob_daemon 05-13-2004 05:45 AM

Then view the source and you should see the SQL error. Paste that here.

ranger2kxlt 05-14-2004 01:21 AM

wow never knew that before...

HTML Code:

<!--
Database error in vBulletin 3.0.0:

Invalid SQL: INSERT INTO pmtext
                        (
                                fromuserid,
                                fromusername,
                                title,
                                message,
                                touserarray,
                                iconid,
                                dateline,
                                showsignature,
                                allowsmilie
                        )
                        VALUES
                        (
                                ,
                                '',
                                'Welcome to ThunderBirdNest.com Forums!',
                                'Hi test1 and welcome to ThunderBirdNest.com Forums!

We appreciate you taking the time to register on our site and we hope you enjoy your stay.

TBN features some great options for you as a member! 
1)  A fully functional gallery that allows your to store your images online with us, and share them with the rest of the world without paying for webspace!  You are given 512kb of webspace for free to host your images!!  However you can upgrade this amount to 10gigs for a very small fee.  See below for details.
2)  Huge Discounts from our Supporting Sponsors.  You can literally save hundreds on top items for your Thunderbird.  For example, get a borla exhaust complete setup for ONLY $635!  That alone is a savings of over $100 off retail pricing.  For information on how to subscribe to our discount forums... please see details below.
3)  An online chatroom.  Not only can your talk on our forums, but we offer live chat with any members you wish to talk to.  Just visit our free chatroom!
4)  An events gallery!  We keep all our images from all our events.  TBN hosts some of the largest club events in the country!  Check out our events gallery to experience what its like to have 50-60 Thunderbirds all together!
5)  Get your own Email address!  For information on how to order your own email address, see details below!
6)  So much more!  What are you waiting for?  Check out our account upgrade options and then head over to the New Members area and tell us about yourself!!

For information on how to order any of our upgrade options, please visit the following link!
[url]http://www.thunderbirdnest.com/forums/subscriptions.php[/url]

If you have any questions, you can ask an administrator for assistance.

We hope to see you around.

Sincerely,
The ThunderBirdNest.com Forums staff

Note:  Please do not respond to this message.  Thank you.',
                                'a:1:{i:1867;s:5:\&quot;test1\&quot;;}',
                                0,
                                1084501190,
                                1,
                                1
                        )
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '
                                '',
                                'Welcome to ThunderBirdNest.com Forums!',
                                'Hi

mysql error number: 1064

Date: Thursday 13th of May 2004 09:19:50 PM
Script: [url]http://www.thunderbirdnest.com/forums/register.php[/url]
Referer: [url]http://www.thunderbirdnest.com/forums/register.php[/url]
Username: test1
IP Address: 24.155.68.136
 -->


ranger2kxlt 05-14-2004 01:28 AM

could it be that extra comma that is in the text?? right below VALUES??

Im not sure where that is coming from however because it is not in our sourcecode like this.

ranger2kxlt 05-14-2004 01:35 AM

found the problem! My stupid fault... i had the wrong userid in the spot for the person in the from section of the pm. Thanks for your help.

rob_daemon 05-14-2004 04:18 AM

Quote:

Originally Posted by ranger2kxlt
found the problem! My stupid fault... i had the wrong userid in the spot for the person in the from section of the pm. Thanks for your help.

I'm glad to hear that.. but if you hadn't figured it out I'd have been clueless :p

MaxScript 05-18-2004 03:13 AM

how you make to NOT make a popup ?

rob_daemon 05-19-2004 12:32 AM

As of now, there isn't a way; you'd have to disable the JavaScript popup in the Default Registration Options.

armani1072 05-20-2004 09:41 PM

[
PHP Code:

INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmfrom''register''1''1'''14000);
INSERT INTO phrase (phraseidlanguageidvarname, `text`, phrasetypeidVALUES (NULL'0''setting_regpmfrom_title''User Who Sends Automatic PM Upon Registration''5000');
INSERT INTO phrase (phraseidlanguageidvarname, `text`, phrasetypeidVALUES (NULL'0',  'setting_regpmfrom_desc''Enter the user ID of the person whose account you\'d like to be used when sending new users a welcome PM upon registering.''5000'); 


I added a prefix of 'vB3' to all the tables in my database when i uploaded it. so if i were to run this query where would i make the changes? any help would be great. thanks

rob_daemon 05-20-2004 11:46 PM

Here:

Code:

INSERT INTO `PREFIX_setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmfrom', 'register', '1', '1', '', 140, 0, 0);
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_regpmfrom_title', 'User Who Sends Automatic PM Upon Registration', '5000');
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0',  'setting_regpmfrom_desc', 'Enter the user ID of the person whose account you\'d like to be used when sending new users a welcome PM upon registering.', '5000');


INSERT INTO `PREFIX_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);
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_regpmtext_title', 'Welcome PM Text', '5000');
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0',  'setting_regpmtext_desc', 'Set the text of the PM sent to all new users.<br />\r<br />\rNote: You can use the following variables to specify the <b>user\'s</b> information: $username, $userid, $email. And you can use the $bbtitle to specify the board\'s name.', '5000');


INSERT INTO `PREFIX_setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('regpmtitle', 'register', 'Welcome to $bbtitle!', 'Welcome to $bbtitle!', '', 160, 0, 0);
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_regpmtitle_title', 'Title Of the PM That is Automatically Sent to New Users', '5000');
INSERT INTO PREFIX_phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0',  'setting_regpmtitle_desc', 'Set the title of the PM that is sent to all new users automatically. You can use the same variables as the ones that you can use for the PM text (see above).', '5000');

Just replace all instances of 'PREFIX' with your database prefix.

armani1072 05-20-2004 11:50 PM

thanks i will give it a try :)

Rick Sample 05-20-2004 11:51 PM

I'm just affraid to install this hack, yet I really need it to encourage members to post. I just don't like how it says SQL querys can't be undone. I know I would have to run the querys via the admin cp, but it just gives me creaps because I have no experience in restoring a database or anything.

Any suggestions?

armani1072 05-21-2004 12:01 AM

worked great thanks alot rod :)



**clicks install**

armani1072 05-21-2004 12:02 AM

Quote:

Originally Posted by muscle-mustangs
I'm just affraid to install this hack, yet I really need it to encourage members to post. I just don't like how it says SQL querys can't be undone. I know I would have to run the querys via the admin cp, but it just gives me creaps because I have no experience in restoring a database or anything.

Any suggestions?


if you need to delete a query rob shows how to do it in post #72 of this thread.

rob_daemon 05-21-2004 12:03 AM

Quote:

Originally Posted by muscle-mustangs
I'm just affraid to install this hack, yet I really need it to encourage members to post. I just don't like how it says SQL querys can't be undone. I know I would have to run the querys via the admin cp, but it just gives me creaps because I have no experience in restoring a database or anything.

Any suggestions?

All of the queries have counter queries if you need to undo it. It is virtually impossible for this to screw up anything because you are merely inserting rows into the database, not overwriting anything or changing the structure of the database.

Rick Sample 05-21-2004 12:10 AM

Quote:

Originally Posted by rob_daemon
All of the queries have counter queries if you need to undo it. It is virtually impossible for this to screw up anything because you are merely inserting rows into the database, not overwriting anything or changing the structure of the database.

virtually impossible, hmm.....well you don't know me LOL...I'm like tim taylor on tool time LOL.

To test it to make sure users can still register, should I try to register after I do this hack, just to see if its all working?

If so, I'll prob give this a try later tonight, to see if I can get it going or not! It looks easy though, just sounds disasterouse!

Rick Sample 05-21-2004 12:29 AM

quick question,
1. lets say after I open admin cp and run each query individually, how can I test to see if it worked? I mean will I see side effects if it doesn't?

2. I forget should I run it manually or automatic in the admin cp

3. I created the board, but it says I don't have permissions to exicute an SQL query. I know when I transfered my PHP board, it transfered my admin account, then created another admin account. I deleted that without thinking. So how do I make myself a super admin again???


Thanks for all of your help :)

rob_daemon 05-21-2004 12:59 AM

Quote:

To test it to make sure users can still register, should I try to register after I do this hack, just to see if its all working?
Yup... and then delete the user in the Admin CP when you are done.

Quote:

lets say after I open admin cp and run each query individually, how can I test to see if it worked? I mean will I see side effects if it doesn't?
To see if it worked, go into the Admin CP --> vBulletion Options --> User Registration Options

And there should be three new options: Registration PM From, Text, and Title.

Quote:

I forget should I run it manually or automatic in the admin cp
You do them manually by pasting them into the query box.

Quote:

I created the board, but it says I don't have permissions to exicute an SQL query. I know when I transfered my PHP board, it transfered my admin account, then created another admin account. I deleted that without thinking. So how do I make myself a super admin again???
http://www.vbulletin.com/docs/html/m...ntenance_query

josh929 05-21-2004 07:03 AM

i would like to install this hack. however, i know absolutely NOTHING about mysql.

i would be able to run the queries just fine, but i need to know now to uninstall the hack for future upgrades and whatnot. if anyone could provide an exact undo of every change to the database (putting it back just like it was before the hack was installed), that would be fantabulous. i could then install the hack without worrying about foreign things in my vbulletin database that i have no idea how to get rid of. :)

if this is alot of work, then nevermind. :)

rob_daemon 05-22-2004 02:04 AM

The following two queries will undo any database changes:

Code:

DELETE FROM `setting` WHERE `varname` IN ('regpmfrom', 'regpmtext',  'regpmtitle');

DELETE FROM `phrase` WHERE `varname` IN ('setting_regpmfrom_title', 'setting_regpmfrom_desc', 'setting_regpmtext_title', 'setting_regpmtext_desc', 'setting_regpmtitle_title', 'setting_regpmtitle_desc');


josh929 05-22-2004 11:28 PM

thanks :)

MediaHound 06-03-2004 07:14 AM

Thanks a lot for this hack!

Onkel_Tom 06-03-2004 09:30 AM

Thanks for this hack !
click install ;)

contramontanum 06-03-2004 01:24 PM

Ran all queries, clicked "save" in ACP User registration options and did the file edit. When I registered a test user I got an error message that there was a problem with the database. This is the error msg that was emailed to me.
Quote:

Database error in vBulletin 3.0.0:

Invalid SQL: INSERT INTO pmtext
(
fromuserid,
fromusername,
title,
message,
touserarray,
iconid,
dateline,
showsignature,
allowsmilie
)
VALUES
(
,
'',
'Welcome to Loudmouth Discussion Forums!',
'Hi testuser and welcome to Loudmouth Discussion Forums!

We appreciate you taking the time to register on our site and we hope you enjoy your stay.

If you have any questions, you can ask an administrator for assistance.

We hope to see you around.

Sincerely,
The Loudmouth Discussion Forums staff',
'a:1:{i:89;s:8:\"testuser\";}',
0,
1086272221,
1,
1
)
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '
'',
'Welcome to Loudmouth Disc

mysql error number: 1064

Bryan Ex 06-03-2004 03:26 PM

Looks like exactly what I was after. Just so I'm clear on this... do PM's need to be enabled for users awaiting email confirmation or will the welcome PM just wait until the account is activated?

rob_daemon 06-03-2004 05:08 PM

Quote:

Ran all queries, clicked "save" in ACP User registration options and did the file edit. When I registered a test user I got an error message that there was a problem with the database. This is the error msg that was emailed to me.
It appears that you don't have a user set for the registration PM to be from. Go into the Admin CP and make sure that 'User Who Sends Automatic PM Upon Registration' has the proper value.

Quote:

Looks like exactly what I was after. Just so I'm clear on this... do PM's need to be enabled for users awaiting email confirmation or will the welcome PM just wait until the account is activated?
The PM will be sent upon the user hitting the final button in the registration system... since there is no "PM Que" in vB, the user will get the welcome PM notice right after they register (even if they haven't activated yet). And the hack simply puts the PM in the user's inbox without any regards for permissions.

contramontanum 06-03-2004 08:01 PM

Thanks Rob, that did the trick. Very useful hack indeed! Is there a way to format the text in the welcome mail to put in links (to other pages on the forum)? I noticed HTML doesn't work.

rob_daemon 06-03-2004 08:52 PM

Glad that did the trick :)

Standard vB code will work.

r6xual 06-04-2004 12:30 AM

**install**

Flawless install for me.

MediaHound 06-04-2004 03:16 AM

First off, thanks for a great hack. It's exactly what I was after.


Quote:

Originally Posted by rob_daemon
The PM will be sent upon the user hitting the final button in the registration system... since there is no "PM Que" in vB, the user will get the welcome PM notice right after they register (even if they haven't activated yet).

That being said,
I just installed it, and ran the first test of a new user registration.
I was alarmed to see the PM before I clicked the link in the email that I was supposed to click before becoming a member. I was even more alarmed to be taken to my inbox with no problem after clicking 'ok' to accept the PM.

Quote:

Originally Posted by rob_daemon
And the hack simply puts the PM in the user's inbox without any regards for permissions.

If I were a slow or stupid end user on my board, and as soon as I registered and was taken to my inbox, I would think I'm all good to go. I might not realize that there was still a link to click in my email before I was given permissions.

The defalut PM your out of the box hack should include, should tell the user that they still need to check their email and click a link, (if the board requires it).

Had I seen that as the PM I wouldnt have been so alarmed, as the webmaster.
That scared the ** out of me because I thought my users now didnt need to click the link in the email to get their permissions.

Just could have been a little less harsh with that surprise.

Off to my sites!
Thanks again,

MH

rob_daemon 06-04-2004 03:32 AM

Hmm... it really let you go into the inbox before you activated your account? That shouldn't happen (I think)... I'll do some testing tomorrow (or later tonight) to see if I can figure out why you were able to view your inbox prior to activation as vBulletin should prevent that from happening.

Another alternative would to hide the popup box when inserting the PM into the database, but new users who are not familiar with a forums system may not notice the "You have 1 new PM" in the upper right corner. I wonder if there is a way to suppress email messages about PMs, though....

MediaHound 06-04-2004 04:40 AM

Quote:

Originally Posted by rob_daemon
Hmm... it really let you go into the inbox before you activated your account? That shouldn't happen (I think)... I'll do some testing tomorrow (or later tonight) to see if I can figure out why you were able to view your inbox prior to activation as vBulletin should prevent that from happening.

After a user registers, they are told they need to check their email. That message:

"Thank you for registering, testuser6. An email has been dispatched to testuser6@edit.com with details on how to activate your account. Click here to return to where you were previously.

You will receive an email in your inbox. You MUST follow the link in that email before you can post on these forums. Until you do that, you will be told that you do not have permission to post."

If they click 'here' to return to where they were previously, bang, the popup (as well as the page I was previously on). The popup then takes me to the inbox, and I'm in.

I see how this could be confusing to inexperienced users.

MediaHound 06-04-2004 04:48 AM

Just for the record, I'm also able to reply to the message. Not cool.

Also,
I set up "Welcome Message Ghost" as the user who 'sends' this PM, so I as the admin dont get bombarded with newbie pms.

And the subtitle on this new user tells them:
"Please do not reply to me. I'm just a robot. Use the 'contact us' link for assistance."

This will help cut back the time I spend chatting 1 on 1 with new members unnecessarily.

But, back to it - I think it's not so cool that they can read and write from the inbox if they aren't 'opted in' by clicking the link they were sent.

Your hack is excellent in 99% of its regards, except that the uses can kind of 'get in the side entrance' per say.

rob_daemon 06-04-2004 04:55 AM

What are your permissions on the "Users Awaiting Email Confirmation" usergroup?

MediaHound 06-04-2004 05:48 AM

Quote:

Originally Posted by rob_daemon
What are your permissions on the "Users Awaiting Email Confirmation" usergroup?


It's a lot of variables.
Everything is set to 'NO', except for the following, which are yes:

Usergroup Options:
Allow Users to have Member Groups (Sets whether or not permissions from the user's member (secondary) user group memberships are inherited or not)

General Permissions:
Can View Member Info
Can Edit Own Profile
Can Set Self to Invisible Mode
Show edited by note on edited messages?
Can Use Signatures

Forum Viewing Permissions
Can View Forum
Can View Others' Threads
Can Search Forums

Who's Online Permissions
Can View Who's Online

If I left it out, its because it is set to 'NO', or it's a file size variable that wont matter here.

Many thanks,

MH

SnowBot 06-06-2004 09:28 AM

I have had this being reported afew times now and was hoping someone can advise me on what to do. ?

Quote:

Hi Snowy

I'm getting the flashing Private Messages indicator in the NAVbar and within my UserCP is states I have 1 unread PM, but I don't have any.

Any ideas?

Cheers

Its happening all the time and i have to go in and delete it in the database :( not good, any ideas ?

Thanks


All times are GMT. The time now is 12:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01624 seconds
  • Memory Usage 1,874KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete