Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Improved PM Folderview Details »»
Improved PM Folderview
Version: 1.00, by kreftt kreftt is offline
Developer Last Online: Nov 2005 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 03-30-2002 Last Update: Never Installs: 151
 
No support by the author.

TESTED ON 2.3.0 AND FOUND WORKING

What does it do?

You know it happens to me pretty often that my users wonder why they cannot receive any more pm's. the standard question "did you check your sent items folder?" is answered with the standard question "do i have a sent items folder?"...

to avoid that, this hack shows the user on the privatemessage mainpage which folders they have in a list with the ability to add a folder without having to switch to the folders template.

aditionally, i modified the pmgauge enhanced hack by WWW.TOTAL-IMPACT.COM aka princeton a little and included it.

so, its nothing special, but maybe some people like it.
note: im new to this, so the code might be very ugly...

instructions:

1) follow instructions.txt

Credits: The_Sisko, mystics and boofo for finding bugs and helping with the code

Please notice this add-on by matt that allows you to have the amount of messages in each folder displayed next to it. Working on 2.2.9 too.

NOTICE: If you installed the private messages backup hack by Cano2 which is found here, you will have to to change a bit in the instructions.txt:

where it says to find:
PHP Code:
  //get correct folder name
  
if ($folderid=="0") { 
you will need to find the SECOND instance as the private message backup hack adds another instance of this code to the file.

NOTICE2: if you installed the PM Quota by Usergroup Hack by g-force2k2 that can be found here then the solution to make both work together is here

please click install if you use it, thank you

kreftt

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #222  
Old 08-18-2003, 11:15 AM
Asterik's Avatar
Asterik Asterik is offline
 
Join Date: Jul 2003
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<!-- Database error in vBulletin 2.3.2:

Invalid SQL: DELETE FROM privatemessage WHERE privatemessageid=20' AND folderid!='-2'
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' AND folderid!='-2'' at line 1

mysql error number: 1064

Date: Monday 18th of August 2003 08:06:07 AM
Script: http://www.plugspark.com/forums/forums/private.php
Referer: http://www.plugspark.com/forums/private.php?folderid=-2
 -->
I get this when i try to delete a message :sleep:
Reply With Quote
  #223  
Old 08-18-2003, 08:13 PM
kreftt's Avatar
kreftt kreftt is offline
 
Join Date: Dec 2001
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so there is some error in your deletion-code in private.php, most likely a missing ' after privatemessageid=

the hack didnt change a thing at that place, you made that mistake somewhere else.

please post the sections "start do stuff (move, etc) " and "start delete" from your private.php and we'll see what we can do

greetz

kreftt
Reply With Quote
  #224  
Old 08-18-2003, 10:17 PM
Asterik's Avatar
Asterik Asterik is offline
 
Join Date: Jul 2003
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
// ############################### start delete ###############################
if ($HTTP_POST_VARS['action']=="dodelete") {
  if (!$delete) {
    eval("standarderror(\"".gettemplate("error_pmnotchecked")."\");");
    exit;
  }

  $privatemessageid=verifyid("privatemessage",$privatemessageid);
  $DB_site->query("DELETE FROM privatemessage WHERE privatemessageid=$privatemessageid AND userid=$bbuserinfo[userid]");

  eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($folderid)."\");");
} #end dodelete
Reply With Quote
  #225  
Old 08-18-2003, 10:19 PM
Asterik's Avatar
Asterik Asterik is offline
 
Join Date: Jul 2003
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^-- Start Delete

v-- Start Do Stuff
Code:
if ($HTTP_POST_VARS['action']=="dostuff") {
  $what = '';
  if ($delete!="") {
    $what="delete";
  }
  if ($move!="") {
    $what="move";
  }
  if ($what=="mark") {
    // ************************
    // mark as (un)read
  }
  if ($what=="move") {
    if (is_array($privatemessage)) {
      while(list($key,$val)=each($privatemessage)) {
        $DB_site->query("UPDATE privatemessage SET folderid=".intval($folderid)." WHERE privatemessageid=".intval($key)." AND userid=$bbuserinfo[userid]");
      } //end while
    } else {
      eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
      exit;
    }
    eval("standardredirect(\"".gettemplate("redirect_pmmove")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($folderid)."\");");
  }
  if ($what=="delete") {
    if (is_array($privatemessage)) {
      while(list($key,$val)=each($privatemessage)) {
        $DB_site->query("DELETE FROM privatemessage WHERE privatemessageid=".intval($key)."' AND folderid!='-2'");
      } //end while
    } else {
      eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
      exit;
    }
    eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($thisfolder)."\");");
  }

}
Reply With Quote
  #226  
Old 08-19-2003, 02:35 PM
kreftt's Avatar
kreftt kreftt is offline
 
Join Date: Dec 2001
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, your dostuff-section looks wrong, there is a mistake in the delete-query leading to the error.

there are two more diefferences to how this section should look in 2.3.2, so if you update your dostuff-section to look like this:

Code:
if ($HTTP_POST_VARS['action']=="dostuff") {
  $what = '';
  if ($delete!="") {
    $what="delete";
  }
  if ($move!="") {
    $what="move";
  }
  if ($what=="mark") {
    // ************************
    // mark as (un)read
  }
  if ($what=="move") {
    if (is_array($privatemessage)) {
      while(list($key,$val)=each($privatemessage)) {
        $DB_site->query("UPDATE privatemessage SET folderid=".intval($folderid)." WHERE privatemessageid=".intval($key)." AND userid=$bbuserinfo[userid]");
      } //end while
    } else {
      eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
      exit;
    }
    eval("standardredirect(\"".gettemplate("redirect_pmmove")."\",\"private.php?s=$session[sessionhash]&amp;folderid=".intval($folderid)."\");");
  }
  if ($what=="delete") {
    if (is_array($privatemessage)) {
      while(list($key,$val)=each($privatemessage)) {
        $DB_site->query("DELETE FROM privatemessage WHERE privatemessageid=".intval($key)." AND userid=$bbuserinfo[userid]");
      } //end while
    } else {
      eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
      exit;
    }
    eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&amp;folderid=".intval($thisfolder)."\");");
  }

}
you should be set

and no, this isnt because of my hack

greetz

kreftt
Reply With Quote
  #227  
Old 08-20-2003, 01:26 AM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi @LL,

works fine with 2.3.0 and backup PN hack. Good job. *thumbup*

Cheers,

Pseudomizer
Reply With Quote
  #228  
Old 09-01-2003, 12:48 AM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, also matts on worked great, just got this installed on my personal site. using vb 2.3.2

question:

you have a ADD FOLDERS section,

how would add a Remove Folders section?

Rob
Reply With Quote
  #229  
Old 09-01-2003, 02:39 AM
kreftt's Avatar
kreftt kreftt is offline
 
Join Date: Dec 2001
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you would have to code it yourself, i dont know enough php to do it

sorry

kreftt
Reply With Quote
  #230  
Old 09-01-2003, 04:30 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oy..... can someone install this for me? I'm afraid I'll screw it up. :ermm:
Reply With Quote
  #231  
Old 10-15-2003, 03:56 PM
Red Blaze's Avatar
Red Blaze Red Blaze is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just alittle thing. I installed this, and it looks very good. Only thing is that the gauge won't work. It won't say how much I'm using, nor will the images show up. I installed everything correctly. I'm useing 2.3.2. Any Ideas?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07784 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete