######################################################## ## ## Hack Title: PM Limitation ## Hack Version: 1.0.0 ## Author: Christoph "Toxic" Hellings (toxic@freenet.de) ## Date Created: 09-02-02 ## Thread Location: http://www.tforumhacks.com/tforum/viewtopic.php?TopicID=1028 ## Working Example: ## Description: User can't receive more PMs when their Inbox is full ## ## ## Installation Level: Easy ## Installation Time: 5 Minutes ## Files To Edit: 2 ## Edit Database: no ## Included Files: none ## ######################################################## ## ## Installation/Author Notes: ## ## I think it works but no warranty... ## change the $limit var to set how many PMs are allowed ## ######################################################## # #-----[ ACTION: BACKUP ]------------------------------------------ # Every time you edit your files, you should always back them up first. Although all of these hacks have been tested on various systems, they may not work with your configuration or you may not like what it does. Backing up protects yourself and your users from downtime. # #-----[ ACTION: OPEN ]------------------------------------------- # pm.php # #-----[ ACTION: LOCATE ]----------------------------------------- # function ShowPM() # #-----[ ACTION: FIND ]------------------------------------------- # { global $fSettings,$username,$txt; # #-----[ ACTION: ADD AFTER ]-------------------------------------- # $limit = 20; # #-----[ ACTION: FIND ]------------------------------------------- # $query = "SELECT * FROM t_pm WHERE ToUser='".AddSlash($username)."' ORDER BY Date DESC"; # #-----[ ACTION: REPLACE ]---------------------------------------- # $query = "SELECT * FROM t_pm WHERE ToUser='".AddSlash($username)."' ORDER BY Date ASC LIMIT 0,$limit"; # #-----[ ACTION: FIND ]------------------------------------------- #