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)

07-12-2000 01:52 PM

Ed:

One thing too. Do you have it written for 1.1.3 yet? I used the version that you have but noticed today that in the faq and bbcode pages you get a database error like:

Database error in vBulletin: Invalid SQL: SELECT announcementid,userid,startdate,title FROM announcement WHERE startdate<=963412951 AND enddate>=963412951 AND (forumid= OR forumid=-1) ORDER BY startdate DESC LIMIT 1
mysql error: You have an error in your SQL syntax near 'OR forumid=-1) ORDER BY startdate DESC LIMIT 1' at line 1
mysql error number: 1064
Date: Wednesday 12th of July 2000 09:42:31 AM
Script: /htforum/index.php?action=bbcode
Referer: http://www.hometheaterforum.com/htfo...php?action=faq

so it is probably where I am putting the code that have in the index.php file.

Could you look at 1.1.3 and see what changes need to be made in the placement of your code?

BTW, when I put the original code from 1.1.3 back in it took care of the problem.

Thanks,
Parker

07-12-2000 02:11 PM

Parker-
Quote:

One other thing. I think you should make it to where the member can turn this option off. I know you have control as an admin to turn it off or on to the whole board but a lot our members don't like the private messging and don't want anyone sending them anything. This should also remove the icon that you put in the forumdisplay pages too so that they can't send a private message from there either.
See my list, it's "Coming...", as in I'm programming it right now.

Quote:

You know looking at what you have done already it would nice if you put all the member selection in an options section.
Maybe if I feel like writing another template. I really hate making templates, and I'm already up to about 30 (!!!) :D

Quote:

One thing too. Do you have it written for 1.1.3 yet?
Yes, works fine on 1.1.3. Look at my board.

Quote:

I used the version that you have but noticed today that in the faq and bbcode pages you get a database error like: {SNIP}
Umm... I don't get them.

Doron-
Quote:

all we need now are polls in a pm...
LOL, that's coming in version v80.1 :)

07-12-2000 02:44 PM

Ed:

Since it is the index.php file that is causing the trouble
this is what I have.

Just below:
if ($action=="showforums") {

I have:

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

and this is just above:

$numbersmembers=$DB_site->query_first("SELECT COUNT(userid) AS users FROM user");
$numbermembers=$numbersmembers[users];

Does this look right?

Parker

07-12-2000 04:12 PM

Parker - that code is fine, although the new version makes some changes.

Now, the weird thing: I just downloaded the new beta 3, and did some searches, both in global.php and index.php. And that SQL isn't even in either! So, it's not my hack that's causing them to die :)

07-12-2000 04:16 PM

That IS weird. If I put the orginal index.php file back in I don't get the error. If I put the one with the code added in I get the database error.

What I was wanting in the previous message was to know if I was putting it in right or not.

Maybe the new version will take care of this problem. Who knows.

Parker

[Edited by Parker Clack on 07-12-2000 at 01:18 PM]

07-12-2000 07:32 PM

Maybe I'm missing the point, or didn't catch the sarcasm, but... :)

What's the point with polls in a private message?

There would be two votes MAX...so it seems rather, pointless. :)

07-12-2000 07:38 PM

you could mass mail them and have a central poll..nah, that was a joke. ;)

07-12-2000 07:49 PM

This is sweet! :) Goodbye mass e-mails hello personal messages! ;)

07-13-2000 02:53 AM

Ed:

I sent you an email back with the file you requested.

Did you get it?

Parker

07-13-2000 03:53 AM

Yeah, I haven't looked at it extensively yet though. Can you do a quick search in your global.php for something in that SQL error (like, announcement) or something - I really have no clue what would cause that.

When forumid=-1 in an announcement, that means it's going to any forum. So what the script is trying to grab looks like a forumdisplay.php routine: grab announcements for any forum (-1) or this forum (the blank space, since you're not in a forum). But, w(why)tf would it be doing that in index.php?!

*shrug* Not sure yet...

And, to everyone, I'm very close to the new release. Tonight if I rush to document all the changes, most likely tomorrow though.

Some misc. stuff now:
- Yes, there is an upgrade route to the new version, but some of the templates have significant changes. I suggest using the default versions, and just rehacking :) (Besides, I'm not even sure of everything I've changed)
- 95% of the suggestions have been implemented, including a few that weren't "Done!" before.
- Unfortunately, with new features, comes more editing to vB's standard files--much more. :(

Now, some bragging rights: :D
- 4 new profile fields, 2 customizable via "modifyprofile", other 2 from PM hack itself
- one new field to "usergroup" table
- (Get ready) 35 new templates (!!)
- 3 new tables:
* privatercvd, now with 10 fields
* privatesent, with 8 fields
* and pmstats, with 4 (new feature, still lacking though) :(

Anyway, get ready :)


All times are GMT. The time now is 05:09 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.01345 seconds
  • Memory Usage 1,749KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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