I got back to working on the WGEP's extensions. Mainly the one which was supposed to give the top-level wiki a Mini-wiki like structure and also allow for linking throughout the project in the form of links like [[Anime:/seriesid/:/pagename/]] which would link to the proper location, be it a page on the Animepedia, or a page on another wiki. ie: Negima is a series listed on the Animepedia [[Anime:Negima:Negima!?]] would link to the Animepedia's Negima/Negima!? page. And Naruto has it's own Narutopedia, [[Anime:Naruto:Naruto Uzumaki]] would link to the Nartuopedia's Naruto Uzumaki page. (There are also a few extra features to it)

I already know much of how I'm going to program it but I'm just wanting advice from one of the techs on what method I've been thinking of I should use to do the system in the most optimized and fast way. Don't want to suggest anything to put on Wikia that slows things down or is any sort of burden.
-----Nontechnical people can stop here-----
Just a quick summary of what the dilemma is.
In the network we have world entries, each one has a 'World page' name which is the name of the base page all the pages in that Series 'world' or sometimes known as 'universe' is a subpage of. Individual series aren't exactly seperate worlds; Negima! and Negima!? both share characters, unique traits, etc... And are both part of the same 'world'. Similarly Full Metal Panic which has the original series, Fummofu, and The Second Raid I believe, are all part of the same world. So world != series just to be specific. The World page name is basically a short id which can be used to describe all these series. For Full Metal Panic, it is commonly known as FMP, Negima! and Negima!? have 'Negima' as the World ID. etc... Other than the 'World page' name there are a few other items of info for each world. Of course there's a lengthened Display name for the World. So FMP would have 'Full Metal Panic' for the extended name. There is the 'wiki' column which basically is either blank or an interwiki prefix. If it's blank, then that means that the entire world is located in the Top level wiki because there is no wiki dedicated to that world. If the world does have a wiki such as the Narutopedia for Naruto, then the 'wiki' column has an interwiki link to the other wiki, in this case 'w:c:Naruto'. There are 2 more technical values; ForceCase and ForceSlash. ForceCase and ForceSlash only apply to the worlds located on the top-level wiki, mostly they're there as options to get around technical stuff. On the Top-level wiki the various Character, Series, Episode, etc... Pages are not all placed in the base of the wiki together where many of them will run into Name conflicts with each other... Instead they each get a mini-wiki like section of their own. The world page at '/Worldpagename/' is an index for that world, all the pages in that world are subpages of that page. So the page for Full Metal Panic's Fummofu series would be at 'FMP/Full Metal Panic? Fummofu', the FMP world id at the start is what stops any name conflicts with things in other series. But there are 2 technical issues: The first letter of subpages are not automatically capitalized, and / are used in a similar fashion to : in this structure.
ForceCase and ForceSlash are 2 options used to get around those.
ForceSlash deals with the : and / discrepancy if somewhere the format '/World//Characters//Charactername/' were used. When ForceSlash is enabled the :'s in the World name are translated to /'s. So a link to [[Anime:Negima:Characters:Negi Springfield]] would point to 'Negima/Characters/Negi Springfield'. This isn't a strong permanently set setting that applies everywhere because it could cause a bit of an issue in some cases. It is left as a boolean value for cases such as where a title like how Naruto's series go 'Naruto: Naruto Shippuden'. That : would be translated to / if it was on the Animepedia and that would be an issue. So it's a Boolean option that will help if it's needed, but otherwise is off so it doesn't break anything. Next, ForceCase is meant to deal with the issue that subpages don't have their first letter automatically capitalized by the software. ForceCase has 5 options, (Off, Uppercase, Lowercase, Uppercase Deep, and Lowercase Deep). When set to Uppercase the first letter of the pagename in [[Anime:seriesid:pagename]] is forced to upper case. So [[Anime:Negima:magic]] would lead to 'Negima/Magic' instead of 'Negima/magic'. The Deep options are to deal with the previous : / translation issue. In the case of ForceSlash being used in the format shown above, if ForceCase was set to Uppercase Deep the link [[Anime:negima:spells:lightning arrows]] would lead to 'Negima/Spells/Lightning arrows' when if it was only set to Uppercase it would lead to 'Negima/Spells/lightning arrows' and if off 'Negima/spells/lightning arrows'.

