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)

11-06-2000 08:29 AM

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

11-14-2000 09:53 AM

Hello Ed,

I have been getting the error below for quite some time. Any ideas?

Quote:

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:

11-14-2000 01:17 PM

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

11-14-2000 01:22 PM

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.

11-14-2000 01:28 PM

Feeeeeling so dump now... <ahem>... :)

11-14-2000 10:11 PM

Hello,

I checked the templates. It does not contain any ' / '

Here is template pmsentmsg
Code:

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

Code:

        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?

11-14-2000 10:59 PM

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.

11-15-2000 01:17 AM

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

11-21-2000 07:53 PM

When I send a message the other person only receives the topic and no text. What is going on here?

12-10-2000 05:33 PM

I can't figure out what to replace because it is the newer version of vB and its using templates!


All times are GMT. The time now is 08:02 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.01671 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (1)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
  • (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