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 Hack (v0.9) !!!!!!! (https://vborg.vbsupport.ru/showthread.php?t=1095)

06-14-2000 01:16 PM

Thanks everyone!! This is a great hack and it was great to see such creative minds at work!! :D

06-14-2000 02:21 PM

RE: The Date Problem

Quite a simple fix actually, in private.php, find: (line 146)
Code:

$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,UNIX_TIMESTAMP(joindate) AS  joindate,posts FROM user WHERE userid=$userid2");
Replace with:
Code:

$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid2");
Can anyone else tell me if I'm the only person still running v1.1.1? Because if I am, there's no use in me adding a "version" switch...

06-14-2000 02:28 PM

RE: Profile Problem

Another REALLY simple fix, in private.php, (line 143) Find:
Code:

$userid2=$fromid;
Under it, add (for simplicity's sake):
Code:

$userid=$fromid;

06-14-2000 03:55 PM

Ok, another release - most (if not all) of the fixes included in v0.9.3 have been posted here, either by me or someone else.

However, there are a few things I want to address.

1. The index.php code has changed significantly:
Code:

  //PM HACK
  if ($bbusername) {
          $username = $bbusername;
          $pmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid");
          $pmcount = $pmcounta[msgid];
          $newpmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid AND UNIX_TIMESTAMP(datetime)>$bblastvisit");
          $newpmcount = $newpmcounta[msgid];
        if ($newpmcount == 0) {
                $lightbulb = 'images/off.gif';
        } else {
                $lightbulb = 'images/on.gif';
        }
        $lastsent = $DB_site->query_first("SELECT fromid,UNIX_TIMESTAMP(datetime) AS datetime FROM privatercvd WHERE toid=$bbuserid ORDER BY msgid DESC");
        if ($lastsent) {
                $lastid = trim($lastsent[fromid]);
                $lastdate=date($dateformat,$lastsent[datetime]+(($timeoffset+$bbtimezoneoffset)*3600));
                $lasttime=date($timeformat,$lastsent[datetime]+(($timeoffset+$bbtimezoneoffset)*3600));
                $lastsentuser = $DB_site->query_first("SELECT username FROM user WHERE userid=$lastid");
                $lastuser = htmlspecialchars($lastsentuser[username]);
        }
          eval("\$pminfo .= \"".gettemplate("pmloggedin")."\";");
  } else {
          eval("\$pminfo .= \"".gettemplate("pmloggedout")."\";");
  }
  //END PM HACK

2. pmloggedin changed pretty significantly too:
Code:

<TR bgcolor="{categorybackcolor}" id=cat><TD colspan=6>
<font color="{categoryfontcolor}" size=2><B>Private Messaging:</B></font></td>
</tr>

<tr bgcolor="{firstaltcolor}">
<td><img src="$lightbulb"></td>
<td colspan=5>
<smallfont><a href="private.php">Read them!</a>
<BR>$username - You have $pmcount private message(s) ($newpmcount new) -  Latest Message from <a href="member.php?action=getinfo&userid=$lastid">$lastuser</a></smallfont></td>
</tr>

Also, I suggest EVERYONE!! snag the newest private.php, since it contains all the bugfixes I know of :)

~~~Current Version: v0.9.3 :D

BTW, Me2Be, yes that's better... Women...

06-14-2000 05:25 PM

2 more bugs...

When you go to delete a post and hit cancel the post still gets deleted.

Even if you don't check the "delete" check box you can hit delete and the post is removed.

06-14-2000 07:52 PM

I updated to the new version and i'm now unable to log in with the username 'Craig Antill' but I am able to with the username 'Administrator' - I presume it's because it's a single word with no spaces ? This has only happened since I updated - here is the error I get:

Quote:

Database error in vBulletin: Invalid SQL: SELECT username FROM user WHERE userid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Thursday 15th of June 2000 09:32:41 AM
Script: /forum/index.php
Referer:
I have just been and double checked that I followed the instructions correctly - I did - does anyone else have this problem ? If not, what could it be ?

06-14-2000 08:05 PM

OK, found the problem - the instructions in the latest .zip don't seem to match the code you give above. I've added the above code in place of that in the zip and all is fine and dandy.

You do like to panic me, don't you ?!

06-14-2000 08:28 PM

Hey! Just noticed the time and date features - excellent! I've now setup pmloggedin exactly like forumbit with full details of the last post - time, date & who made it - as well as the lightbulbs - great work fellas

06-14-2000 10:08 PM

I was curious to see what icon people were choosing.. and of those I checked, they were quite varied in their selection. Our poor hack author Ed has a dark (black?) background and you couldn't read the icon text. So here for our esteemed hack are the icons with white text...

http://www.wakeamerica.com/forums/im...m2_onblack.gif
http://www.wakeamerica.com/forums/im...m3_onblack.gif
http://www.wakeamerica.com/forums/im...m4_onblack.gif

[Edited by Wake America on 06-15-2000 at 07:10 AM]

06-15-2000 01:19 AM

Craig - Sorry about that, I knew I had that typo at one time, but I thought I fixed it :(

Rick - Fixed both bugs you mentioned (one was just a typo in makeprivtables.php)

I suggest everyone re-update their private.php :D

WakeAmerica - Thanks! I never got around to making the white text version.

06-15-2000 04:41 AM

Is the latest private.php file in the ZIP? The date of the current version is 6/15 10:10am it tries to replace a file that says 6/15 12:xxam. I updated anyway and the delete bug is still there.

06-15-2000 05:48 AM

Heya Ed,

A couple more features I'd like to place on the wishlist:

1) Forward. "Forward this message to..." :)

