FANDOM


m (Forum:Fresh Start // rebranding)
(Forum:Fresh Start#Userpages // blank of userspace of long term inactive user)
Line 1: Line 1:
__TOC__
+
{{Inactive user}}
 
__NEWSECTIONLINK__
 
 
----
 
<big><big> '''Note:''' - this is in my subpage ([[User:Scottch|Scottch]]), but it's a direct copy from [[w:User:Splarka]]'s subpage [[w:User:Splarka/tricks|here]]. I didn't discover these, he did. Thanks, Splarka!</big></big>
 
----
 
 
<!---Commented out - Splarka's words, not mine ---- These are css/js/parserfunction/magicword hacks that I either developed or "discovered", by myself, by user request, or with the help of other wiki users. Others may have done them proir to me, but in most cases I had no external help in figuring them out (other than the help pages on [[m:|meta]]). Mostly this page is to document the requests for tweaks I've been asked to do on wikia, but several also apply to Uncyclopedia or Wikipedia. ---->
 
 
=CSS=
 
Mostly these apply to [[MediaWiki:Common.css]], [[MediaWiki:Monobook.css]] and [[Special:Mypage/Monobook.css]] (assuming you use the default 'monobook' theme). See also: [[Wikipedia:Wikipedia:Catalogue_of_CSS_classes]].
 
 
==Limiting TOC to certain depths==
 
 
In MediaWiki:Common.css:
 
.toc5 li.toclevel-6 {display:none}
 
.toc4 li.toclevel-6, .toc4 li.toclevel-5 {display:none}
 
.toc3 li.toclevel-6, .toc3 li.toclevel-5, .toc3 li.toclevel-4 {display:none}
 
.toc2 li.toclevel-6, .toc2 li.toclevel-5, .toc2 li.toclevel-4, .toc2 li.toclevel-3 {display:none}
 
.toc1 li.toclevel-6, .toc1 li.toclevel-5, .toc1 li.toclevel-4, .toc1 li.toclevel-3, .toc1 li.toclevel-2 {display:none}
 
 
In Template:TOC1
 
<nowiki><div class="toc1">
 
__TOC__
 
</div></nowiki>
 
 
In Template:TOC2
 
<nowiki><div class="toc2">
 
__TOC__
 
</div></nowiki>
 
 
etc
 
 
==Un-numbered TOC==
 
In MediaWiki:Common.css:
 
 
.utoc .tocnumber { display:none; }
 
.utoc #toc ul,
 
.utoc .toc ul {
 
line-height: 1.5em;
 
list-style-type: square;
 
margin: .3em 0 0 1.5em;
 
padding: 0;
 
list-style-image: url(/skins3/monobook/bullet.gif);
 
}
 
 
And then put a <nowiki>__TOC__</nowiki> in a <nowiki><div class="utoc"></div></nowiki>.
 
 
==Limiting a DynamicPageList list to one specific letter==
 
Notes:
 
*Requires css capable browser or will look funky
 
*Does not work well with higher numbers of pages (say ~1000)
 
*Lame hack, better to use a custom namespace and Allpages/Prefixindex
 
 
In MediaWiki:Common.css:
 
.alphacat ul {list-style: none; }
 
.alphacat li a {display: none; }
 
.alphacat-a li a[title ^="A"] {display: inline }
 
.alphacat-b li a[title ^="B"] {display: inline }
 
.alphacat-c li a[title ^="C"] {display: inline }
 
.alphacat-d li a[title ^="D"] {display: inline }
 
.alphacat-e li a[title ^="E"] {display: inline }
 
.alphacat-f li a[title ^="F"] {display: inline }
 
.alphacat-g li a[title ^="G"] {display: inline }
 
.alphacat-h li a[title ^="H"] {display: inline }
 
.alphacat-i li a[title ^="I"] {display: inline }
 
.alphacat-j li a[title ^="J"] {display: inline }
 
.alphacat-k li a[title ^="K"] {display: inline }
 
.alphacat-l li a[title ^="L"] {display: inline }
 
.alphacat-m li a[title ^="M"] {display: inline }
 
.alphacat-n li a[title ^="N"] {display: inline }
 
.alphacat-o li a[title ^="O"] {display: inline }
 
.alphacat-p li a[title ^="P"] {display: inline }
 
.alphacat-q li a[title ^="Q"] {display: inline }
 
.alphacat-r li a[title ^="R"] {display: inline }
 
.alphacat-s li a[title ^="S"] {display: inline }
 
.alphacat-t li a[title ^="T"] {display: inline }
 
.alphacat-u li a[title ^="U"] {display: inline }
 
.alphacat-v li a[title ^="V"] {display: inline }
 
.alphacat-w li a[title ^="W"] {display: inline }
 
.alphacat-x li a[title ^="X"] {display: inline }
 
.alphacat-y li a[title ^="Y"] {display: inline }
 
.alphacat-z li a[title ^="Z"] {display: inline }
 
 
In a template (which you call via <nowiki>{{sometemplate|a}}</nowiki> to show just 'a')
 
<nowiki><div class="alphacat alphacat-{{lc:{{{1|a}}}}}">
 
<DynamicPageList>
 
category=</nowiki>'''Some Category'''<nowiki>
 
count=1000
 
</DynamicPageList>
 
</div></nowiki>
 
 
==Style the menus==
 
Done on [[w:c:scratchpad:MediaWiki:Monobook.css]]
 
 
In MediaWiki:Monobook.css, a base to start fiddling:
 
 
<pre>#p-wikicities-nav, #p-tb, #p-search, #p-navigation {
 
background-color: #fffff6;
 
border:1px solid black;
 
}
 
#p-navigation .pBody, #p-search .pBody, #p-tb .pBody, #p-lang .pBody, #p-wikicities-nav .pBody {
 
display: block;
 
border: none;
 
background-color: transparent;
 
padding: 0
 
}
 
