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 06-06-2004 10:43 PM

When it happens, go into the database and make sure that there is something in both the pmtext and pm table.

If there isn't, try rehacking the file; if there is, could you please paste the values of those two rows (and also their appropriate fields)?

MediaHound 06-10-2004 01:01 AM

Quote:

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

Did you see my reply?

rob_daemon 06-10-2004 02:29 AM

Yup... and I can not recreate this on my test forum at all with this hack installed. I'll keep trying various permission combinations.

Kwak 06-14-2004 05:14 PM

Does anyone know if this mini-mod interfere with the v3 Articles hack?

RapCheck 06-14-2004 09:02 PM

whats the difference between this and the welcome pm thats in vb3???

Bryan Ex 06-15-2004 12:03 AM

The welcome message built into VB3 is sent via email... this is by PM when they first login.

RapCheck 06-15-2004 01:38 AM

ummmm, its already in vb3... the last option in the vboptions...

Noiz Pollution 06-18-2004 01:35 PM

Quote:

Originally Posted by RapCheck
ummmm, its already in vb3... the last option in the vboptions...

I don't have that.

RapCheck 06-18-2004 08:10 PM

lol

well thats weird, its not a hack

I have 3.0.0 gold, been there since vb3 beta versions

Boofo 06-19-2004 03:20 AM

Quote:

Originally Posted by RapCheck
lol

well thats weird, its not a hack

I have 3.0.0 gold, been there since vb3 beta versions

The built-in one for for e-mail. This one is for pm. So, yes, it is a hack and no, it is not into vB3 by default. ;)

RapCheck 06-19-2004 08:25 PM

ummmmm hello!! look at the screen shot lol

https://vborg.vbsupport.ru/external/...chmentid=19189


'default PM'

'send default PM to new users?'

I get replies to this PM all the time on my board... lol

Onkel_Tom 06-20-2004 03:28 PM

Hi all,
there is a problem when the username has a ' in the name like "Tom's"
I get a MySQL Error while inserting the PM in the database because the PM receivername will be closed after Tom instead of Tom's.

any idea to fix that ?

Noiz Pollution 06-21-2004 07:59 AM

Quote:

Originally Posted by RapCheck
ummmmm hello!! look at the screen shot lol

https://vborg.vbsupport.ru/attachmen...chmentid=19189


'default PM'

'send default PM to new users?'

I get replies to this PM all the time on my board... lol

Heh, did you have the hack installed on vB2 by any chance?

rob_daemon 06-21-2004 08:07 AM

Quote:

Does anyone know if this mini-mod interfere with the v3 Articles hack?
Sorry, I haven't tested that.

Quote:

ummmmm hello!! look at the screen shot lol

https://vborg.vbsupport.ru/atta...achmentid=19189


'default PM'

'send default PM to new users?'

I get replies to this PM all the time on my board... lol
Whatever that is, it's not standard in vB3.

Quote:

Hi all,
there is a problem when the username has a ' in the name like "Tom's"
I get a MySQL Error while inserting the PM in the database because the PM receivername will be closed after Tom instead of Tom's.

any idea to fix that ?
I just updated the hack to make sure that all strings are protected against quote problems. Follow the upgrade instructions in the first post.

Onkel_Tom 06-21-2004 10:59 AM

thanks for your fast reply and fix of the code rob_daemon ;)

RapCheck 06-21-2004 05:31 PM

Quote:

Originally Posted by 662C
Heh, did you have the hack installed on vB2 by any chance?

I checked and yeah apparently I did


I dont see how its still in the options and works fully with vb3 but anyways I guess I'm lucky, or something.

Noiz Pollution 06-22-2004 08:49 AM

Quote:

Originally Posted by RapCheck
I checked and yeah apparently I did


I dont see how its still in the options and works fully with vb3 but anyways I guess I'm lucky, or something.

Looks like you have been, I had an old portal hack which stayed in my options, didn't do anything but it was there.

b4ne 06-26-2004 01:04 PM

My new users dont get a PM but get the message via email .... any idea how to fix this ?

rob_daemon 06-26-2004 08:25 PM

Quote:

Originally Posted by b4ne
My new users dont get a PM but get the message via email .... any idea how to fix this ?

What do you mean? Do they get the new PM email and not the PM?

