PDA

View Full Version : Send default PM to all new users


Sparkz
01-25-2002, 10:00 PM
Small hack to automatically send PM to new users
after they have activated account.

Requested by Xelation
Tested on 2.2.5

UPDATED - v2.1 - 2002-05-02

Version 2.1 only fixes some problems with installation. Now it checks to see if the settings are already present in the DB, it has an option to remove the settings if you wish to uninstall and it has an option to remove any surplus settings you may have as a result of running the old install file.

If you have version 2.0 up and running problem-free, there is absolutely no need to upgrade.

You should uninstall version 1.0 before installing this one.
This version facilitates vB's built in setting system, and no longer requires a writable file on the server.

It also supports popup on PM.

Follow the instructions in install.txt

-- If you are running MySQL 3.22.xx, you might need to use this (https://vborg.vbsupport.ru/attachment.php?s=&postid=246943) installfile instead.

DelusionalMind
01-26-2002, 01:13 AM
nice :)

would be a good feature at my board :)

DelusionalMind
01-26-2002, 01:18 AM
will be installing in a few...the first one also. haha

Sparkz
01-26-2002, 01:19 AM
Heh - it would be cool if someone was actually able to use it :)

*looks at the time*hmm - 05.20... Time to get home, I guess. Should probably be thinking of getting up in - err - 3 hours

Xelation
01-26-2002, 01:25 AM
Oh first time someone actually created a hack I requested! I'm gonna install it right now... I'll tell you how it went.

DelusionalMind
01-26-2002, 01:26 AM
okie. i just installed. it would be cool if you made it show the input area under the vb options...but hey, this is nice also

I don't feel like editing the hack so i'll leave it as is. heh

I installed it at teencribs.com .... please register only if you plan on being part of the board...not just for the sake of trying out the hack!

Sparkz
01-26-2002, 01:30 AM
Originally posted by DelusionalMind
okie. i just installed. it would be cool if you made it show the input area under the vb options...but hey, this is nice also


I'm not quite sure I understand what you mean here...

Xelation
01-26-2002, 01:38 AM
Works perfectly! Thank you very much! :D

Xelation
01-26-2002, 01:49 AM
Just though I would make a screen shot for everyone. :D oh and I just made a temporary message for now... that will change later.

Admin
01-26-2002, 04:21 AM
Nice hack, just installed this here (another good way to tell people to enter their license). :)

FWC
01-26-2002, 04:23 AM
Originally posted by FireFly
Nice hack, just installed this here (another good way to tell people to enter their license). :) LOL!!!!! :D

Admin
01-26-2002, 04:40 AM
Ok works a treat, I did make one change though, to use the username of the user in the message:
$PM_content = str_replace('$username',$username,fread($fp, 50000));

Lesane
01-26-2002, 10:34 AM
Great feature, gonna install this hack later. Thnx

Sparkz
01-26-2002, 11:38 AM
Originally posted by FireFly
Ok works a treat, I did make one change though, to use the username of the user in the message:
$PM_content = str_replace('$username',$username,fread($fp, 50000));

Thx for the idea - I uploaded an updated zip with this feature for both the title and the content.

I also changed
fread($fp, 50000)
to fread($fp, filesize ($PM_file))
(where the variable $PM_file contains the filename, of course)

Just in case someone wants an incredibly long default PM

Admin
01-26-2002, 11:48 AM
Why not store it in the database, as a setting?

Sparkz
01-26-2002, 12:02 PM
Originally posted by FireFly
Why not store it in the database, as a setting?

Mainly because I haven't touched that part of the system before.
This was kind of a quick&dirty done in the wee hours.

But I guess by saying that you just gave me a reason to play some more with the DB :)

aldamon
01-30-2002, 02:14 PM
Hey,

How do I change who the PM comes from? I have two identities, my Administrator ID and my anonymous "Moderator" ID. I'd like the welcome PM to come from moderator and it's coming from my Administrator ID.

Thanks!

Admin
01-30-2002, 02:47 PM
Originally posted by Sparkz
All messages will originate from userid 1 - this can be changed by assigning $originating_user another userid in register.php

aldamon
01-31-2002, 11:01 AM
LOL.

OK, here's another one. I have "pmpopup" and PM e-mail notification set to YES to during registration. However, I have created a new ID to test the system, and when I clicked the activation link there was no popup or E-mail notification of the new PM when I returned to the main menu.

