Extension talk:Contributors
Add topicIt will not work ok when the MW version is 1.8.4
[edit]i have already fix this problems!I am --Wanglong 08:23, 26 September 2007 (UTC)
if I add the Special:Contributors/CPU, the extension works ok,
but when I type the url:
http://localhost/allwiki/index.php/Special:Contributors
the system tell me:
Fatal error: Call to undefined method IncludableSpecialPage::gettitlefor() in E:\wamp\www\allwiki\extensions\Contributors\Contributors.page.php on line 206
because MW1.8.4 don`t have the method gettitlefor() under SpecialPage.php, so i copy the method from the vesion of 1.10.0 to current version of my Mediawki 1.8.4 to the class SpecialPage:
static function getTitleFor( $name, $subpage = false ) { $name = self::getLocalNameFor( $name, $subpage ); if ( $name ) { return Title::makeTitle( NS_SPECIAL, $name ); } else { throw new MWException( "Invalid special page name \"$name\"" ); } } /** * Get the local name for a specified canonical name */ static function getLocalNameFor( $name, $subpage = false ) { global $wgContLang; // $aliases = $wgContLang->getSpecialPageAliases();// i get off this by pea if ( isset( $aliases[$name][0] ) ) { $name = $aliases[$name][0]; } if ( $subpage !== false && !is_null( $subpage ) ) { $name = "$name/$subpage"; } return $name; }
and then the extension can work!i am so happy! hehe !--Wanglong 08:23, 26 September 2007 (UTC)
Cite and Contributors extension
[edit]Hi. I am getting html validity warning when using both Cite and Contributors extensions.
Warning: <li> anchor "t-cite" already defined
<li id="t-cite"> <a href="/parrot-lgp/w/index.php?title=Special:Cite&page=Parrot-lgp&id=52">Cituj tento článek</a> </li> <li id="t-cite"> <a href="/parrot-lgp/w/index.php?title=Special:Contributors&target=Parrot-lgp">Main contributors</a> </li>
--147.229.5.124 06:52, 30 May 2007 (UTC)
- Fixed, thanks. robchurch | talk 18:19, 1 June 2007 (UTC)
Embedding
[edit]When I did a test page for embedding in a page, it was one row and pretty much looks awful. :( --PurplePopple 14:59, 27 September 2007 (UTC)
Problem with custom namespaces
[edit]I've set up the contributors extension on my site and it works fine. This is a very useful extension.
However, I've got a problem with custom namespaces. Almost all articles on my wiki appear in custom namespaces and I would like to use the "main contributor" link in the toolbox to see the main contributors for these articles.
The problem is that the "main contributors" link appears in the toolbox on articles in the (Main) namespace, but not in the toolboxes in the custom namespaces.
I'm using MW version 1.9.1 with the monobook template.
I tried to set up a link to the special page using MediaWiki:sidebar, but I couldn't get this to work.
For some reason, the contributor extension is placing the "main contributors" link in the tool box only in the (Main) namespace.
Can anyone help me solve this problem?
Thanks..
--C4duser 23:50, 26 October 2007 (UTC)
How to add Contributors list on each article page?
[edit]I have installed this extension on my media wiki installation. It is working fine enough.
Is there anyway to tweak it so that it will shown on each article?
some tweaks to this extension
[edit]I've posted a version of this extension with some customizations (each name links to user homepage, option to show real name, more flexible layout): http://htyp.org/Contributors_extension
I have no idea what the process is for properly integrating these changes with the official release (assuming they're an improvement), so I'll leave it for someone else to do or else point me at a how-to... Thanks.
--Woozle 12:29, 14 November 2007 (UTC)
Doesn't work out of the box with PostgreSQL
[edit]Postgres will (correctly) complain that you neeed to group by rev_user as well as rev_user_text for the query to really make sense. To fix find the line that looks like:
'GROUP BY' => 'rev_user_text',
and change it to:
'GROUP BY' => 'rev_user_text, rev_user',
Mediawiki 1.15 and Contributors
[edit]Ok, so after some playing and tinkering, pushing and pulling, I finally got contributors working for my installation. For some reason it chokes on Line 50 of Contributors.page.php (Undefined call...)
Finally, after some thinking, I got it working by using the REL_1_14 branch. Here's my pertinent excerpts from Special:Version:
MediaWiki 1.15.1 PHP 5.2.4-2ubuntu5.6 (apache2handler) MySQL 5.0.51a-3ubuntu5.4 Installed extensions Special pages Collection (Version 1.2) Create books PediaPress GmbH and Siebrand Mazeland Contributors (Version 1.0.1beta) Summarises the main contributors to a page Rob Church Flagged Revisions Gives editors and reviewers the ability to validate revisions and stabilize pages Aaron Schulz and Joerg Baach Parser hooks Cite Adds <ref[ name=id]> and <references/> tags, for citations Ævar Arnfjörð Bjarmason DynamicPageList (Version 1.8.6) A highly flexible report generator for MediaWikis - manual and examples: see [1] Gero Scholz ParserFunctions (Version 1.2.0) Enhance parser with logical functions Juraj Simlovic, Robert Rohde, Ross McClure and Tim Starling Extension functions efContributors, efLoadFlaggedRevs, wfSetupParserFunctions and (ExtDynamicPageList, setupDPL) Parser extension tags <dpl>, <dynamicpagelist>, <pre>, <ref>, <references> and <section> Parser function hooks anchorencode, basepagename, basepagenamee, defaultsort, displaytitle, dpl, dplchapter, dplmatrix, expr, filepath, formatdate, formatnum, fullpagename, fullpagenamee, fullurl, fullurle, gender, grammar, if, ifeq, iferror, ifexist, ifexpr, int, language, lc, lcfirst, localurl, localurle, namespace, namespacee, ns, numberingroup, numberofactiveusers, numberofadmins, numberofarticles, numberofedits, numberoffiles, numberofpages, numberofusers, numberofviews, padleft, padright, pagename, pagenamee, pagesincategory, pagesinnamespace, pagesize, plural, protectionlevel, rel2abs, special, subjectpagename, subjectpagenamee, subjectspace, subjectspacee, subpagename, subpagenamee, switch, tag, talkpagename, talkpagenamee, talkspace, talkspacee, time, timel, titleparts, uc, ucfirst and urlencode
So, I got it working finally, and I hope it helps out anyone else running into the same issue. 121.8.153.6 03:10, 6 August 2010 (UTC)
Call to a member function listToText() on a non-object
[edit]when i use the Special:Contributors/Sandbox , the page turns out these warnings "Fatal error: Call to a member function listToText() on a non-object in D:\Program Files\wamp\www\mediawiki\extensions\Contributors\Contributors.page.php on line 52"
i changed the codes "global $wgContLang" into "global $wgContLang" and "$output =$wgContentLang->listToText( $names) ; " into " $output =$wgContLang->listToText( $names) ; "
then solved the problem.
121.8.153.6 03:10, 6 August 2010 (UTC)
- it solved the problem for me too in v.1.16. 75.81.147.30
- Yeah, just replace the 3 occurrences of $wgContentLang with $wgContLang and it will work - also in MW 1.19. --Stefahn (talk) 22:44, 22 March 2013 (UTC)
- This is still not fixed in version 1.1.0. Yaron, can you maybe fix this in the source code? Stefahn (talk) 18:41, 19 July 2014 (UTC)
Contributors vs ContributionCredits
[edit]Can anyone explain the difference between these two extensions?
We are trying to something very simple (like the first line on this page: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/vtkDistanceWidget )
that simply shows (without users having to go specifically looking for the information) which people have been involved with the creation and maintenance of the page.
Thanks,
David
Unique edits
[edit]Suppose I edit a wiki article in the following way:
Select a paragraph of text. Copy text to clipboard. Delete paragraph. Save article. Edit article again and paste the previously-copied text back into the exact same place it was before. No other changes are made. Save article.
Would I be listed as a contributor?
Not working in mediawiki version 1.16
[edit]I have just installed the Contributors extension and edited my LocalSettings.php file as required. I can view the special page Special:Contributors with no problem and it is functioning well. However, the "main contributors" link in the toolbox is not appearing.
Also, when I add {{Special:Contributors/Article}} or {{Special:Contributors/{{FULLPAGENAME}}}} to a page I get this error:
Fatal error: Call to a member function listToText() on a non-object in /home/physiocom/public_html/extensions/Contributors/Contributors.page.php on line 50
Would appreciate some help! --86.157.33.118 12:39, 10 May 2011 (UTC)
- YES, me either, pls. Thx! Boris 09:11, 8 June 2011 (UTC)
- Same here! (ver 1.16.5) Jonathan3 21:57, 4 September 2011 (UTC)
- Same here on MediaWiki v. 1.17.0
- Please read point 9 : Call to a member function listToText() on a non-object :-) Works then fine on 1.18.0 --Jhf2442 13:40, 2 January 2012 (UTC)
There is a bug in Contributors.page.php. The global variable $wgContentLang should be changed to $wgContLang.
Download and Git links broken
[edit]As of July 2012, all the download-related (download snapshot, git repository, ...) are broken. I guess the extension is no longer maintained (?).
MW 1.19.2: Issue with cite extension (references)
[edit]After replacing the 3 occurrences of $wgContentLang with $wgContLang in Contributors.page.php I got the extension running.
However there is one issue: the <references />
tag of the Cite extension doesn't produce output if you use {{Special:Contributors/{{FULLPAGENAME}}}}
on the same page.
Any idea what's wrong? Thanks for your help! Stefahn (talk) 15:32, 28 March 2013 (UTC)
- Debugged the code myself and found a solution: Comment out line #22 ($this->setHeaders();) in Contributors.page.php, like so:
global $wgOut, $wgRequest; //$this->setHeaders(); $this->determineTarget( $wgRequest, $target );
- I don't know what it does, but the extension still seems to work fine without that line... Stefahn (talk) 16:10, 28 March 2013 (UTC)
How to make a list of names with links?
[edit]Hello! Need some help.
Extension is very useful and works well. It would be great if the list of names would be links to pages of authors(User:UserName).
Everything that is displayed on a special page(Special:Contributors) be great to displayed on the page of the article.
How it can be added to the template? It should look like this:
— Preceding unsigned comment added by Piroru90 (talk • contribs) 10:20, 29 October 2014
- The extension doesn't currently support that, though it probably should. In the meantime, if you'd like, try the following patch. In the latest version of
Contributors.hooks.php
in functioncontributorsParserFunction
, line 52, change it from:
return $contributors->getSimpleList( $parser->getFunctionLang() );
- to:
return array( $contributors->getNormalList( $parser->getFunctionLang() ), 'noparse' => true, 'isHTML' => true );
- Note that this will patch will only help when using the
#contributors
parser function, not when using special page inclusion. - --Ike @ WikiWorks 19:39, 29 October 2014 (UTC)
Thank u much!
A List of Names outputted as comma separated
[edit]Hi
Thanks for the great extension. I'm looking to change the code from printing out: Joe, Frank and Mike to where the output is just a comma delimited list: Joe, Frank, Mike. That way one could feed the results to an arraymap, or arraytemplate, to have a better display. Thanks Christharp (talk) 22:10, 16 December 2014 (UTC)
- Perhaps the extension should support that. A format parameter for the parser function might be nice, at some point. I guess you could strip out the "and" using StringFunctions, which is somewhat unreliable, especially in non-English languages. This modification should work:
- In the latest version of
Contributors.class.php
in functiongetSimpleList
, change it from:
return $language->listToText( $this->getContributorsNames() );
- to:
return $language->semicolonList( $this->getContributorsNames() );
- I changed this to a semicolon list because those are not commonly found in user names. You can do a comma list by calling function
commalist
instead. --Ike @ WikiWorks 22:43, 16 December 2014 (UTC)
- Thanks. Between this and the NamespaceHTML extension you're starting to be my new favorite extension writer (Lol) (Yaron Koren and Cindy Cicalese being my other favorites). Anyways, thank you and whatever holiday you celebrate, or don't celebrate, have a good one and a happy new years.Christharp (talk) 23:40, 18 December 2014 (UTC)
Extension Contributors is not deployed in en-wiki
[edit]Hello,
I am a GSoC aspirant and I am planning to work on a project named List Of contributors which aims at listing the contributors to a particular page. But I came across a similar extension Contributors which has already been developed. But the extension Contributors doesn't seem to be deployed in the en-wiki. It would be great if someone can point out the reason.
Thanks!Devikrishnan (talk) 13:23, 18 March 2016 (UTC)
- Many extensions aren't deployed on Wikimedia wikis. Usually it comes down to either not enough people want it, or nobody has asked or there are quality problems with the extension. Bawolff (talk) 01:38, 22 November 2017 (UTC)
Not compatible with MediaWiki 1.27
[edit]See Topic:T6thcdtfz8k4f1mw --Ciencia Al Poder (talk) 02:55, 1 July 2016 (UTC)
- This is fixed now. Bawolff (talk) 01:38, 22 November 2017 (UTC)
Error when referring to this page
[edit]I have the extension mostly working on MW 1.27, but this construction {{Special:Contributors/{{FULLPAGENAME}}}} crashes the page
with these 2 errors:
Original exception: [a3bf0f7608a59bc1ebb43392] [no req] MWException from line 141 of WIKI/includes/FormOptions.php: Invalid option target Backtrace:
#0 WIKI/includes/FormOptions.php(176): FormOptions->validateName(string, boolean) #1 WIKI/includes/FormOptions.php(391): FormOptions->getValue(string) #2 WIKI/extensions/Contributors/Contributors.page.php(35): FormOptions->offsetGet(string) #3 WIKI/includes/specialpage/SpecialPage.php(479): SpecialContributors->execute(string)
...
Exception caught inside exception handler: [a3bf0f7608a59bc1ebb43392] [no req] MWException from line 166 of WIKI/includes/FauxRequest.php: Request URL not set
Same thing if I use {{Special:Contributors/Article}} on the 'Article' page.
- I cannot reproduce this. Bawolff (talk) 01:38, 22 November 2017 (UTC)
Breaks pages with ampersands
[edit]On MW 1.27, when trying to link to a page with an ampersand in the title, e.g. [[You&Me]], this extension causes the page to fail with the error: Fatal error: Call to a member function getLocalURL() on a non-object in WIKI/includes/skins/Skin.php on line 1051
It appears to be caused when creating the 'special' page for the 'tools' box. I added logging which shows Skin::makeSpecialUrl name=Preferences Skin::makeSpecialUrl name=Watchlist Skin::makeSpecialUrl name=Userlogout LoadBalancer::reuseConnection: this connection was not opened as a foreign connection Skin::makeSpecialUrl name=Upload Skin::makeSpecialUrl name=Specialpages Skin::makeSpecialUrl name=Contributors/IM%26P_External_Database_Setup
The error goes away when I edit the function 'navigation' in Contributors.hooks.php, and just return false.
public static function navigation( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
+ return false;
— Preceding unsigned comment added by Berbo (talk • contribs)
- It would be more useful if you want it fixed to fill a task in phabricator about such bugs --Ciencia Al Poder (talk) 03:18, 4 November 2016 (UTC)
- This is fixed now. Bawolff (talk) 01:38, 22 November 2017 (UTC)
Master branch seems broken.
[edit](Ping: @Devikrishnan and Tosfos: ) The master branch of this extension seems totally broken to me. Unless someone objects, I'm going to revert back to a working version (probably REL1_27). Bawolff (talk) 01:54, 22 November 2017 (UTC)
- Sorry about the delay in responding. Is this still relevant? --Ike @ WikiWorks 21:40, 7 December 2017 (UTC)
Was not working under MediaWiki 1.31.1
[edit]The problem was that function getContributorsData() was never called and variable contributors was empty. A simple fix to change line 186 of file Contributors.php to
return array_keys( $this->getContributorsData() );
instead of
return array_keys( $this->getContributors() );
REAL USER NAME
[edit]Could someone please help me by indicating how I get the real name of the user? I have installed this extension but it only prints the username. Example: Username: Clituma Real Name: Carolina Lituma
maintenance/PopulateContributorsTable.php is broken in MW 1.35
[edit]The maintenance script crashes because it still uses the removed rev_user and rev_user_text fields to import from the revision table.
Add page title in database
[edit]Hi I am trying to add page title in database alongwith its other table like:
'cn_page_id' => $pageId, 'cn_user_id' => $userId, 'cn_user_text' => $text, 'cn_revision_count' => 1, 'cn_first_edit' => $timestamp
i wan to insert page title in database as well like
'cn_page_title' => $pagetitle
How and where to include code correctly?
My mail address fkhalid42@gmail.com
Transclusion and parser function always produce an empty list of contributors
[edit]It seems like both transclusion of the special page and use of the parser function are generated from Contributors::getSimpleList(). However, this seems to always return an empty list because it appears that the contributor data is never actually loaded from the database. Adding the following line to the bottom of Contributors::__construct() fixes the problem:
$this->setContributors( $this->getContributorsData() );
Additionally, it doesn't appear that any code in the extension ever calls Contributors::getContributorsData(). The normal view of the special page continues to work fine since it seems to use a totally independent loading mechanism via MediaWiki's TablePager. Perhaps a call to getContributorsData() was removed during construction since that would hit the database twice when generating the Table?
Error when upgrading the Contributors Extension
[edit]When launching the upgrade script (php extensions/Contributors/maintenance/PopulateContributorsTable.php
, I get :
Error: Class 'Revision' not found
In the script, this is the line causing the error :
$dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'
➡ How to correct this script please??
The author suggested I create a bug. I did here: https://phabricator.wikimedia.org/T306900