Citizendium Forums
November 24, 2009, 11:27:35 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: POSTING RULES FOR MAIN CZ BOARDS: (1) The CZ Forums are Citizens-only (a "Citizen" is a Citizendium member). Non-Citizens may use only the "Non-member discussion" and "General help" boards, but still must register before posting (it's easy!). Non-Citizen posts elsewhere will be summarily deleted. (2) All must now use their own real names. To edit your displayed name, click on Profile > Account Related Settings. (3) Citizens must now link to their CZ user pages. To edit your signature, click on Profile > Forum Profile Information.
Click here to return to the wiki
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem or Error on Discipline Workgroup Wiki Pages  (Read 4479 times)
Ruth Ifcher
New Arrival
*
Posts: 12


WWW
« on: November 23, 2006, 10:44:34 PM »

The Discipline Workgroups, are described by Larry, as containing, at least:
There are links there to the workgroup's wiki homepage, an article list,
editors list, authors list, and a link to the forum--for each discipline
workgroup.
The Authors List and Editors List Pages have an error.

The Table of Discipline Workgroups:
http://pilot.citizendium.org/wiki/Citizendium_Pilot:Discipline_Workgroups

as well as, the Individual Discipline Workgroup Pages, e.g.Biology Workgroup:
http://pilot.citizendium.org/wiki/Citizendium_Pilot:Biology_Workgroup

On either of these pages, if you navigate to the Authors List:
http://pilot.citizendium.org/wiki/Category:Biology_Authors

You find both:

This page lists all the authors who have joined the Biology Workgroup.
     and
Articles in category "Biology Authors"

The same problem appears in Biology Editors:

Articles in category "Biology Editors"

Assuming we agree these pages need to have "Articles" replaced by "Authors" or "Editors,"
this will have to be fixed. I hope I am not repeating someone else's post.



Logged

Simen Rustad
New Arrival
*
Posts: 17


« Reply #1 on: November 24, 2006, 01:37:24 AM »

Well, I thought the articles should be tagged "Biology Workgroup", and that "Biology Author"/"Biology Editor" was reserved for people?
Logged
Zachary Pruckowski
Technical Liasion/Executive Committee
Administrator
Forum Regular
****
Posts: 933


« Reply #2 on: November 24, 2006, 11:37:55 AM »

That's related to the fact that it's a category.  I don't think there's a way to change that without creating an entirely new specialized namespace (Translation:That's a lot of work).
Logged

Jesse Weinstein
Forum Participant
**
Posts: 42


WWW
« Reply #3 on: November 24, 2006, 01:20:12 PM »

That's related to the fact that it's a category.  I don't think there's a way to change that without creating an entirely new specialized namespace (Translation:That's a lot of work).
Well, it can be changed to say "pages" not "articles" easily enough; change http://pilot.citizendium.org/wiki/MediaWiki:Category_header to match http://en.wikipedia.org/wiki/MediaWiki:Category_header, and that's done.  I think it should be possible to produce a different one based on the category name, using ParserFunctions; let me look into that, and I'll get back to you.
Logged

Zachary Pruckowski
Technical Liasion/Executive Committee
Administrator
Forum Regular
****
Posts: 933


« Reply #4 on: November 24, 2006, 03:39:10 PM »

That's related to the fact that it's a category.  I don't think there's a way to change that without creating an entirely new specialized namespace (Translation:That's a lot of work).
Well, it can be changed to say "pages" not "articles" easily enough; change http://pilot.citizendium.org/wiki/MediaWiki:Category_header to match http://en.wikipedia.org/wiki/MediaWiki:Category_header, and that's done.  I think it should be possible to produce a different one based on the category name, using ParserFunctions; let me look into that, and I'll get back to you.

Sweet.  Thanks for that.  In that case, all we need is to get one of the people with bureaucrat or sysop powers to add the appropriate ParserFunction to it (as the MediaWiki namespace is one of the few things locked on the pilot wiki).

It's pretty useful having a WP administrator around.
Logged

Ruth Ifcher
New Arrival
*
Posts: 12


WWW
« Reply #5 on: November 24, 2006, 10:32:21 PM »

I am a Sysop and a Bureaucrat, but unfortunately, my Virus Scan is re-installing itself for the last 3 hours. I have no idea when this will be over. I do know that all the time I am using the internet is slowing it down. It should be done tomorrow. Then, I can make the changes you are talking about, but you have to give me step by step instructions. Apologies.. All constables are sysops, however. That would be, Sarah Tuttle and Phil Wardle, at least.
Sarah Tuttle :
sarah@astro.columbia.edu
Phil Wardle:
phil_wardle@iprimus.com.au
Logged

Zachary Pruckowski
Technical Liasion/Executive Committee
Administrator
Forum Regular
****
Posts: 933


« Reply #6 on: November 24, 2006, 11:14:48 PM »

If Jesse comes back to us with a parser function, then we can have you do a copy-paste.  Otherwise, you go to http://pilot.citizendium.org/wiki/MediaWiki:Category_header and change wherever you see "articles in category" to "pages in category". 

That isn't the ideal change though.  What Jesse is looking into (and I'm googling around at the moment, but he has a lot more experience) would allow us to have it say "authors" for all Categories with the word "author" in the title, and "editors" for all categories with the word "editor" in the title, and "pages" for everything else.  But I don't see how you can do that with the existing parser functions...
Logged

Jesse Weinstein
Forum Participant
**
Posts: 42


WWW
« Reply #7 on: November 26, 2006, 01:34:37 AM »

I don't think we can do it without installing an extension called StringFunctions (that we probably don't want to bother with); however, if the names of the categories were Category:Authors/Engineering (or Category:Egineering/Authors ) then we could do it; because dividing based on slashes is a built-in part of MediaWiki.

Assuming the categories were of the form Category:Authors/workgroup_name(i.e. Category:Authors/Engineering); copying this code

{{#switch:{{BASEPAGENAME}}
  |Editors
  |Authors={{SUBPAGENAME}} {{BASEPAGENAME}}
  |Pages in category "$1"
}}

into http://pilot.citizendium.org/wiki/MediaWiki:Category_header should do the trick.  The only reason it may not work is if MediaWiki:Category_header is HTML, not wiki-text, in which case MediaWiki hacking will be necessary; it shouldnt be that difficult a MediaWiki hack though; if this doesnt' work, please bug me and I'll see if I can come up with a patch.

There's one other MediaWiki page we need to hack on, to make this all fixed up; if this works, I'll post a patch for that one; it should be about the same.

P.S.  Zach, while I do appreciate (and I'm delighted to help) with MediaWiki tweaking/Wikipedia integration, it's not because I have the sysop bit at Wikipedia that lets me do this - a more accurate statement would be "It's great to have somebody who digs around in the back corners of the Wikipedia namespace for fun helping with Citizendium" ;-) (Sorry, but I have a bugaboo about people misunderstanding the role of admins in Wikipedia; it's why I call myself a janitor, most times).

Logged

Larry Sanger
Administrator
Forum Regular
****
Posts: 1755



WWW
« Reply #8 on: December 10, 2006, 01:36:12 AM »

Assuming the categories were of the form Category:Authors/workgroup_name(i.e. Category:Authors/Engineering); copying this code

{{#switch:{{BASEPAGENAME}}
  |Editors
  |Authors={{SUBPAGENAME}} {{BASEPAGENAME}}
  |Pages in category "$1"
}}

into http://pilot.citizendium.org/wiki/MediaWiki:Category_header should do the trick.  The only reason it may not work is if MediaWiki:Category_header is HTML, not wiki-text, in which case MediaWiki hacking will be necessary; it shouldnt be that difficult a MediaWiki hack though; if this doesnt' work, please bug me and I'll see if I can come up with a patch.

Doesn't work (I tried and reverted).  Please do help with the patch!
Logged

My CZ user page: http://en.citizendium.org/wiki/User:Larry_Sanger
Please link to your CZ user page in your signature, too!
To do that, click on Profile > Forum Profile Information.
Jesse Weinstein
Forum Participant
**
Posts: 42


WWW
« Reply #9 on: December 20, 2006, 01:55:13 AM »

Sorry for the long time it took me to get back to you all.

This patch should work (I have not tested it, I don't (yet) have a testing implementation of MediaWiki at home).

Index: CategoryPage.php
===================================================================
--- CategoryPage.php   (revision 18415)
+++ CategoryPage.php   (working copy)
@@ -247,8 +247,14 @@
 
    function getPagesSection() {
       $ti = htmlspecialchars( $this->title->getText() );
+      $type = wfMsg( 'nstab-main' );
+      if( substr_compare($ti, " Editors",strlen($ti)-8)) {
+        $type = "Editors";
+      } elseif (substr_compare($ti, " Authors",strlen($ti)-8)) {
+        $type="Authors";
+      }
       $r = "<div id=\"mw-pages\">\n";
-      $r .= '<h2>' . wfMsg( 'category_header', $ti ) . "</h2>\n";
+      $r .= '<h2>' . wfMsg( 'category_header', $ti, $type ) . "</h2>\n";
       $r .= wfMsgExt( 'categoryarticlecount', array( 'parse' ), count( $this->articles) );
       $r .= $this->formatList( $this->articles, $this->articles_start_char );
       $r .= "\n</div>";


It also requires a small change to MediaWiki:Category_header; specifically, that page should be set to:

$2 in category "$1"


I'm not entirely sure what exactly we want to say in this part of the category page, and it would probably be better to abstract away the magic strings "Authors" and "Editors" but this is a good (and hopefully working) first draft.  Comments greatly appreciated.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!