SnowBot 06-30-2004 02:14 AM

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
This is still happening even withthe updates. I notice its when the user first registers and the popup comes if the press CANCEL it comes up with this. I mean if they dont read the PM right away we get this error.

rob_daemon 06-30-2004 05:59 AM

Hmm... I'm not sure why that would be happening. I'll see if I can recreate this tomorrow and if I am able to, I'll see if I can't come up with a fix.

SnowBot 06-30-2004 08:24 AM

Cool that will be great :) Thanks for the fast responce :)

Osterling 07-05-2004 05:56 AM

the attachement seems to be messed up.. can some one send me the instructions?

Onkel_Tom 07-06-2004 09:11 PM

Small update to find the correct place to put the code in register.php for vB3.0.2 or 3.0.3:

find:
PHP Code:

$username $_POST['username'];
            
$email $_POST['email'];
            eval(
fetch_email_phrases('newuser'0));

            
$newemails explode(' '$vboptions['newuseremail']);
            foreach (
$newemails AS $toemail)
            {
                if (
trim($toemail))
                {
                    
vbmail($toemail$subject$message);
                }
            }
        } 

after add:
PHP Code:

// ##############################################################################################

        // ###################################################################
        // # WELCOME PM HACK BY rob_daemon
        // ###################################################################
        
        
$username $_POST['username'];
        
        
// Process each one of the replacement vars
        
$vars = array(
            
'$bbtitle' => $vboptions['bbtitle'], 
            
'$username' => $username
            
'$email' => $email
            
'$userid' => $userid
        
);
        
        
$pmoptions['regpmtext'] = $vboptions['regpmtext'];
        
$pmoptions['regpmtitle'] = $vboptions['regpmtitle'];
        
$pmoptions['regpmfrom'] = $vboptions['regpmfrom'];
        
        
// Now that we have the options, we need to process eaach of the 
        // vars we can use
        
foreach($vars AS $_key => $_value)
        {
            
$pmoptions['regpmtext'] = str_replace($_key$_value$pmoptions['regpmtext']);
            
$pmoptions['regpmtitle'] = str_replace($_key$_value$pmoptions['regpmtitle']);
        }

        
$get_pm_from $DB_site->query_first("SELECT username,userid FROM " TABLE_PREFIX "user WHERE userid=$pmoptions[regpmfrom]");
        
        
// Send the new owner a PM
        
$DB_site->query(
            
"INSERT INTO " TABLE_PREFIX "pmtext
            (
                fromuserid,
                fromusername,
                title,
                message,
                touserarray,
                iconid,
                dateline,
                showsignature,
                allowsmilie
            )
            VALUES
            (
                
$get_pm_from[userid],
                '" 
addslashes($get_pm_from['username']) . "',
                '" 
addslashes($pmoptions['regpmtitle']) . "',
                '" 
addslashes($pmoptions['regpmtext']) . "',
                '" 
addslashes(serialize(array($userid => $username))) . "',
                0,
                " 
TIMENOW ",
                1,
                1
            )"
        
);
        
        
$pmtextid $DB_site->insert_id();
        
        
$DB_site->query("UPDATE " TABLE_PREFIX "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$userid");
        
$DB_site->query(
        
"INSERT INTO " TABLE_PREFIX "pm 
            (
                pmtextid, 
                userid, 
                folderid, 
                messageread
            ) 
            VALUES 
            (
                '
$pmtextid', 
                '
$userid', 
                '0', 
                '0'
            )"
        
);
        
// ###################################################################
        // # END WELCOME PM HACK
        // ###################################################################
// ############################################################################################## 

@ rob_daemon
Please update the installation instruction ;)

Kwak 07-07-2004 12:03 AM

[QUOTE=Onkel_Tom]Small update to find the correct place to put the code in register.php for vB3.0.2 or 3.0.3:

find:
PHP Code:

$username $_POST['username'];
            
$email $_POST['email'];
            eval(
fetch_email_phrases('newuser'0));

            
$newemails explode(' '$vboptions['newuseremail']);
            foreach (
$newemails AS $toemail)
            {
                if (
trim($toemail))
                {
                    
vbmail($toemail$subject$message);
                }
            }
        } 



On the register.php file for 3.0.3, I can't find $username = $_POST['username'];

This is the part I think you are talking about:
Code:

