with all the codes i'm lost
Maybe an addon can be posted in kooky's 1st post
thanks a lot
Moderator: Moderators

##############################################################
## MOD Title: Gender Required Field Mod (Add-on)
## MOD Version: 0.9.0
## Translation: Deutsch (German)
## Rev date: 24/07/2004
##
## Translator: TheRealKoston < therealkoston@yahoo.de > (n/a)
##
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
$lang['No_gender_specify'] = "keine Angabe";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Gender_require'] = 'Die Eingabe des Geschlechts ist erforderlich';
#
#-----[ OPEN FILE ]------------------------------------------
#
language/lang_german/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Start add - Gender Mod
$lang['Gender_required'] = 'Die Eingabe des Geschlechts erforderlich machen';
// End add - Gender Mod
#
#-----[ SAVE & CLOSE ]------------------------------------------
#
# EoM
create a file with .php extension and add this code:cbl2 wrote:Does anyone have a db_update.php for this mod, as I cannot use myphpadmin. Thanks.
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');
$sql=array(
'INSERT INTO ' . CONFIG_TABLE . ' (config_name, config_value) VALUES ("gender_required", "0")'
);
$mods = array (
'Gender Mod'
);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if ($userdata['user_level']!=ADMIN)
message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for the additional mods in the pre-moded pack</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
$n++;
}
message_die(GENERAL_MESSAGE, $message);
?>#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
// Start add - Gender Mod
$gender_required_yes = ( $new['gender_required'] ) ? "checked=\"checked\"" : "";
$gender_required_no = ( !$new['gender_required'] ) ? "checked=\"checked\"" : "";
// End add - Gender Mod
#
#-----[ REPLACE WITH ]------------------------------------------
#
// Start add - Gender Mod
$gender_required_yes = ( $new['gender_required'] ) ? ' checked="checked"' : '';
$gender_required_no = ( !$new['gender_required'] ) ? ' checked="checked"' : '';
// End add - Gender Mod
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1">{L_GENDER_REQUIRED}</td>
<td class="row2">
<input type="radio" name="gender_required" value="1" {GENDER_REQUIRED_YES} />
<span class="genmed">{L_YES}</span>
<input type="radio" name="gender_required" value="0" {GENDER_REQUIRED_NO} />
<span class="genmed">{L_NO}</span>
</td>
</tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<tr>
<td class="row1">{L_GENDER_REQUIRED}</td>
<td class="row2">
<input type="radio" name="gender_required" value="1"{GENDER_REQUIRED_YES} />
<span class="genmed">{L_YES}</span>
<input type="radio" name="gender_required" value="0"{GENDER_REQUIRED_NO} />
<span class="genmed">{L_NO}</span>
</td>
</tr>set it in your AdminCPmguffey5 wrote:Is there anyway to make this a mandatory on the registration page.
Users browsing this forum: No registered users and 1 guest