[Release] Date Joined Editor (Please Look)

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
Pokeon
Registered User
Posts: 12
Joined: Sat Apr 20, 2002 11:47 pm

[Release] Date Joined Editor (Please Look)

Post by Pokeon »

This mod help you edit user's joined date. This still has 2 error that i know of. One is the date editor text bx it is just numbers and i cant crack the code. Two is only 10 characters allowed but if you can crack the code you dont need more then 10 characters. If you know any ways to maek it better please reply.

Code: Select all

#################################################################
## Mod Title: Join Date Mod
## Mod Version: 1.0.0
## Author: Lance Rumsby
## Description:  This mod will help you edit the date users joined.
##
## Installation Level: easy
## Installation Time: 2 minute
## Files To Edit: 3
##
## lang_XXX/lang_admin.php
## admin/admin_users.php
## templates/XXX/admin/user_edit_body.tpl
##
## Included Files: n/a
## Generator: phpBB2 Mod Maker
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites without the direct permission of the author
#################################################################
##
## Author Note: The date is numbers and hard to set to a date you want.
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
# 
#-----[ ACTION: Open lang_XXX/lang_admin.php ]------------------------------------------ 
# 
# 
#-----[ Find ]------------------------------------------ 
#
$lang['User_special_explain'] = "$lang['User_special_explain'] = "These fields are not able to be modified by the users.  Here you can set their status and other options that are not given to users.";

# 
#-----[ Add After ]------------------------------------------ 
#
$lang['user_regdate'] = "date when User joined";
# 
#-----[ ACTION: Open admin/admin_users.php ]--------------------------------------------
# 
# 
#-----[ Find ]------------------------------------------ 
#
		$user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;
# 
#-----[ Add After ]------------------------------------------ 
#
		$user = (!empty($HTTP_PORS_VARS['user_regdate'])) ? intval($HTTP_POST_VARS['user_regdate']) : 0;



# 
#-----[ Find ]------------------------------------------ 
#
		$user_allowavatar = $this_userdata['user_allowavatar'];
# 
#-----[ Add After ]------------------------------------------ 
#
		$user_regdate = $this_userdata['user_regdate']; 
# 
#-----[ Find ]------------------------------------------ 
#
			"L_ALLOW_AVATAR" => $lang['User_allowavatar'],
# 
#-----[ Add After ]------------------------------------------ 
#
			"U_user_regdate" => $user_regdate, 
			"L_user_regdate" => $lang['User Joined'], 
# 
#-----[ 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 .  " 
               WHERE user_id = $user_id"; 

# 
#-----[ 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_regdate = $user_regdate, user_rank = $user_rank" . $avatar_sql .  " 
               WHERE user_id = $user_id"; 
# 
#-----[ ACTION: Open templates/XXX/admin/user_edit_body.tpl ]------------------------------------------ 
#
# 
#-----[ Find ]------------------------------------------ 
#
	<tr>
	  <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
	</tr>
# 
#-----[ Add After ]------------------------------------------ 
# 
   <tr> 
      <td class="row1"><span class="gen">{L_user_regdate}</span></td> 
      <td class="row2"> 
      <input type="text" name="user_regdate" value="{U_user_regdate}" size="18" maxlength="18" /></td> 
   </tr>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
[/b]
Last edited by Pokeon on Tue May 14, 2002 2:36 pm, edited 1 time in total.

User avatar
Brewjah
Registered User
Posts: 265
Joined: Sun Mar 10, 2002 5:37 pm
Location: I think im lost..
Contact:

Post by Brewjah »

could you please use the proper templating structure

>>FIND is not part of it..

#
#-----[ FIND ]-------------------------------------------------------------
#

that is proper structure



please read
http://www.phpbb.com/phpBB/viewtopic.php?t=11549
http://www.phpbb.com/phpBB/viewtopic.php?t=11548

- Brew
Filling in that ugly white noise with a bunch of black static..

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~ »

You should speak with " Sysops " he has cracked the code thx to some help of AbelaJohnB hehe .. I belive sysops has upload his mod to the database ?? ne wayz if ya ask nicely in a PM maybe he will send you the code..

C'ya
Hacker

Pokeon
Registered User
Posts: 12
Joined: Sat Apr 20, 2002 11:47 pm

Post by Pokeon »

i changed the mod thing and pm him.

OuterRealm
Registered User
Posts: 24
Joined: Wed Apr 10, 2002 9:04 pm
Contact:

Post by OuterRealm »

That is correct I have the code

Code: Select all

################################################################# 
## Mod Title: Edit Join Date
## Mod Version: 1.0.0 
## Author: Shaun Marfia < sysops@domecity.com > - http://www.domecity.com 
## Description: Allows you to edit join date for users
## 
## Installation Level: easy
## Installation Time: 10 Minutes 
## Files To Edit: lang_admin.php, admin_users.php, and user_edit_body.tpl
## Included Files: none
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
################################################################# 
## 
## Author Note: 
## I would like the thank AbelaJohnB for help with the create_date fuction
## (the phpBB Group Reserves The Right To Remove/Edit Author Notes, Should It Be Warranted) 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

# 
#-----[ OPEN lang_XXX/lang_admin.php ]------------------------------------------ 
# 


# 
#-----[ FIND ]------------------------------------------ 
# 

$lang['User_special_explain'] = "These fields are not able to be modified by the users.  Here you can set their status and other options that are not given to users.";

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$lang['joined'] = "Date User Joined";

# 
#-----[ CLOSE lang_XXX/lang_admin.php ]------------------------------------------ 
# 


# 
#-----[ OPEN admin/admin_users.php ]------------------------------------------ 
# 


# 
#-----[ FIND ]------------------------------------------ 
# 

$user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;


# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

$user = (!empty($HTTP_POST_VARS['user_regdate'])) ? intval($HTTP_POST_VARS['user_regdate']) : 0;
$user_regdate = strtotime($user_regdate);

# 
#-----[ FIND ]------------------------------------------ 
#

$user_allowavatar = $this_userdata['user_allowavatar'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

$joined = create_date($board_config['default_dateformat'], $this_userdata['user_regdate'], $board_config['board_timezone']);

# 
#-----[ FIND ]------------------------------------------ 
#

'L_ALLOW_AVATAR' => $lang['User_allowavatar'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

'U_JOINED' => $joined,
'L_JOINED' => $lang['joined'],

# 
#-----[ 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 . "
	WHERE user_id = $user_id";

# 
#-----[ 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_regdate = $user_regdate, user_rank = $user_rank" . $avatar_sql .  " 
	WHERE user_id = $user_id";

# 
#-----[ CLOSE admin/admin_users.php ]------------------------------------------ 
#

# 
#-----[ OPEN templates/XXX/admin/user_edit_body.tpl ]------------------------------------------ 
#

# 
#-----[ FIND ]------------------------------------------ 
#

<tr>
  <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

<tr> 
  <td class="row1"><span class="gen">{L_JOINED}</span></td> 
  <td class="row2"> 
  <input type="text" name="user_regdate" value="{U_JOINED}" size="10" maxlength="20" /></td> 
</tr>

# 
#-----[ CLOSE templates/XXX/admin/user_edit_body.tpl ]------------------------------------------ 
#

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
enjoy I am trying to get it uploaded so others can use it too but still waiting to hear back about access to mod database

Sysops
The Shadows are unseen in the dark until they overcast your shadow and then its too late...

Pokeon
Registered User
Posts: 12
Joined: Sat Apr 20, 2002 11:47 pm

Post by Pokeon »

thx for helping that was my frist mod.

Locked

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