$email = $_POST['email'];
                        eval(fetch_email_phrases('newuser', 0));

                        $newemails = explode(' ', $vboptions['newuseremail']);
                        foreach ($newemails AS $toemail)
                        {
                                if (trim($toemail))
                                {
                                        vbmail($toemail, $subject, $message);
                                }
                        }
                }


On top of that code is:
Code:

                if ($vboptions['newuseremail'] != '')
                {
                        if ($havefields)
                        {
                                $DB_site->data_seek(0, $profilefields);
                                while ($profilefield = $DB_site->fetch_array($profilefields))
                                {
                                        $varname = "field$profilefield[profilefieldid]";
                                        $cfield = $$varname;
                                        $customfields .= "$profilefield[title] : $cfield\n";
                                }
                        }


Any idea?

Onkel_Tom 07-07-2004 12:55 AM

In the original file register.php it's line 743 with
$username = $_POST['username'];

rob_daemon 07-08-2004 06:30 PM

Quote:

Originally Posted by exasko
the attachement seems to be messed up.. can some one send me the instructions?

What are you using to view the file? See here.

The file has been updated with the new instructions.

Kwak 07-08-2004 07:40 PM

Code:

Error

SQL-query :

INSERT INTO `setting` ( `varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` )
VALUES (
'regpmfrom', 'register', '1', '1', '', 140, 0, 0
)

MySQL said:
#1062 - Duplicate entry 'regpmfrom' for key 1

[Documentation] ? [Back]

Getting that error message when I query the provided codes on phpmyadmin.
vB 3.0.3.

rob_daemon 07-08-2004 10:02 PM

You don't need to redo the queries if you have already installed the mod.

Quote:

Originally Posted by Upgrade Instructions in the First Post
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.


Onkel_Tom 07-08-2004 10:07 PM

Quote:

Originally Posted by iKwak
Code:

Error

SQL-query :

INSERT INTO `setting` ( `varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` )
VALUES (
'regpmfrom', 'register', '1', '1', '', 140, 0, 0
)

MySQL said:
#1062 - Duplicate entry 'regpmfrom' for key 1

[Documentation] ? [Back]

Getting that error message when I query the provided codes on phpmyadmin.
vB 3.0.3.

that means that you have already the needed setting for regpmfrom in your database !
You can't add a setting twice with the same name.
If you have installed the hack before all is fine and you can proceed with the other instructions. If not you have to check which hack also uses a varname called regpmfrom in the settings table.

Kwak 07-09-2004 12:33 AM

Oh okay. So I applied the hack on the new register.php file (3.0.3) and then tested it out.

I got a new popup so that is a good start. There was no text on the PM so I went to the admin setting.
Under Options, User Registion Options, on the bottom, I only see
"User Who Sends Automatic PM Upon Registration" (which I set to admin) and
"Title Of the PM That is Automatically Sent to New Users."

But I don't see where I could put the Welcome PM text in. ANy idea?

rob_daemon 07-09-2004 02:17 AM

Hmm... I see the problem. Run this query:

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

Kwak 07-09-2004 02:33 AM

Quote:

Originally Posted by rob_daemon
Hmm... I see the problem. Run this query:

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


Bingo! :cool: Thanks a lot rob_daemon. Have a great weekend!

rob_daemon 07-09-2004 04:21 AM

No problem; and have a great weekend yourself :)

kira 07-15-2004 07:45 PM

One of my favorite hacks, ported over wonderfully to vb3. If I hadn't screwed up a query by repeating it accidentally (my fault entirely), this would've been a perfect install!

Great work. Thanks very much!

Bro_Joey_Gowdy 07-20-2004 03:16 PM

clicks install

paulyy 07-23-2004 06:35 AM

This didn't work properly for me either. I followed the instructions like a religious man and one of the queries wouldn't work, also I couldn't find where to "customise" the welcome PM, nor would the title of the PM show.

rob_daemon 07-23-2004 11:02 PM

Hmm... that's very odd. Which query did not work? What version of vB are you running and what is the last updated date on the hack?

paulyy 07-24-2004 03:27 PM

Quote:

vB Version: 3.0.3
What do you mean by 'Last updated date'?

rob_daemon 07-24-2004 05:35 PM

In the hack file, there's a line that says "Last Updated" and there's a date next to it. What is that date?


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.01460 seconds
  • Memory Usage 1,881KB
  • 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
  • (6)bbcode_code_printable
  • (3)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