[BETA] Full Name Field

Zelf bezig aan een modificatie? Wij kijken graag mee..
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

[BETA] Full Name Field

Bericht door Salomon » 14 jun 2006, 16:38

Code: Selecteer alles

############################################################## 
## MOD Title: Full Name Field 
## MOD Author: Nomolas <salo@dse.nl> (Salomon) http://forum.probleemoppc.com
## MOD Description: This MOD add a "Full name" field
## MOD Version: 0.0.1 
## 
## Installation Level: Easy 
## Installation Time: 10 Minutes 
## Files To Edit: 6
##      includes/ucercp_register.php 
##      templates/subSilver/profile_add_body.tpl
##      templates/subSilver/profile_view_body.tpl 
##		templates/subSilver/viewtopic_body.tpl
##		language/lang_english/lang_main.php
##		language/lang_dutch/lang_main.php
## Included Files: (N/A) 
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: This MOD add a "Full name" field into the profile
############################################################## 
## MOD History: 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]---------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]---------------------------------------------
#
		'L_EMAIL_ADDRESS' => $lang['Email_address'],
#
#-----[ AFTER, ADD ]---------------------------------------
#
		'L_FULL_NAME' => $lang['Full_name'],
#
#-----[ FIND ]---------------------------------------------
#
'CONFIRM_IMG' => $confirm_image,
#
#-----[ AFTER, ADD]----------------------------------------
#
'FULL_NAME' => $full_name,
#
#-----[ FIND ]---------------------------------------------
#
$strip_var_list = array(
#
#-----[ IN LINE, FIND ]------------------------------------
#
'email' => 'email'
#
#-----[ IN LINE AFTER, ADD ]-------------------------------
#
, 'full_name' => 'full_name
#
#-----[ FIND ]---------------------------------------------
#
	validate_optional_fields(
#
#-----[ IN LINE, FIND ]------------------------------------
#
$icq,
#
#-----[ IN LINE BEFORE, ADD ]------------------------------
#
$full_name, 
#
#-----[ FIND ]---------------------------------------------
#
		$icq = stripslashes($icq);
#
#-----[ BEFORE, ADD ]---------------------------------------
#
		$full_name = stripslashes($full_name);
#
#-----[ FIND ]----------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql .
				WHERE user_id = $user_id";
#
#-----[ IN LINE, FIND ]-------------------------------------
#
, user_yim = '" . str_replace("\'", "''", $yim) . "'
#
#-----[ IN LINE BEFORE, ADD ]-------------------------------
#
, user_full_name = '" . str_replace("\'", "''", $full_name) . "'
#
#-----[ FIND ]---------------------------------------------
#
			//
			// Get current date
			//
			$sql = "INSERT INTO " . USERS_TABLE . "	(
				VALUES ($user_id, '" . str_replace
			if ( $board_config['require_activation'] == USER_ACTIVATION_SELF ||
#
#-----[ IN LINE, FIND ]-------------------------------------
#
user_viewemail,
#
#-----[ IN LINE AFTER, ADD ]--------------------------------
#
 user_full_name,
#
#-----[ IN LINE, FIND ]-------------------------------------
#
$viewemail,  
#
#-----[ IN LINE AFTER, ADD ]--------------------------------
#
'" . str_replace("\'", "''", str_replace(' ', '+', $full_name)) . "',
#
#------[ FIND ]---------------------------------------------
#
'EMAIL_ADDRESS' => $email,
#
#-----[ AFTER, ADD ]----------------------------------------
#
'full_name' => $full_name,
#
#-----[ FIND ]---------------------------------------------
#
		$icq = stripslashes($icq);
#
#-----[ BEFORE, ADD ]---------------------------------------
#
		$full_name = stripslashes($full_name);
#
#-----[ FIND ]----------------------------------------------
#
	$icq = $userdata['user_icq'];
#
#-----[ AFTER, ADD ]-----------------------------------------
#
	$full_name = $userdata['user_full_name'];
#
#-----[ FIND ]-----------------------------------------------
#
	display_avatar_gallery(
#
#-----[ IN LINE, FIND ]--------------------------------------
#
$icq, 
#
#-----[ IN LINE BEFORE, ADD ]--------------------------------
#
$full_name, 
#
#-----[ FIND ]-----------------------------------------------
#
'YIM' => $yim,
#
#-----[ BEFORE, ADD ]----------------------------------------
#
'FULL_NAME' => $full_name, 
#
#-----[ FIND ]-----------------------------------------------
#
		'L_ICQ_NUMBER' => $lang['ICQ'],
#
#-----[ AFTER, ADD ]-----------------------------------------
#
		'L_FULL_NAME' => $lang['Full_name'],
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/profile_add_body.tpl
# 
#-----[ FIND ]------------------------------------------ 
# 
<!-- Visual Confirmation -->
	<!-- BEGIN switch_confirm -->
	<tr>
		<td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
	  <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
	</tr>
	<!-- END switch_confirm -->
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<tr> 
		<td class="row1"><span class="gen">{L_FULL_NAME}: *</span></td>
		<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{FULL_NAME}" /></td>
	</tr>
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>
#
#-----[ AFTER, ADD ]---------------------------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_FULL_NAME}:</span></td>
		  <td> <b><span class="gen">{FULL_NAME}</span></b></td>
		</tr>
#
#-----[ OPEN ]----------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]----------------------------------------------
#
	<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}
#
#-----[ IN LINE, FIND ]-------------------------------------
#
{postrow.POSTER_FROM}
#
#-----[ IN LINE AFTER, ADD ]--------------------------------
<br />{postrow.POSTER_FULL_NAME}
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]----------------------------------------------
#
$lang['ICQ'] =
#
#-----[ BEFORE, ADD ]---------------------------------------
#
$lang['Full_name'] = 'Full name';
#
#-----[ OPEN ]----------------------------------------------
#
language/lang_dutch/lang_main.php
#
#-----[ FIND ]----------------------------------------------
#
$lang['ICQ'] =
#
#-----[ BEFORE, ADD ]---------------------------------------
#
$lang['Full_name'] = 'Volledige naam';
#
#-----[ SQL ]-----------------------------------------------
#
ALTER TABLE `phpbb_users` ADD `full_name` VARCHAR( 255 ) NOT NULL AFTER `user_email` ;
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Volgens mij is heir geen beschrijving nodig :bier:
Wat vinden jullie ervan ?
Laatst gewijzigd door Salomon op 14 jun 2006, 17:20, 2 keer totaal gewijzigd.

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 14 jun 2006, 16:40

Ik mis iets: een SQL opdracht :roll:
... Maar ik modereer (nog) niet.

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Bericht door Salomon » 14 jun 2006, 16:41

Oeps, vergeten... :oops: :oops: :oops:
Ik ga er aan werken
Laatst gewijzigd door Salomon op 14 jun 2006, 16:43, 1 keer totaal gewijzigd.

Insomnia
Berichten: 277
Lid geworden op: 15 apr 2006, 20:52
Contacteer:

Bericht door Insomnia » 14 jun 2006, 16:42

Die mod kan niet werken,
Om die mod de draaien heb je SQL gegevens nodig

EDIT

Bee was me alvoor :P

EDIT 2
is de ongedite mod niet toevallig de add a profile field mod ? van phpbb2.de ?

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Bericht door Salomon » 14 jun 2006, 16:51

Insomnia schreef:EDIT 2
is de ongedite mod niet toevallig de add a profile field mod ? van phpbb2.de ?
Hoe bedoel je?
Trouwens, geupdate, SQL erbij gezet.

BetaDevil
Berichten: 2810
Lid geworden op: 28 mei 2006, 15:27

Reactie

Bericht door BetaDevil » 14 jun 2006, 16:59

Hij denkt dat je deze MOD gekopieert hebt van phpBB2.de en alleen wat dingetjes veranderd hebt, en kan je ook maken dat het editable is in Admin, is maar een suggestie :D

Insomnia
Berichten: 277
Lid geworden op: 15 apr 2006, 20:52
Contacteer:

Bericht door Insomnia » 14 jun 2006, 17:10

Precies


en ## templates/subSilver/profile_view_body.tpl
staat er twee keer in bij inculde files

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Bericht door Salomon » 14 jun 2006, 17:21

Geupdate
Ik ga kijken voor de admin :)

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 14 jun 2006, 17:29

Je moet viewtopic.php ook editen, anders zal je nog niks in viewtopic zien ;)

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Bericht door Salomon » 14 jun 2006, 17:38

Dit topci mag dicht, het wordt toch niks met deze MOD.....

Moderatortjes?

Gesloten