2) a "read next" "read previous" links on the messages, like in the threads.

3) An arrow next to the "last message from..." which takes you directly to that last message.

Cheers,

Bira

[Edited by bira on 06-15-2000 at 03:10 PM]

06-15-2000 09:10 AM

Quote:

Originally posted by Rick Horwitz
Is the latest private.php file in the ZIP? The date of the current version is 6/15 10:10am it tries to replace a file that says 6/15 12:xxam. I updated anyway and the delete bug is still there.
BTW, 10:10 am is later than 12:xx am :D

Umm.. which bug were you referring to? The delete button fix in forumdisplay-type page was only changed in makeprivtables.php - look back for the code if you wanna see it, or just change the onSubmit of the <FORM> tag to "return verify();"

The other bug I know I fixed, because I tested it on my site. :D

Anyway, I just reupdated/uploaded the zip just in case.

06-15-2000 09:16 AM

"BTW, 10:10 am is later than 12:xx am"

Maybe I need some more sleep: :D

06-17-2000 07:23 AM

Realy great Hack it works fine, even in the version 1.1.3
Only one little Problem, there is no icon (lamp) befor
the message "read them!"

how can i change it (where is the path for the icon written)

Thx

06-17-2000 01:38 PM

You have to change the values in the code.

So other than that, has no one found any other bugs?

YAY! I'll start on the UBB import utility then.

06-17-2000 06:04 PM

Hey, I have been trying to get this hack working on http://www.scubaboard.com. However, the text to let you check your messages does not show up on any pages. I may have missed something but I thought I'd ask first...

Any tips for getting this text to show?

06-17-2000 07:03 PM

Add $pminfo (or whatever it says in the instructions) to your forumhome template.

06-18-2000 03:32 AM

Thanks a ton Ed/Mike, I seemed to have overlooked that step.

Please let me know if there's ever anything I can do to help you out in return for this great addon...

[Edited by ExtremeFactor on 06-18-2000 at 12:38 PM]

06-19-2000 12:02 AM

Just a thought... how about the option to dispatch an email to the user when a new private message is awaiting them ? Would sure help to draw people back a bit more often... and I could then remove the email display altogether... :D

06-19-2000 12:13 AM

Agreed this would be a good feature. I would prefer this to the ability for people to email my members directly, for them only to be able to send them private messages and then have the private messaging system email the user to tell them they have a message waiting. Especially as I have had a recent incident of someone abusing my mailing system.

Also, it would be great if there was a facility for admins only (i.e. me) to send a private message to *every* registered user.

06-19-2000 12:53 AM

nice ideas. Got my vote!

06-19-2000 01:10 AM

I had your spam message in mind when I posted my message Mark. Maybe we could, when John builds this into the pukka code, also have an option to stop specific users from using the facility if they abused it, but seperate from their posting rights section. Probably getting beyond the realms of a hack now... :D

06-19-2000 03:30 AM

Nothing is beyond the realms of this hack :)

