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 03-31-2004 10:00 PM

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 hack was last updated: Sun December 5, 2004 at 23:00 PDT
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);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_regpmon_title', 'Automatically Send Welcome PM to New Users?', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0',  'setting_regpmon_desc', 'Do you want to automatically send a welcome PM to new users?', '5000');

Uninstall Instructions:

Run the queries in this post, and then remove the hack in register.php (see below).

Look for:
PHP Code:

        // ###################################################################
        // # WELCOME PM HACK BY rob_daemon
        // ###################################################################

 // [. . .] There is code here, but I didn't want to take  up more room

        // ###################################################################
        // # END WELCOME PM HACK
        // ################################################################### 

To configure it after installation, go to: Admin CP --> Options --> vBulletin Options --> User Registration Options

Attached is a screen grab of the PM by default and text instructions. If the file appears corrupt, please see this post.

Boofo 04-01-2004 05:04 AM

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? ;)

rob_daemon 04-01-2004 05:13 AM

Quote:

Originally Posted by Boofo
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? ;)

Yes and yes. Both are now attached to the original post. :)

Boofo 04-01-2004 05:22 AM

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!

rob_daemon 04-01-2004 05:29 AM

Quote:

Originally Posted by Boofo
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!

Hehe :D

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*

Charlie Argueta 04-01-2004 05:52 AM

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

rob_daemon 04-01-2004 06:08 AM

Quote:

Originally Posted by Charlie Argueta
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

Of course... see the long line of ////'s that say CUSTOMIZE HERE?

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.

Charlie Argueta 04-01-2004 06:16 AM

Quote:

Originally Posted by rob_daemon
Of course... see the long line of ////'s that say CUSTOMIZE HERE?

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.

Thanks again:devious: and with the phrase I believe would be perfect :up:

rob_daemon 04-01-2004 06:18 AM

Quote:

Originally Posted by Charlie Argueta
Thanks again:devious: and with the phrase I believe would be perfect :up:

Indeed, but the problem lies in the variables; but I'll see what I can do.

Boofo 04-01-2004 06:31 AM

Is there a way to set this up to test it without a new registration?


All times are GMT. The time now is 12:36 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.01292 seconds
  • Memory Usage 1,749KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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