What could cause that? It's almost like vB is not recognizing the automated PM as a "new" message.

This concerns me because my users are very computer illiterate and I want them to have a reason to go into the user cp. If there is no popup, then most people won't even notice the first new message. Heck, most of my users don't even know PMs exist, so the popup, or at the very least E-mail notification, on the first message would be really sweet.

Thanks!

Sparkz
01-31-2002, 12:45 PM
I'd have to look in to this when I get back home from this business trip.

I'll change it so it uses the settings table as well, in stead of storing the default message in a file.
Have had a lot to do at work lately, so I haven't had time to implement this yet...

neal
02-07-2002, 01:25 AM
Doesn't seem to be working on 2.2.2... anyone else have this installed or have to modify anything?

c-pr0mpt
02-10-2002, 12:26 AM
neal> Doesnt work for me either. :(

Sparkz
02-11-2002, 12:31 PM
I'll see if I have time to install 2.2.2 on my testserver today and see if there is anything special that needs to be done there.

As I still have craploads of work to do, I can't promise that I have the time today, but I'll try.

Xelation
02-18-2002, 03:13 PM
Originally posted by Sparkz
I'll see if I have time to install 2.2.2 on my testserver today and see if there is anything special that needs to be done there.

As I still have craploads of work to do, I can't promise that I have the time today, but I'll try.

I just tested it on 2.2.2 and eveything seems to be working fine, it sent a pm to the new user. :D

jvv
02-18-2002, 05:35 PM
Yes it works, don't forget that the user has to activate the account before he receives the PM.

nafae
02-18-2002, 08:43 PM
mine doesn't work either. Note that I don't have email activation turned on, if that would have anything to do with it?

nafae
02-19-2002, 06:30 PM
bump? :(

jvv
02-19-2002, 08:52 PM
Yes it has to do with that. If you look closely at where you need to insert the code, you'll notice that it is when the user activates. If you want to change this you'll have to place it at where the user registers if I am making any sense (I'm actually too lazy to look it up right now... maybe tomorrow)

nafae
02-19-2002, 10:54 PM
yeah that makes sense, if you can find where that is in the code I would be soo appreciative~ Thanks :]

SaintDog
02-20-2002, 05:25 AM
I would love to use this hack if you were to adapt it to work with vB 2.2.2, it would help control a few things on my board as well (I believe, at least)

SaintDog

Sparkz
02-20-2002, 10:30 AM
I have been really swamped in work lately, so I haven't even gotten around to upgrading my own boards to 2.2.2 yet.
At the moment, I am not sure when I will get around to look at it.
Sorry. Will do it as soon as I find the time, tho.

SaintDog
02-20-2002, 04:44 PM
That's cool, I can wait (for a little ;))

mav
02-28-2002, 02:58 AM
Awesome!

Supernature
02-28-2002, 08:35 PM
Very nice Hack, I would love to use it, but I also have the Email verification turned off and don't know where to put the code in register.php :(
Please help

ForKmaN
03-02-2002, 12:00 PM
Originally posted by Supernature
Very nice Hack, I would love to use it, but I also have the Email verification turned off and don't know where to put the code in register.php :(
Please help

*bump*

I'd like to know aswell

neal
03-03-2002, 03:03 AM
same here. anyone?

Overgrow
03-03-2002, 06:57 AM
I hope Sparkz doesn't mind, but I updated this hack since I wanted to use it.

-works with 2.2.1 and 2.2.2 no problem
-works whether or not you have email activation turned on
-uses templates instead of text files

https://vborg.vbsupport.ru/showthread.php?s=&threadid=35647

camoboy
03-07-2002, 01:18 PM
There is a slight issue with this hack;

if a user who registers chooses not to receive stuff from admins, it still sends a PM to them upon activiation. I received a rather rude message from a user about this; is there any fix?

aldamon
03-07-2002, 01:31 PM
If a user is going to write rude messages to you about a welcome PM, then they are not worth having around any way. How lame.

Anyway, I don't think the option you are referring to will limit Private Messages in any way.



*****2.2.3 Issue*****

Anyone get this to work in 2.2.3 yet? It's giving me errors on line 593 in register.php. Here is the line that's giving it fits. There could be more but I have to fix this one first (Line is IN BOLD):

// send default PM to new user
$originating_user = 1;
$PM_file = "admin/default_pm.txt";
$fp = fopen <http://www.php.net/fopen>($PM_file, 'r');
$PM_title = str_replace <http://www.php.net/str_replace> ('$username', $username, fgets <http://www.php.net/fgets>($fp, 4096));
$PM_content = str_replace <http://www.php.net/str_replace> ('$username',$username,fread <http://www.php.net/fread>($fp, filesize <http://www.php.net/filesize> ($PM_file)));

$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid) VALUES (NULL,$u,$u,$originating_user,'".addslashes <http://www.php.net/addslashes>(htmlspecialchars <http://www.php.net/htmlspecialchars>($PM_title))."','".addslashes <http://www.php.net/addslashes>($PM_content)."',".time <http://www.php.net/time>().",0,0)");
// send default PM to new user

mas404
03-12-2002, 08:40 AM
can it modified to send the PM to the normal user depend on his post NO.?

ex.
if the user get 50 post >> he will get defult PM
" thank you for your posts after another 20 post more your titel will be chang to Tyro Hacker and you will get star "

thank you

Sparkz
04-23-2002, 02:30 PM
Updated the zip with a complete rewrite of the hack.
See first post for details.

JulianD
04-23-2002, 09:15 PM
This is one of the most useful hacks installed on my board! Although there were other options and similars hacks, I kept this one! And now I'm getting an updated version :D :p Great work Sparkz

Sparkz
04-23-2002, 09:18 PM
Thanks.
This update was due a long time ago. For some reason I just didn't get around to it before.
I am quite convinced that this one is superior to the first version, tho. :)

