Extension talk:BackLinksFunctions

From mediawiki.org
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

When I try to use this extension on my computer, there is an warning like this:

Warning: array_slice() [function.array-slice]: The first argument should be an array in C:\mediawiki\languages\Language.php on line 1083

Is this a bug, or something else?

Environment:

  • Windows XP With SP2
  • Apache 2.2.3
  • MediaWiki 1.8.2
  • MySql 5.0.27
  • PHP 5.2.0

— Preceding unsigned comment added by Coeus (talk • contribs) 22:01, January 6, 2007

That problem is solved with the new source. — Preceding unsigned comment added by 81.246.7.222 (talk • contribs) 09:02, July 11, 2007

Not working[edit]

I may be being stupid but I cannot get this extension to function - I added the required line to LocalSettings and made the folder/copied the text, set the permissions etc. But the referring info never appears - it doesnt seem to get parsed - it just leaves it as I typeed it in "edit".? — Preceding unsigned comment added by 86.156.195.57 (talk • contribs) 03:14, August 8, 2007

Article list[edit]

Is it possible to get a list of the articles too instead of just counts? Dynamic Page List can include redirected pages in lists but doesn't include the redirected page links, like Special:Whatlinkshere does. Also, integrating backlink counters into Special:Whatlinkshere would be nice. -Eep² 07:41, 10 August 2007 (UTC)Reply

parser was not processing these functions until I removed the pound signs[edit]

As it is written, this extension did not function properly for me. This was easily remedied, though, by removing the pound signs from lines 50-69, for this instead:

    $wgParser->setFunctionHook ( 'linking',    array( &$wgExtBackLinksFunctions, 'linking'   ));
    $wgParser->setFunctionHook ( 'including',  array( &$wgExtBackLinksFunctions, 'including' ));
    $wgParser->setFunctionHook ( 'refering',   array( &$wgExtBackLinksFunctions, 'refering'  ));
 
    $wgParser->setFunctionHook ( 'iflinksto',    array( &$wgExtBackLinksFunctions, 'iflinksto'   ));
    $wgParser->setFunctionHook ( 'ifincludes',   array( &$wgExtBackLinksFunctions, 'ifincludes'  ));
    $wgParser->setFunctionHook ( 'ifbelongsto',  array( &$wgExtBackLinksFunctions, 'ifbelongsto' ));
    $wgParser->setFunctionHook ( 'ifrefersto',   array( &$wgExtBackLinksFunctions, 'ifrefersto'  ));
}
 
function wfBackLinksFunctionsGetMagic( &$magicWords, $langCode ) {
    switch ( $langCode ) {
    default:
            $magicWords['linking']     = array( 0, 'linking' );
            $magicWords['including']   = array( 0, 'including' );
            $magicWords['refering']    = array( 0, 'refering' );
            $magicWords['iflinksto']   = array( 0, 'iflinksto' );
            $magicWords['ifincludes']  = array( 0, 'ifincludes' );
            $magicWords['ifbelongsto'] = array( 0, 'ifbelongsto' );
            $magicWords['ifrefersto']  = array( 0, 'ifrefersto' );

I consider myself a novice and don't want to insist on this for others, but it solved my issue and wanted to leave a response in case anyone else runs into it.

Edit: Apparently the code tag doesn't work for me either. Cyllibi (talk) 02:54, 11 June 2012 (UTC)Reply