.portlet h5 {
 
font-weight:bold;
 
display: block;
 
border-bottom: 1px solid #ccccff;
 
padding-bottom: .35em;
 
}
 
.pBody a { text-decoration: none; }
 
.pBody ul li:hover { background-color:#ffffcc }
 
#p-navigation .pBody ul, #p-search .pBody ul, #p-tb .pBody ul, #p-lang .pBody ul, #p-wikicities-nav .pBody ul {
 
list-style-image: none;
 
list-style-position: outside;
 
list-style-type: circle;
 
padding: 0 0 0 1.5em;
 
margin: 0;
 
}
 
#p-navigation .pBody li, #p-search .pBody li, #p-tb .pBody li, #p-lang .pBody li, #p-wikicities-nav .pBody li {
 
border-left: 1px solid #ffcccc;
 
border-bottom: 1px solid #ccccff;
 
padding: 0 0 .05em .5em;
 
</pre>
 
 
== less annoying "You have new messages" ==
 
 
In your ''user/monobook.css'' :
 
.usermessage {
 
background-color: #FFFFFF;
 
border: 1px solid #777777;
 
color: Black;
 
font-weight: normal;
 
margin: .5em 0em .5em 0em;
 
padding: 4px;
 
vertical-align: middle;
 
}
 
 
== Redirects ==
 
 
On [[Special:Allpages]], you can make redirects stand out a lot more. For example (in MediaWiki:Common.css or ''user/monobook.css''):
 
 
.allpagesredirect { font-style: italic; }
 
