vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE] Private Messaging (PM) Hack, v 1.2.0 (https://vborg.vbsupport.ru/showthread.php?t=1772)

08-01-2000 06:56 AM

You can't append numbers to the "name" attributes.

action3 should be action
table2 -> table
password3 -> password

etc, etc, etc.

08-02-2000 04:23 AM

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:
Quote:

<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>
Quote:

<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

08-02-2000 04:49 AM

The <select> part is wrong. Should be:
Code:

<SELECT name="thefolder">
And FYI, the default templates are included with the hack, so you might wanna take a look at those.

08-03-2000 03:20 PM

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 ?

08-05-2000 11:52 AM

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

08-08-2000 01:42 AM

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

08-08-2000 03:00 AM

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)

08-08-2000 03:12 AM

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

08-08-2000 04:11 AM

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.

08-08-2000 11:56 AM

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]

08-19-2000 06:54 PM

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

08-24-2000 02:34 PM

bump

08-24-2000 03:09 PM

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.

08-28-2000 10:46 AM

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:

08-28-2000 01:22 PM

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:

Code:

    if ($message[showsignature]==1 and $allowsignatures==1) {
      $signature= "\n__________________\n$userinfo[signature]";
    } else {
      $signature="";
    }

and change it to look like:

Code:

    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

08-29-2000 08:03 PM

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]

08-29-2000 08:16 PM

Ok the problem is this is in the instructions:

Code:

Find:
~~~~~~~
$DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,usertitle,joindate,canpost,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,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,$emailnotification)");
~~~~~~~

Replace with:
~~~~~~~
  //PM Hack
  //Original: $DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,usertitle,joindate,canpost,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,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,$emailnotification)");
  //New:
  $DB_site->query("INSERT INTO user (userid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,usertitle,joindate,canpost,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,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,$emailnotification,$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.

08-30-2000 04:55 PM

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?

08-30-2000 07:03 PM

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)

08-30-2000 07:23 PM

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:
Code:

        if ($reply=="true") {
                $DB_site->query("UPDATE privatercvd SET repliedto=1 WHERE msgid=$replyto");
        }

Replace with:
Code:

        if ($replyto) {
                $DB_site->query("UPDATE privatercvd SET repliedto=1 WHERE msgid=$replyto");
        }


08-30-2000 09:21 PM

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.

08-30-2000 10:08 PM

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.

09-04-2000 12:41 AM

How can I add PM to each forum not only the main page?

09-04-2000 12:46 AM

Quote:

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

09-04-2000 02:55 AM

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]

09-06-2000 01:48 AM

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.

09-06-2000 04:43 PM

i need a working privatemsglist template please. i lost one of my <form> tags in mine.

09-06-2000 06:37 PM

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

09-06-2000 06:47 PM

i put

,receivepm,emailonpm

at the end of the query line

Code:

$userinfo=$DB_site->query_first("SELECT parentemail,coppauser,email,password,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,cookieuser,daysprune,timezoneoffset,emailnotification,receivepm,emailonpm FROM user WHERE userid=$userid");
does this look right the fix for this problem?

09-06-2000 07:04 PM

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!

09-11-2000 04:35 PM

I am getting this error:
Quote:

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. :)

09-12-2000 09:06 AM

any final release ?

09-16-2000 06:36 AM

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:

Quote:

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:

Quote:

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:

Quote:

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

09-16-2000 11:51 AM

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.

09-16-2000 03:26 PM

This thing just doesn't want to work... I tried what you said, and still received an error:

Quote:

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:

Quote:

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...

Quote:

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]

09-16-2000 04:07 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?)

09-16-2000 05:31 PM

No ALTER permission will clearly state "Access Denied" so it isn't that.

09-16-2000 06:53 PM

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

09-16-2000 09:20 PM

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

09-17-2000 11:05 PM

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


All times are GMT. The time now is 08:11 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.01535 seconds
  • Memory Usage 1,847KB
  • 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
  • (7)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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