Sparkz
04-24-2002, 12:28 AM
BTW, why isn't this featurea already present in vB?
It is most usefull :)

You don't even have to sex0r me to use it in vB3 ;)

Disclamier to all posts I have made in the last 6 hours:
We are a wee bit drunk today, but we are doing our best :)

Meta
04-24-2002, 10:49 AM
Installs softly and works nice.

Well done ... thank you, Sparkz!

tpearl5
04-30-2002, 09:38 PM
I'm getting this error when I run the install file:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT @displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '@displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT' at line 1

mysql error number: 1064

Any idea why?

Mathiau
05-01-2002, 07:13 AM
Great hack m8

When i clicked the

[Proceed to fileedit-part]

Part, i didn't think it was doing anything, SO now in my control panel, i got like

8

[Default PM]

In a row, how can i 'uninstall' 7 of them?

And perhaps add some feature so idiots can't do what i did?

Sparkz
05-01-2002, 05:09 PM
Originally posted by Mathiau
Great hack m8

When i clicked the

[Proceed to fileedit-part]

Part, i didn't think it was doing anything, SO now in my control panel, i got like

8

[Default PM]


In a row, how can i 'uninstall' 7 of them?

And perhaps add some feature so idiots can't do what i did?

I am on the move now, but I will write a script for you later that fixes this.
I will also update the installfile to prevent it from happening to others. It's a known bug.

Sparkz
05-01-2002, 05:10 PM
Originally posted by tpearl5
I'm getting this error when I run the install file:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT @displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '@displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT' at line 1

mysql error number: 1064

Any idea why?

What version of MySQL are you running?

tpearl5
05-01-2002, 06:07 PM
3.22.32 :( I have had problems with it before.

Sparkz
05-01-2002, 09:43 PM
Without having actually checked, I'd guess that your version does not support user variables.
I am about to hit the sack now, but I'll try to make a script you can run instead tomorrow afternoon.

tpearl5
05-01-2002, 10:26 PM
Is there any way to get around it?

Sparkz
05-02-2002, 08:42 AM
Yeah, it is. I'll write an install script for you later today, or early tomorrow. I just completed an 8 hour trip and had to go straight to work, but as I said, I'll try to whip something up for you this afternoon.

sub
05-02-2002, 09:45 AM
Thanks so much of this hack! It's awesome and WORKS GREAT with 2.2.5

Now the hostess don't have to keep PM'ing ppl.
Keep up the good work! :bunny:

Sparkz
05-02-2002, 11:19 AM
Originally posted by tpearl5
Is there any way to get around it?

Try this script instead. Since I have a much more recent version of MySQL myself, I have no chance to verify that it will work with your version, but it does work with the version I am running.

Droopy
05-03-2002, 08:42 AM
Very cool hack, works fine.

tpearl5
05-03-2002, 03:28 PM
Thanks Sparkz! It installed this time.

However, when I signed up a test account I did not get the default PM. I'm not getting any errors anywhere and I changed the settings in the control panel. What could be wrong?

You can visit my board at http://degster.com/midi/board/ to take a look.

Sparkz
05-03-2002, 03:31 PM
And you have completed the file edits too?

tpearl5
05-03-2002, 03:38 PM
yep, there's only one, right?

Sparkz
05-03-2002, 10:30 PM
Yeah... I have just tried with a fresh forum/DB - using the file I wrote for you, and it works nicely...

I honestly can't see what is wrong.

Mathiau
05-03-2002, 11:44 PM
Hey m8

Just wanted to say thnx for the great support....

I actually am redoing the entire forum, did a few bo'bo's on hacks, and will be reinstalling your hack, but this time i won't press he button 50 million times :)

Sparkz
05-04-2002, 12:13 AM
Well, with the updated installfile that is no longer an issue :)

