Ricky_Racer
Support Team

Joined: 19 Jul 2003
Posts: 1425
Location: Middle of Nowhere, USA
|
Posted: February 18th 2007, 11:14 am Post subject: |
|
|
Using information provided by Add new field to profile mod by: Acid
I came up with this,
| Code:
|
#
#------[SQL:]-------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
ALTER TABLE phpbb_users ADD user_opersys VARCHAR(255)
ALTER TABLE phpbb_users ADD user_browser VARCHAR(255)
#
#------[OPEN:]------------------------------------------
#
./language/lang_english/lang_main.php
#
#------[FIND:]------------------------------------------
#
$lang['Interests'] = 'Interests';
#
#------[AFTER, ADD:]------------------------------------
#
$lang['Opersys'] = 'OS';
$lang['Browser'] = 'Browser';
#
#-----[OPEN:]------------------------------------------
#
./includes/usercp_viewprofile.php
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[AFTER, ADD:]------------------------------------
#
'OPERSYS' => ( $profiledata['user_opersys'] ) ? $profiledata['user_opersys'] : ' ',
'BROWSER' => ( $profiledata['user_browser'] ) ? $profiledata['user_browser'] : ' ',
#
#-----[FIND:]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[AFTER, ADD:]------------------------------------
#
'L_OPERSYS' => $lang['Opersys'],
'L_BROWSER' => $lang['Browser'],
#
#-----[OPEN:]------------------------------------------
#
./includes/usercp_register.php
#
#-----[FIND:]------------------------------------------
#
$strip_var_list = array('username' => 'username', 'email' => 'email',
#
#-----[IN-LINE, FIND:]---------------------------------
#
, 'interests' => 'interests'
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, 'opersys' => 'opersys', 'browser' => 'browser'
#
#-----[FIND:]------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = stripslashes($opersys);
$browser = stripslashes($browser);
#
#-----[FIND:]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql
#
#-----[IN-LINE, FIND:]---------------------------------
#
, user_interests = '" . str_replace("\'", "''", $interests) . "'
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, user_opersys = '" . str_replace("\'", "''", $opersys) . "', user_browser = '" . str_replace("\'", "''", $browser) . "'
#
#-----[FIND:]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate
#
#-----[IN-LINE, FIND:]---------------------------------
#
, user_interests
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, user_opersys, user_browser
#
#-----[FIND:]------------------------------------------
#
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "'
#
#-----[IN-LINE, FIND:]---------------------------------
#
, '" . str_replace("\'", "''", $interests) . "'
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, '" . str_replace("\'", "''", $opersys) . "', '" . str_replace("\'", "''", $browser) . "'
#
#-----[FIND:]------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = stripslashes($opersys);
$browser = stripslashes($browser);
#
#-----[FIND:]------------------------------------------
#
$interests = $userdata['user_interests'];
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = $userdata['user_opersys'];
$browser = $userdata['user_browser'];
#
#-----[FIND:]------------------------------------------
#
display_avatar_gallery($mode,
#
#-----[IN-LINE, FIND:]---------------------------------
#
, $interests
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, $opersys, $browser
#
#-----[FIND:]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[AFTER, ADD:]------------------------------------
#
'OPERSYS' => $opersys,
'BROWSER' => $browser,
#
#-----[FIND:]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[AFTER, ADD:]------------------------------------
#
'L_OPERSYS' => $lang['Opersys'],
'L_BROWSER' => $lang['Browser'],
#
#-----[OPEN:]------------------------------------------
#
./includes/usercp_avatar.php
#
#-----[FIND:]------------------------------------------
#
function display_avatar_gallery($mode,
#
#-----[IN-LINE, FIND:]---------------------------------
#
, &$interests
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, &$opersys, &$browser
#
#-----[FIND:]------------------------------------------
#
$params = array('coppa',
#
#-----[IN-LINE, FIND:]---------------------------------
#
, 'interests'
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, 'opersys', 'browser'
#
#-----[OPEN:]------------------------------------------
#
./admin/admin_users.php
#
#-----[FIND:]------------------------------------------
#
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = ( !empty($HTTP_POST_VARS['opersys']) ) ? trim(strip_tags( $HTTP_POST_VARS['opersys'] ) ) : '';
$browser = ( !empty($HTTP_POST_VARS['browser']) ) ? trim(strip_tags( $HTTP_POST_VARS['browser'] ) ) : '';
#
#-----[FIND:]------------------------------------------
#
$interests = htmlspecialchars(stripslashes($interests));
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = htmlspecialchars(stripslashes($opersys));
$browser = htmlspecialchars(stripslashes($browser));
#
#-----[FIND:]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql
#
#-----[IN-LINE, FIND:]---------------------------------
#
, user_interests = '" . str_replace("\'", "''", $interests) . "'
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, user_opersys = '" . str_replace("\'", "''", $opersys) . "', user_browser = '" . str_replace("\'", "''", $browser) . "'
#
#-----[FIND:]------------------------------------------
#
$interests = htmlspecialchars(stripslashes($interests));
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = htmlspecialchars(stripslashes($opersys));
$browser = htmlspecialchars(stripslashes($browser));
#
#-----[FIND:]------------------------------------------
#
$interests = htmlspecialchars($this_userdata['user_interests']);
#
#-----[AFTER, ADD:]------------------------------------
#
$opersys = htmlspecialchars($this_userdata['user_opersys']);
$browser = htmlspecialchars($this_userdata['user_browser']);
#
#-----[FIND:]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", """, $interests) . '" />';
#
#-----[AFTER, ADD:]------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="opersys" value="' . str_replace("\"", """, $opersys) . '" />';
$s_hidden_fields .= '<input type="hidden" name="browser" value="' . str_replace("\"", """, $browser) . '" />';
#
#-----[FIND:]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[AFTER, ADD:]------------------------------------
#
'OPERSYS' => $opersys,
'BROWSER' => $browser,
#
#-----[FIND:]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[AFTER, ADD:]------------------------------------
#
'L_OPERSYS' => $lang['Opersys'],
'L_BROWSER' => $lang['Browser'],
#
#-----[OPEN:]------------------------------------------
#
./templates/ALL_TEMPLATES/profile_add_body.tpl
#
#-----[FIND:]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[AFTER, ADD:]------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_OPERSYS}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="opersys" size="35" maxlength="150" value="{OPERSYS}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BROWSER}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="browser" size="35" maxlength="150" value="{BROWSER}" />
</td>
</tr>
#
#-----[OPEN:]------------------------------------------
#
./templates/ALL_TEMPLATES/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_OPERSYS}:</span></td>
<td> <b><span class="gen">{OPERSYS}</span></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BROWSER}:</span></td>
<td> <b><span class="gen">{BROWSER}</span></b></td>
</tr>
#
#-----[OPEN:]------------------------------------------
#
./templates/ALL_TEMPLATES/admin/user_edit_body.tpl
#
#-----[FIND:]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}</span></td>
<td class="row2">
<input class="post" type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[AFTER, ADD:]------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_OPERSYS}</span></td>
<td class="row2">
<input class="post" type="text" name="opersys" size="35" maxlength="150" value="{OPERSYS}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BROWSER}</span></td>
<td class="row2">
<input class="post" type="text" name="browser" size="35" maxlength="150" value="{BROWSER}" />
</td>
</tr>
#
#-----[OPEN:]------------------------------------------
#
./viewtopic.php
#
#-----[FIND:]------------------------------------------
#
$sql = "SELECT u.username, u.user_id
#
#-----[IN-LINE, FIND:]---------------------------------
#
, u.user_posts
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
, u.user_opersys, u.user_browser
#
#-----[FIND:]------------------------------------------
#
$poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';
#
#-----[AFTER, ADD:]------------------------------------
#
$poster_opersys = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Opersys'] . ': ' . $postrow[$i]['user_opersys'] : '';
$poster_browser = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Browser'] . ': ' . $postrow[$i]['user_browser'] : '';
#
#-----[FIND:]------------------------------------------
#
'POSTER_POSTS' => $poster_posts,
#
#-----[AFTER, ADD:]------------------------------------
#
'POSTER_OPERSYS' => $poster_opersys,
'POSTER_BROWSER' => $poster_browser,
#
#-----[OPEN:]------------------------------------------
#
./templates/ALL_TEMPLATES/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>
#
#-----[IN-LINE, FIND:]---------------------------------
#
<br />{postrow.POSTER_POSTS}<br />
#
#-----[IN-LINE AFTER, ADD:]----------------------------
#
{postrow.POSTER_OPERSYS}<br />{postrow.POSTER_BROWSER}<br />
#
#------[SAVE/CLOSE/UPLOAD/ENJOY !!!]--------------------
#
# ..:: -= END =- ::..
|
your users/members will have to edit their profiles and add it in. |
|