The last bit of this erm, long summary is the id's that are used to link to the series. Using the World name as the single thing to link with isn't a very good thing to use; Full Metal Panic could be referred to as FMP, FullMetalPanic, Full Metal Panic, Full Metal Panic!, etc... so one identifier to link with doesn't work out, for much the same reason that the #REDIRECT [[]] exists in mediawiki, cause one way to link doesn't always work. So each World has a set of id's that can be used to link with.
-----Now for the technical dilemma-----
Each world has a row with id/name/wiki/forceslash/forcecase and also a series of id's for linking. The dilemma is how to do this.
There are 2 ways that could be considered.
A) Place worlds and id's in one table as 'id/name/links/wiki/forceslash/forcecase' and have links be a blob field with a serialized array of all the id's that can be linked with. B) Place worlds in a table as 'id/name/wiki/forceslash/forcecase' and put linking id's in another table as 'id/world'. The reasoning behind B is that instead of querying every row in A and pulling out the arrays of id's (though the final result could be cached) we would use a SELECT ... WHERE id='$id' to get the world name that the world goes by so we can get the rest of the data. Just to help, here's a bit of info on when certain parts of the info are needed: * When linking in the format [[Anime:linkid:pagename]] and the link goes through, the linkid is needed to find the world's row to know where to redirect the link. * When using the [[Special:GENetwork]] page, all the rows of worlds and linkid's are needed to populate the list. * When on a page in the wiki, the extension needs to know if it is inside of a world or not, and if so, what world it is in. (This means pulling out everything before the first /, normalizing it, and checking if a world exists with that name) (This is needed to be known because when inside of a world extra CSS is added for that world.) * The extension also needs to know what world it is inside of when someone uses the {{WORLDPAGENAME}} Magic word. The {{WORLDPAGENAME}} is similar to {{BASEPAGENAME}} but {{BASEPAGENAME}} won't help us out if we use something like 'Negima/Characters/Negi Springfield' because it will be returning 'Negima/Characters' instead of 'Negima'. Also {{WORLDPAGENAME}} returns blank if we are not on a world.

-----A little extra, second dilemma-----
This one is a bit extra, I've been going around my ideas and finding as many of the hacks as possible that can be replaced by some form of hook, extension bit, or something that does not require hacking a clean unhacked part of Wikia's MediaWiki code. I've managed to stop permissions stuff from needing a hack, needing to hack in another hook for css additions. And one or two other things, but I'm still running into a hilt with title stuff. Changing the title around on it's own isn't an issue. But displaying something like 'Negima > Negima!?' where the first part is a link back to the main part of the world is a bit of an issue. Especially in trying to add the fulltitle bit below it so that people can still copy text they can use to link to it.

The dilemma is down to where to modify. There are 2 places that could be modified, each with an advantage and disadvantage: A) includes/Skin.php can be hacked with a small minor change, to make this work; The advantage is that it works in all skins without needing to modify all the skins. But the disadvantage is that from what I know, Wikia is using a nice cleen Skin.php right now. B) It would work alright to hack the individual Skin files, ie: Monobook.php, etc... To add a modification; The advantage is that I know Monobook has already been hacked, and the Quartz skins are custom made, and there are no other skins which really matter as the Big wikis aren't using these, and the Simple/MySkin/etc... skins don't really matter. But the disadvantage is that multiple skin files need to be altered in order to do this. Though, I haven't checked yet. But it might work out a bit better to use B because something does need to be put below the title for what to link with. If you want to see what I mean:
http://www.wikia.com/wiki/User:Dantman/GE_Extended/Extra_notes#Alterations_to_the_Title_alterations
Ignore most of the stuff there except the display. The hack there is actually part Skin.php hack, and part hacking the individual skins... I'll come up with something better depending on if A or B is picked, that won't involve hacking both sets of files... Also the CSS is not going to be specifically used, because it turns it IE does not support the :after pseudo-class and because of that annoyance I'm going to half to hardcode the > separator, or use a MediaWiki message to determine what to use as a separator.

--
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment 
Project, and Wiki-Tools.com

_______________________________________________
Wikia-l mailing list
[email protected]
http://lists.wikia.com/mailman/listinfo/wikia-l

Reply via email to