bandersen
05-05-2002, 05:37 PM
Cute hack - I installed it. Shows fine in admin panel, but no PM message is actually sent to the new user. I have yes on receive PM, PM activated etc.

for some reason I get an error when clicking on the Agree button in the signup template (line 748 - document.forms.0.avatarset.selectedIndex is NULL or not an object) Win Me, vb 2.2.5. Not sure this is a result of this hack tho.

Anyone have an idea... the latter is really more urgent than the first.

Oh, I installed it May 1st. Will the new version sort out the above?
Thanks!

Sparkz
05-05-2002, 06:33 PM
I have been unable to reproduce the bug where no PM is sent, so I can't really say what to do about it. If/when I can reproduce it, I can start debugging. Sorry for not being able to help here.

Sparkz
05-05-2002, 06:51 PM
I will however look into the problem asap.
For all I know it might be because of some general forum setup *wild guess*.

bandersen
05-05-2002, 07:03 PM
thank you - appreciate it!!

vbf.Falco171
05-06-2002, 07:52 PM
Hello, I have the same problem...
I have install your hack but i never receive default pm !
I have only an error on line +- 527 in the register.php file...
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");

I have translate this hack in french (version of 05-02-2002), if you change something, can you say me what ?

Sparkz
05-07-2002, 08:46 AM
I never bothered to sort out that email-thingy, so I removed it like 10 minutes after posting it. :)

I could probably check it out a bit later today, tho.
I think the only thing I really changed was the install-procedure, and the removal of the mail-thingy.

vbf.Falco171
05-07-2002, 10:36 AM
It's probably a problem from the code top in the register.php file...

If I find a solution, i'll send it to you or give it here...

Sparkz
05-07-2002, 10:39 AM
Have any of you done other hacks in your register.php which might affect this hack?

I have reinstalled my hack at least 10 times on completely fresh copies of vB 2.2.5, and it works like a charm every single time.

For the life of me, I can't figure out what is wrong.

bandersen
05-07-2002, 02:23 PM
I have no other hacks in the register.php.
I even tried a clean install of the original file just in case... included the code again... but still nothing. I made sure everything was checked "yes" if to receive PMs or not....

vbf.Falco171
05-07-2002, 03:39 PM
Yes, same for me...

Sparkz
05-07-2002, 04:00 PM
If at least I was able to reproduce the problem, I could try to solve it. Sorry for not being able to help you guys :/

vbf.Falco171
05-07-2002, 08:07 PM
I've a first correction for this hack...

In php file of the hack, replace on line 17 and 18, $username by \$username, because with $username you can't see this text in admin panel...

Sparkz
05-07-2002, 08:18 PM
I actually knew about that one. Just forgot to update the file :)

bonnmac
05-08-2002, 05:34 PM
Thank You very much for this hack. I've installed it and it works great. Will make for a nice friendly atmosphere of a board to be welcomed.

vbf.Falco171
05-09-2002, 07:28 PM
Ouhhh I've the solution, from Nicolas2000 a moderator of vBulletin-France Team...

The new code to insert into register.php :
// Sparkz - Send Default PM to new users
if ($defpmactive && ($defpmadminmail || $adminemail)) {
$DB_site->query ("INSERT INTO privatemessage
(privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid)
VALUES (NULL,$userid,$userid," . $defpmuserid . ",'" . addslashes (htmlspecialchars (str_replace ('$username', $username, $defpmsubject))) . "','".addslashes (htmlspecialchars (str_replace ('$username', $username, $defpmbody))) . "',".time().",0,0)");
if ($pmpopup) {
if ($noshutdownfunc) {
$DB_site->query("UPDATE user SET pmpopup=2 WHERE userid='$userid'");
} else {
$shutdownqueries[]="UPDATE user SET pmpopup=2 WHERE userid='$userid'";
}
}
}
// Sparkz - Send Default PM to new users

Modifications in php file :
$optionstemplate=generateoptions();
$DB_site->query("UPDATE template SET template='$optionstemplate' WHERE title='options'");
Put that on line 34 after } and on line 71 after } .

