No edit summary |
m (Automatic substitution of article type data) |
||
(18 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox JavaScript |
{{Infobox JavaScript |
||
− | | Description = |
+ | | Description = Inserts a [https://mibbit.com Mibbit] IRC chat widget into any page |
− | | Scope = |
+ | | Scope = ps |
− | | Author |
+ | | Author = |
+ | * [[User:Master Ceadeus 27|Master Ceadeus 27]] |
||
− | | Updated = 12/07/2013 |
||
+ | * [[User:KockaAdmiralac|KockaAdmiralac]] |
||
⚫ | |||
⚫ | |||
− | | Skins = Oasis <br /> Monobook |
||
+ | | Updated = {{Updated|MediaWiki:MibbitIRC/code.js}} |
||
− | | Languages = English }} |
||
+ | | Code = [[MediaWiki:MibbitIRC/code.js|code.js]] |
||
+ | | Type = integration |
||
+ | }} |
||
⚫ | |||
+ | Note that you '''must''' have a Mibbit IRC chatroom set up already. This can be done from [https://mibbit.com mibbit.com,] and WikiHow has [[wikihow:Make-a-Free-IRC-Chat-Room-Using-Mibbit|a guide]] explaining how. |
||
⚫ | |||
− | ==Installation== |
+ | == Installation == |
+ | {{Script Install |
||
− | ===Step 1: Importation=== |
||
⚫ | |||
− | This script is easy to use: first, place the following line into MediaWiki:Common.js: |
||
+ | }} |
||
− | <source lang="javascript"> |
||
− | importArticle({type:'script', article:'w:c:dev:MibbitIRC/code.js'}); |
||
− | </source> |
||
+ | == Usage == |
||
− | This isn't enough to make anything show up--it's enough to input the widget, and nothing more. You need to specify what channels and server to use! |
||
+ | Insert this in a page to render the widget: |
||
− | |||
− | ===Step 2:The variables=== |
||
− | Four different variables are required for the script. |
||
− | |||
− | <source lang="javascript"> |
||
⚫ | |||
− | </source> |
||
− | |||
− | The above specifies what server your IRC chat is on--to find out this and the contents of the next variable, go to menu > link to channel. The link it gives you will have &server= on it somewhere; copy the text after <code>&server=</code> for your server variable. Copy the link after <code>?channel=23%</code> for your channel variable. |
||
− | |||
− | <source lang="javascript"> |
||
⚫ | |||
− | </source> |
||
− | |||
− | the second variable. |
||
− | |||
− | This should set up your on-wiki channel: the next two variables control the size. Add them after the source variables (the above two) |
||
− | |||
− | <source lang="javascript"> |
||
− | var Height = "800"; |
||
− | var Width = "600"; |
||
− | </source> |
||
− | |||
− | Change those variables to change the height and width of your gadget. |
||
− | |||
− | ===Step 3: The Div=== |
||
− | Now, you need to insert it. Find the page you want to use, and insert the following div: |
||
<syntaxhighlight lang="html5"> |
<syntaxhighlight lang="html5"> |
||
− | <div id="JRChatReplace" |
+ | <div id="JRChatReplace" |
⚫ | |||
− | text |
||
⚫ | |||
− | </div> |
||
+ | data-height="800" |
||
+ | data-width="600" |
||
+ | >This text will display while the widget is loading.</div> |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
− | '''Note: this is under construction and may be faulty.''' |
||
− | |||
⚫ | |||
− | |||
− | ==Alternate Configuration== |
||
− | This script currently is faulty when configured with the above method; thus, a different method should instead be used until this script is ready for normal configuration. |
||
− | |||
− | * Copy the entire script within [[/code.js|Code.js]]. |
||
− | * Follow step 2; however, place the two varables within the function--above the first variable declaration, but below any lines above it-- like this. |
||
− | <source lang="javascript"> |
||
− | var ServerIdentify = "servername"; |
||
− | var ChannelIdentify = "channelname"; |
||
− | var replace = document.getElementById("JRChatReplace"); |
||
− | </source> |
||
− | The above should be what your variables look like. |
||
− | * Now, follow step 3. The script should be working well. |
||
+ | == Demo == |
||
− | <small> ''Note: this is probably possible with verbatim, but w/e'' </small> |
||
+ | <div id="JRChatReplace" |
||
+ | data-server="irc.mibbit.net" |
||
+ | data-channel="#foo" |
||
+ | data-height="800" |
||
+ | data-width="600" |
||
+ | >This text will display while the widget is loading.</div> |
Revision as of 10:04, 16 November 2018
MibbitIRC places a pre-created Mibbit chatroom into a page with a certain div on it. This can be on any page: however, you only have one chat that it automatically connects to.
Note that you must have a Mibbit IRC chatroom set up already. This can be done from mibbit.com, and WikiHow has a guide explaining how.
Installation
Usage
Insert this in a page to render the widget:
<div id="JRChatReplace"
data-server="the name of your server"
data-channel="the name of your channel"
data-height="800"
data-width="600"
>This text will display while the widget is loading.</div>
Demo
This text will display while the widget is loading.