...good suggestions though. Dunno when they'll get implemented though. As I've mentioned several times, I want to do a UBB import utility first.

06-19-2000 04:50 AM

Well, may I politely suggest that you get on with it then... :D

06-19-2000 04:56 AM

Well, in that case, I'm not going to write it! :p

But seriously, calm down - I have to write more than just this one script. The ones I write for UBBHackers.com are pretty big!

Ahh, I'm rambling (in 2 sentences!). I hope to have the import utility done by June 24th, because if not, it won't come out till after July 2nd, since I'm going on vacation.

[high]* gets back to work.[/high]

06-19-2000 05:55 AM

in the index.php hack, there is still the "UNIX_TIMESTAMP(datetime)" problem, which causes msg's to always be new. take away the UNIX_TIMESTAMP, and it works

06-19-2000 08:21 AM

No no no, it supposed to be like that. I store the dates using MySQL's DATETIME field - and I need to pull them out like that.

I use v1.1.3b2 and it works fine like that...

(You realize I just ended every sentence with "like that" :D)

[Edited by Ed Sullivan on 06-19-2000 at 05:22 PM]

06-19-2000 08:35 AM

works on 1.1.2 and before, all old messages were new. Now it works...wierd....

06-19-2000 03:32 PM

One more thing... Would it be possible to place check boxes next to the list of "sent" messages, so instead of deleting them one at a time you could check as many messages as you want and delete them all at once.

Thanks,

Rick

06-19-2000 05:03 PM

Does anyone have this hack installed with an indicator on the main forum page showing that the member has a new message waiting?

Thanks,
Parker

06-19-2000 06:57 PM

Parker,

I have a little truck that changes from black to yellow when there is a new message waiting. It also informs the user through a text message.

You can see it at: http://www.explorerforum.com

06-21-2000 05:13 PM

I installed the hack on 1.1.3beta2 and it seems to be working ok! No dreaded "we have mailed the technical contact' emails yet. :)

06-21-2000 06:37 PM

Parker - I think you mean your <img> tag was blank.

Yeah, that was a typo in pmloggedin. Just change it to this: <img src="$lightbulb">

06-22-2000 03:15 AM

Some requests for a future version:

Receipt Notification (notify sender that recepient read message)

Make a folder with an R or such so that we know we responded to a specific message

If there are no messages in your folder it says "Last message from" and then nothing, have this say 'nobody' or such. Should only do this if I have never received a message (see below)

If I delete all of my messages it should remember who my last message was from and reflect that in the "Last Message from"

06-22-2000 05:57 AM

Quote:

If I delete all of my messages it should remember who my last message was from and reflect that in the "Last Message from"
That's a pretty major table change, to either store the userid in an additional column in the user table (quite possible) or an additional table (possible, but overkill). I'll think about it :)

"Last message from (blank)" - that was just an over sight on my part. Pretty easy fix.

Anyway, everything you basically suggested it quite possible. I'll look into them.

06-22-2000 07:07 AM

Thanks, I think just adding a field that stores the ID of the last message user would be fine.

The hack is great and my users love it.

Oh yeah would it be possible to get some sort of stat function in the CP that would say

25 IM's sent today, 350 total ever sent.

Something so I can make sure that the IM isn't taking over message posting. I know this would be 2 more fields and would require another table. I am currently looking at the sent & received tables but I'm not comfortable seeing what everybody has sent when it is 'supposed' to be private.

06-22-2000 12:33 PM

Question - I use 1.1.3beta2 and it says everyone registered in 1969 - what do I change to fix this?

06-22-2000 12:39 PM

Rangersfan - here is what Ed posted about the date problem earlier in this page:

Originally posted by Ed Sullivan
RE: The Date Problem

Quite a simple fix actually, in private.php, find: (line 146)
Code:

$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,UNIX_TIMESTAMP(joindate) AS  joindate,posts FROM user WHERE userid=$userid2");
Replace with:
Code:

$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid2");


[Edited by bira on 06-22-2000 at 09:40 PM]

06-22-2000 01:08 PM

Thanks I looked at every post but I guess I missed that one. :eek:

The line was already there commented out so I just switched the two around.

[Edited by rangersfan on 06-22-2000 at 10:15 PM]


All times are GMT. The time now is 05:08 AM.

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.01219 seconds
  • Memory Usage 1,826KB
  • 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
  • (8)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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