vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Anyone notice about PMs? (https://vborg.vbsupport.ru/showthread.php?t=40195)

Takara 06-23-2002 03:53 PM

Anyone notice about PMs?
 
There are a fiew things wrong with Private Messages.

#1, if you have no messages in any of your folders (recieved or sent) you see this:

Quote:

<nick> - You have new message(s) since your last visit.
(You have unread messages and 0 total messages in all your folders.)
It SHOULD say 'You have 0 new messages' and 'You have 0 unread messages'. Aswell you can send a message to a user with just spaces in the subject, thats really annoying.

Xenon 06-23-2002 03:59 PM

open private.php
find:
PHP Code:

if ($message=="" or $touser=="" or $title=="") {
    eval(
"standarderror(\"".gettemplate("error_requiredfields")."\");");
    exit;
  } 

replace with
PHP Code:

if (trim($message)=="" or $touser=="" or trim($title)=="") {
    eval(
"standarderror(\"".gettemplate("error_requiredfields")."\");");
    exit;
  } 

then no " " messages could be sent anymore

Takara 06-23-2002 04:05 PM

Cool, thanks ^^

Now I just have to fix that other one.

Takara 06-23-2002 04:14 PM

Ah, its because I commented out the following queries in index.php

PHP Code:

  $allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers"); 
  
$newpm=$DB_site->query_ffirst("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");
  
$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");

    
$newpm['messages']=$allpm['newpm'];
    
$unreadpm['messages']=$allpm['unreadpm']; 

and replaced by
PHP Code:

$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages,
                                SUM(IF(dateline>
$bbuserinfo[lastvisit] AND folderid=0,1,0)) AS newpm,
                                SUM(IF(messageread=0 AND folderid=0,1,0)) AS unreadpm
                                FROM privatemessage WHERE userid=
$bbuserinfo[userid] $ignoreusers");

    
$newpm['messages']=$allpm['newpm'];
    
$unreadpm['messages']=$allpm['unreadpm']; 

I'll changed the end part to
PHP Code:

  if ($allpm['newpm'] == "") { 
    
$newpm['messages']="0";
  } else {
    
$newpm['messages']=$allpm['newpm'];
  }

  if (
$allpm['unreadpm'] == "") { 
    
$unreadpm['messages']="0";
  } else {
    
$unreadpm['messages']=$allpm['unreadpm'];
  } 

But it hasnt worked yet. I'll keep playing.


All times are GMT. The time now is 03:01 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.01132 seconds
  • Memory Usage 1,740KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete