WantedTemplatesPage Class Reference
[SpecialPage]

A querypage to list the most wanted templates - implements Special:Wantedtemplates based on SpecialWantedcategories.php by Ævar Arnfjörð Bjarmason <avarab@gmail.com> makeWlhLink() taken from SpecialMostlinkedtemplates by Rob Church <robchur@gmail.com>. More...

Inherits QueryPage.

List of all members.

Public Member Functions

 getName ()
 Subclasses return their name here.
 isExpensive ()
 Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
 isSyndicated ()
 Sometime we dont want to build rss / atom feeds.
 getSQL ()
 Subclasses return an SQL query here.
 sortDescending ()
 Override to sort by increasing values.
 preprocessResults ($db, $res)
 Fetch user page links and cache their existence.
 formatResult ($skin, $result)
 Formats the results of the query for display.

Private Member Functions

 makeWlhLink ($title, $skin, $result)
 Make a "what links here" link for a given title.


Detailed Description

A querypage to list the most wanted templates - implements Special:Wantedtemplates based on SpecialWantedcategories.php by Ævar Arnfjörð Bjarmason <avarab@gmail.com> makeWlhLink() taken from SpecialMostlinkedtemplates by Rob Church <robchur@gmail.com>.

Author:
Danny B. Copyright © 2008, Danny B. http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later

Definition at line 18 of file SpecialWantedtemplates.php.


Member Function Documentation

WantedTemplatesPage::formatResult ( skin,
result 
)

Formats the results of the query for display.

The skin is the current skin; you can use it for making links. The result is a single row of result data. You should be able to grab SQL results off of it. If the function return "false", the line output will be skipped.

Reimplemented from QueryPage.

Definition at line 66 of file SpecialWantedtemplates.php.

References $result, $text, $wgContLang, $wgLang, QueryPage::isCached(), Title::makeTitle(), makeWlhLink(), and wfSpecialList().

WantedTemplatesPage::getName (  ) 

Subclasses return their name here.

Make sure the name is also specified in SpecialPage.php and in Language.php as a language message param.

Reimplemented from QueryPage.

Definition at line 20 of file SpecialWantedtemplates.php.

Referenced by getSQL().

WantedTemplatesPage::getSQL (  ) 

Subclasses return an SQL query here.

Note that the query itself should return the following four columns: 'type' (your special page's name), 'namespace', 'title', and 'value' *in that order*. 'value' is used for sorting.

These may be stored in the querycache table for expensive queries, and that cached data will be returned sometimes, so the presence of extra fields can't be relied upon. The cached 'value' column will be an integer; non-numeric values are useful only for sorting the initial query.

Don't include an ORDER or LIMIT clause, this will be added.

Reimplemented from QueryPage.

Definition at line 32 of file SpecialWantedtemplates.php.

References $dbr, $name, $page, getName(), and wfGetDB().

WantedTemplatesPage::isExpensive (  ) 

Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.

$wgDisableQueryPages causes all query pages to be declared expensive. Some query pages are always expensive.

Reimplemented from QueryPage.

Definition at line 24 of file SpecialWantedtemplates.php.

WantedTemplatesPage::isSyndicated (  ) 

Sometime we dont want to build rss / atom feeds.

Reimplemented from QueryPage.

Definition at line 28 of file SpecialWantedtemplates.php.

WantedTemplatesPage::makeWlhLink ( title,
skin,
result 
) [private]

Make a "what links here" link for a given title.

Parameters:
Title $title Title to make the link for
Skin $skin Skin to use
object $result Result row
Returns:
string

Definition at line 90 of file SpecialWantedtemplates.php.

References $result, $title, $wgLang, SpecialPage::getTitleFor(), and wfMsgExt().

Referenced by formatResult().

WantedTemplatesPage::preprocessResults ( db,
res 
)

Fetch user page links and cache their existence.

Reimplemented from QueryPage.

Definition at line 54 of file SpecialWantedtemplates.php.

References $batch, $db, $res, and $row.

WantedTemplatesPage::sortDescending (  ) 

Override to sort by increasing values.

Reimplemented from QueryPage.

Definition at line 49 of file SpecialWantedtemplates.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:50 2009 for MediaWiki by  doxygen 1.5.9