vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   View X Last Private Messages In AdminCP 1.1 (https://vborg.vbsupport.ru/showthread.php?t=78750)

FatalBreeze 03-24-2005 10:00 PM

View X Last Private Messages In AdminCP 1.1
 
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 . " '
PHP Code:

                $id $DB_site->query_first("SELECT userid FROM user WHERE username = '$user'"); 

To avoid SQL-Injections change to:
PHP Code:

                $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.

Viks 03-25-2005 02:11 PM

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.

Viks 03-25-2005 03:27 PM

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

Quote:

Originally Posted by FatalBreeze
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" ;)

Viks 03-25-2005 10:53 PM

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:
PHP Code:

        construct_nav_option($vbphrase['private_message_statistics'], 'usertools.php?do=pmstats''<br />'); 

After Add:

PHP Code:

        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.

Viks 03-26-2005 02:43 PM

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:

PHP Code:

$cell[] = construct_link_code($pm[title],"pm.php?$session[sessionurl]do=view&pmid=$pm[pmtextid]"); 

And Replace it with
PHP Code:

$cell[] = construct_link_code($pm[title],"ppm.php?$session[sessionurl]do=view&pmid=$pm[pmtextid]"); 

And that's it everything will work correctly.

Viks 03-27-2005 12:56 AM

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.

Viks 03-27-2005 01:21 AM

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:

PHP Code:

$cell[] = substr($msg,1,30)."\n\n"

I would change that to :

PHP Code:

$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:

PHP Code:

$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:

Quote:

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

Quote:

Originally Posted by Nathan2006
Im using vBulletin Version 3.5.4

Thats why, this mod is for version 3.0.7 :rolleyes:


All times are GMT. The time now is 04:50 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.01632 seconds
  • Memory Usage 1,776KB
  • 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
  • (9)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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