Hak5
Save 10% at GoDaddy.com with coupon code HAK

Talk:Main Page/Templates Overuse

From Hak5

Jump to: navigation, search

Wiki Poll

http://wikipoll.free.fr/mediawiki-1.6.5/index.php?title=Source_code

Incase you're ever interested.

Wiki Parsing

Man I was trying to do some advanced template stuff and it wasn't working. I finally figured out that it's because the Parsingfunctions.php file isn't installed  :/ So math and parsing isn't possible till Expr.php and Parsingfunctions.php are installed.

Parsing allows the same kind of thing that I did in the Rainbow Tables, where you type a word {{GenUL}} and it grabs that template except with parsing it only takes one template instead of the 6 that it takes now. It would look like this..

{{ #switch: {{{1}}}
| Res = style="background:#99CCCC"|Reserved
| Gen = style="background:#dddddd"|Generating
| GenUL = style="background:#00FFCC"|Generated/Uploading
| Done = style="background:#66FF66"|Completed
| Corrupt = style="background:#FF3333"|Upload Failed. Please Try Again --Silivrenion
| Unassigned
}}

A lot slicker than 6 templates! This type of parsing makes a lot of things easier for future stuff because you can also use templates for the = part of the functions. This means that if there is a template assigned to a word and the parser is used on a lot of pages, you only have to change the parser template to make the word used redirect to another template rather then finding/changing a lot of pages.


If you're interested...

Expr.php

ParserFunctions.php

Then put the following at the end of your LocalSettings.php:

require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );

You can also browse the code tree here:

--A Witt 07:03, 10 October 2006 (PDT)

This would be good, all the Ep Info templates could be rolled into one if we had this. --GallaUK

I think there are too many templates that aren't used much. Also using too many templates will slow the Wiki down and as it is growing this could become a big problem. I propose we cut down the amount of unnecessary templates like the Ep Info templates which may only be used twice and themselves contain a template. This will cause load on the server and in the end slow it down a lot. --GallaUK


There are only certain situations and types of templates where they would cause any significant/noticable load on the server, they absolutely aren't doing that right now. As a wiki is developing and new users are learning wiki script, templates actually take load off the server because of redundant and unnecessary scripting. Anyone noticing that the wiki has slowed down (as was mentioned in #hak5 irc on Sun) is having the problem on their end, I checked it when they said that, still wicked fast. If templates weren't being used on pages like rainbow tables the page would be over 4 times the size it is right now and very difficult for people to edit. The same amount of information is being loaded when the page is acessed but there is no math or parsing happening so it's not increasing load on the server to any degree that could be noticed. There are only a few that aren't being used or being used only a little. The whole idea is that templates that are only being used a little now will get more use, that's why they were made. Some of the templates are experiments for future use and aren't being used at all at the moment. Some of the templates look redundant but they aren't. Just as a reference, MediaWiki has over 5,000 templates and Wikipedia over 78,000, both with massive amounts of parsing on a very high percentage of their pages, we're probably o.k. with under 50 being used with no parsing.

--A Witt 01:13, 16 October 2006 (PDT)

Okay I'm pretty sure you know more than me on the matter so I'll leave it at that, I'll move this to a separate page since the matter is pretty much closed. --GallaUK 05:50, 16 October 2006 (PDT)