Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User talk:Catrope: Difference between revisions

Discussion page of User:Catrope
Serenity (talk | contribs)
Catrope (talk | contribs)
→‎S/he: reply
Line 109: Line 109:


I'm using she and he because using the name all the time is mind-numbingly repetitive. I see that you try to use the name at the start of every paragraph and then switch to pronouns. The problem is that the paragraphs for these characters are usually so short that every or every second sentence starts with the name. That just doesn't really read well ([[Tattooed pilot]] was a really bad case of repetition once). And there generally isn't an confusion about who is meant with it. ---[[User:Serenity|Serenity]] 15:22, 8 November 2007 (CST)
I'm using she and he because using the name all the time is mind-numbingly repetitive. I see that you try to use the name at the start of every paragraph and then switch to pronouns. The problem is that the paragraphs for these characters are usually so short that every or every second sentence starts with the name. That just doesn't really read well ([[Tattooed pilot]] was a really bad case of repetition once). And there generally isn't an confusion about who is meant with it. ---[[User:Serenity|Serenity]] 15:22, 8 November 2007 (CST)
:It's considered good style not to say "(s)he" too often, but to reuse the name every three or four occurrences. Lots of "(s)he"'s are also boring. --[[User:Catrope|Catrope]]<sup>([[User talk:Catrope|Talk to me]] or [[Special:Emailuser/Catrope|e-mail me]])</sup> 15:24, 8 November 2007 (CST)

Revision as of 21:24, 8 November 2007


I speak English (near-native), Dutch (native) and German (limited)
Feel free to ask your question in either of these three languages


creating and modifying templates

i've been looking around on the internet for pointers on creating my own templates and working with other more interesting wiki features, but i'm not having much luck. is there a site you can point me to? the feature i was trying to add on my userinfo was school. thanks! Caw 17:14, 15 September 2007 (CDT)

Here is a pretty extensive guide on templates. For more complex templates ParserFunctions are useful, although you probably won't have to use them at first. If you want to add stuff to the box templates, you might also want to read about tables, which we use to format the boxes. Good luck! ---Catrope(Talk to me or e-mail me) 09:33, 17 September 2007 (CDT)

dumpBackup.php

I figure you might know the answer to this, so I'll ask you before I make a query on the mediawiki mailing list. Is there a way to specify what kinds of pages can be dumped using dumpBackup.php? For instance, I want to make a dump of pages in the article, portal, sources, category, template, and Battlestar Wiki namespaces, but not anything pertaining to the user or any talk namespaces. Is there an option I need to pass in the command line to do that? Or another program? Thanks! -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 11:55, 23 September 2007 (CDT)

How about using MWDumper instead? BTW, why would you want an XML dump of content-only stuff? --Catrope(Talk to me or e-mail me) 12:05, 23 September 2007 (CDT)
Cool. Thanks again! :-) As for why, I'm building a mirror in the event the main server should ever go down. (I don't expect it to, but you never know.) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:07, 23 September 2007 (CDT)
It can be done with dumpBackup.php also:
php dumpBackup.php --filter=namespace:NS_MAIN,NS_CATEGORY,NS_TEMPLATE,NS_PROJECT,100,102
Where 100 and 102 are the numbers associated with the Portal and Sources namespaces (see also here). BTW, wouldn't it be wise to include Quotes (104) and Podcast (106) too? --Catrope(Talk to me or e-mail me) 12:14, 23 September 2007 (CDT)
Yeah, I'll add those namespaces too. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:17, 23 September 2007 (CDT)
Well, by just restricting it to the most valuable content, it cut the xml filesize down by half. ;-) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:26, 23 September 2007 (CDT)
I see. For serious backups, you want to backup the entire DB though, so as to also backup users and their preferences, not to mention the quite huge {page,template,image,category,external,lang}links, redirect, *cache and math tables. You could exclude them to cut down on backup size, as they can be rebuilt from the pages' content. That would take quite some time, though, considering the amount of pages we have here. During the rebuild, categories, Special:Whatlinkshere and redirects won't work very well. Also, the wiki might be somewhat slower since its internal caches are gone. --Catrope(Talk to me or e-mail me) 12:39, 23 September 2007 (CDT)
Well, the entire database is backed up on a weekly basis. ;-) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:41, 23 September 2007 (CDT)
That's a comforting thought. Like I said, some tables can be rebuilt on the fly (you might wanna try excluding them to see if it makes a difference in the backups, I think that it'll at least speed up recovery, less stuff for mysqlbackup to import), but rebuilding will take significant time, although there's not much denial of service involved: the wiki will be somewhat slower, and some features aren't used very often anyway will not work fully. --Catrope(Talk to me or e-mail me) 12:45, 23 September 2007 (CDT)
BTW, if you want to get a general idea of how all those tables work together, see this picture. --Catrope(Talk to me or e-mail me) 12:46, 23 September 2007 (CDT)

