Skype Version of Moodle will be released today (with a little help)

Skype Version of Moodle will be released today (with a little help)

by Jens Gammelgaard -
Number of replies: 28
Picture of Translators

Hello

I am almost done with a new user edit where you can write in your Skype name and in the view.php you can press an icon and actually skype the person behind the profile.

But it seems that in the edit.html the skypename is written skypename from this function: <td align=right><p><?php print_string("skypename") ?>:</td>. The result should be: Skype Name

What I am looking for is In which file are these names defined, so that fx. icqnumber is written "ICQ number" in the edit.html?

I will release the files and instructions later today if you can help me with with this.

Thank you!

BR
Jens

Average of ratings: -
In reply to Jens Gammelgaard

Re: Skype Version of Moodle will be released today (with a little help)

by Shane Elliott -
Picture of Core developers Picture of Plugin developers
print_string('stringname') looks in lang/xx/moodle.php for the string 'stringname' where xx is your default site language.
If it is undefined there, it will look in lang/en/moodle.php.
And if it is undefined there it will print out stringname

There is an optional second parameter eg print_string('stringname', 'languagefile') where, if defined, it will look in languagefile.php instead of moodle.php. However the above rules still apply for retrieving the string value.

I'm looking forward to seeing the code.
In reply to Shane Elliott

Re: Skype integrated in Moodle is released today!

by Jens Gammelgaard -
Picture of Translators

Hello Shane and fellow Moodlers!

Thanks! I chose to set in the parameter in the lang/en/moodle.php, so I only have to do it once, no matter the language!

I have attached a zip file with all the files, that I have added the lines below to. My experience is that you can upload and replace them to your own moodle installation and it will work, if you remember to add the field in the mdl_usertable, but it is with no warranty and guarantee!

Feedback and testing will be appreciated and if it works then maby Martin D. or some one else will add it to the future Moodleversions. Maby someone else can make some kind of sql-module that will add the skype field to mdl_user table..?

In order to make Moodle Skype Compatible I did the following:

1. I installed the MySQL Admin from the http://moodle.org/download/modules/ - look in bottom of the page.

2. I added a field called skype in the mdl_user table. See the picture in the word file in the attached Skype.zip

3. I added these lines in the moodle/user/edit.html just above the ICQ row:

<tr valign=top>

<td print_string("skypename") ?>:</td>

<td><input type="text" name="skype" size="25" maxlength="30" value="<?php p($user->skype) ?>" >

<?php if (isset($err["skype"])) formerr($err["skype"]); ?><br>

</td>

</tr>

4. I added these lines in the moodle/user/view.php:

if ($user->skype) {

print_row("SKYPE:","<a href=callto:\"$user->skype\"> <img src=\"\" border=0></a>"); }

5. I added these lines in the lang/en/moodle.php on line 587:

$string['skypename'] = 'SKYPE name';

This is how it the view will look like - and Skype users call each other by clicking on the Skype me! image: See the word file in the attached Skype.zip

Happy Skyping!

BR
Jens Gammelgaard

In reply to Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

by Jens Gammelgaard -
Picture of Translators

Hello,

I would like to show you a picture of the view.php, as it looks like if your user has entered a skype name in the profile edit page. With Skype users can call each other for free PC-PC, MAC-MAC, PDA-PDA or PC<->PDA.

Attachment View.png
In reply to Jens Gammelgaard

Database Insert?

by Melissa Anderson -
I am trying out your directions in order to add a zip code field to the user data, but I'm running into trouble because the data is not being inserted into the database. Here's what I've done, step-by-step:

1) I created the database field zipcode in the mdl_user table:
 Field     Type         Null  Default
zipcode varchar(12) Yes  NULL
I wanted to leave room for the zip + 4 in US postal codes which includes a dash, so I made it a 12 character varchar.

2) I put the following in user/edit.html

<tr valign=top>
<td align=right><p><?php print_string("zipcode")?>:</td>
<td><input type="text" name="zipcode" size="12" maxlength="12"
value="<?php p($user->zipcode) ?>">
<?php if (isset($err["zipcode"])) formerr($err["zipcode"]); ?>
</td>
</tr>


3) And the following in user/edit.php :

if (empty($usernew->zipcode))
$err["zip"] = get_string("missingzipcode");

This worked, making zipcode a required field with an error message. I eventually commented it out because it's not necessary to require it.

4) And the following in lang/en/moodle.php:

$string['zipcode'] = 'Postal Code';
$string['missingzipcode'] = 'Postal Code is a required field.';

5) I put the following in user/view.php:

if ($user->zipcode) {
print_row(get_string("zipcode").":", "$user->zipcode");
}

I didn't initially alter user/view.php because I won't be displaying the data there, but then I decided to try to be consistent with what you've done until I get this working.

6) I tested that the variable was being set by echoing it back on the page
and not filling out the required City field. It was displayed as I expected.

<? echo("Zip: " . $zipcode); ?>

It appears that everything is in order except data is not being inserted into the database.

In reply to Melissa Anderson

Re: Database Insert?

by Melissa Anderson -
Doh! I had installed moodle with postgres, but since not all the modules work, I installed a second instance with mysql. I edited the mysql database instead of the postgres.blush

Amend the above to say, with the postgres monitor type:
 alter table mdl_user add zipcode varchar(12);

So then, thanks for your directions, which worked quite well!
In reply to Melissa Anderson

Re: Database Insert?

by Jens Gammelgaard -
Picture of Translators