I test it and it run ! But the installation and un-installation don't work

bandersen
05-09-2002, 08:41 PM
Vive la France!!!!

Can you pls. tell what's on line 34 and 71... just in case we do not have the same? then I'll try it out. thanks.

vbf.Falco171
05-09-2002, 09:25 PM
Ouais vive la Belgique, vive la France, vive les pays Francophones :)

And for answer you :
On line 34 after } elseif ($result['total'] > 1) {
echo '<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Les param&egravetres existent d&eacuteja ' . $result['total'] . ' fois</font></p></td></tr>';
echo '<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Essayez de modifier vos param&egravetres.</font></p></td></tr>';
}

and on line 71 after }
} else {
echo '<tr class="'.getrowbg().'" valign="top"><td><p><font size="1">Impossible de trouver des param?tres ? supprimer.</font></p></td></tr>';
}

Sparkz
05-09-2002, 10:08 PM
I will look at it and update the files tomorrow... I've already had a few beers, so I'm not gonna mess with any code now :)

bandersen
05-09-2002, 11:21 PM
It's working here too.

Merci merci from Norway!!

Sparkz
05-09-2002, 11:54 PM
J?ss, norsk du ogs?? :)

bandersen
05-09-2002, 11:58 PM
YES, you bet! :laugh:

trainer
05-15-2002, 09:58 PM
got this installed and it is working great but...

is there a way to send 2 different PM's to new users? i would like to send the normal greeting PM and also one with our site sponsors. really need to push to help support our site.

any way that can be done?

Sinecure
05-20-2002, 06:38 AM
First off I must say, great hack, installed perfectly!
I ran into a problem though, after installation. I went to the Admin CP to change the PM body and PM Message title, etc..

I wanted to incorporate the Username of the user in the PM, but when reading your description it didn't say how to get the username in there. Well after reading it closely I discovered that you need to place the $username variable before "anywhere". $username is the variable that will be parsed.

So, here are the quick changes u need to make.

Under PM Subject change it to:
Whatever you enter here will appear in the subject line of the PM. Enter $username anywhere to have it replaced by the username of the recipient.

and

Under PM Body change it to:
This is the message-body. Enter the text that will be the actual PM to new users. If you enter $username anywhere in this text, it will be replaced by the username of the recipient.

--------------------------
That will simply help make it more clear as to how to get the recepients username in the subject or the body. I think you meant to put $username in there, but just forgot.

As I said, great hack!

vbf.Falco171
05-20-2002, 09:59 AM
I say that in one of my last posts...

For correct the problem, you must put / before $username in the text...

Sparkz
06-01-2002, 10:20 PM
Sorry about that, Sinecure... Corrected it in the zip.

rascal
06-02-2002, 12:49 PM
It works perfectly but there is no popup.

*update - It's ok now.*

rcooper7
06-02-2002, 01:08 PM
excellent idea! i'm installing it now! Thansk

inetd
06-09-2002, 08:17 AM
Who can make this:
User receive default PM only after user moderation.

novel44
06-27-2002, 02:27 PM
Running 2.2.6.

Ran the install.php file. it says successful and creates the table entries in sql, but does not create the admin CP information.

Please assist.

Keith
06-29-2002, 01:36 AM
This is a very good hack, and it's working on 2.2.5.

novell44, The Send Default PM is now placed/found in the VBulletins Options Menu, last item listed. I think the screen shot earlier in thread shows it placed in the left frame. Could be why you don't see it in your CP.

Great hack. I wish I had the talent and knowledge to do this sort of stuff, you hack guys simply amaze me. :D

dreamhost
06-30-2002, 12:39 PM
Ok this may sound stupid. I installed script as directed, but I cannot find in my admin cp where to send a new pm. All buttons looks same.
thanks in advance

dreamhost
06-30-2002, 12:41 PM
disreguard, last post, found it, man I must be really tired :)

mashby
06-30-2002, 05:53 PM
This was one of the easiest hacks I've ever installed!

