vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   [ADD-ON] Improved PM Folderview PM Totals (https://vborg.vbsupport.ru/showthread.php?t=36840)

ImportPassion 03-02-2003 11:23 PM

I just made some more changes.
Instead of displaying ( / ) or () if there is nothing there, I added this.

PHP Code:

//Message Tracking
$msgin_track $DB_site->query_first("SELECT COUNT(*) AS track_msgtotal FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='1'");
//$track_msgtotal = $msgin_track[track_msgtotal];
if ($msgin_track[track_msgtotal]) :  
    
$track_msgtotal $msgin_track[track_msgtotal];
else :
    
$track_msgtotal 0;
endif;

$msgin_trackread $DB_site->query_first("SELECT COUNT(*) AS track_msgtotalread FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='2'");
$track_msgtotalread $msgin_trackread[track_msgtotalread];
//$track_msgtotalread = $msgin_track[track_msgtotalread];
if ($msgin_track[track_msgtotalread]) :  
    
$track_msgtotalread $msgin_track[track_msgtotalread];
else :
    
$track_msgtotalread 0;
endif; 


Stud_Muffin 03-23-2003 06:19 PM

Installed in vb 2.3.0 but quite messy to do.

AlexanderT 04-22-2003 01:31 AM

Quote:

03-03-03 at 01:23 AM 7thgenCivic.Com said this in Post #31
I just made some more changes.
Instead of displaying ( / ) or () if there is nothing there, I added this.

Yours contains some typo mistakes. Here the corrected one (apply in both private.php and private2.php)

PHP Code:

  $msgin_track $DB_site->query_first("SELECT COUNT(*) AS track_msgtotal FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='1'");
  if (
$msgin_track[track_msgtotal]) :  
      
$track_msgtotal $msgin_track[track_msgtotal];
  else :
      
$track_msgtotal 0;
  endif;

  
$msgin_trackread $DB_site->query_first("SELECT COUNT(*) AS track_msgtotalread FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='2'");
  if (
$msgin_trackread[track_msgtotalread]) :  
      
$track_msgtotalread $msgin_trackread[track_msgtotalread];
  else :
      
$track_msgtotalread 0;
  endif; 


RetroDreams 05-06-2003 02:05 PM

Quote:

07-14-02 at 12:19 AM PET said this in Post #15
sugestion :

when i create a folder. If i want to delete it...i must go to folders room. Well you can put a DELETE button...on each custom forum.

Has this been accomplished? Also what about alphabetizing the folders?

ogden2k 05-06-2003 10:57 PM

Quote:

11-04-02 at 11:30 PM Tigga said this in Post #21
Well just incase anyone else is having the problem with the custom folders total not showing, I figured out what was wrong.

Open private.php and find:
PHP Code:

eval("\$folderboxeshack .= \"".gettemplate("priv_showfolders_folderbit_hack",1,0)."\";"); 

Right above that add:
PHP Code:

$msginfolder $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage
 WHERE userid=
$bbuserinfo[userid] AND folderid=$folder[folderid]");
$foldermsgtotal $msginfolder[foldermsgtotal]; 

Then you can look for another instance of the code above that you just added (near the bottom of the file) and remove it. Works great now. :)

Thanks!

XFLBret 05-07-2003 01:39 AM

i installed this in 2.3.0 and it seems to be working OK.

I'm holding off installing the mentioned code in post 26 until boofo's question is answered. I'd like to save a couple queries myself.

and as for the addition proposed in post 31, I don't understand what it's supposed to do.

nymyth 05-31-2003 07:46 AM

my custom folders are still not showing a total......and i couldnt find the other instance you were talking about....any ideas...

Peace

Sam FT 06-03-2003 05:06 AM

Quote:

05-31-03 at 03:46 AM nymyth said this in Post #37
my custom folders are still not showing a total......and i couldnt find the other instance you were talking about....any ideas...

Peace

There isn't any, because if you look at the date when it was posted it was back in November of 2002. So think it had an extra instance of it, but now with the newer version there isn't any.

Sam FT 06-03-2003 05:33 AM

I was reading through this thread and noticed some people said that it was quite messy getting through this hack. And I am surprised that someone didn't already compile all the modifications and fixes submitted by everyone in this thread. So I decided to that it need to be done and that way it would be much easier on everyone.

Thanks to Matt for creating this hack. And also thanks to Mystics, ManagerJosh, Tigga, T?Pau, 7thgenCivic.Com, & AlexanderT for modifying and fixing to this hack.

Special thanks goes out to Kreft for creating the original Improved PM Folderview Hack.

*File has been updated 6/15/03*

Onkel_Tom 06-16-2003 01:18 AM

Sorry Music Pirate, but there is a mistake in your compilation.

you wrote:
PHP Code:

OPEN PRIVATE.php

FIND
:

if (
$bbuserinfo[pmfolders]) {
    
$allfolders split("\n"trim($bbuserinfo[pmfolders]));
    
$foldercount 0;
    while (list(
$key,$val)=each($allfolders)) {
      
$folder split("\|\|\|"$val);
      
$foldercount++;
      
$highestnum $folder[0];

      
$folder[folderid]=$folder[0]+1;
      
$folder[title]=$folder[1];


BELOW THAT ADD

//////////////////////////////////////hack////////////////////////////////////////

$ignoreusers=""
      if (
trim($bbuserinfo['ignorelist'])!="") { 
        
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' 'trim($bbuserinfo['ignorelist']))); 
      } 
      
$msginfolder $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid] $ignoreusers");
$foldermsgtotal $msginfolder[foldermsgtotal];

///////////////////////////////////////hack///////////////////////////////////////


FIND

///////////////////////////////////////hack///////////////////////////////////////

eval("\$folderboxeshack .= \"".gettemplate("priv_showfolders_folderbit_hack",1,0)."\";");
      }
  }

///////////////////////////////////////hack///////////////////////////////////////


ABOVE THAT ADD

///////////////////////////////////////hack//////////////////////////////////////

$msginfolder $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage
WHERE userid=
$bbuserinfo[userid] AND folderid=$folder[folderid]");
$foldermsgtotal $msginfolder[foldermsgtotal];

///////////////////////////////////////hack/////////////////////////////////////// 

But correct is:
PHP Code:

OPEN PRIVATE.php

FIND
:

if (
$bbuserinfo[pmfolders]) {
    
$allfolders split("\n"trim($bbuserinfo[pmfolders]));
    
$foldercount 0;
    while (list(
$key,$val)=each($allfolders)) {
      
$folder split("\|\|\|"$val);
      
$foldercount++;
      
$highestnum $folder[0];

      
$folder[folderid]=$folder[0]+1;
      
$folder[title]=$folder[1];


BELOW THAT ADD

/////////////////////////////////////////hack////////////////////////////////////

$ignoreusers=""
      if (
trim($bbuserinfo['ignorelist'])!="") { 
        
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' 'trim($bbuserinfo['ignorelist']))); 
      } 
      
$msginfolder $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid] $ignoreusers");
$foldermsgtotal $msginfolder[foldermsgtotal];

/////////////////////////////////////////hack///////////////////////////////////// 

The second part you wrote in your instruction is duplicate with the first part !

@ all
How can I delete custom Folders from PM System ?
I didn't find a solution how to delete the added own folders. Am I blind ?


All times are GMT. The time now is 02:33 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.01164 seconds
  • Memory Usage 1,794KB
  • 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
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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