Hi Melissa!

Thanks, for your reflections!

I am sure it will help a lot in the long run wink

It was interesting to hear about your experiences, and you are right, my directions can very well be used as a guideline for extending Moodle with new fields and views.

So until 1.5, when it seems to be possible to make an arbitrary field in Moodle then feel free reflecting and implementing on this issue.

BR
Jens Gammelgaard

In reply to Melissa Anderson

Re: Database Insert?

by Penny Leach -
What problems did you see with Postgres? Did you file a bug report?
In reply to Penny Leach

Re: Database Insert?

by Melissa Anderson -
I was unable to create Surveys or Questionnaires. When I checked the forums, it appeared that whatever support might come for the questionnaire module was already on its way, so I did not file a report.
In reply to Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

by Tony Hursh -
Nice mod, Jens. As it happens, one of our professors has his class working with Skype this semester (along with other forms of CMC), so this was very welcome.

In reply to Tony Hursh

Re: Skype integrated in Moodle is released today!

by Jens Gammelgaard -
Picture of Translators

Thank you Tony!

I am glad you and your professors could get the use of it... Just a bit before the 1.5 version is ready, right Martin D.? smile

I have integrated this mod in a hospitals Moodle, so hopefully they can cut down on the phone bill and spend the money on caretaking...

BR
Jens

In reply to Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

by Robert Lefebvre -
When I click on the "Skype Me" button I get the error "call to is not an accepted protocol".

"Call to" is from the code added at #4

 I added these lines in the moodle/user/view.php:

if ($user->skype) {

 print_row("SKYPE:","<a href=callto:\"$user->skype\"> <img src=\"\" border=0></a>"); }

In reply to Robert Lefebvre

Re: Skype integrated in Moodle is released today!

by Timothy Takemoto -
Dear Robert,
You do have Skype installed don't you? For callto: to be recognised all you should need is for skype to be installed. What happens when you click Skype me?
Timothy
In reply to Timothy Takemoto

Re: Skype integrated in Moodle is released today!

by Robert Lefebvre -
Wow did I goof! I was using win 98 at the time and Skypes isn't installed(it won't run in 98). Thanks for the reply. Good call!
In reply to Robert Lefebvre

Re: Skype integrated in Moodle is released today!

by Jens Gammelgaard -
Picture of Translators

Hi Robert!

I think you have overseen the same lines as you write in your post in my instruction, but I am glad you solved it anyway!

BR
Jens Gammelgaard

In reply to Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

by Robert Lefebvre -
Yes, it works great and was an excellent addition. Thank you smile
In reply to Jens Gammelgaard

Re: Skype Version of Moodle will be released today (with a little help)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Moodle 1.5 now has fields and support for ICQ, Skype, AIM, Yahoo, MSN as well as Moodle Messenger.  smile
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Moodle Messenger?

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
          "Moodle 1.5 now has fields and support for ... Moodle Messenger."

Moodle Messenger?  wide eyes   So I will need to choose an "MM" name?  thoughtful
Attachment MM.jpg
In reply to Don Hinkelman

Re: Skype Version of Moodle will be released today (with a little help)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It's automatically done for you.  smile   Everybody's called Bruce - that keeps things simple.
In reply to Martin Dougiamas

Re: Skype Version of Moodle will be released today (with a little help from Bruce)

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Please, turn off the auto-Brucer!   dead
In reply to Don Hinkelman

Re: Skype Version of Moodle will be released today (with a little help from Bruce)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I am sooooooo tempted to put in a three line filter to convert random words here to Bruce.  smile
In reply to Martin Dougiamas

Re: Skype Version of Moodle will be released today (with a little help from Bruce)

by Chardelle Busch -
Picture of Core developers
You guys are funny...kiss
In reply to Martin Dougiamas

Odp: Re: Skype Version of Moodle will be released today (with a little help)

by Greg Szczotka -

I have 1.5 and I can't see it. Has it been just added? How can I safe update moodle to have it?

Regards,

Greg

In reply to Greg Szczotka

Re: Odp: Re: Skype Version of Moodle will be released today (with a little help)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This was just added today.
In reply to Martin Dougiamas

Re: Skype Version of Moodle will be released today (with a little help)

by Hansruedi (Lori) Lorenz -
Skype works great with broadband, however with a slow dialup connection it is next to useless. I found the Australian FireFly working really well with a slow connection and wonder whether it could be integrated in Moodle?
Lori
In reply to Hansruedi (Lori) Lorenz

Re: Skype Version of Moodle will be released today (with a little help)

by N Hansen -
Skype in my experience, both in Egypt and the US, works absolutely wonderfully on a slow dialup connection. It's like talking to someone in the same room.
In reply to N Hansen

回复: Re: Skype Version of Moodle will be released today (with a little help)

by Haisen Zhang -
Yeah, you're right. I have had a similar experience in using Skype. When I was in the United States as a visiting scholar, I used Skype as a medium to advise my students to improve their theses via Skype. Though we stayed on both sides of the Pacific Ocean, we talked as if we were in the same room. The experience of using Skype is really fascinating.
In reply to Hansruedi (Lori) Lorenz

Re: Skype Version of Moodle will be released today (with a little help)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I too have only had good experiences with Skype even on slow connectiosn.

But if Firefly has a capability for callto: links like Skype does then integrating it yourself is trivial, you could hack your user/view.php file to change how the Skype entry is displayed so clicking on the link calls Firefly instead.