After seeing the results of this hack on VBulletinTemplates.com (http://www.vbulletintemplates.com), I decided that it was way cool and I had to have it on one of my new boards.

Excellent work!

tpearl5
07-08-2002, 12:23 AM
Originally posted by vbf.Falco171
Ouhhh I've the solution, from Nicolas2000 a moderator of vBulletin-France Team...


It must be our versions of mySQL. Your code worked for me and sprakz didn't at all. :D

Schorsch
07-10-2002, 01:08 AM
thanks for this hack, works fine on my v2.2.6 and installation was very easy :)

regards,
Schorsch

Floris
07-19-2002, 03:04 PM
1000th download by me !! :) weeee.

I will use the weekend to install it, nice hack dude. Great job.

Floris
07-19-2002, 03:49 PM
installed.. i couldn't wait :P

It works great, nice job!

PsYc
07-19-2002, 07:02 PM
hi the popup didn't work


i have this addon installed


https://vborg.vbsupport.ru/showthread.php?s=&threadid=34356


called Improved PM Popup JavaScript


i think there is a little conflict in it

can anybody help

would be nice ;)

Kiraly
07-20-2002, 09:39 AM
i have 2.2.6
i have installed the hack
put text before
// sort out emails and usergroups
:(

Floris
07-20-2002, 10:18 AM
Why are you sad that you installed vBulletin 2.2.6 and the hack and that you put text somewhere :) I have done that many times, you don't see me commit suicide :D

Explain what is wrong, then users might be able to help out.

PsYc
07-20-2002, 01:14 PM
fixed my problem it was just a typo :)

Sparkz
07-20-2002, 07:15 PM
This has been downloaded 1017 time(s).
Yay! Can't say I ever expected it to be downloaded more than twice (first time would be me testing to see if it was working after upload - second time would be me testing a week later since the number never increased ;))
Really glad you guys like it :)

A.T.F
07-20-2002, 07:24 PM
Originally posted by novel44
Running 2.2.6.

Ran the install.php file. it says successful and creates the table entries in sql, but does not create the admin CP information.

Please assist.


Try clicking "vbulletin options" in your admin cp and it should greate a new tag underneath the "who's online" options, right at the very bottom.

omegauk
08-24-2002, 04:05 PM
I bought this forum and they have this hack installed, now users get a message with the ex-owners name but I want to have my name there instead, how to fix this?

Nightfire
09-18-2002, 03:24 PM
I'm getting an error on register.php this is on the latest version that's out.

line 814:
char 5
error 'document.forms.0.avatarset.selectedIndex' is not an object
URL http://chatterspics.com/forums/register.php

The only thing I added to register.php was the default pm code in the zip file

The PM does work though, but doesn't tell the user he/she has a pm

Arekusan
09-19-2002, 05:44 PM
Awesome hack!

Amazing autoinstall!

U rool!

8ball
09-21-2002, 08:49 PM
very good work ;)

K_2
09-26-2002, 05:42 PM
Thank you very much, this works in version 2.2.8

K2 clicks 'Install'

Graphics
10-06-2002, 12:04 PM
Excellent work Sparkz. Easy to install, and very usefull.

* Works on new PM

erdem
10-09-2002, 05:11 PM
allright great hack ..
i installed it ..

but when a new user registered it automatically logged out after registering ..
but users can get pms when they logged in ..

uhmm also pm's has a missing footer .. i mean uhmm dunno how to explain LOL

anyideas on login thing?

erdem
10-10-2002, 04:11 AM
bumpy bump ?
;)

FleaBag
10-13-2002, 03:25 PM
;) Nice addition to my 2.2.7. Thanks. :)

erdem
10-14-2002, 04:04 AM
Originally posted by GamerForums
;) Nice addition to my 2.2.7. Thanks. :)

dont u have "logout" problem ?
:ermm:

mv540
10-14-2002, 05:00 AM
I installed the hack flawlessly, until i came to a bump in the road. When i went to go test it, i clicked on register and all i got was a blank white screan....

any suggestions? thx in advance....

I~

mv540
10-14-2002, 12:34 PM
hows about an answer people!...thx....

I~

erdem
10-22-2002, 03:39 AM
no one interested in bugs/errors ?
any idea?

mv540
10-22-2002, 03:49 AM
boy this room really died quickly..incase anyone is wondering ive found the answer to my own question...