.allpagesredirect:after { color:grey; content: " (redirect)"}
 
 
Makes them italic and appended with the word 'redirect'.
 
 
.allpagesredirect a { background: url(/images/5/5c/Allpagesredirect.gif) center left no-repeat; padding-left: 13px; }
 
 
Gives each redirect a small image ([http://uncyclopedia.org/images/5/5c/Allpagesredirect.gif found here], save and upload to use, public domain (or create your own)) to the side.
 
 
==Recent Changes tweaks==
 
 
===Hilighting admin/staff===
 
This lets you style the nickname of trusted editors in the recent changes as you wish.
 
 
In your ''user/monobook.css'' (or in MediaWiki:Common.css '''with community approval''') :
 
 
ul.special li a[title="User:Angela"],
 
ul.special li a[title="User:Sannse"],
 
ul.special li a[title="User:Splarka"] { font-weight: bold; font-style: italic; color: #ff00ff; }
 
 
This example shows Angela, Sannse, and Splarka as bold, magenta, and italic, in recent changes.
 
 
table.diff a[title="User:Splarka"],
 
ul#pagehistory li a[title="User:Splarka"],
 
ul.special li a[title="User:Splarka"] { color: #33dd33; font-weight:bold; }
 
 
This example shows Splarka as bold and green, in diffs, page histories, and recent changes.
 
 
===Finding new users===
 
In MediaWiki:Common.css or ''user/monobook.css'':
 
 
ul.special li a[title ^="User talk:"].new { color:#ff00ff;font-weight:bold }
 
 
Will show a bright pink <span style="color:#ff00ff;font-weight:bold;text-decoration:underline">Talk</span> link on recent changes, for all users who do not have talk pages.
 
 
ul.special li a[title ^="User talk:"].new { color:#ff00ff;font-weight:bold }
 
ul.special li a[title ="Special:Contributions"] + a[title ^="User talk:"].new { color:#CC2200;font-weight:normal }
 
 
Will do the same, but only for logged in users, and not IPs. ''Note that it does this by resetting IP talk links to normal, so whatever changes done have to be undone.''
 
 
===Float the namespace selector to the right===
 
In ''user/monobook.css'':
 
div.namespacesettings {
 
float: right;
 
clear: none;
 
position: relative;
 
top: -8em;
 
width: 175px;
 
border: 1px dotted #AAAAAA;
 
padding: 4px;
 
}
 
Gets it out of the way.
 
 
===Various minor tweaks===
 
In ''user/monobook.css'':
 
.newpage { color : #990000; }
 
.minor { color : #AAAAAA; }
 
.unpatrolled { color : #ff00ff; }
 
This changes the N (new page) letter to red, the m (minor edit) letter to grey, and the ! (unpatrolled edit) exclamation mark to bright pink. Lots of things can be done in excess to this, such as images, extra comments, and blinking.
 
 
 
==Make some links look like regular links==
 
This is useful if you want to make inline templates with a mixture of internal/interwiki/external links but don't want a clash of link formatting associated with such. In MediaWiki:Common.css:
 
 
#bodyContent .stealthexternallink a { background: none; padding: 0; color: #002bb8; }
 
#bodyContent .stealthexternallink a.new { color: #CC2200 !important; }
 
#bodyContent .stealthexternallink a:visited { color: #5a3696; }
 
#bodyContent .stealthexternallink a:active { color: #faa700; }
 
#bodyContent .stealthexternallink a:hover { text-decoration: underline; }
 
 
And then put such links in <nowiki><span class="stealthexternallink"></span></nowiki>
 
 
==Make class="new" inheritable==
 
This allows you to force links to be red, by putting links in a block or inline element in class="new": In MediaWiki:Common.css:
 
 
.new a { color:#cc2200; }
 
.new a:visited { color:#a55858; }
 
 
And then: <nowiki><span class="new">[[Blah]]</span></nowiki> should always be red.
 
 
==Different logos per namespace==
 
You can change the logos in each namespace, via MediaWiki:Monobook.css. For example:
 
 
body.ns-110 #p-logo a { background-image: url(/images/6/61/Forum_Logo_Soapboxes.png) !important; }
 
body.ns-111 #p-logo a { background-image: url(/images/d/db/Forum_talk.png) !important; }
 
 
Note that you must determine the image location and namespace number yourself. To determine the image location: upload an image, right click on it, and 'copy image location' (mozilla) or 'properites' (ie). To determine the namespace number, go to a page in that namespace and view page source, the <nowiki><body></nowiki> tag will have it as a class, eg user might be <nowiki><body class="ns-2 ltr"></nowiki> indicating ''body.ns-2'' is the identifier for that namespace. Hint: Lots of customizations are possible by namespace.
 
 
== Misc user css tweaks ==
 
Mostly for ''user/monobook.css'':
 
 
Make action tab links change color when visited:
 
#p-cactions .new a:visited { color: #ba6644; }
 
#p-cactions li a:visited { color: #492FAF; }
 
 
Position the delete confirmation button at the same place on every page (useful for mass deletions in tabs):
 
#deleteconfirm { position: absolute; top: 130px; left: 150px; }
 
 
Remove gap between action tabs (talk/edit, and move/watch (or history/watch)):
 
li#ca-watch, li#ca-unwatch { margin-right: 1.6em; margin-left: .05em; }
 
li#ca-talk { margin-right: .4em; }
 
 
Show "Templates used on this page" as an inline list instead of long bullet pointed list.
 
.templatesUsed ul { list-style: none; }
 
.templatesUsed li { display: inline; padding: 0 0 0.1em 0; margin: 0 0.3em 0 0; }
 
 
Make edit pages much smaller (by removing copyright warning and tools) '''Warning: for advanced users only, could get you banned for ignoring site rules'''
 
#editpage-copywarn { display: none !important; }
 
#editpage-tools { display: none !important; }
 
 
Removes block expiry dropdown on Special:Blockip (I always type in a time manually).
 
#wpBlockExpiry { display: none !important; }
 
 
That annoying updated marker!
 
.updatedmarker {display: none}
 
 
Wanna change your edit box font?
 
textarea {font-family: "Comic Sans MS"; font-size:110%;}
 
 
==Printed links Underlined==
 
in ''user/monobook.css'':
 
@media print {
 
a, a.external, a.new, a.stub {
 
color: blue ! important;
 
text-decoration: underline ! important;
 
}
 
}
 
 
==Border on LaTeX images==
 
Experimental, requires CSS2.
 
a img[alt="math"] { border:1px solid green;background-color:white;padding:3px; }
 
 
Also (from [[HRWiki:User:Lapper|Lapper]]):
 
#bodyContent a[href ^="/extensions/wiki/text/tmp/"] { border:1px solid green;background-color: hite;padding:3px; }
 
 
==Per-namespace tab buttons==
 
 
A quick trick to let you customize messages per namespace.
 
 
For example, to prefix a namespace-specific word before 'discussion' on every talk page:
 
 
<pre>
 
body.ns-0 #ca-talk a:before { content: "Article "}
 
body.ns-1 #ca-talk a:before { content: "Article "}
 
body.ns-2 #ca-talk a:before { content: "User "}
 
body.ns-3 #ca-talk a:before { content: "User "}
 
body.ns-4 #ca-talk a:before { content: "Project "}
 
body.ns-5 #ca-talk a:before { content: "Project "}
 
body.ns-6 #ca-talk a:before { content: "Image "}
 
body.ns-7 #ca-talk a:before { content: "Image "}
 
body.ns-8 #ca-talk a:before { content: "Message "}
 
body.ns-9 #ca-talk a:before { content: "Message "}
 
body.ns-10 #ca-talk a:before { content: "Template "}
 
body.ns-11 #ca-talk a:before { content: "Template "}
 
body.ns-12 #ca-talk a:before { content: "Help "}
 
body.ns-13 #ca-talk a:before { content: "Help "}
 
body.ns-14 #ca-talk a:before { content: "Category "}
 
body.ns-15 #ca-talk a:before { content: "Category "}
 
body.ns-100 #ca-talk a:before { content: "Lodging "}
 
body.ns-101 #ca-talk a:before { content: "Lodging "}
 
body.ns-102 #ca-talk a:before { content: "Restaurant "}
 
body.ns-103 #ca-talk a:before { content: "Restaurant "}
 
body.ns-110 #ca-talk a:before { content: "Forum "}
 
body.ns-111 #ca-talk a:before { content: "Forum "}
 
</pre>
 
 
''(CSS2 - won't work on all browsers)''
 
 
=Javascript=
 
Usually for [[MediaWiki:Monobook.js]] or [[Special:Mypage/monobook.js]]
 
 
==List of all Wikia==
 
[[MediaWiki:Wikialist.js]]
 
 
This is just a list of all the Wikia on Wikia. It isn't current (as it has to be manually created from the database list), and it excludes all the non-wikia domains (uncyclopedia.org/memoryalpha.org). It would be nice if someday it was referenceable from a url like ''www.wikia.com/stats/wikialist.js'' (hint hint).
 
 
As it is, you can reference it via:
 
<nowiki><script type="text/javascript" src="http://wikia.com/index.php?title=MediaWiki:Wikialist.js&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"></script></nowiki>
 
 
And then use it for something in JS that needs a list of lots of wikia. Whatever.
 
 
==Customize the search box==
 
You can add this to your ''user/monobook.js'' to change the search box.
 
 
This changes the go button to view, and the search button to edit (the value and label should stay at these words), and the name of both to action. The consequece of this is: clicking edit takes you to /w/index.php?title=WHATEVER&action=edit, and clicking go *should* take you to /w/index.php?title=WHATEVER&action=view ... however, it takes me (at least) directly to /wiki/WHATEVER, even if the page does not exist (and not to the edit page). Note that this still does not let you manually type &action=edit but it does let you just click 'edit' instead.
 
 
function customsearch() {
 
document.getElementById('searchform').action = "/index.php";
 
document.getElementById('searchInput').name = "title";
 
document.getElementById('searchGoButton').name = "action";
 
document.getElementById('searchGoButton').value = "view";
 
document.getElementById('searchform').elements[2].name = "action";
 
document.getElementById('searchform').elements[2].value = "edit";
 
};
 
addOnloadHook(customsearch);
 
 
This sets the focus on a page load, to the search box:
 
addOnloadHook(function() {document.getElementById('searchform').elements[0].focus(); return false;;});
 
 
==Change the favicon==
 
On Wikia you can upload a custom favicon per wiki, but if you personally want to put a notably different favicon on each wiki you edit, you can add to your ''user/monobook.js'':
 
document.write('<link REL="shortcut icon" HREF="'''link to icon'''" />')
 
Where <tt>'''link to icon'''</tt> is the full url to a 16x16 icon.
 
 
==Trimmed main page==
 
Actually, originally stolen from Wikipedia and modified, but I've been doing similar per-page CSS on uncyclopedia for a while myself (see below)
 
 
Used on [http://stargate.wikia.com/index.php?title=MediaWiki:Monobook.js&action=edit stargate]
 
if(document.title.indexOf("Kingdom Hearts Wiki - ") == 0) {
 
document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, #contentSub, h1.firstHeading { display: none !important; } /*]]>*/</style>');
 
}
 
 
Used on [http://notreal.wikia.com/index.php?title=MediaWiki:Monobook.js notreal]
 
if(document.title.indexOf("Kingdom Hearts Wiki - ") == 0) {
 
document.write('<style type="text/css">/*<![CDATA[*/ #p-cactions, #p-personal, #lastmod, #siteSub, #contentSub, h1.firstHeading { display: none !important } \n #content {top: -2.5em} /*]]>*/</style>');
 
}
 
 
You can also use this to do any arbitrary CSS changes on a per-page basis. For example, to change the logo:
 
if(document.title.indexOf("Kingdom Hearts Wiki - ") == 0) {
 
document.write('<style type="text/css">/*<![CDATA[*/ #p-logo a { background-image: url(<nowiki>http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png</nowiki>) !important; } /*]]>*/</style>');
 
}
 
 
'''NOTE''': Once we upgrade to 1.9, this will no longer be necessary, as each body tag will have the page name as a separate class, eg ''<nowiki><body class="mediawiki ns-0 ltr page-Main_Page"></nowiki>'' (per [http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=17119 rev:17119]
 
 
==Per-Page CSS support==
 
As noted in [[#Trimmed main page]], the next upgrade should give a functionality for easy per-page CSS manipulation. Here is a little script to sort-of emulate this:
 
 
<pre style="overflow: auto; width:90%;height:20em"><nowiki>
 
// ==================================================
 
// Begin temporary per-page unique CSS (Splarka)
 
// ==================================================
 
 
function bodyClassAdd() {
 
var bodyclass = document.getElementsByTagName('body')[0].className;
 
var page = pageName();
 
 
if(queryString('useclass')) page = queryString('useclass')
 
page = page.replace(/\W/g,'_'); //
 
page = 'page-' + page;
 
if(queryString('debug')) alert('This page has an extra CSS body class:\n' + page+ '\nIt will be applied as soon as you close this alert')
 
document.getElementsByTagName('body')[0].className = bodyclass + ' ' + page;
 
}
 
addOnloadHook(bodyClassAdd);
 
 
function pageName(){
 
h1=document.getElementsByTagName('h1');
 
for (var n=0; n < h1.length ;n++) {
 
if (h1[n].className=="firstHeading") return h1[n].textContent;
 
};
 
}
 
 
function queryString(p) {
 
var re = RegExp('[&?]' + p + '=([^&]*)');
 
var matches;
 
if (matches = re.exec(document.location)) {
 
try {
 
return decodeURI(matches[1]);
 
} catch (e) {
 
}
 
}
 
return null;
 
}
 
// ==================================================
 
// End temporary per-page unique CSS (Splarka)
 
// ==================================================
 
</nowiki></pre>
 
 
Description: The <nowiki><h1 class="firstHeading"></nowiki> for a page is acquired, and all non-alphanumeric characters are converted to underscores, and assigned to the <nowiki><body></nowiki> tag as a new class:
 
*on [[Kingdom Hearts Wiki]]: <code><nowiki><body class="ns-8"></nowiki></code> becomes <code><nowiki><body class="ns-8 page-Main_Page"></nowiki></code>
 
*on [[Special:Recentchanges]]: <code><nowiki><body class="ns--1"></nowiki></code> becomes <code><nowiki><body class="ns--1 page-Recent_changes"></nowiki></code>
 
 
This allows per-page CSS, for example thusly:
 
body.page-Main_Page h1.firstHeading { display: none !important; }
 
<nowiki>body.page-Recent_changes #p-logo a { background-image: url(http://en.wikipedia.org/images/wiki-en.png) !important; }</nowiki>
 
 
'''NOTE''': Certain pages, like ''Special:'' pages, will have different classes when we upgrade to 1.9, so would need to be changed after the upgrade.
 
 
Advanced:
 
* '''?debug=true''' can be appended to the URL of any page have a javascript alert tell you the class for that page
 
* '''?useclass=''pagename''''' can be appended to temporarily over-write the class for that page (like ?useclass=Main_Page to emulate the Main_Page class).
 
 
==Add checkuser link to contribs==
 
:''Note #1: Probably only works in Mozilla/FF/Netscape, still buggy and in testing. Also: This is written for mw1.7, not 1.8. 1.8 has some extra js globals defined that make some of this easier.''
 
:''Note #2: If you are not a CheckUser, this link is rather useless for you. Also, it probably won't even work unless you are set admin.''
 
 
This adds a link to Special:CheckUser on user contrib pages in the contentSub heading.
 
:<tt>Before: For Nobody (Talk | block | Block log | Logs )</tt>
 
:<tt>After: For Nobody (Talk | block | Block log | Logs | Checkuser )</tt>
 
 
<pre>function checklink() {
 
if(document.getElementsByTagName("h1")[0].innerHTML != "User contributions") return;
 
 
if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == "Talk") {
 
var link = document.getElementById("contentSub").getElementsByTagName("a")[3];
 
checkhref = "ip=" + document.getElementById("contentSub").innerHTML.substring(4,document.getElementById("contentSub").innerHTML.indexOf("(")-1);
 
} else {
 
var link = document.getElementById("contentSub").getElementsByTagName("a")[4];
 
checkhref = "user=" + document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML;
 
}
 
var chLink = document.createElement("a");
 
chLink.href = "\/wiki\/Special:CheckUser?" + checkhref;
 
chLink.textContent = "Checkuser";
 
chLink.title = "Checkuser this user";
 
var space = insertAfter(link.parentNode, document.createTextNode(" | "), link);
 
insertAfter(link.parentNode, chLink, space);
 
}
 
addOnloadHook(checklink);
 
 
// insertAfter by Volte
 
function insertAfter(parent, node, referenceNode) {
 
if(referenceNode.nextSibling) {
 
return parent.insertBefore(node, referenceNode.nextSibling);
 
} else {
 
return parent.appendChild(node);
 
}
 
}</pre>
 
 
==Patrolled edits popups==
 
<pre><nowiki>
 
// ** patrolled edit popups **
 
// Lets you open patrolled edit links in popups which will autoclose when complete.
 
// Set popups to open in new tabs for best results.
 
function patrolpop() {
 
if( (!document.getElementById)||(!queryString("diff"))||(!queryString("rcid")) ) return;
 
 
if(document.getElementsByTagName("table")[0].className = "diff") {
 
var marklink = document.getElementsByTagName("table")[0].getElementsByTagName("a").length -1;
 
var purl = document.getElementsByTagName("table")[0].getElementsByTagName("a")[marklink].href
 
var mp = document.getElementsByTagName("table")[0].getElementsByTagName("a")[marklink].parentNode
 
var mpa=document.createElement('span');
 
mpa.innerHTML='&emsp;<sup>[<a id="poppatrol" href="#" onclick="window.open(\'' + purl + '&autoclose=true\',\'automarking '+ purl +'\',\'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=320,height=240\');window.focus();return false;" title="Patrol in popup [alt-p]">pop</a>]</sup>';
 
mp.appendChild(mpa);
 
document.getElementById("poppatrol").accessKey="p";
 
}
 
}
 
addOnloadHook(patrolpop);
 
 
// window closer and query string retriever
 
if( queryString("autoclose") == "true") window.close();
 
function queryString(p) {
 
var re = RegExp('[&?]' + p + '=([^&]*)');
 
 
var matches;
 
 
if (matches = re.exec(document.location)) {
 
try {
 
return decodeURI(matches[1]);
 
} catch (e) {
 
}
 
}
 
 
return null;
 
}
 
// ** end patrolled edit popups **
 
</nowiki></pre>
 
 
==Extra search box==
 
<pre><nowiki>
 
function whoisip() {
 
if(!document.getElementById) return;
 
var searchForm = document.getElementById("searchform");
 
var whoisForm=document.createElement('form');
 
whoisForm.action = 'http://www.dnsstuff.com/tools/whois.ch';
 
whoisForm.method - 'GET';
 
whoisForm.innerHTML = '<input accesskey="1" TYPE=text NAME=ip SIZE=16 class="std"><input TYPE=submit VALUE="WHOIS" class="send-btn">';
 
searchForm.appendChild(whoisForm);
 
};
 
addOnloadHook(whoisip);
 
</nowiki></pre>
 
 
==Link generation page==
 
:'''''Not highly tested'''. Known to have problems with non-english content languages (like Polish in MediaWiki: namespace).''
 
 
This lets you create a template with parameter that generates a multitude of links that, for example, search for that parameter (Similar to Book_sources on Wikimedia, eg: [[Wikipedia:Wikipedia:Book_sources]])
 
 
<pre><nowiki>
 
addOnloadHook(linkInsert);
 
function linkInsert() {
 
//parameters
 
var linkpage = 'MediaWiki:Links';
 
var linkparm = 'link';
 
var magic = 'MAGICWORD';
 
 
//aborts
 
if(document.title.indexOf(linkpage) != 0) return;
 
if(!queryString(linkparm)||(queryString(linkparm)==magic)) return;
 
 
//loop
 
var body = document.getElementById('bodyContent')
 
alert(body.innerHTML.indexOf(magic));
 
while (body.innerHTML.indexOf(magic) != -1) {
 
body.innerHTML = body.innerHTML.replace(magic, queryString(linkparm))
 
}
 
}
 
 
function queryString(p) {
 
var re = RegExp('[&?]' + p + '=([^&]*)');
 
var matches;
 
if (matches = re.exec(document.location)) {
 
try {
 
return decodeURI(matches[1]);
 
} catch (e) {
 
}
 
}
 
return null;
 
}
 
</nowiki></pre>
 
 
To use it, create a template with contents like:
 
 
<nowiki>[{{fullurl:MediaWiki:Links|link={{urlencode:{{{1|}}}}}}} search]</nowiki>
 
 
And then if your template is called, eg <code><nowiki>{{foo|pink floyd the wall}}</nowiki></code> it will generate a link to <code>/index.php?title=MediaWiki:Links&link=pink+floyd+the+wall</code> ... and all occurences of MAGICWORD on MediaWiki:Links will be replaced by <code>pink+floyd+the+wall</code>, eg:
 
<nowiki>http://www.google.com/search?q=MAGICWORD</nowiki>
 
becomes
 
<nowiki>http://www.google.com/search?q=pink+floyd+the+wall</nowiki>
 
 
==(To add)==
 
**http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Add_LI_link
 
**http://www.w3.org/TR/css3-selectors/#selectors
 
 
*http://uncyclopedia.org/wiki/MediaWiki:Uncyclopedia.js
 
*http://uncyclopedia.org/wiki/User:Splaka/uncyclopedia.js
 
*http://en.wikipedia.org/wiki/User:Splarka/wikialink.js
 
*http://uncyclopedia.org/wiki/HowTo:Reskin_Uncyclopedia
 
*http://www.wikia.com/wiki/Forum:Uncyclopedia_logo
 
 
*http://bdsm.wikia.com/wiki/MediaWiki:Monobook.js <- warning cookie
 
*http://list.wikia.com/index.php?title=User:Splarka/monobook.js&oldid=2176 <- list columnizer
 
*Anonnotice popup?
 
 
=Other=
 
Parserfunctions/magicwords/messages
 
 
== "Did you delete the talk page?" ==
 
 
From a thread on [[Wikipedia:WP:VP/T]]: When deleting pages, often times the talk pages are forgotten, this can cause a rash of orphaned talk pages to hover around indefinitely. Sometimes a talk page should be kept as a valid indicator as to previous conversations about the page and why it should not exist, but most times the talk pages should be deleted (except in user: namespace). As of this writing, parserfunctions don't work in [[MediaWiki:Deletedtext]], but transcluded parserfunctions do.
 
 
In: MediaWiki:Deletedtext:
 
<nowiki>{{Template:Talkexist}}
 
"$1" has been deleted.
 
See $2 for a record of recent deletions.</nowiki>
 
 
In Template:Talkexist:
 
<nowiki>{{#ifexist:{{TALKPAGENAME}}|{{#ifeq:{{SUBJECTPAGENAMEE}}|{{FULLPAGENAMEE}}|{{#ifeq:{{TALKSPACEE}}|User_talk||
 
'''<span style="color:#00ff00;text-decoration:blink">Note:</span> A [[{{TALKPAGENAME}}|talk page]] (<span class="plainlinks">[{{fullurl:{{TALKPAGENAME}}|action=delete&wpReason=Orphaned%20talk%20page}} del]</span>) exists for this page.'''<br /><br />}}}}}}</nowiki>
 
 
This can also be added to MediaWiki:Confirmdeletetext (and will show up similar to the "This page has a history" alert).
 
 
== Per-namespace sitenotice ==
 
Sometimes this is requested. It is fairly straightforward with [[m:ParserFunctions]], just put something like this into [[MediaWiki:Sitenotice]]:
 
 
<nowiki>{{#ifeq:{{NAMESPACEE}}|Image_talk|This is an image talk page}}</nowiki>
 
 
The main namespace can sometimes cause problems as it is null, best to wrap it in dashes:
 
 
<nowiki>{{#ifeq:-{{NAMESPACEE}}-|--|This is an article}}</nowiki>
 
 
Slightly more advanced is putting a message in multiple namespaces, like for example all talk namespace. This is easier done with a #switch:
 
<nowiki>{{#switch:-{{NAMESPACEE}}-
 
|-{{ns:1}}-|-{{ns:3}}-|-{{ns:5}}-|-{{ns:7}}-|-{{ns:9}}-
 
|-{{ns:11}}-|-{{ns:15}}-|-{{ns:101}}-|-{{ns:103}}-|-{{ns:105}}-
 
|-{{ns:107}}-|-{{ns:109}}-|-{{ns:111}}-|-{{ns:113}}-|-{{ns:115}}-
 
|-{{ns:117}}-= This is a talk page}}</nowiki>
 
 
 
{{wikia|subpage|User:Splarka/tricks}}
 

Revision as of 23:48, November 28, 2019

This user is inactive
This user's page has been blanked due to inactivity for one year or longer. Upon the user's return to normal activity, they may restore their original page.
This action was performed automatically (check activity·undo)
Community content is available under CC-BY-SA unless otherwise noted.