Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
This Forum has been archivedVisit the new Forums
The current code is here. The file is imported from my userspace wikia.js. As it stands, I have no problems retrieving the contents of a wiki page (for now a sandbox page in my userspace) and parsing them to get the part I want. I also have the ready-to-insert html for the side box (a rapid prototype for testing so it's all in an ugly, long, html string), to be prettified later (custom icons, etc).
My two problems are as follows:
- I am able to populate the editor window, but only in RTE source mode, or when RTE is disabled. For now I'm using the inspection tools found in Chrome (not my personal machine, can't install FF with Firebug), and the visual RTE window has this structure. There seems to be an embedded html document within the editor iframe, and I have no idea how to access the body of that page using jQuery in order to replace the contents.
to add the box to the rail. Yet this does not happen when the script runs on page load. prePane is the variable that holds the html string for the box.
I would be grateful for any assistance with solving the two problems.
- On a side note, could anyone recommend a guide/sample code to cannibalize/etc that shows how to write wikia modules that add boxes to the right rail? Source of the Templates module would be nice, don't know where to look for it. After I finish the JS version I was thinking about writing a proper wikia module/extension that does the same job and is easily configurable via special pages. I know where to look for info about page preloading and parsing wikia pages, but adding elements to the right rail is one thing I could not find examples of.
- Preload is built into MediaWiki, if you add &preload=PAGENAME to the end of the URL, it will preload that page's content into the page -- RandomTime 21:21, May 8, 2012 (UTC)
- Now that you mention it, I do recall hearing about it. I suppose I wanted to make something that didn't require refreshing the page (as this might evolve to provide ready-made snippets of code that can be inserted into editor. not requiring a page-refresh would allow users to use such functionality while modifying the existing content). In the worst case I could rely on the preload action. Still, I only need to figure out the visual editor, and there's the problem of adding the box to the rail on page load. Regardless of how preload is done I'd like to offer users a panel of templates that they can choose from. -- Gyumaou (Talk) 22:03, May 8, 2012 (UTC)