thx mv540 for all your hard work and detication...cheers to you mv540..next rounds on me bro... ;)

M

concept
10-25-2002, 09:06 AM
i installed everything right but nothign happend in my admin cp? i don;t have the button there

Glenn379
10-25-2002, 03:16 PM
Great Hack! Works like a charm! (Now that I can install them myself it does hehe) Thanks! *installs*

FleaBag
10-28-2002, 11:01 PM
All's well with 2.2.8. Thank you! :)

Cyberhouse
11-28-2002, 08:01 AM
Works great :)

Xer
12-01-2002, 07:39 AM
working on my 2.2.9..thx!

JustAskJulie
12-05-2002, 08:43 PM
I'm getting the following error when I click "install"

Invalid SQL: SELECT @displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '@displayorder:=displayorder+1 FROM settinggroup ORDER BY displayorder DESC LIMIT' at line 1

Sparkz
12-05-2002, 08:55 PM
Try using this installfile instead: https://vborg.vbsupport.ru/attachment.php?s=&postid=246943

You probably have MySQL 3.22.xx or something. Someone else had problems with that too, so I had to change some stuff in the installer.

JustAskJulie
12-06-2002, 01:47 AM
Thanks that did the trick. Now one more question, how do I find out the numerical userID that matches a username? I can't find that on the profile info that comes up in the CP.

JustAskJulie
12-06-2002, 01:49 AM
One more thing, I'm now getting a java error on my register.php page when it opens. Any ideas what might have caused this?

JustAskJulie
12-06-2002, 01:50 AM
One more still. Getting this error when attempting to register a new user:

Invalid SQL: SELECT setting.varname, setting.value FROM setting INNER JOIN settinggroup ON setting.settinggroupid = settinggroup.settinggroupid WHERE settinggroup.title = 'Default PM'
mysql error: You have an error in your SQL syntax near 'ON setting.settinggroupid = settinggroup.settinggroupid WHERE settinggroup.title' at line 1

Bison
12-06-2002, 01:45 PM
Does this hack work if you manually register a user to your forum?

Sparkz
12-06-2002, 03:34 PM
Originally posted by JustAskJulie
Thanks that did the trick. Now one more question, how do I find out the numerical userID that matches a username? I can't find that on the profile info that comes up in the CP.

Just hover your mouse cursor over a username in the member list, and watch the link in your status bar. At the end of the link there is a userid=xxxx parameter, where xxxx is the number you are looking for.

Sparkz
12-06-2002, 03:34 PM
Originally posted by JustAskJulie
One more thing, I'm now getting a java error on my register.php page when it opens. Any ideas what might have caused this?

No idea. I don't mess with any javascript or anything in this hack...

Sparkz
12-06-2002, 03:35 PM
Originally posted by JustAskJulie
One more still. Getting this error when attempting to register a new user:

Invalid SQL: SELECT setting.varname, setting.value FROM setting INNER JOIN settinggroup ON setting.settinggroupid = settinggroup.settinggroupid WHERE settinggroup.title = 'Default PM'
mysql error: You have an error in your SQL syntax near 'ON setting.settinggroupid = settinggroup.settinggroupid WHERE settinggroup.title' at line 1

I'd have to look in to this at a later date. I am out of town atm, so I don't have access to my test board from here.

Sparkz
12-06-2002, 03:38 PM
Originally posted by Rolodex
Does this hack work if you manually register a user to your forum?

I haven't checked, but I believe manual registration from the ACP uses other scripts than register.php.

It should be a quick fix to add that feature, though.

Bison
12-06-2002, 07:16 PM
Thanks, i'll be looking for that fix when you have the time to do it.

Otherwise, the hack works great ... thanks! :banana:

JustAskJulie
12-09-2002, 03:54 PM
Thanks Sparkz,

I'm going to try reinstalling it again and see what happens.

