Difference between revisions of "XMPP URIs"

Jump to navigation Jump to search
2,810 bytes added ,  10:48, 13 January 2010
(Added how-to for MediaWiki)
 
(2 intermediate revisions by the same user not shown)
Line 24: Line 24:
# add "xmpp=0,0,<application to run>" to the "Trusted Protocols" section
# add "xmpp=0,0,<application to run>" to the "Trusted Protocols" section
# Note: on older versions it's "xmpp=<application to run>"
# Note: on older versions it's "xmpp=<application to run>"
== Konqueror ==
In KDE4 create a file in $HOME/.kde4/share/kde4/services/xmpp.protocol
[Protocol]
exec=psi --uri "%u"
protocol=xmpp
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
Icon=""
In KDE3 is similar, but the file will be $HOME/.kde/share/services/xmpp.protocol and you might have to replace the exec line with ''exec=psi --uri `echo "%u" |sed s/%40/@/ `''


= Operating systems =
= Operating systems =
Line 73: Line 93:
= MediaWiki =
= MediaWiki =


== Last version ==
=== Part 1 ===
In mediawiki-1.15.1\includes\DefaultSettings.php
There is:
<pre>
/**
* The external URL protocols
*/
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:',
'svn://',
);
</pre>
You must add:
<pre>'xmpp:',</pre>
Result:
<pre>
/**
* The external URL protocols
*/
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'xmpp:',
'news:',
'svn://',
);
</pre>
=== Part 2 ===
In mediawiki-1.15.1\maintenance\fuzz-tester.php
There is:
<pre>
            // implicit link creation on URIs.
            "http://",
            "https://",
            "ftp://",
            "irc://",
            "news:",
            'gopher://',
            'telnet://',
            'nntp://',
            'worldwind://',
            'mailto:',
            // images.
</pre>
You must add:
<pre>'xmpp:',</pre>
Result:
<pre>
            // implicit link creation on URIs.
            "http://",
            "https://",
            "ftp://",
            "irc://",
            "news:",
            'gopher://',
            'telnet://',
            'nntp://',
            'worldwind://',
            'mailto:',
            'xmpp:',
            // images.
</pre>
=== Part 3 ===
In all skins (\mediawiki-1.15.1\skins\***\main.css)
There is:
<pre>
#bodyContent a[href ^="mailto:"],
.link-mailto {
    background: url("mail_icon.gif") center right no-repeat;
    padding-right: 18px;
}
</pre>
You must add:
<pre>
#bodyContent a[href ^="xmpp:"],
.link-xmpp {
    background: url(xmpp_icon.gif) center right no-repeat;
    padding-right: 10px;
}
</pre>
Result:
<pre>
#bodyContent a[href ^="mailto:"],
.link-mailto {
    background: url("mail_icon.gif") center right no-repeat;
    padding-right: 18px;
}
#bodyContent a[href ^="xmpp:"],
.link-xmpp {
    background: url(xmpp_icon.gif) center right no-repeat;
    padding-right: 10px;
}
</pre>
And in the same folder as the CSS file, download and place [http://wiki.jabber.org/skins/jabberorg/xmpp_icon.gif this icon file].
== older ==
If you run a MediaWiki you may also want it to support xmpp: URIs, which it doesn't by default. Thankfully the fix is easy. In your LocalSettings.php file, add the line:
If you run a MediaWiki you may also want it to support xmpp: URIs, which it doesn't by default. Thankfully the fix is easy. In your LocalSettings.php file, add the line:
 
<pre>
$wgUrlProtocols[] = "xmpp:";
$wgUrlProtocols[] = "xmpp:";
</pre>


That's all you technically need to do. It can also make things prettier though if you add the Jabber icon next to all such links. To do this, locate the .css file for the skin you are using (e.g. skins/monobook/main.css) and append the following code:
That's all you technically need to do. It can also make things prettier though if you add the Jabber icon next to all such links. To do this, locate the .css file for the skin you are using (e.g. skins/monobook/main.css) and append the following code:
<pre>
#bodyContent a[href ^="xmpp:"],
.link-xmpp {
        background: url(xmpp_icon.gif) center right no-repeat;
        padding-right: 10px;
}
</pre>


#bodyContent a[href ^="xmpp:"],
And in the same folder as the CSS file, download and place [http://wiki.jabber.org/skins/jabberorg/xmpp_icon.gif this icon file].
.link-xmpp {
        background: url(xmpp_icon.gif) center right no-repeat;
        padding-right: 10px;
}


and in the same folder as the CSS file, download and place [http://wiki.jabber.org/skins/jabberorg/xmpp_icon.gif this icon file].
{{Technical Page}}
217

edits

Navigation menu