https://bugzilla.wikimedia.org/show_bug.cgi?id=50414

--- Comment #1 from RolandUnger <[email protected]> ---
Unfortunately I have no experience with the API and how to work with the Git
repository so I will give at least two ideas:

(1) The API function should be similar to prop=langlinks (ll)

(2) From the public function onSkinTemplateToolboxEnd( &$skinTpl ) (at the end
of RelatedSites.class.php) you can learn how to access to the stored values:

$relatedSites = $this->getCustomData()->getSkinData( $skinTpl, 'RelatedSites'
);

if ( count( $relatedSites ) == 0 ) {
    return true;
}

$relatedSitesUrls = $this->getRelatedSitesUrls( $relatedSites );

foreach ( (array) $relatedSitesUrls as $url ) {
    $href = htmlspecialchars( $url['href'] );
    $text = $url['text'];
    ...
}

Now you can check for Wikipedia and Commons. $url['text'] should contain
"Wikipedia", "Wikimedia Commons" and others.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to