The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Improved PM Folderview Details »» | |||||||||||||||||||||||||
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:
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
|
Comments |
#222
|
||||
|
||||
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 --> |
#223
|
||||
|
||||
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 |
#224
|
||||
|
||||
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 |
#225
|
||||
|
||||
^-- 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)."\");"); } } |
#226
|
||||
|
||||
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]&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]&folderid=".intval($thisfolder)."\");"); } } and no, this isnt because of my hack greetz kreftt |
#227
|
||||
|
||||
Hi @LL,
works fine with 2.3.0 and backup PN hack. Good job. *thumbup* Cheers, Pseudomizer |
#228
|
|||
|
|||
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 |
#229
|
||||
|
||||
you would have to code it yourself, i dont know enough php to do it
sorry kreftt |
#230
|
|||
|
|||
Oy..... can someone install this for me? I'm afraid I'll screw it up. :ermm:
|
#231
|
||||
|
||||
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?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|