View Full Version : [RELEASE] Private Messaging (PM) Hack, v 1.2.0
It's HEREEEEE!
version 1.2.0, with so much increase functionality, including:
* Checkbox deletion/moving
* Lightbulb/last message by on index.php
* Icon for "Send Private Message" in posts
* Multiple folders for organization of PMs
* Designation of replied to messages
* Message quotas (untested, but should work fine)
* Sends email when message box is full
* Message forwarding
* Previous/Next PM when viewing
* Direct link to last message from index.php
* Receive email when PMed
* Usergroup function to turn off PMs
* Individual ability to turn off PMs
* index.php code bugfixed
* VERY simple PM stats (/private.php?action=checkstats)
* Banned IP checking
* and more...
Stats I posted elsewhere too:
* 35+ templates
* 4 new profile fields
* 3 new tables
* 1 new field to usergroup table
I was able to set up a stock 1.1.3b3 test board and the hack installed successfully. Upgrading shouldn't be a problem either, except for the template changes. I HIGHLY suggest you overwrite the templates in upgrade-template.txt and re-edit from there.
All other instructions should be located in the .zip.
<download removed -- see http://www.vbulletin.com/forum/showthread.php?threadid=4405 >
[Edited by Ed Sullivan on 01-02-2001 at 07:13 PM]
Mr Sullivan, I installed the hack and it seems to work quite well! :) We are already testing it on my test board (if you remember the URL, come by and check it out).
Just a couple of things to note: there are no graphics for the "messages read" feature, so if you install it, you will need to create your own graphics (no biggie!).
I'm not sure the "message read" feature is working. I still get the same graphic whether or not it is read. Or does it go by the amount of time the cookies are set for?
But so far, so good! I'll keep playing and let you know if we come up with anything else! Great job, Mr Sullivan!
It's not message read, it's message replied to :)
Well, thanks for fixing it! At least anyone else who installs it now won't have that problem ;)
So everyone knows - there was a problem with the replied to marking, but I fixed it and reuploaded the zip.
[Edited by Ed Sullivan on 07-14-2000 at 05:27 PM]
Gimme gimme gimme gimme...
CHOCOLATE!
Gimme gimme gimme gimme...
(Thanks ed! You're a genius! :D)
Originally posted by SonnetCelestial
(Thanks ed! You're a genius! :D)
See, I'm not the only one! ;)
John - Any chance of getting this into the 1.1.3 Final version?
Me2Be - I've noticed :)
rangersfan - AFAIK, this hack will not be incorporated until the "summer release", whenever that is. Even so, it will not be incorporated with my code - it will be rewritten like the memberlist (well, at least partly)
Oh, and uploaded a new zip (same version) with one bug fix Sir Nikon alerted me of, and a typo in a template - nothing much.
Ed yes I've seen the posts by John but vBulletin is better for having the hack in by default. John can go about modifying it later on if it has problems or needs changes.
Great hack ed! er, mike!
I did a new / fresh install with vb1.1.3b3, the whole thing took about 30 min to install, however i need to change around more templates for a custom look (yay)... Everything went smooth, great documentation. No problems yet! :)
Just wondering if anyone successfully upgraded yet? I did a fresh install myself without any problems, but I haven't tried the upgrade yet :)
Help! the [Send A Private Message] - [Send A Reply] -[Forward This Message] links are all white, and so is my background! What template do i change this in? :D
[Edited by BikeForums on 07-15-2000 at 11:41 AM]
OK, i found the template that its in, and the text should be set by the $cssinclude info, right? for some reason everything on the page works fine, but the text color for the above 3 links comes up white, i cant figure this out!
Anyone know whats going on here? Feel free to register on my forums to see what im talking about, this is really wierd!
It uses the thtcolor (I think it's called that) that is defined in $cssinclude - either change the color in $cssinclude (which, BTW, will change more than just those links) or go into the privmsglist and showprivmsg templates and change the 3 areas.
I tried to change my preferences to turn on the e-mail notification. When I hit submit it told me that the e-mail address was already in use. Like I was trying to re-register.
Has anyone else come across this in 1.1.3?
That's something related to 1.1.3 - not my hack. There was a thread about it somewhere, Bug Reports I presume. :)
Umm... is it a good or bad thing that not many people have responded? :D
Seriously - how many people have actually installed this new version, either "freshly" or "upgraded"?
Because if you're not posting anything, I assume there's no problems - which is a GOOD thing :cool:
I'm gonna do it in a few hours
I'll cuss you after I'm done;)
Looking good.
Just did a clean install on beta 3, everything works great so far.
Thanks again for the great hack!
On a side note, if someone could make some graphics, that would be greeeeat.
One thing... the UBB pm import killed all the dates, saying they were sent on 12.31.69. Oh well, it's all good.
And damnit, MySQL ran out of memory importing them. If possible, you should make it so we can decide how many to import at one time.
Just my one cent.
Ed:
I installed the upgrade on version 1.1.3 beta 3 without any problems.
The only thing that I didn't do was to upload the newest version of private.php. Maybe you should tell people in your documentation that they will need to upload this new version of private.php too.
Thanks again for a great hack.
What else do you have up your sleaves? I really like the location hack you did too.
Parker
Hey, I installed your hack. Works great except for one thing. Maybe this is due to my own ineptitude, but when trying to log out, or register as a new user, this error occurs:
Warning: Oops, php3_SetCookie called after header has been sent in /home/httpd/html/zone/bb/member.php on line 895
Warning: Oops, php3_SetCookie called after header has been sent in /home/httpd/html/zone/bb/member.php on line 896
The board can be found at: http://whodatzone.com/bb/
I will take a closer look at this when I get home tonight ... don't have time here at work. I was all set to "officially" launch the site ... but I can wait until the errors are resolved.
Cold Steel - that's why the PM import is unsupported :)
Parker - hmm... I assumed people would do that, as in my mind it's "an edited file" but whatever.
And now I'm working on an attachment hack a little (not sure how to integrate it though :() and my own backend type product.
David - that's a vB related problem with some people.
I upgraded to 1.1.3 Beta 3 and installed the PM hack and other than the couple of little problems mentioned above (font colors, missing graphics) it went nice and clean. Took about 30 minutes to get it installed and set the way I wanted it. Great job, Mr. Sullivan, it is a fine hack!
Hi Ed,
I upgraded your hack from the previous one - it went flawlessly.
One thing though: I replied to a PM but the folder image did not change to the "replied to" folder. At what condition does it change? I must be missing something :o
Thanks,
Bira
Can someone else who has installed this hack test and see if they can add a new usergroup?
I think I messed up something during this install :(
1. I had to change the name of pm1.gif to pm.gif for it to show up.
2. When I go into the main PM screen, the icon to the left of the message and the index icons on the bottom show a bad link, the their properties point only to my vbulletin forum.
I can send messages ok, but there is no apparent way to reply, and I suspect it is because the icon is not showing up next to the message
1. I believe that was noted in the install.
2. You didn't set up the options.
Using vB 1.13 with this hack and everything seems to work. However, I could not find the following in the posbit template:
After:
~~~~~~
$aim <-- does not exist?
~~~~~~
Add:
~~~~~~
$pmlink <-- nor could I find a pmlink template. if it is a template?
~~~~~~
Any suggestions.
Thanks in advance.
It doesn't have to go after $aim - it can go anywhere in that template that you want.
$pmlink isn't a template - it was hardcoded. Look in showthread.php for a reference to it.
Ed,
Why don't the "folderrt.gif" and "newfolderrt.gif" images show up on replied to PMs? I'm a bit confused about this.
Thanks,
Bira
If a user's profile has "Receive Private Messages" set to No, shouldn't the Private Message header be turned off?
Thanks in advance.
bira - I'm not sure why it's doing that. I ran fine on my boards, but it didn't on Me2Be's at one point, but I think she eventually got it to work *shrug*
BobR - I suppose so, but I didn't think of that at the time (that was the last feature I added)
I recently installed the 0.9 version of the pm hack and was wondering how long it takes to install the upgrade? Also, I'm not sure why this happened but when I installed the 0.9 version my fivelinks icons moved more toward the center and when a user is logged in on my forums, and wants to check their pm, it shows a broken gif with an image redirect to my forums. What can I do to fix this, and then I'll upgrade. Please visit my forums and see what I'm talking about
[Edited by steven on 07-26-2000 at 04:07 AM]
I installed the PM hack on our vBulletin forums the other day. It has been brought to my attention, however, that the forum was not automatically filling in the Username/Password from the cookies on a thread post or reply. I've investigated the 'Store Username & Password in browser memory' setting in the profiles, and it appears the PM hack has blanked out the radio buttons for ALL members i.e. neither button is checked.
Can this be checked please?
I think you messed up user.php, because I haven't had that problem (and no one else has reported it)
Thanks Ed, I'd imagined the same too. I've performed the changes again on a copy of the original user.php, went into the profile and its still showing blanks! Any other suggestions?
Mike, first of all let me say that this is a truly amazing hack. It's very professionaly done all the way through, and very easy to customize with the multiple templates. The only thing that I might like to see in any future versions, would be a postbit_pmlink template. I know that it can be changed by editing showthread.php, but I just think that more template changes and less "code-hacking" is better. Keep in mind this is just a suggestion, and in no way takes away from the appreciation I have for the quality work you have done and given to all of us.
Cameron
Mike,
I was wondering if you could take a look at this code and see what I'm doing wrong. When I was customizing the look of my privmsglist template, I think I messed up somehow. For instance, whenever I check several boxes, clicking move or delete has no effect. I can add folders, and jump from folder to folder, but I can't move messages.
Here's the code containing the move and delete buttons:
<form action="private.php" method="POST">
<div align="center"><FONT SIZE="2" FACE="arial, helvetica"><b>Checked Items:</b></font>
<input type="hidden" name="action3" value="domove">
<input type="hidden" name="table2" value="$table">
<input type="hidden" name="password3" value="$password">
<input type="submit" name="submit3" value="Delete">
<FONT SIZE="2" FACE="arial, helvetica"><b>or</b></font>
<input type="Submit" name="submit3" value="Move">
<FONT SIZE="2" FACE="arial, helvetica"><b>to</b></font>
<select name="select2">
<option value="0">Inbox</option>$folderjump
</select>
</div>
</form>
Here's the code for the checkbox:
<input type="checkbox" name="msgs[$msgid]" value="yes">
Thanks in advance to anyone who can help,
Cameron
You can't append numbers to the "name" attributes.
action3 should be action
table2 -> table
password3 -> password
etc, etc, etc.
Thanks for the help Mike, but it's still not fixed :(
The original problem occured because I was playing around a lot with Dreamweaver editing the template, and copying the form around a couple times led to the problems.
Here's the current status:
I can jump from folder to folder with no problem.
When I hit delete, I get the message that the file was deleted, but when transferred back to my inbox the message is still there.
When I try moving it to a different folder, I get this message "can't move to nonexistant folder."
Here's my code one more time:
<form action="private.php" method="POST">
<div align="center"><FONT SIZE="2" FACE="arial, helvetica"><b>Checked Items:</b></font>
<input type="hidden" name="action" value="domove">
<input type="hidden" name="table" value="$table">
<input type="hidden" name="password" value="$password">
<input type="submit" name="submit" value="Delete">
<FONT SIZE="2" FACE="arial, helvetica"><b>or</b></font>
<input type="Submit" name="submit" value="Move">
<FONT SIZE="2" FACE="arial, helvetica"><b>to</b></font>
<select name="select">
<option value="0">Inbox</option>$folderjump
</select>
</div>
</form>
<input type="checkbox" name="msgs[$msgid]" value="yes">
Thanks again. If you want to see it in action, here's a link to my forum http://www.basswriters.com/forums
The <select> part is wrong. Should be:
<SELECT name="thefolder">
And FYI, the default templates are included with the hack, so you might wanna take a look at those.
okay i am game Ed :D ... going to install PM this weekend most likely, so is there anything going to be added or modified to it between now and then ?
Installed everything and maked a few changes to the templates to fit my Board, but:
In the USer Profile:
Receive Email On PM ON/OFF
this didn't Work! I can check On or Off, when I go back to the Profile it's still off!
In case off get private message in the profile it's also on Off, but you get pm + same prob here like the one above with the email!
Can anyone help???
http://www.star-trek-forum.de
The_Sisko
Ed:
If you get a private message and then read it, if you go back to the main forum index you shouldn't have an indicator that tells you that you have a new message should you? Doesn't this get automatically set so that it is no longer a new message and just gets kept in the total count?
The way that I see it now is that it tells me that I have a new message all the time even though I read it. Shouldn't this get reset?
Am I missing something here?
Parker
Parker - I use vB's last visit time to determine if the message is new or not. Completely unrelated to read or not (I don't even track if it's been read at all anyway)
So what is the lag time between when your last visit time and new visit time when the pm will no longer show you that you have a new private message?
Parker
More correctly, it uses the same method as the rest of the light bulbs on index.php - it draws from your cookie.
So, whenever that is updated.
Ed:
Ok, I see that now. Is there anyway that you could write it so that you could make a private message as being read once you have read it? What I am trying to do here is reset the new message count to zero once you have read a message.
Parker
[Edited by Parker Clack on 08-08-2000 at 09:26 AM]
I am having the same problem
In the USer Profile:
Receive Email On PM ON/OFF
this didn't Work! I can check On or Off, when I go back to the Profile it's still off!
also the same with the recieve PM it will not turn on stays in the off postiion
Works fine for me, and to my knowledge, it works fine for others. Me2Be had that problem, but she just reinstalled and it was fixed, IIRC.
can someone confirm for me that the signatures work in the PM hack, they dont seem to show up for me when i check the tick box. issit just me :confused:
ok...well looks like i solved the bug myself.
the signature function was not correctly specified in "private.php"
so to help anyone else who comes across this problem...
heres how i fixed it, find:
if ($message[showsignature]==1 and $allowsignatures==1) {
$signature= "\n__________________\n$userinfo[signature]";
} else {
$signature="";
}
and change it to look like:
if ($message[signature]==1 and $allowsignatures==1) {
$signature= "\n__________________\n$userinfo[signature]";
} else {
$signature="";
}
for those of you who cant see the difference the change is in changing "showsignature" to "signature"
this fixed the bug for me because the old code was instructed to query the "showsignature" field in the messages table, however this field does not exist, it is in fact called "signature"
this became apparent to me when i analysed the database directly and also because the database query did not include showsignature but instead signature which was wrong.
i hope this helps and sorry if i confused anyone. btw thanks for a fantastic hack ed...umm i mean mike
:D:D:D:D:D
Well I finally upgraded and the users who post above about the "Can send pms" always defaulting to NO even though they set it to yes are correct. That is how mine is behaving. I am about to investigate the problem and fix it - I will post when I am done. It is saying NO but I can clearly see that the field in the database is set to "1" so it must be reading the setting incorrectly.
Also a note, if you upgrade you need to remove the <a href=etc etc link to private.php that you put in the postbit template from the first version and replace it with $pmlink. The notes don't seem to mention this.
[Edited by rangersfan on 08-29-2000 at 05:17 PM]
Ok the problem is this is in the instructions:
Find:
~~~~~~~
$DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n)");
~~~~~~~
Replace with:
~~~~~~~
//PM Hack
//Original: $DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n)");
//New:
$DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n,$receivepm,$emailonpm)");
//END PM Hack
~~~~~~~
The thing is you will find that line (or lines that look damn near the same) in two places. One in the edit profile section and one in the coppa form section. You need to make sure to change the one in the "Edit Profile" section, it is also the first occurence of the line.
About the "Replied to" graphics
If I reply to a message, I am still getting the same plain old folders, not the replied to folders. Does this work for anyone else, besides Ed and Me2Be, before I investigate the code?
Well, it's not working for me anymore :( I don't think at least. Have to go verify.
They USED to... when I implemented them, so I'm going to have to make sure I didn't break them when I added other stuff (they were one of the first features I added)
Ok, simple fix. It just wasn't validating to true - I missed an <input> :D
But that's the alternate fix - this one's easier. Open up private.php and find:
if ($reply=="true") {
$DB_site->query("UPDATE privatercvd SET repliedto=1 WHERE msgid=$replyto");
}
Replace with:
if ($replyto) {
$DB_site->query("UPDATE privatercvd SET repliedto=1 WHERE msgid=$replyto");
}
Works Now :)
Bug #2 - The subject field states (subject is optional) .. but.. if you leave the subject blank then you are told you did not fill in all the fields.
Yeah, that's a known issue - just remove that from the template.
I'll be making an official release of 1.2.5 with some bugfixes.
How can I add PM to each forum not only the main page?
Originally posted by Ed Sullivan
Yeah, that's a known issue - just remove that from the template.
I'll be making an official release of 1.2.5 with some bugfixes. will that conincide with the vb hack site release :D
i seem to have killed one of the forms in the html code and can't find the <form tag i'm missing could someone post a fully functional template file here?
i'm missing the little form which lets you delete checked marked private messages or move them - my begining <form> tag got deleted by accident :)
thanks
[Edited by rsg on 09-03-2000 at 11:59 PM]
Ed ; I had a user with the password of "a"
When he goes into the PM's it always asks him to login, over and over.
I checked and it appears that 'a' encrypts to '0' so that your check of
if ($bbpassword)
comes back false everytime since his password, though valid is set to '0'
I just changed his password to something a wee bit secure but just letting you know.
i need a working privatemsglist template please. i lost one of my <form> tags in mine.
is there something i missed about having the profile show the correct default settings for the pm hack? when ever anyone goes to the profile section, the pm hack defaults get set to "no" for both recieve private pms and receive emails on pm.
it shows correctly in the admin edit profile page in the control panel
i put
,receivepm,emailonpm
at the end of the query line
$userinfo=$DB_site->query_first("SELECT parentemail,coppauser,email,password,homepage,icq, aim,yahoo,biography,signature,adminemail,showemail ,invisible,cookieuser,daysprune,timezoneoffset,ema ilnotification,receivepm,emailonpm FROM user WHERE userid=$userid");
does this look right the fix for this problem?
1. Ever think of looking at template-list.html?
2. If it doesn't work then you messed up the install - read what rangersfan said.
And yes, that should be ok.
RTFM!
I am getting this error:
Database error in vBulletin: Invalid SQL: SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,text,signature FROM privatercvd WHERE msgid= AND toid=5053
mysql error: You have an error in your SQL syntax near 'AND toid=5053' at line 1
mysql error number: 1064
Date: Monday 11th of September 2000 12:28:03 PM
Script: /private.php?action=show
Referer: http://forums.paintballcity.com/private.php?action=show
Please help. Thanks. :)
I just had the most horrible time trying to install this hack, even though it probably should have been fairly easy. I'm using vBulletin v 1.1.3 B3 and followed the "first time installation" instructions which were included in the zip file.
I edited all of the files, then uploaded the makeprivtables.php file to my server. When I ran it, I got a database error, and the following message was sent to me:
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup ADD canusepm TINYINT (4) DEFAULT '1' not null
mysql error: Lost connection to MySQL server during query
mysql error number: 2013
Script: /forums/makeprivtables.php
I clicked 'refresh' and tried to run makeprivtables.php again. This time I got a new error:
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup ADD canusepm TINYINT (4) DEFAULT '1' not null
mysql error: Duplicate column name 'canusepm'
mysql error number: 1060
Script: /forums/makeprivtables.php
I went ahead and uploaded the modified files, changed the PM settings in options.php, and tried to access my board. When I tried to load my forums, I got a parse error:
Parse error: parse error in global.php on line 199
About an hour later, I gave up and restored my backup copies of the files which were edited. Everything appears to be working like before now, thankfully. I'm not sure if the problems were because of the Database errors, or maybe the instructions for modifying the code (I noticed that in the instructions for global.php it mentioned versions 1.1.2 and 1.1.1, but not 1.1.3).
I don't know a whole lot about MySQL, and vBulletin is the first PHP program I've used with my site. I have used plenty of Perl and CGI scripts before though, and have never really had a problem. Does anyone have an idea of what I might be doing wrong here, or what could be causing all of the problems? Any help is appreciated... thanks.
-Tom
Tom -
in makeprivtables.php uncomment this line:
//$DB_site->query("ALTER TABLE usergroup DROP canusepm"); (remove the //)
Then rerun it. If you get an error with it finding a duplicate column, uncomment the corresponding line. (look in the file - you'll see)
As for your parse error, then you messed up in editing the file.
This thing just doesn't want to work... I tried what you said, and still received an error:
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup DROP canusepm
mysql error: Lost connection to MySQL server during query
mysql error number: 2013
Date: Saturday 16th of September 2000 12:01:52 PM
Script: /forums/makeprivtables.php
I ran it again after that, and got a new error:
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup DROP canusepm
mysql error: Can't DROP 'canusepm'. Check that column/key exists
mysql error number: 1091
Date: Saturday 16th of September 2000 12:03:44 PM
Script: /forums/makeprivtables.php
According to that error, it can't find 'canusepm' so it can drop it... so I commented out the command in makeprivtables.php that drops that table and tried again...
Database error in vBulletin: Invalid SQL: ALTER TABLE usergroup ADD canusepm TINYINT (4) DEFAULT '1' not null
mysql error: Lost connection to MySQL server during query
mysql error number: 2013
Date: Saturday 16th of September 2000 12:04:52 PM
Script: /forums/makeprivtables.php
Just to clear up a few little things that could be causing this... lemme make sure I've done everything right here....
I uploaded makeprivtables.php to my /forums/ directory, and that's the ONLY file I have uploaded for this hack. In the php file it includes "global.php", which would mean it's including the global.php from the /forums/ directory and not the /forums/admin/ directory... is all of this correct? If so, I have NO clue why it's having so much trouble modifying the tables. It seems like it loses the MySQL connection ever time it's creating "canusepm", then runs into an error if I try again because it's trying to add a duplicate column... and this happens over and over. I hope somebody can help, I'd really like to get this hack working :( Thanks.
-Tom
[Edited by Tomeeboy on 09-16-2000 at 12:29 PM]
Being that that's the first ALTER command, I think your host isn't giving you full permissions. Talk to them about letting you have ALTER table permissions.
(Anyone else have any other ideas?)
No ALTER permission will clearly state "Access Denied" so it isn't that.
Man.. this is really bugging me now... hehe. I can usually figure out why stuff like this is happening, but this just doesn't make any sense at all. I have full permissions to everything, and I haven't had any other problems with MySQL or PHP on my server (except for the magic_quotes thing, but that was easy to fix). If anyone else has any more suggestions, keep 'em coming... I apprecitate the help.
-Tom
Okay... apparently, since I'm hosted by VServers, user authenticated access to the database via http is not possible... go figure... "virtual server" my rear.
Is there some way around this? perhaps through telnet or something? If not... can somebody recommend a good hosting company? lol.
-Tom
Another update!
Okay, I figured the ALTER command was the cause of the problem (thinking that I didn't have permission to use that command via HTTP), so I attempted to send the first few commands to MySQL while logged in through telnet. BAM! Same errors that I got while trying via HTTP. So I emailed tech support at VServers and asked what the deal was, and they responded saying that there are segmentation faults in the MySQL daemon! (the plot thickens...) So I guess that is what was causing the problem all along... not permissions. They're having a "senior programmer" work on it now... and hopefully it will get fixed sometime soon.
All of this trouble, just to add a hack to the message board. This private messaging thing better be damn good Ed! Hehehe.
Anyway.. just thought I'd let everyone know so you're not thinking up workarounds and stuff for me. I'll let everyone know how it turns out :)
-Tom
My problem is using HTML, VB code, or smilies does not work with my PM hack! Everything else seems to be fine!
I toggled settings in the admin panel to turn on and off these features, but it seems to be stuck in the off state.
Can someone point me in the right direction of the problem can may be?
Thanks Ed, I installed it sucessfully on my board! It's great!
Rangersfan - I finally got alter permissions on my Vbulletin, so I can finally install the avatar hack!
Okay, small problem:
Almost everyone is catagorized as "Unable to recieve Private Messages".
The reason for this is this: When you edit your profile, you have to choose the radio button that says "Receive Private Messages". Well, that's all fine and dandy. But then, if you edit your profile again, the radio buttons' position isn't saved (they're both unselected) and you HAVE to click on yes, even if you are doing something unrelated like changing your Biography. If you leave it unchecked, it assumes that you do NOT want to recieve PMs.
Also, everyone who was registered BEFORE the hack was installed has it turned off by default.
How do I fix these 2 problems?
Cid look at my posts on this page:
http://www.vbulletin.com/forum/showthread.php?threadid=1772&pagenumber=4
Originally posted by rangersfan
Ok the problem is this is in the instructions:
Find:
~~~~~~~
$DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n)");
~~~~~~~
Replace with:
~~~~~~~
//PM Hack
//Original: $DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n)");
//New:
$DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppau ser,homepage,icq,aim,yahoo,biography,signature,adm inemail,showemail,invisible,usertitle,joindate,can post,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm) VALUES (NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($parentemail)."',$coppauser,'".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotificatio n,$receivepm,$emailonpm)");
//END PM Hack
~~~~~~~
The thing is you will find that line (or lines that look damn near the same) in two places. One in the edit profile section and one in the coppa form section. You need to make sure to change the one in the "Edit Profile" section, it is also the first occurence of the line.
Okay, I know this is the problem that I have, and the solution, but I have no idea what you're saying here. Can you explain?
Well Cid I did explain. I will try to log in later and fix it for you.
Nevermind Rangersfan. I removed all the private messaging stuff from member.php and started again. Sure enough, its working now.
Thanks.
This is an absolutely great hack, I love the results!
If I may add, there should be warnings especially to those who have installed other hacks already, I have almost overwritten my Poll Hacks, good thing I paid more attention than usual.
Best of all, this hack works, and wonderfully at that! Great JOB!
Ed you do need to put a check in the hack because if someone deletes a message then goes back I get tons of tech errors emailed to me :)
Question about templates - what template contains the information on reply and that sort of things. I am looking for the actually text and links so I can change the color from white so it will show up on the white background.
I have been through all of them that I can find and cant seem to find it.
OK now I see why I didnt get a reply - dang I must have read this entire thread five times and missed what I wanted staring me in the face on the first page
oops
Hello Ed,
I have been getting the error below for quite some time. Any ideas?
Database error in vBulletin: Invalid SQL: SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,text,signature FROM privatercvd WHERE msgid=34768/ AND toid=6679
mysql error: You have an error in your SQL syntax near 'AND toid=6679' at line 1
mysql error number: 1064
Date: Monday 13th of November 2000 08:33:21 PM
Script: /private.php?action=show&msgid=34768/
Referer:
Open private.php. Around line
if ($table=="privatercvd") {
and look for
$message = $DB_site->query_first("SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,text,signature FROM $table WHERE msgid=$msgid AND toid=$userid");
Remove / if you have there something like msgid=$msgid/
Hope this helps. :)
uhh, no :)
Someone is coming in via this URL:
.../private.php?action=show&msgid=34768/
The trailing slash is what's killing it. Check your templates to see if you added a slash by accident.
Feeeeeling so dump now... <ahem>... :)
Hello,
I checked the templates. It does not contain any ' / '
Here is template pmsentmsg
Hello,
You have received a private message at $bbtitle, from $name.
You may view it by going here: $bburl/private.php?action=show&msgid=$theid
Thanks,
$bbtitle Post Manager
I also checked Pef's but the code does not show any ' / '
if ($table=="privatercvd") {
$message = $DB_site->query_first("SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,text,signature FROM $table WHERE msgid=$msgid AND toid=$userid");
if ($getnextnewest=$DB_site->query_first("SELECT msgid FROM privatercvd WHERE msgid>$msgid AND toid=$userid ORDER BY msgid LIMIT 1")) {
$nextnewestthreadid=$getnextnewest[msgid];
eval("\$nextnewest = \"".gettemplate("pm_nextnewest")."\";");
}
if ($getnextoldest=$DB_site->query_first("SELECT msgid FROM privatercvd WHERE msgid<$msgid AND toid=$userid ORDER BY msgid DESC LIMIT 1")) {
$nextoldestthreadid=$getnextoldest[msgid];
eval("\$nextoldest = \"".gettemplate("pm_nextoldest")."\";");
}
} else {
$message = $DB_site->query_first("SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,text,signature FROM $table WHERE msgid=$msgid AND fromid=$userid");
if ($getnextnewest=$DB_site->query_first("SELECT msgid FROM privatesent WHERE msgid>$msgid AND fromid=$userid ORDER BY msgid LIMIT 1")) {
$nextnewestthreadid=$getnextnewest[msgid];
eval("\$nextnewest = \"".gettemplate("pm_nextnewest")."\";");
}
if ($getnextoldest=$DB_site->query_first("SELECT msgid FROM privatesent WHERE msgid<$msgid AND fromid=$userid ORDER BY msgid DESC LIMIT 1")) {
$nextoldestthreadid=$getnextoldest[msgid];
eval("\$nextoldest = \"".gettemplate("pm_nextoldest")."\";");
}
}
Any ideas?
Well, some random user is coming in through that link - I don't know why.
You can fix that by change the query PeF mentioned to look like this
WHERE field='value'
Note the apostrophes.
Ed,
I finally got my permissions straightened out and added the pm hack. This is such a wonderful add on! I just wanted to thank you so much for all of the hard work that went into this- it's fantastic!
TigerLily:)
When I send a message the other person only receives the topic and no text. What is going on here?
I can't figure out what to replace because it is the newer version of vB and its using templates!
I patch those mentioned file in vb 1.1.4 except one
, I cannot found the search string mentioned in showthread.php
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.