[release] Edit User Post Count

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Hacker~
Registered User
Posts: 233
Joined: Wed Apr 10, 2002 12:41 am
Location: Houston, Tx Never too far to Travel and see Otep
Contact:

[release] Edit User Post Count

Post by Hacker~ »

Code: Select all

################################################################# 
## Mod Title: Edit User Posts Count	
## Mod Version: 2.0.0
## Author: your_name CybertownExploits-Hacker (http://mods.phpbb-mods.cc)
## Description: Mod to allow the editing of users posts count in admin area..
## 
## Installation Level: easy
## Installation Time: 10 - 15 minutes 
## Files To Edit: admin_users.php -  user_edit_body.tpl
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
################################################################# 
## 
## Author Note: 
## Always backup older existing files incase you decide not to continue using this mod..
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

# 
#-----[ OPEN admin_users.php ]------------------------------------------ 
# 
	[FIND]
		$user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;
		
	[ADD AFTER]
		$user_posts = ( !empty($HTTP_POST_VARS['user_posts']) ) ? intval( $HTTP_POST_VARS['user_posts'] ) : 0;

[FIND]
		$sql = "UPDATE " . USERS_TABLE . "
					SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
	
	[REPLACE WITH]
		$sql = "UPDATE " . USERS_TABLE . "
					SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank, user_posts = $user_posts" . $avatar_sql . "

[FIND]
		$user_allowpm = $this_userdata['user_allow_pm'];
		
	[ADD AFTER]
		$user_posts = $this_userdata['user_posts'];

[FIND]
		$s_hidden_fields .= '<input type="hidden" name="user_rank" value="' . $user_rank . '" />';
		
	[ADD AFTER]
		$s_hidden_fields .= '<input type="hidden" name="user_posts" value="' . $user_posts . '" />';

[FIND]
		'RANK_SELECT_BOX' => $rank_select_box,
	
	[ADD AFTER]
		'USER_POSTS' => $user_posts,

[FIND]
		'L_SELECT_RANK' => $lang['Rank_title'],
		
	[ADD AFTER]
		'L_USER_POSTS' => $lang['User_posts'],
# 
#-----[ CLOSE and SAVE admin_users.php ]------------------------------------------ 
# 


# 
#-----[ OPEN user_edit_body.tpl ]------------------------------------------ 
# 
	[FIND]
		<tr>
		<td class="row1"><span class="gen">{L_SELECT_RANK}</span></td>
		<td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
	    </tr>
		
	[ADD AFTER]
		<tr>
		<td class="row1"><span class="gen">User Posts</span></td>
		<td class="row2"><input type="text" name="user_posts" value="{USER_POSTS}" size="5"></td>
		</tr>

# 
#-----[ CLOSE and SAVE user_edit_body.tpl ]------------------------------------------ 
# 


# EoM
Hacker

Rocketeer
Registered User
Posts: 108
Joined: Thu Sep 06, 2001 11:43 pm
Location: Coventry, UK
Contact:

Post by Rocketeer »

Hmmm...

Me points to previously written topic: [Beta] Edit User Post Count

Also, this particular "Release" has a couple of bugs in it - like, did someone forget to edit the lang_admin.php file?

I think it's a little silly to release a bugged version of a mod that someone else has already done!

Hacker~
Registered User
Posts: 233
Joined: Wed Apr 10, 2002 12:41 am
Location: Houston, Tx Never too far to Travel and see Otep
Contact:

Post by Hacker~ »

Rocketeer wrote: Hmmm...

Me points to previously written topic: [Beta] Edit User Post Count

Also, this particular "Release" has a couple of bugs in it - like, did someone forget to edit the lang_admin.php file?

I think it's a little silly to release a bugged version of a mod that someone else has already done!


Posted without seeing his post.. so ya can bite me if ya dont like me.

=)
Hacker

desean84
Registered User
Posts: 205
Joined: Thu Jan 03, 2002 8:53 am
Location: Singapore

Post by desean84 »

so, it looks like there are 3 posting count editing mod... so, what are their difference?

NightHawk
Registered User
Posts: 28
Joined: Mon Dec 17, 2001 5:27 am
Location: Rochester, NY
Contact:

Post by NightHawk »

The difference is that the two of us posted without bothering to search for any others.

*shrugs* That'l teach us to not use the search function i guess. :P

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

and, <grin> that is why we have a MOD-Database ;)


Much easier to see if someone has already writen it :P


(btw, if you cannot log-in to the MOD-Database then send a PM to ffeingol, he will correct this problem for you)

Hacker~
Registered User
Posts: 233
Joined: Wed Apr 10, 2002 12:41 am
Location: Houston, Tx Never too far to Travel and see Otep
Contact:

Post by Hacker~ »

lol ya i was preoccupied with my "Multiple Ranks" mod earlier today that i didnt make a search either.. I just responded to a request =P Ill respond do a request if for as far as i know it hasnt been done..

Interested in being a beta tester for Multi ranks system ? PM me 4 more spots to fill ;)
Hacker

Locked

Return to “[2.0.x] MODs in Development”