User talk:Mabdul

Welcome
I see you're from Wikipedia. What bring you here to Wikibooks? [[User:Liam987| Liam987 ]] 15:44, 22 May 2012 (UTC)


 * Short answer: images. -.-
 * Long answer: I got the attention about local images at this discussion and thought I can cleanup a bit. I'm not planing to write any book (although I will look at the C and the Java books and maybe improve it if I can). I recognized that here are more than 4k free licensed images (only CC-BY-SA and PD self) which can be moved to commons. Starting to cleanup problematic images (fair use, lacking source/author, etc) I realized that I need a script which doesn't exists until now (at least not how I want it) and thus I will create first the script and then starting to move many images to commons. (or tag them or whatever is needed)


 * Many people work on the big wikipedias (especially at dewp and enwp where I'm familiar with) moving constantly images to Commons, but watching the backlogs this will be resolved in a few years ("near future") - although there will be enough work at these small wikis and I'm always somehow a bit different doing other backlogs. ;) And I like small and "family-like" communities. mabdul 16:18, 22 May 2012 (UTC)
 * Oh and I'm really interested in Germany book ^^ (I'm from Germany) - so I will correct it - or if you need help, feel free to poke me! mabdul 16:22, 22 May 2012 (UTC)


 * Well, good luck!  Liam987  06:36, 25 May 2012 (UTC)


 * Since you offered, I could use some help with JavaScript for the book I'm working on, Wikijunior:Countries A-Z. I don't know if you know, but here at Wikibooks we have per book CSS and JavaScript that is defined for the whole book at MediaWIki:Perbook/bookname.css (or .js) and for user styling at User:username/per book/bookname.css. I know virtually nothing about JavaScript and very little about CSS, so if you would give me a hand I would appreciate it. Let me know if you're interested and I'll explain what I need. Thanks, Liam987  10:18, 25 May 2012 (UTC)


 * Yes, I know that there are "custim CSS files for every book (although didn't know of the JS files.) I'm still learning CSS and JS, but concrete tasks are always better than every tutorial and I might be able to help you. Go on and I will try to solve all your problems although I don't promise anything. ;) Check my edit counter: I needed really many edit to get working, but in this case it's really complex (w:regex), so go on and ask. Regards, mabdul 12:36, 25 May 2012 (UTC)


 * Well, I will describe what I would like done.
 * I am creating the book Wikijunior:Countries A-Z, which is a non-traditional book with a page for each country in the world, featuring the names of the country in its native languages, a large image of the country, and a few other things. As an example here I will use Belgium. When you hover over the word Belgique ("Belgium" in French) on the page, hover text will come up saying "French (Official language)". Currently these hover text things are just using the Wikicode Belgique
 * I would like to do something similar to what has been done with the hover text on the Wikibook Turkish. Hover your cursor over the first sentence on Turkish/Greetings and you will see what I mean. The code for this function is at MediaWiki:Perbook/Turkish.js and MediaWiki:Perbook/Turkish.css, through the template Template:Turkish/Tooltip.


 * I have assigned the class  to the titles on Wikijunior:Countries A-Z, so that is the class that should be used in the js and css. As for the style box that should be used (like they use "tbox" in the Turkish book), I can design that and give it to you to put into the JavaScript (or however it works).


 * I would recommend that you design the code on Special:MyPage/per book/Wikijunior:Countries A-Z.js and Special:MyPage/per book/Wikijunior:Countries A-Z.css.
 * Thanks, Liam987  14:25, 25 May 2012 (UTC)


 * Also something similar should be done with things marked with the class "htitle", though in a different style. I also forgot to mention that there should be two sections of the pop-up/hovering box, similar to the way it is in the Turkish book, but in this case one section will be used for the language title ("French") and the other for the status of the language ("Official language"). That might not be possible since only one title specified, but if it is possible it would be good. Liam987  14:48, 25 May 2012 (UTC)
 * OK, I will check that later, probably tomorrow. This seems a easy task since it is only a copy, paste, and modify task. ;) mabdul 18:41, 25 May 2012 (UTC)


 * Great Liam987  19:13, 25 May 2012 (UTC)
 * OK, I checked the code. It's not really hard to implement this since it is mostly a copy and paste job. The main question is (to do it right, this can also be useful for other books) for which languages do you want to use it? I have to de facto create for every language at least one template (to address the language parameter for the machine readable assignment), a useful redirect (like Template:tr/Word). Template:Tr/c should be moved to a generic one, because it doesn't contain any Turkish specific parameter and can be used by every other (word) template. The CSS and the JS file are easily to import/copy 'n paste. As I said: I need a list of languages you want to use, the ISO short letter code (for the redirect and the parameter in the template) and a short discussion if we can move the Tr/c template to something more generic since it can be used by every template. mabdul 22:07, 28 May 2012 (UTC)
 * Oh I missed: Template:Turkish/Tooltip should also be moved to something generic since it is similar to the /c template: just generic! mabdul 22:08, 28 May 2012 (UTC)
 * I'm not sure how this would be useful for other books. Explain? Also I believe the Turkish thing just uses the span title (defined in Template:Turkish/Tooltip) and puts that in a box, along with text between the span tags. I don't see where a list of language codes and languages comes in to this. It seems to me that the best way to do this is to do this is to put the language name ("French") in the first part of the box, and if it is possible to use the regex thing you mentioned to identify when a "(" appears in the text (the title), put everything after that into the second part of the box, excluding the ")" at the end. Therefor the first part of the box (the part that says "Merhaba" in the first word of Turkish/Greetings) will say "French" (or whatever the language is) and the second part (that says "Hello!" in Turkish/Greetings) will say "Official language". I have created a sandbox at Turkish/Sandbox to show you what I mean (I'll ask somebody to delete when we are done with it). Liam987  10:10, 29 May 2012 (UTC)
 * Now that I think about it, I can see how this could be useful for multiple book. In that case it will have to be defined at MediaWiki:Common.js. The problem, however, it that this will mean that the box can not be individually formatted unless the CSS styles are defined perbook. Liam987  10:13, 29 May 2012 (UTC)

If you check the source code of Template:Turkish/Word you will see the parameter |lang= which is used at Template:Turkish/Tooltip (which itself doesn't contain any Turkish relevant markup) for the XML stuff so that the actual HTML/XHTML/XML source code contains this parameter. This is very useful for screen readers and web robots.

Related to your question of the different styling: you don't get the magic of CSS. ;) The bot has an standard displaying - it works even without any custom styling, but you can copy, paste and modify the styling of the book CSS and that's it. The book CSS will format the button and can be changed by every book. CSS is one of the best inventions in the web - it's rather easy, great, and magic! Really: I have no actual book work made here, but if there are books using different languages, it would be wise and clueful to create "hundreds" of redirects and actual templates and include them at least in your book. Moreover the documentation isn't that hard, although the user has to get how he/she can create a useful CSS file for the book.

Even if we create these templates only for your books (likely that there are a few languages...) - most work is then already done - totally independent of any other book. (although other book authors simply can use them) <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 10:32, 29 May 2012 (UTC) UUgh I missed: the note of MediaWiki:Common.js is great. The JS file doesn't have to installed to every book by hand. A good idea. although this is also simple: it's just a line because the JS file doesn't need any modification. (I believe I have to check that) <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 10:36, 29 May 2012 (UTC)
 * I am already marking all the non-English text in my book using the template, which uses lang= and xm:lang=, and as far as I can see the CSS and JS of the Turkish book is not effected by these, so they are not relevant to the CSS and JS code. About the per book formatting, can we not use this code in the JavaScript:
 * This would allow the per book styling to be formatted on a template (Template: book name /Tooltip) instead of in the perbook CSS, making it more accessible (to non-administrators). Liam987  11:17, 29 May 2012 (UTC)
 * Have you made any progress on this, Mabdul? Liam987  23:23, 11 June 2012 (UTC)
 * Sorry, I will check today the code and will do all what is needed so that this is working today. <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 08:33, 15 June 2012 (UTC)
 * Sorry, I had some bugfixes to correct and some feature requests to integrate into a script which I maintains at enwp. I will do it, it is on my to do list at the top now, after improving that high used script. Regards, <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 19:58, 16 June 2012 (UTC)
 * Sorry, I had some bugfixes to correct and some feature requests to integrate into a script which I maintains at enwp. I will do it, it is on my to do list at the top now, after improving that high used script. Regards, <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 19:58, 16 June 2012 (UTC)

Like this
diff. You need to specify the parameter (either by using 1= or reason=) otherwise the diff link, because it contains an = sign, gets interpreted as trying to assign the bit that follows diff= to a parameter named diff.... <font color="#E66C2C">QU <font color="#306754">TalkQu 21:06, 7 June 2012 (UTC)

Do you want to do your own imports?
I can add you to the importer group if you want... otherwise you will occasionally be waiting a long time for someone to import things for you! <font color="#E66C2C">QU <font color="#306754">TalkQu 23:15, 8 June 2012 (UTC)


 * That sounds great. I had already gained some experienced on some testwikis with the importation tool, but never gained the right on a productive wiki. Yeah, I already recognized that there is not the big activity here (in sense of general (RC) and of admin activities) and so I wouldn't create even more work for you. ^^
 * Thanks for the hint with the <tt>1=</tt>, I totally missed that. <small style="font: 12px Courier New;display:inline;border:#009 1px dashed;padding:1px 6px 2px 7px;white-space:nowrap"><font color="#000">mabdul 23:31, 8 June 2012 (UTC)
 * Done. You have also been autopromoted to reviewer which will save me loads of time too as your edits will now autoreview. You may find that import fails quite a lot - if you try and import all revisions from an article with a large revision history then the query times out. <font color="#E66C2C">QU <font color="#306754">TalkQu 14:20, 9 June 2012 (UTC)

Can you delete for me the obsolete images?
candidate for deletion: Image:CDRs cascade.png http://en.wikibooks.org/wiki/File:CDRs_cascade.png and File:CDRs cascade with improved tolerance.png http://en.wikibooks.org/wiki/File:CDRs_cascade_with_improved_tolerance.png (The two figures contain mistakes, and their content and intended use are replaced (in Commons) by: File:Cascade of two CDRs with just different char frequency.png, File:Dejittering node.png, File:De Jitterer characteristics.png, File:Transfer and tolerance of an elastic buffer.png). BTW, I created the obsolete and the new ones, and - to my knowledge - they were and are all used only in the wikibook that I am writing. TY. (BORGATO Pierandrea 10:53, 14 December 2012 (UTC))
 * They have been deleted <font color="#E66C2C">QU <font color="#306754">TalkQu 22:50, 14 December 2012 (UTC)