New extension idea

For The Great Machine wiki, I've created a template that allows for the creation of shortened inline episode citations. The idea is when the user hovers their cursor over it, the episode number (i.e. S1E01) will reveal the full episode title (i.e. Midnight on the Firing Line). A mouseout event returns the text to its shorter state. This is all done by javascript; the js function that does the text changing is:

function changeTextById(elementId,changeVal){
   var hasInnerText =
   (document.getElementsByTagName("body")[0].innerText != undefined) ? true : false;
   var elem = document.getElementById(elementId);
   if(!hasInnerText){
       elem.textContent = changeVal;
   }else{
       elem.innerText = changeVal;
   }
}

That code is located in the Common.js file so that it works site-wide.

Of course, for it to work, I've had to enable wgRawHTML since that enables the javascript events written in the divs, which is something I really didn't like to do.

And the only way I can get it to work is to create sub templates that template substitute from the cite template.

What I'd like to do is turn it into an extension so that when the user calls <cite id="Midnight on the Firing Line">S1E01</cite>, they'll be able to do the same thing, without the use of templates. Is there a way you can whip up something quickly? If not, no worries.-- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 18:16, 1 October 2007 (CDT)

I think we need to update the "ref" extension. Shane (T - C - E) 02:02, 2 October 2007 (CDT)
I think it would be a good idea to do <redircite>S1E01</redircite>, where S1E01 redirects to Midnight on the Firing Line. Implementing this as a fork of Cite.php (which does the <ref> tags) doesn't seem like a good idea to me, as Cite.php is really intended to do the reference section thing.
Another important issue, though: it currently doesn't work, at least not for me. When I mouseover the example on tgm:Template:Cite, the text doesn't change back and forth between "S1E01" and "Midnight on the Firing Line" as expected, but simply remains static. --Catrope(Talk to me or e-mail me) 09:10, 2 October 2007 (CDT)
Ok, I fixed that. ;) Do a hard refresh and it should work. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 11:32, 2 October 2007 (CDT)
Yeah, it works now, except that I can't middle-click it. This could be fixed by using an <a> element rather than a <span>. I'll start working on the extension tomorrow. --Catrope(Talk to me or e-mail me) 13:12, 2 October 2007 (CDT)
Yeah, middle click won't work because it uses a javascript on click event. Hopefully, in writing the extension you would be able to get rid of that... :) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 13:27, 2 October 2007 (CDT)
If you work on Cite.php, this one features would be good... <ref name="hello" section="greetings">Hi.</ref> and <references area="greetings" />. "Another" <ref name="hello"/> would still put it in the "greetings" while if you had <ref name="hello2">Test</ref> would show up just in <references/>. Shane (T - C - E) 13:21, 2 October 2007 (CDT) :)
You can file an enhancement request at MediaZilla. --Catrope(Talk to me or e-mail me) 13:27, 2 October 2007 (CDT)

I'm done writing the extension. I still have to draw up a README and do all the other paperwork, but you can already test it (at the hb: for instance) by copypasting this PHP code to extensions/redircite/redircite.php (relative to your MediaWiki root directory) and adding require_once('$IP/extensions/redircite/redircite.php'); to the bottom of your LocalSettings.php --Catrope(Talk to me or e-mail me) 10:21, 3 October 2007 (CDT)

Eureka! It works! :) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:43, 3 October 2007 (CDT)
The extension is now on line here. --Catrope(Talk to me or e-mail me) 15:46, 4 October 2007 (CDT)