JustAskJulie
12-09-2002, 04:17 PM
Still no luck :(
FYI, I am using MySQL 3.23

JustAskJulie
12-09-2002, 04:41 PM
Tried to uninstall it and got this error:


Invalid SQL: SELECT @settinggroupid:=settinggroupid FROM settinggroup WHERE title = 'Default PM'
mysql error: You have an error in your SQL syntax near '@settinggroupid:=settinggroupid FROM settinggroup WHERE title = 'Default PM'' at line 1

Sparkz
12-10-2002, 05:05 PM
Strange, that scripts runs w/o problems on my server.

JustAskJulie
12-10-2002, 05:25 PM
Any idea how I can uninstall it then? I have a few more hacks I want install but I don't want any remnants of hacks that aren't working hanging around causing more problems.

flup
12-15-2002, 02:59 PM
Nice

flup
12-15-2002, 03:11 PM
darn doesn't work @ 2.2.9

Smoothie
12-15-2002, 10:46 PM
Works fine for me on 2.2.9

imageconstrux
01-30-2003, 01:54 PM
Great hack! Works on 2.2.9

Glad you put the failsafe in there so we don't build the template more than once - the install.txt says click install, click submit.

No 'submit' showed up for me, so I did like others did - clicked 'install' again.

Might save some confusion by just editing the install.txt.

Instead of saying: Select install and press submit.

It'd say:Select Install, when the window changes to show the options to be installed, select Install again, then close the window. I think that's how it went, anyway.

But other than that teeny tiny thing, the install was smooth as silk, did what it was supposed to on the first try, and now all new registrants to my site will get a nice PM from me when they sign up!

Thanks!

Jeff

Bison
01-30-2003, 02:50 PM
Originally posted by Sparkz


I haven't checked, but I believe manual registration from the ACP uses other scripts than register.php.

It should be a quick fix to add that feature, though.

haven't got around to doing this?

ernestdefoe
02-19-2003, 01:00 AM
Okay I had this running in vB 2.3.0 yesterday, but then decided not to use vB and deleted everything including the database. Now I changed my mind, and have decided to use vB again, and now when I try to run the installer file I get this error.

Fatal error: Call to undefined function: cpheader() in /home/twc/public_html/forums/defpm_dbinstall.php on line 4

What could be wrong?

Verted
03-06-2003, 04:04 PM
I tried it on v 2.3.0 and the install file didnt work, but it sounds like such a cool hack, perhaps you can get it to work on 2.3.0 because I'd love to have it:)

Alien
04-27-2003, 02:45 AM
Anyone have this confirmed working on vB 2.3.0? (Without upgrading from previous versions of course) ;)

-Jason

Alien
04-27-2003, 03:13 AM
Never mind, decided to give it a whirl (like I guess I normally do lol) and it worked flawlessly in vB 2.3.0!

Thanks so much for this!

-Jason

Floris
04-27-2003, 07:57 AM
Confirmed to work with version 2.3.0
I installed it yesterday on a site of a client.

gmarik
05-24-2003, 07:13 AM
Nice to hear it works on 2.3.0
Will install it today.

paratek
06-05-2003, 09:30 PM
Works here on 2.30 no problems....Clicks the install!

Anjie
06-11-2003, 12:01 AM
INstalled on 2.3.0, and it worked awesome, or so I thought. Everything looked good, everything seemed good. Come to find that registering members never got their confirmation email, and got a database error. After uninstalling everything worked fine again. So I advise all to check and see if a new registration can get the confirmation email. If not this would be why. I wish this did work, the whole thing was too darn cool! :(

lostsoul2k
06-11-2003, 05:53 AM
will this hack work for 3.0

subu1
07-10-2003, 07:10 PM
sorry but why dont work this easy install Hack not on my vb2.3.0 *cry*

Catch-22|BL
09-28-2003, 10:35 PM
*Clicks install

Nice hack!

Working fine in vb2.30

erikajune
02-08-2004, 03:00 PM
I get this error when I try to run defpm_dbinstall.php.

Fatal error: Call to undefined function: cpheader() in /home/erika/public_html/community/defpm_dbinstall.php on line 4

Line 4 is: cpheader('<title>>Default PM to new users v2.0</title>');

ManagerJosh
03-26-2004, 07:54 PM
I get this error when I try to run defpm_dbinstall.php.

Fatal error: Call to undefined function: cpheader() in /home/erika/public_html/community/defpm_dbinstall.php on line 4

Line 4 is:
anyone make a port for vB3 yet? :)

beansbaxter
06-25-2005, 06:03 PM
will this work in 3.0.7?

Marco van Herwaarden
06-25-2005, 06:56 PM
Since this is a vB2 hack, it will not work on any vB3 version.

MarkyLeonard
10-13-2005, 09:42 PM
It upgraded itself on my 2.3.4 to 3.5 upgrade, works a treat.

Idea : Any chance of a "Test this PM" button? When clicked it sends it to you, so you can check formatting etc. Or failing that, a preview button?