View Full Version : View X Last Private Messages In AdminCP 1.1
FatalBreeze
03-24-2005, 10:00 PM
Hack Built By: FatalBreeze
Version: 1.1
Date: 10/7/2005
Name Of Hack: View X Last Private Messages In AdminCP.
THE ENTIRE HACK IS BUILT IN ENGLISH!!!!
*Note: All the tips posted here were taken.
What This Hack Does: This hack allows the admins who has access to the column "Users" in the admincp,
to view the last X (you define it in the admincp) private messages which were sent by the users.
The Reason I Built This Hack: i built this hack because i just wanted to see if someone is spamming the forums, or advertising
his forum. because i have a lot of users i cannot view each and every ones outgoing messages, so i built this hack to see the last pm's which were sent.
Screen Shots Are Attached Below, Please Execuse Me I Have Built This Hack In A Forum Which Uses Hebrew... So Dont Be Afraid... : )
If you like it please click INSTALL!!
FatalBreeze
03-25-2005, 12:14 PM
Now That's starnge... i got stock without being able to post the HACK itself...
if a moderator can contact me please...
Marco van Herwaarden
03-25-2005, 12:30 PM
Just edit your post and upload the hack as an attachment.
FatalBreeze
03-25-2005, 12:38 PM
oh ok i havent seen where the edit button is....
k now everyting is great.
Marco van Herwaarden
03-25-2005, 01:08 PM
Thanks for sharing this FatalBreeze.
Just a few remarks:
Could you rename the install.php to install.txt, so people know it is just a text file.
I would add support for a list of id's in '$useridofsuper', or just use the config.php variable '$superadministrators'.
Are you Dr. PHP?
Prefix all the tablenames in queries with ' " . TABLE_PREFIX . " '
$id = $DB_site->query_first("SELECT userid FROM user WHERE username = '$user'");
To avoid SQL-Injections change to:
$id = $DB_site->query_first("SELECT userid FROM user WHERE username = '" . addslashes($user) . "'");
Same goes for the second query on username.
FatalBreeze
03-25-2005, 01:13 PM
oh thanks i installed it in another forum and i use different nick there.
and this is my first hack but thanks ill fix everything
Marco van Herwaarden
03-25-2005, 01:21 PM
No problem that is why we are here to help eachother.
nice Mod!
pls let us know if you've updated the instructions... i will install.
FatalBreeze
03-25-2005, 02:46 PM
I have updated the instructions earlier.
I installed it.. and I have 2 issues.
1. there is already a PM.php file that I am using so i named yours ppm.php and amended the instructions for admincp/index.php accordingly.
2. When I click on the link in admicp i get the following message:
No valid userid specified
Add ?userid=x to the end of the URL
(where x is an Existing user)
----------
I am not sure why I am getting this message becoz i think it is supposed to pick up last 20 pms and not pms by userid.
Marco van Herwaarden
03-25-2005, 07:36 PM
I have updated the instructions earlier.Great :D
But they where not instructions, just advices :D
Allan
03-25-2005, 07:58 PM
Great, cheer :)
Thank for Hack, "click Install" ;)
i still cud not understand what this hack does? :?
FatalBreeze
03-26-2005, 06:41 AM
viks because you have changed the pm.php to ppm.php you need to edit the file index.php in the admincp as well.
so go to admincp/index.php
and find:
construct_nav_option($vbphrase['private_message_statistics'], 'usertools.php?do=pmstats', '<br />');
After Add:
construct_nav_option('View Last Private Messages', 'ppm.php?do=index', '<br />');
You got this code (Add ?userid=x to the end of the URL
(where x is an Existing user) because you didn't change the index.php file correctly and you mixed it up with another hack. my hack shows the last 20 messages and the other hack shows messages by user ids.
hi Fatalbreeze,
thanks.. ya i was confusing the hacks...
ok. i have not only made the change u recommended but also modifiied the pm.php fil of urs to update references to pm.php to the new file ppm.php in 2 places.
i still get the same meessage as before!!
when i click get 20 pms.. it goes to ppm.php and get the error message
FatalBreeze
03-26-2005, 08:56 PM
ok so what you need do to is to open the file ppm.php, and find:
$cell[] = construct_link_code($pm[title],"pm.php?$session[sessionurl]do=view&pmid=$pm[pmtextid]");
And Replace it with
$cell[] = construct_link_code($pm[title],"ppm.php?$session[sessionurl]do=view&pmid=$pm[pmtextid]");
And that's it everything will work correctly.
I have already chaned all references to pm.php to ppm.php in that file.. still it does not work!! i think it is having some prbs with the PM hack i installed earlier.
ok it works only if I rename ur file to pm.php! i searched all through the file why doesnt it work with another name... even changed the references PM.PHP to PVPM.PHP in all the places.. in the pm.php file and also in admincp/index.php file..
still it did not work!!
anyway, ihave modified the earlier hack i had.. so now both of them are working.
thanks fatebreeze.
FatalBreeze
03-27-2005, 08:55 AM
: ) hope you enjoy this hack
sv1cec
06-11-2005, 02:16 PM
May I make a small suggestion?
In file pm.php, you have something like:
$cell[] = substr($msg,1,30)."\n\n";
I would change that to :
$cell[] = substr($msg,0,30)."\n\n";
Or else the first character of the message is lost. Substr considers 0 to be the first character of the string. Better yet, you can replace that line with:
$cell[] = substr(strip_bbcode(strip_quotes(trim($msg))),0,30 )."\n\n";
Also, please change the "Reviever" to "Receiver", I guess this is what you mean.
Rgds and me clicks install.
Nathan2006
03-06-2006, 10:47 PM
Hi,
I new to all this, When I edit the index.php from the admincp I cannot find this code:
1) open admincp/index.php, find:
construct_nav_option($vbphrase['private_message_statistics'], 'usertools.php?do=pmstats', '<br />');
Im using vBulletin Version 3.5.4
Thank you for any help :)
HMBeaty
03-06-2006, 10:52 PM
Im using vBulletin Version 3.5.4
Thats why, this mod is for version 3.0.7 :rolleyes:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.