Skip to content

Commit

Permalink
Added user fields for Skype, AIM, Yahoo, and MSN messengers. :-)
Browse files Browse the repository at this point in the history
If anyone knows good links+images to use for AIM, Yahoo and MSN let me know
  • Loading branch information
moodler committed Mar 5, 2005
1 parent 24e1eae commit 766d2bf
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
$string['advancedfilter'] = 'Advanced search';
$string['advancedsettings'] = 'Advanced settings';
$string['again'] = 'again';
$string['aimid'] = 'AIM ID';
$string['all'] = 'All';
$string['allactivities'] = 'All activities';
$string['alldays'] = 'All days';
Expand Down Expand Up @@ -700,6 +701,7 @@
$string['moveselectedcoursesto'] = 'Move selected courses to...';
$string['movetoanotherfolder'] = 'Move to another folder';
$string['moveup'] = 'Move up';
$string['msnid'] = 'MSN ID';
$string['mustchangepassword'] = 'The new password must be different than the current one';
$string['mustconfirm'] = 'You need to confirm your login';
$string['mycourses'] = 'My courses';
Expand Down Expand Up @@ -953,6 +955,7 @@
$string['sizegb'] = 'Gb';
$string['sizekb'] = 'Kb';
$string['sizemb'] = 'Mb';
$string['skypeid'] = 'Skype ID';
$string['socialheadline'] = 'Social forum - latest topics';
$string['someallowguest'] = 'Some courses may allow guest access';
$string['someerrorswerefound'] = 'Some information was missing or incorrect. Look below for details.';
Expand Down Expand Up @@ -1128,6 +1131,7 @@
$string['writingscalesinfo'] = 'Writing scales info';
$string['writinguserinfo'] = 'Writing users info';
$string['wrongpassword'] = 'Incorrect password for this username';
$string['yahooid'] = 'Yahoo ID';
$string['yes'] = 'Yes';
$string['youareabouttocreatezip'] = 'You are about to create a zip file containing';
$string['youaregoingtorestorefrom'] = 'You are about to start the restore process for';
Expand Down
7 changes: 7 additions & 0 deletions lib/db/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,13 @@ function main_upgrade($oldversion=0) {
table_column('dst_preset', '', 'year', 'int', '10', '', '0', 'not null', 'family');
}

if ($oldversion < 2005030501) {
table_column('user', '', 'msn', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'aim', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'yahoo', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'skype', 'varchar', '50', '', '', '', 'icq');
}

return $result;
}

Expand Down
4 changes: 4 additions & 0 deletions lib/db/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ CREATE TABLE `prefix_user` (
`email` varchar(100) NOT NULL default '',
`emailstop` tinyint(1) unsigned NOT NULL default '0',
`icq` varchar(15) default NULL,
`skype` varchar(50) default NULL,
`yahoo` varchar(50) default NULL,
`aim` varchar(50) default NULL,
`msn` varchar(50) default NULL,
`phone1` varchar(20) default NULL,
`phone2` varchar(20) default NULL,
`institution` varchar(40) default NULL,
Expand Down
7 changes: 7 additions & 0 deletions lib/db/postgres7.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,13 @@ function main_upgrade($oldversion=0) {
table_column('dst_preset', '', 'year', 'int', '10', '', '0', 'not null', 'family');
}

if ($oldversion < 2005030501) {
table_column('user', '', 'msn', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'aim', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'yahoo', 'varchar', '50', '', '', '', 'icq');
table_column('user', '', 'skype', 'varchar', '50', '', '', '', 'icq');
}

return $result;
}

Expand Down
4 changes: 4 additions & 0 deletions lib/db/postgres7.sql
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ CREATE TABLE prefix_user (
email varchar(100) NOT NULL default '',
emailstop integer NOT NULL default '0',
icq varchar(15) default NULL,
skype varchar(50) default NULL,
yahoo varchar(50) default NULL,
aim varchar(50) default NULL,
msn varchar(50) default NULL,
phone1 varchar(20) default NULL,
phone2 varchar(20) default NULL,
institution varchar(40) default NULL,
Expand Down
24 changes: 24 additions & 0 deletions user/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,30 @@
<?php if (isset($err["icq"])) formerr($err["icq"]); ?>
</td>
</tr>
<tr>
<th><?php print_string("skypeid") ?>:</th>
<td><input type="text" name="skype" size="25" alt="<?php print_string("skypeid") ?>" maxlength="50" value="<?php p($user->skype) ?>" />
<?php if (isset($err["skype"])) formerr($err["skype"]); ?>
</td>
</tr>
<tr>
<th><?php print_string("aimid") ?>:</th>
<td><input type="text" name="aim" size="25" alt="<?php print_string("aimid") ?>" maxlength="50" value="<?php p($user->aim) ?>" />
<?php if (isset($err["aim"])) formerr($err["aim"]); ?>
</td>
</tr>
<tr>
<th><?php print_string("yahooid") ?>:</th>
<td><input type="text" name="yahoo" size="25" alt="<?php print_string("yahooid") ?>" maxlength="50" value="<?php p($user->yahoo) ?>" />
<?php if (isset($err["yahoo"])) formerr($err["yahoo"]); ?>
</td>
</tr>
<tr>
<th><?php print_string("msnid") ?>:</th>
<td><input type="text" name="msn" size="25" alt="<?php print_string("msnid") ?>" maxlength="50" value="<?php p($user->msn) ?>" />
<?php if (isset($err["msn"])) formerr($err["msn"]); ?>
</td>
</tr>
<tr>
<th><?php print_string("idnumber") ?>:</th>
<td>
Expand Down
7 changes: 7 additions & 0 deletions user/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
$usernew->lang = clean_param($usernew->lang, PARAM_FILE);
$usernew->url = clean_param($usernew->url, PARAM_URL);
$usernew->icq = clean_param($usernew->icq, PARAM_INT);
if (!$usernew->icq) {
$usernew->icq = '';
}
$usernew->skype = clean_param($usernew->skype, PARAM_CLEAN);
$usernew->yahoo = clean_param($usernew->yahoo, PARAM_CLEAN);
$usernew->aim = clean_param($usernew->aim, PARAM_CLEAN);
$usernew->msn = clean_param($usernew->msn, PARAM_CLEAN);

$usernew->maildisplay = clean_param($usernew->maildisplay, PARAM_INT);
$usernew->mailformat = clean_param($usernew->mailformat, PARAM_INT);
Expand Down
15 changes: 14 additions & 1 deletion user/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,20 @@
}

if ($user->icq) {
print_row("ICQ:","<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&amp;img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" /></a>");
print_row(get_string('icqnumber').':',"<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&amp;img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" /></a>");
}

if ($user->skype) {
print_row(get_string('skypeid').':','<a href="callto:'.urlencode($user->skype).'">'.s($user->skype).'</a>');
}
if ($user->yahoo) {
print_row(get_string('yahooid').':', s($user->yahoo));
}
if ($user->aim) {
print_row(get_string('aimid').':', s($user->aim));
}
if ($user->msn) {
print_row(get_string('msnid').':', s($user->msn));
}

if (isteacher($course->id)) {
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)

$version = 2005022400; // YYYYMMDD = date
$version = 2005030501; // YYYYMMDD = date
// XY = increments within a single day

$release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name
Expand Down

0 comments on commit 766d2bf

Please sign in to comment.