Forum:Bugs in dynamic navigation

Dynamic navigation used to hide menus like this right. Well, it works, but does not work correctly. In my language, show means "Mostrar" and hide means "Esconder". But the only word is "Esconder" when clicking. Well, look at this template in my wiki and you will understand. 00:21, April 9, 2010 (UTC)
 * Guys, help me, this template will appear on many pages, I made a picture for you to compare:

14:48, April 9, 2010 (UTC)


 * Copying over thing from wikipedia is not a thing that should be encouraged.
 * Instead use what is already awailable on Wikia.
 * >> http://dev.wikia.com/wiki/ShowHide
 * — TulipVorlax 15:04, April 9, 2010 (UTC)


 * It worked. But how do I change the show/hide words for my language? I think you should not understand my language, is Portuguese (pt-português) and this is the translation:


 * Show: Mostrar
 * Hide: Esconder

MediaWiki:Common.js of my wiki. Thanks 17:36, April 9, 2010 (UTC)


 * That Button lable code is contained in a .js file according to wikipedias help page for navigation / collapsible templates. Here - Try updating your local version with your language version.


 * Wikipedia templates are not 100% compatable with wikia but most do now work (with some updating of links and other bits of code). when i first started on wikia I had big problems as i tried to copy lots of them with wikipedia pages and they would not work due to the Parser function being different (with help i got a work round to work to create the V.D.E buttons to operate on the Navigation box template).


 * Another problem is so many templates are nested on wikipedia, so it is hard to track were the problem is (especialy if the doc pages are added as well, as the examples call other templates) - BulldozerD11 19:06, April 9, 2010 (UTC)


 * - Its in the common.js you linked to above, in the 3rd main section down

(navigation bars) section

// set up the words in your language var NavigationBarHide = '[Hide]'; var NavigationBarShow = '[show]';

Change the code to if you have admin acces to the page.(if not you need an admin to edit the file) or to get it to work just for you edit your own JS file as per wikipedias help section. // set up the words in your language var NavigationBarHide = '[Esconder]'; var NavigationBarShow = '[Mostrar]';


 * Think thats it if I've undertood the Question correcly - BulldozerD11 19:20, April 9, 2010 (UTC)
 * I think the codes of Wikipedia do not work on Wikia because is a project of the Wikimedia Foundation.

The code did not work, look. Look the common too. 21:08, April 9, 2010 (UTC)


 * There might be conflicting scripts. You need to remove anything related to show/hide except the three lines

var NavigationBarHide = '[Esconder]'; var NavigationBarShow = '[Mostrar]'; importScriptPage('ShowHide/code.js', 'dev');
 * (plus any comments you want to keep). The import line gets the script from its page on w:c:dev, the two other ones change the names of the buttons. And that's all you need. 23:02, April 9, 2010 (UTC)


 * It appears to work for me now - the cache had not cleared as when i went back again after refreshing it had changed to the portugese version. But Ose is better qualifed than me to fix JS code, so i will leave hime to it as i'canot read it in detail. So over to Ose.


 * The core code for wikia and wikipedia is the mediawiki/wiki-media software, but the 2 sites are customiseing and refining it to suit there differing needs as the sites develope. The original code was writen for wikipedia and released through the Wikimedia foundation. Both wikia and wikipedia were founded by Jimmy Wales, but wikia is not conected to the Wikimedia foundation (a not for profit organisation with charity satus. Wikia is a comercial operation, funded by the adverts, and using the same opensource wiki software (but customised). (Thats a summary as i understand it, but staff may clarify it if i'm wrong) - BulldozerD11 23:19, April 9, 2010 (UTC)


 * Wait, I have to copy this code or this code? Or both? 00:20, April 10, 2010 (UTC)


 * Neither according to user:Ose as he is sayng that in the JS file there is a link that calls the code in the Wikia development wiki. See his reply above mine You just need the customised language bit aparentlly and the call to the other wiki with the code. most of the other suff is not needed -


 * One of the advantages and problems with wiki software is there are several ways of doing things so it can get confusing. You may be best talking to Ose by leaving a nessage on his talk page asking him to explaine just what is needed and what can be removed, Sorry canot help more - BulldozerD11 02:56, April 10, 2010 (UTC)

You dont need to copy the js file ; the line  importScriptPage('ShowHide/code.js', 'dev');  do it for you using a link, sort of. — TulipVorlax 03:00, April 10, 2010 (UTC)

With, of course, the two lines that Ose showed to change the language to Portuguese. Otherwise we'd be back to square one. ;) The 888th Avatar   (talk)  03:45, April 10, 2010 (UTC)