Thankyou

Thanks for cancelling the block. I wont "vandalise" the site again (hopefully) and thankyou for properly explaining it to Shane...

) (Pooh the hat 17
54, 9 October 2007 (CDT))
No problem. Shane mixed up the chronology (which can happen if you don't visit Battlestar Wiki as obsessively as some of us do) and blocked you by mistake. It would be unfair to block you from editing forever because of a human error on our part. --Catrope(Talk to me or e-mail me) 07:47, 10 October 2007 (CDT)
Oh wait, you did vandalize the wiki again, and now you have been blocked. You won't be able to edit the wiki for 3 months, and if you pull any stunts after, we'll gladly extend that to the end of time. --Catrope(Talk to me or e-mail me) 08:01, 10 October 2007 (CDT)

The page: Tigh me up Tigh me down

When it describes what happens at the dinner between Roslin, Ellen Tigh, Tigh, Adama, and Lee Adama, what does it mean by Ellen tried to play footsies wwith Lee Adama under the table? What is footsies? How was she playing footsies with him? Please reply... —The preceding unsigned comment was added by Pooh the hat (talk • contribs).

Here ya go. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 18:03, 9 October 2007 (CDT)

EditOwn extension

I noticed your EditOwn extension and was wondering if there was a way to modify it so that it can perform the following functions:

  • A user creates a page in the article—or any other—namespace, but doesn't want anyone else to edit it.
  • Sysops must be immune, which shouldn't be a problem, but it goes without saying.
  • Of course, not all pages on the wiki would have this restriction, and thus there would have to be some way to select whether an article has this type of owner-edit-only protection.

Reason I ask is because I'm building the BattlestarPegasus.com website using MW as a backend and one of the key things I wanted to do is have content creators, like fanfic writers, be able to post something up there without worrying about getting rewritten or vandalized. Thus I wanted to see if such a thing was possible. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 02:09, 29 October 2007 (CDT)

Hmm. I think you may not even need an EditOwn-like extension for that. You could create a group called 'authors' that can create pages whereas regular users cannot. You can also make it possible to protect a page so that only authors can edit it. The necessary lines in LocalSettings.php are the following:
$wgGroupPermissions['*']['createpage'] = false; // You probably have this one already
$wgGroupPermissions['user']['createpage'] = false; // Regular users can't create new pages
$wgGroupPermissions['user']['createtalk'] = true; // But they can create talk pages
$wgGroupPermissions['authors']['createpage'] = true; // People in our brand new authors group can create pages

$wgRestrictionLevels[] = 'authors'; // Make it possible to protect articles authors-only
By default, you'll see Require "authors" permission show up in the protection form. You can change this to something more descriptive by editing MediaWiki:protect-level-authors. You can add users to the authors group through the Special:Userrights interface (with which you're probably familiar already). --Catrope(Talk to me or e-mail me) 11:30, 29 October 2007 (CDT)
Well, I want it so that an author can only edit their own pages. So let's say that there are two fan fiction authors who contribute to BSP.com... they can submit their content, but can't edit the other's work. Is there something that can be whipped up for that? -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 12:59, 29 October 2007 (CDT)
Ah, that's more complicated. How about this extension? Then you could create these pages as User:Alice/Fanfic Article 1 and transclude it (i.e. {{User:Alice/Fanfic article 1}}) on Fanfic article 1, which would be protected. --Catrope(Talk to me or e-mail me) 13:27, 29 October 2007 (CDT)
Yes, that seems to be the best bet for now. Thanks! :) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 13:29, 29 October 2007 (CDT)

S/he

I'm using she and he because using the name all the time is mind-numbingly repetitive. I see that you try to use the name at the start of every paragraph and then switch to pronouns. The problem is that the paragraphs for these characters are usually so short that every or every second sentence starts with the name. That just doesn't really read well (Tattooed pilot was a really bad case of repetition once). And there generally isn't an confusion about who is meant with it. ---Serenity 15:22, 8 November 2007 (CST)

It's considered good style not to say "(s)he" too often, but to reuse the name every three or four occurrences. Lots of "(s)he"'s are also boring. --Catrope(Talk to me or e-mail me) 15:24, 8 November 2007 (CST)