1
Mods & Plugins (Requests & Discussions) / [MOD] MSN & AIM User Information
« on: December 09, 2009, 04:49:29 AM »
So after using this script for years and years, i've finally decided to help those in awe in adding these fields. Since no one really uses ICQ anyways. This is a quick mod that adds the fields "MSN" and "AIM" to user profiles.
New MySql fields:
user_msn
user_aim
Backup these files:
includes/db_field_definitions.php
lang/yourlang/main.php
lang/yourlang/admin.php
register.php
details.php
member.php
templates modified
member_editprofile.html
member_profile.html
1. Backup those files and your MySql database.
2. Run this MySql query using phpmyadmin or something of that type.
OR
create two tables in "users" called
3. Open includes/db_field_definitions.php
Find:
Add BEFORE it:
4. Open lang/your_lang/main.php
Find:
Add BEFORE it:
5. Open lang/your_lang/admin.php
Find:
Add BEFORE it:
6. Open register.php
Find:
Add BEFORE it:
Find:
Add BEFORE it:
Find:
Add BEFORE it:
7. Open details.php
Find:
Add BEFORE it:
8. Open member.php
Find:
Add BEFORE it:
Now let us edit some templates.
1. Open member_profile.html
Find:
Add AFTER it:
2. Open member_editprofile.html
Find:
Add AFTER it:
Ciao
edit; fixed and added a step.. sorry :[
New MySql fields:
user_msn
user_aim
Backup these files:
includes/db_field_definitions.php
lang/yourlang/main.php
lang/yourlang/admin.php
register.php
details.php
member.php
templates modified
member_editprofile.html
member_profile.html
1. Backup those files and your MySql database.
2. Run this MySql query using phpmyadmin or something of that type.
Code: [Select]
ALTER TABLE `4images_users` ADD `user_msn` VARCHAR( 55 ) NOT NULL ;
ALTER TABLE `4images_users` ADD `user_aim` VARCHAR( 16 ) NOT NULL ;
OR
create two tables in "users" called
Code: [Select]
user_msn
user_aim
3. Open includes/db_field_definitions.php
Find:
Code: [Select]
?>
Add BEFORE it:
Code: [Select]
$additional_user_fields['user_msn'] = array($lang['user_msn'], "text", 1);
$additional_user_fields['user_aim'] = array($lang['user_aim'], "text", 1);
4. Open lang/your_lang/main.php
Find:
Code: [Select]
$lang['icq'] = "ICQ:";
Add BEFORE it:
Code: [Select]
$lang['msn'] = "MSN:";
$lang['aim'] = "AIM:";
5. Open lang/your_lang/admin.php
Find:
Code: [Select]
$lang['field_icq'] = "ICQ";
Add BEFORE it:
Code: [Select]
$lang['field_msn'] = "MSN";
$lang['field_aim'] = "AIM";
6. Open register.php
Find:
Code: [Select]
$user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";
Add BEFORE it:
Code: [Select]
$user_msn = (isset($HTTP_POST_VARS['user_msn'])) ? ((intval(trim($HTTP_POST_VARS['user_msn']))) ? intval(trim($HTTP_POST_VARS['user_msn'])) : "") : "";
$user_aim = (isset($HTTP_POST_VARS['user_aim'])) ? ((intval(trim($HTTP_POST_VARS['user_aim']))) ? intval(trim($HTTP_POST_VARS['user_aim'])) : "") : "";
Find:
Code: [Select]
"user_icq" => $user_icq,
Add BEFORE it:
Code: [Select]
"user_msn" => $user_msn,
"user_aim" => $user_aim,
Find:
Code: [Select]
"lang_icq" => $lang['icq'],
Add BEFORE it:
Code: [Select]
"lang_msn" => $lang['msn'],
"lang_aim" => $lang['aim'],
7. Open details.php
Find:
Code: [Select]
$comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
if (!empty($comment_user_icq)) {
$comment_user_icq_button = "<a href=\"http://www.icq.com/people/about_me.php?uin=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
}
Add BEFORE it:
Code: [Select]
$comment_user_msn = (isset($comment_row[$i][$user_table_fields['user_msn']])) ? format_url($comment_row[$i][$user_table_fields['user_msn']]) : "";
if (!empty($comment_user_msn)) {
$comment_user_msn_button = "<a href=\"".$comment_user_msn."\" target=\"_blank\"><img src=\"".get_gallery_image("msn.gif")."\" border=\"0\" alt=\"".$comment_user_msn."\" /></a>";
}
$comment_user_aim = (isset($comment_row[$i][$user_table_fields['user_aim']])) ? format_url($comment_row[$i][$user_table_fields['user_aim']]) : "";
if (!empty($comment_user_aim)) {
$comment_user_aim_button = "<a href=\"".$comment_user_aim."\" target=\"_blank\"><img src=\"".get_gallery_image("aim.gif")."\" border=\"0\" alt=\"".$comment_user_aim."\" /></a>";
}
8. Open member.php
Find:
Code: [Select]
$user_icq = (isset($user_row['user_icq'])) ? $user_row['user_icq'] : REPLACE_EMPTY;
if (!empty($user_icq) && $user_icq != REPLACE_EMPTY) {
$user_icq_button = "<a href=\"http://www.icq.com/people/about_me.php?uin=".$user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
}
else {
$user_icq_button = REPLACE_EMPTY;
}
Add BEFORE it:
Code: [Select]
$user_msn = (isset($user_row['user_msn'])) ? format_text(format_url($user_row['user_msn']), 2) : REPLACE_EMPTY;
if (!empty($user_msn) && $user_msn != REPLACE_EMPTY) {
$user_msn_button = "<a href=\"".$user_msn."\" target=\"_blank\"><img src=\"".get_gallery_image("msn.gif")."\" border=\"0\" alt=\"".$user_msn."\" /></a>";
}
else {
$user_msn_button = REPLACE_EMPTY;
}
$user_aim = (isset($user_row['user_aim'])) ? format_text(format_url($user_row['user_aim']), 2) : REPLACE_EMPTY;
if (!empty($user_aim) && $user_aim != REPLACE_EMPTY) {
$user_aim_button = "<a href=\"".$user_aim."\" target=\"_blank\"><img src=\"".get_gallery_image("aim.gif")."\" border=\"0\" alt=\"".$user_aim."\" /></a>";
}
else {
$user_aim_button = REPLACE_EMPTY;
}
Now let us edit some templates.
1. Open member_profile.html
Find:
Code: [Select]
<tr>
<td class="row1"><b>{lang_homepage}</b></td>
<td class="row1">{if user_homepage}<a href="{user_homepage}" target="_blank">{user_homepage}</a>{endif user_homepage}</td>
</tr>
Add AFTER it:
Code: [Select]
<tr>
<td class="row2"><b>MSN:</b></td>
<td class="row2">{if user_msn}{user_msn}{endif user_msn}</td>
</tr>
<tr>
<td class="row1"><b>AIM:</b></td>
<td class="row1">{if user_aim}{user_aim}{endif user_aim}</td>
</tr>
2. Open member_editprofile.html
Find:
Code: [Select]
<tr>
<td class="row1"><b>{lang_homepage}</b></td>
<td class="row1"><input type="text" name="user_homepage" size="30" value="{user_homepage}" class="input" /></td>
</tr>
Add AFTER it:
Code: [Select]
<tr>
<td class="row2"><b>MSN:</b></td>
<td class="row2"><input type="text" name="user_msn" size="30" value="{user_msn}" class="input" /></td>
</tr>
<tr>
<td class="row1"><b>AIM:</b></td>
<td class="row1"><input type="text" name="user_aim" size="30" value="{user_aim}" class="input" /></td>
</tr>
Ciao
edit; fixed and added a step.. sorry :[