-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support non-Wikimedia wikis with auto-name detection and default image support (other none wikimedia wikis) #5
Comments
Hey, thanks for the interest in XOWA. Out of curiosity, is this a wikia wiki? If so, I was able to help someone with configuring a Xenoblade wiki. See https://sourceforge.net/p/xowa/discussion/general/thread/91f5df9f/#ed2d . I think this should work with other wikis as well. If you let me know which one, I can give it a try. As for your questions:
Well, for now, your best place is home/wiki/Help:Options/Config_script . You'd have to put in lines like the following:
This would tell XOWA to use the images that are saved in /orig/. Note that they have to be saved there beforehand; XOWA doesn't know how to download non-wikimedia images
You should just be able to rename the folder. For example, if the folder is /xowa/wiki/messed_up_name, just rename it to /xowa/wiki/correct_name. Your history links and bookmarks will break, but XOWA doesn't store the information anywhere else
XOWA stores the logo here: /xowa/user/anonymous/wiki/messed_up_name/html/logo.png . Just make you rename this directory, if you rename your wiki Hope this helps. |
It's nethackwiki The local images seam to work. fixed the logo. You should put this in the help page. When i click on an image, in the page of the image i get the text of the page but i don't get the image it self. Not supported? the categories are not supported yet right? You are saying, only local images for non wikimedia wikis? *Renaming the folder didn't work. :'( * The template It can get an attribute "name", if it doesn't get it, it tries with the title of the article. In xowa, when the attribute name is given, the symbol is trashed. For example here |
Cool. I actually used to play this game. :)
Okay. I'll add it to Help:CSS and link to it from the Wikia article. Just so you know: you can always click "View HTML" and figure out where everything is coming from. Since everything's offline, all the files are sitting on your system somewhere.
Yes. XOWA only loads original files. Thumbs are generated on the fly. It won't use pre-existing thumbs from a dump (I don't know the file-naming convention, and they would probably vary per method-of-generation)
Yup. That's fine. I should have specified that it should be empty. It's basically a temp directory
Hmm... This should work, but I may have to add more code for non-WMF wikis. Which image / page? Also, can you give me the link for the offline xml dump (images too would be great). I can pull it down and work through it on my side.
This is "harder". WMF wikis have a separate table for categories. For example, https://dumps.wikimedia.org/simplewiki/20150603/simplewiki-20150603-categorylinks.sql.gz . The nethack wiki probably only has an XML dump, without any of the table dumps. This table dump can be regenerated by parsing every page, but I don't have this set up yet.
Yes, no downloading of images for non-WMF wikis . I might add support for this in the future, but I'm worried that there's too much variation in terms of the absolute file location.
Yeah, I was wrong. I forgot I changed the code a while ago and baked the domain name into two places:
I'll add a rename wiki function in a future version. Out of curiosity, why don't you reimport the dump again under the correct name?
Yeah, this too will probably need the wiki set up on my side. I looked at the wikitext now, and nothing there looks particularly strange. |
" Cool. I actually used to play this game. :)" "(I don't know the file-naming convention, and they would probably vary per method-of-generation)" "Hmm... This should work, but i may have to add more code for non-WMF wikis. Which image / page?" dumps "reimport the dump" |
Actually, the thumbs are correct and fairly standard. I should change the code to use them, but for now, I'm hoping regenerating new ones shouldn't be an issue Thanks for the example. This is an issue with XOWA, and I have to change the code to handle the non-WMF wikis. It's not an easy change, so it may take a few weeks.
Cool. Very useful.
Yeah, it took some time, but I see what they do. They use javascript to load /wiki/Special:RandomInCategory/Main_Page_rotation .
This isn't an easy change for me to do, primarily because I'd have to get RandomInCategory working (and Category has problems as we discussed earlier) I know this is highly visible (being on the front page), but I probably won't be able to get around to this for a while.
Okay. I'll add a rename wiki in a future release, but for now your best bet is just to reimport. Also:
This is due to nethackwiki implementing #replace and other non-WMF string functions. I'd have to add support for this. I'll try to work on this first over the other items listed here. |
you misunderstood. I wasn't asking to implement using the thumbs or about the front page. I think you should rather have an import option for non-wikimedia wikis, that asks for the name and image configuration during import. I saw that the xml contained information about the name of the site, so you could give that as the default option. You mean they have more custom stuff? If you try to implement all custom changes of wikis, you'll never reach the bottom of it. You can't instead edit the template in wikinethack, so that it works in both the site and xowa? The template almost work's correctly. |
Sorry. I didn't mean to imply that you were making a request. I only meant that XOWA probably should use the official thumbs. I didn't put in this code, because I didn't think that anyone ever released dumps of thumbs. Now that I know they exist, I realize I should probably use them instead of generating new ones in parallel. (even though like you said these new ones work just as well) The tty maps is more of a wish thing. I thought the maps looked neat, and would have wanted XOWA to show a more authentic nethack front page. Otherwise, yes, it is a bit of work.
Hmm... I can definitely default to the XML contained name as opposed to the dump name. The image configuration is a bit more work, but I'll try to work on this as well
Yeah, agreed. That is a danger, and generally I steer clear of them. However, the #replace function is pretty easy to implement and it does exist in MediaWiki (though it's not used in the WMF Wikipedias).
Well, I could ask the user to add Module namespaces (Lua code), but I think that it would just be easier to implement #replace. |
"that anyone ever released dumps of thumbs" "tty maps" requests: About the image configuration, at least: put instructions in the Help page and a link to it from the import page. And ask during import, if it should use commons, and an option to activate deactivate commons in the config pages. |
Ok. It's on my to-do list, but I'll make it low in priority.
Again, a sort of low-priority to-do list item. I'm more interested in the Special:RandomByCategory item.
Yeah, but I usually don't like to ask for prompts. The imports were designed to be scriptable, and prompts get in the way. I'll add an option for wiki_name_type and default this to the xml_type. The user can always change it to the dump name.
Deleting a wiki is still very simple. Just remove the directory!
Agreed. The instructions I gave you was really meant for power-users. I'll come up with a more automatic way (one that doesn't use a custom script). This is a higher to-do priority than the others, though it may still be a few weeks. |
"Yeah, but I usually don't like to ask for prompts." "delete wiki" |
Okay. Cool. That's what I was thinking.
Yeah, XOWA is meant to be portable. So long as you don't move anything in the /bin/ folder (or the root folder, like xowa.gfs), moving anything else should just work. Content may be missing, but nothing should just break. Otherwise, it's a bug.
Yup, will do. Thanks! |
beh >:P Some of the pages of the images, now display a thumb, but the link is to the commons folder. I tried to delete the commons folder but it didn't do anything. simplewiki still works correctly however. |
Hmm.. Did you try updating the option at home/wiki/Help:Options/Config_script ?
|
I alredy changed the paths in the script, i didn't forget that. I think it's commons that messed things up. |
Hmm.... The only other thing I can think of did you restart XOWA after this change? The Config_script is one of the few options that requires a restart Otherwise, I'm on IRC for a while if you want to try some live troubleshooting there. See http://webchat.freenode.net/?channels=#xowa Thanks |
I deleted a suspicious sqlite file in the image folder, that fixed the issue. Maybe note this in the image help pages. It still, a little bit strange though. If i had visited the image page when it was downloading from commons, it displays the thumbnail in the image page, but tries to link to the image in the commons folder. If i hadn't visited the image page, then no thumbnail is displayed. So, commons still does something. And one more request. To be able to set up the logo at import and in the the config pages. Or add instructions in the help pages. |
Hmm... Out of curiosity, was it "^orig_regy.sqlite3"? If so, did you move this sqlite database over with the images?
Well, if you're talking about a "File" page like "File:Sanctum.jpg" then that's possible. I still have to rework the "File" pages for non-wikimedia wikis
Ok. Setting up the logo may be difficult, as I can't automatically download it like I do for the Wikimedia wikis. Instructions could definitely work. Also, I'll have the {{#replace}} fixed for either next week or the week after. This fixes the Monster Box issue for Vecna. |
"did you move this sqlite database over with the images?" Yea the "File" page. Ok |
Ok. That looks like a bug. The "^orig_regy.sqlite3" stores absolute paths, not relative paths. Deleting it was the easiest way. I'll need to add this to the list of things needing fixes. :|
Noted.
Yeah, it'll probably be a few releases, but it will get in there. Thanks. |
I added support for {{#replace}} and other string functions in tonight's v2.7.2. http://nethackwiki.com/wiki/Template:Monster now works. I confirmed with nethackwiki.com/wiki/Vecna . At this point, I think these are the actionable items left in this issue before I close it
Other items that are on my todo list, but probably won't be done for a while
Let me know if I missed anything. Thanks. |
The requests: "Option to dump name" "Automatically set up images" Ask during import, if it should use commons, and an option to activate deactivate commons in the config pages. I think this is important, it messes up the wiki by default otherwise. like you said before, have relative paths instead of absolute paths in the sqlite database. Well, your todo list are not request from me. |
Sorry: accidentally dropped a word. "Option to use dump name". Otherwise, I agree with you on using xml name as default.
Yeah, meant "non-manual" way of setting up images. So a better config option than specifying a script. I changed the comment above.
Understood.
Thanks. Forgot to include this. Added above.
Thanks for the example. You're right. This is something different than the front page. Nethack wiki has its own custom PHP exception <replacecharsblock>. See http://nethackwiki.com/wiki/User:Paxed/ReplaceCharsBlock The extension is pretty simple, but it won't work in XOWA b/c it's PHP. I may experiment with this in the future. Basically, I'd allow the user to register custom Lua handlers for <special_tags>. The user would have to rewrite the PHP code in Lua, but they should be able to achieve similar effects. Definitely a future todo.
Yup. agreed here as well. |
curious, how about http://memory-alpha.wikia.com/wiki/Portal:Main , the Wikia for Star trek fan.. cheers. |
Hi. Thanks for the post. I didn't realize how long this issue was open for.
Not sure I understand the request.
Other than that, it works like the other Wikias. The CSS / images are missing, but I'm afraid that's going to take a while to me to tackle. I have my hands full with Wikimedia wikis. Let me know if you need more info. Thanks. |
I'm going to mark this item resolved. They should be all handled by v4.2. To repeat from above, the actionable items in this issue were:
If there's anything else, let me know, and we'll track it in a new ticket. Thanks. |
As mentioned above, these issues were handled in v4.2. I'm going to close out the ticket now. Thanks again for the report |
I'm actually using xowa for a wiki that is not affiliated with wikimedia.
They are some configuration problems, since the program assumes all wikis are wikimedia related.
How do i fix the configuration files for it?
Where is the configuration file?
Images:
It uses commons, but the wiki doesn't use commons.
I would like to selectively disable commons just for that one.
It doesn't use the images from the wiki it self.
Probably it assumes some naming convention about the link that of course doesn't apply here.
The image dump is only 90 MB, not like the scary terabites of wikipedia. I would like to use offline images, but the help page sais this feature is obsolete.
Minor issues:
It messed up the name of the wiki, it is listed a the name of the folder the dump was in. Also it uses xowa picture as the logo.
The text was updated successfully, but these errors were encountered: