Difference between revisions of "Pcwiki"

From ProgClub
Jump to: navigation, search
(Love Calculator - Did You You Know That There Is out there a Love Calculator?)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Most of us want to know if the person we love enjoys us back and we could perform anything to realize. A lot of people have used the love calculator to calculate love to find out exactly how compatible they are or just how their artists are compatible with one another. Occasionally you get really shocked when you calculate your partners name with yours only to locate which you have a zero percent love rating, very discouraging if you ask my routine. In other terms the love calculator says the 2 of you cannot become compatible yet the 2 of you will be so loving towards each and every other. Buddies surrounding you have told you time and again just exactly how compatible you are yet the calculator disagrees.  
+
Pcwiki is the ProgClub wiki software. That's the software that drives the web-site you're looking at. It's a fork of [http://www.mediawiki.org/wiki/MediaWiki MediaWiki] 1.17.0, with a custom skin called OldSkool, and the [http://www.mediawiki.org/wiki/Extension:NoTitle NoTitle] extension. Pcwiki has also been updated to include a link to the [http://validator.w3.org/ W3C HTML validation service] at the bottom of every page, boasting HTML5 support. See the [[Special:Version|MediaWiki version]] page for details about our MediaWiki configuration. For other projects see [[Projects]].
 +
 
 +
== Project status ==
 +
 
 +
Released! There have been a few releases of the pcwiki software. The latest release is fairly stable, there are only a few niggling [[Pcwiki#TODO|issues to address]].
 +
 
 +
== Contributors ==
 +
 
 +
Members who have contributed to this project. Newest on top.
 +
 
 +
* [[User:John|John]]
 +
 
 +
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]]. This excludes any upstream contributors who tend to have different administrative frameworks.
 +
 
 +
Upstream contributors:
 +
 
 +
* [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/CREDITS MediaWiki contributors]
 +
 
 +
== Copyright ==
 +
 
 +
Copyright 2011, [[Pcwiki#Contributors|Contributors]]. Licensed under the [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/COPYING GPLv2] license.
 +
 
 +
== Source code ==
 +
 
 +
The repository can be browsed online:
 +
 
 +
http://www.progclub.org/pcrepo/pcwiki
 +
 
 +
The code for pcwiki is publicly available from svn:
 +
 
 +
http://www.progclub.org/svnro/pcrepo/pcwiki/tags/latest
 +
 
 +
Or privately available for read-write access:
 +
 
 +
https://www.progclub.org/svn/pcrepo/pcwiki/trunk
 +
 
 +
== Links ==
 +
 
 +
* [http://www.mediawiki.org/wiki/MediaWiki MediaWiki web-site]
 +
* [http://en.wikipedia.org/wiki/MediaWiki MediaWiki on Wikipedia]
 +
* [http://www.mediawiki.org/wiki/Mailing_lists MediaWiki Mailing lists]
 +
 
 +
== TODO ==
 +
 
 +
* Fix the icon graphics for OldSkool, the colours are slightly off.
 +
* Mod to support "Auto:*" includes, and implement Auto:Motto extension
 +
* Modify the 'create account' feature to create a fully-fledged member account, with an LDAP entry, subscription to mailing lists, svn user, etc.
 +
 
 +
== Done ==
 +
 
 +
Stuff that's done. Latest stuff on top.
 +
 
 +
* [[User:John|JE]] 2011-08-10: Added [[Pcwiki#Notes_for_implementers|Notes for implementers]]
 +
* [[User:John|JE]] 2011-08-10: Modified to include section 'link' links next to edit links. These link to the section on the canonical URL.
 +
* [[User:John|JE]] 2011-08-01: Modified to include #top links next to edit links
 +
* [[User:John|JE]] 2011-07-28: Modified to include link to the [http://validator.w3.org/ W3C HTML validation service]
 +
* [[User:John|JE]] 2011-07-28: Modified to be valid HTML5
 +
* [[User:John|JE]] 2011-07-28: Included [http://www.mediawiki.org/wiki/Extension:NoTitle NoTitle] extension
 +
* [[User:John|JE]] 2011-07-28: Fiddled with the Vector skin's graphics to make them #c90 (organge) #000 (black) compatible for OldSkool
 +
* [[User:John|JE]] 2011-07-28: Created OldSkool skin
 +
* [[User:John|JE]] 2011-07-28: Created svn project: [http://www.progclub.org/svnro/pcrepo/pcwiki/ pcwiki]
 +
* [[User:John|JE]] 2011-07-28: Started with MediaWiki 1.17.0
 +
 
 +
== Notes for implementers ==
 +
 
 +
If you are interested in incorporating the ProgClub mods to MediaWiki into your project, here's what you need to know.
 +
 
 +
=== OldSkool skin ===
 +
 
 +
You like the OldSkool skin? Thanks! I'm flattered. I'd be quite happy for you to use it in your own project, with one condition if you don't mind: that you change the colours. I didn't invent fixed-width fonts, but I did invent #000, #c90 and #37a101. Those colours constitute my brand, and I think it would be rather lame of you to impose on my trade mark by copying my look-and-feel. So, what you need to do if you want to use the OldSkool skin, is open the [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/skins/oldskool/screen.css skins/oldskool/screen.css] file for the skin, and find and replace "#000" with your background colour (or keep it as black), find and replace "#c90" with your highlight colour (this replaces the orange), and find and replace "#37a101" with your font colour (this replaces the green). You will then need to create a set of graphics for your chosen colour scheme. You can do this by downloading the free [http://www.gimp.org/ GIMP] program and using its 'colorize' feature on each of the files in the skin's [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/skins/oldskool/images/ skins/oldskool/images] directory. Then you'll have your very own brand, and it'll look ''almost'' as cool as mine! :)
 +
 
 +
=== NoTitle extension ===
 +
 
 +
We blatantly copied the [http://www.mediawiki.org/wiki/Extension:NoTitle NoTitle] extension. We used the version for [http://www.mediawiki.org/wiki/Extension:NoTitle#MediaWiki_1.16 MediaWiki 1.16].
 +
 
 +
=== W3C validation icon ===
 +
 
 +
Note: this modification explicitly disables features that are reported as being non-standards-compliant, and it requires the addition of an icon file as noted below.
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/OutputPage.php includes/OutputPage.php] commented out the alternate edit link:
 +
 
 +
/* JE: 2011-07-28: Removed so validator.w3.org doesn't complain
 +
  // Alternate edit link
 +
  $this->addLink( array(
 +
    'rel' => 'edit',
 +
    'title' => $msg,
 +
    'href' => $this->getTitle()->getLocalURL( 'action=edit' )
 +
  ) );
 +
*/
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/Skin.php includes/Skin.php] commented out the edit uri:
 +
 
 +
/* JE: 2011-07-28: Removed so validator.w3.org doesn't complain
 +
  # Real Simple Discovery link, provides auto-discovery information
 +
  # for the MediaWiki API (and potentially additional custom API
 +
  # support such as WordPress or Twitter-compatible APIs for a
 +
  # blogging extension, etc)
 +
  $out->addLink( array(
 +
    'rel' => 'EditURI',
 +
    'type' => 'application/rsd+xml',
 +
    'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ),
 +
  ) );
 +
*/
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/DefaultSettings.php includes/DefaultSettings.php] added the link to the validation service (note that this required the addition of the validation icon [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/skins/common/images/valid-html5.png skins/common/images/valid-html5.png]):
 +
 
 +
$pwThisScheme = "http";
 
   
 
   
If you take the love calculator seriously you should break up with your ex boyfriend or girlfriend. That is truly because in some of the love calculators, after it calculates the percentage of your respective love and finding it below twenty percent, Provides you a good answer like:'Get a restraining place your order, try to keep the particular person while much while feasible'. It is extremely amusing if you have a amusing area in case you get it seriously it could end up being heart breaking. Unfortunately at times the love calculator can surprise you and give you the right figures, in fact after using the love calculator you are left believing that both of you were actually meant for each and every other. It is a destiny and for many reason, even the calculator knows this unique. That is if you actually love each and every other.
+
if ( isset( $_SERVER[ "HTTPS" ] ) and $_SERVER[ "HTTPS" ] === "on" ) {
 
   
 
   
How does the love calculator work and how will be it used to calculate love? It is extremely easy to use a love calculator. Most you have to will be the Internet. You will need to wide open one with the sites that have the love calculator and you also are ready. You then enter your name and the name of your respective partner in different boxes. After you enter both artists you click on on the calculate button and within a second you should have your results. Remember it could become very disappointing and this is actually only for enjoyment and do not take it as well seriously. Whatever the outcome do you think you're can smile about it. You can calculate for as many people since you can and allow yourself get shocked through the results.
+
  $pwThisScheme = "https";
 
   
 
   
Currently, you can calculate just how much you love one considering the variety of things. There are love quizzes that you can take to determine if you love your partner. They will check several concerns and provide possibilities. Just about all you will need to do is always to select a choice one of the many possibilities that are there. Depending with the choices you make, you get a great almost correct answer of just how much you love your partner. This kind of quizzes are fun and at times they could make you discover things about yourself that you just did not even understand. This kind of weekend, have fun with the love calculator, take as much love quizzes since you can. Have fun while doing it, you can even do it with your partner and laugh about it.
+
}
 
   
 
   
Francis K. Githinji Is actually A helpful Online Dating Expert. His Latest Project Love Calculator [http://www.tomydate.com/dating1725.php -  Shows Just how The Power Of Online Dating Could be Harnessed Internationally and With Great Success, Or You Could Post Your Valued Comments On His Website At Love Calculator [http://www.tomydate.net/?p=1350 - 
+
$pwThisUrl = $pwThisScheme . "://" . $_SERVER[ "HTTP_HOST" ] . $_SERVER[ "REQUEST_URI" ];
 
   
 
   
http://www.mysticscripts.com/compatibility/flames-love-calculator/  
+
$pwValidationUrl = "http://validator.w3.org/check?uri=" . urlencode( $pwThisUrl );
 
   
 
   
http://shareyourevents.com/notice/69241                          [ Activation Result: chosen nickname "totagotbraps"; "height="96""; logged in; success (profile was registered successfully, but there is no permissions for creating new topic);
+
$wgFooterIcons = array(
 +
  "copyright" => array(
 +
    "copyright" => array(), // placeholder for the built in copyright icon
 +
  ),
 +
  "valid_html5" => array(
 +
    "valid_html5" => array(
 +
      //"src" => "$wgStylePath/common/images/valid-html5.png",
 +
      "src" => null,
 +
      "url" => $pwValidationUrl,
 +
      "alt" => "This page is valid HTML5",
 +
    )
 +
  ),
 +
  "poweredby" => array(
 +
    "mediawiki" => array(
 +
      "src" => null, // Defaults to "$wgStylePath/common/images/poweredby_mediawiki_88x31.png"
 +
      "url" => "http://www.mediawiki.org/",
 +
      "alt" => "Powered by MediaWiki",
 +
    )
 +
  ),
 +
);
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/Setup.php includes/Setup.php] added:
 +
 
 +
if( isset($wgFooterIcons["valid_html5"]) &&
 +
  isset($wgFooterIcons["valid_html5"]["valid_html5"]) &&
 +
  $wgFooterIcons["valid_html5"]["valid_html5"]["src"] === null ) {
 +
  $wgFooterIcons["valid_html5"]["valid_html5"]["src"] = "$wgStylePath/common/images/valid-html5.png";
 +
}
 +
 
 +
=== Extended edit links ===
 +
 
 +
This feature adds the canonical section 'link' and 'top' anchors to the section edit links section. These additional links can be disabled in themes by the inclusion of:
 +
 
 +
span.canonical_section_link { display: none; }
 +
span.top_link { display: none; }
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/parser/Parser.php includes/parser/Parser.php] modified to pass $anchor to doEditSectionLink:
 +
 
 +
# give headline the correct <h#> tag
 +
if ( $showEditLink && $sectionIndex !== false ) {
 +
  // JE: 2011-08-09: passed $anchor variable in doEditSectionLink call
 +
  if ( $isTemplate ) {
 +
    # Put a T flag in the section identifier, to indicate to extractSections()
 +
    # that sections inside &lt;includeonly> should be counted.
 +
    $editlink = $sk->doEditSectionLink( Title::newFromText( $titleText ), "T-$sectionIndex", null, $this->mOptions->getUserLang(), $anchor );
 +
  }
 +
  else {
 +
    $editlink = $sk->doEditSectionLink( $this->mTitle, $sectionIndex, $headlineHint, $this->mOptions->getUserLang(), $anchor );
 +
  }
 +
}
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/DefaultSettings.php includes/DefaultSettings.php] added:
 +
 
 +
// JE: 2011-08-10: added for canonical URL linking support
 +
/**
 +
  * Allows specification of the canonical URL components
 +
  */
 +
$wgCanonicalScheme = null;      /* e.g. 'http' or 'https' */
 +
$wgCanonicalHost = null;        /* e.g. 'www.example.com' or 'example.com' */
 +
$wgCanonicalSecureHost = null;  /* e.g. 'www.example.com' or 'secure.example.com' */
 +
 +
// JE: 2011-08-10: there would be a better place for these functions, but I'm not sure where that is
 +
function pw_is_secure() {
 +
 +
  if ( isset( $_SERVER[ 'HTTPS' ] ) and $_SERVER[ 'HTTPS' ] === 'on' ) { return true; }
 +
   
 +
  return false;
 +
 +
}
 +
 +
function pw_get_canonical_scheme() {
 +
 +
  global $wgCanonicalScheme;
 +
 +
  if ( $wgCanonicalScheme !== null ) { return $wgCanonicalScheme; }
 +
 +
  if ( pw_is_secure() ) {
 +
 +
    return "https";
 +
 +
  }
 +
 +
  return "http";
 +
 +
}
 +
 +
function pw_get_canonical_host() {
 +
 +
  global $wgCanonicalHost;
 +
 +
  if ( $wgCanonicalHost !== null ) { return $wgCanonicalHost; }
 +
 +
  return $_SERVER[ "HTTP_HOST" ];
 +
 +
}
 +
 +
function pw_get_canonical_secure_host() {
 +
 +
  global $wgCanonicalSecureHost;
 +
 +
  if ( $wgCanonicalSecureHost !== null ) { return $wgCanonicalSecureHost; }
 +
 +
  return pw_get_canonical_host();
 +
 +
}
 +
 +
function pw_get_canonical_url_base() {
 +
 +
  global $wgCanonicalScheme, $wgCanonicalHost, $wgCanonicalSecureHost;
 +
 +
  // if no canonical features are used, make relative links
 +
  if (
 +
    $wgCanonicalSchem === null and
 +
    $wgCanonicalHost === null and
 +
    $wgCanonicalSecureHost === null ) { return ""; }
 +
 +
  $scheme = pw_get_canonical_scheme();
 +
  $host = pw_get_canonical_host();
 +
 +
  if ( $scheme === 'https' ) { $host = pw_get_canonical_secure_host(); }
 +
 +
  return $scheme . '://' . $host;
 +
 +
}
 +
 
 +
In [http://www.progclub.org/svnro/pcrepo/pcwiki/trunk/includes/Linker.php includes/Linker.php] modified function doEditSectionLink to include:
 +
 
 +
// JE: 2011-08-09: Added section link.
 +
$parts = explode( ":", $nt->mPrefixedText );
 +
if ( count( $parts ) === 1 ) {
 +
  $page = $nt->mUrlform;
 +
}
 +
else if ( count( $parts ) === 2 ) {
 +
  $page = urlencode( $parts[ 0 ] ) . ":" . urlencode( str_replace( ' ', '_', $parts[ 1 ] ) );
 +
  }
 +
else {
 +
  $project = $parts[ 0 ];
 +
  unset( $parts[ 0 ] );
 +
  $page = implode( ":", $parts );
 +
  $page = urlencode( $project ) . ":" . urlencode( str_replace( ' ', '_', $page ) );
 +
}
 +
global $wgArticlePath;
 +
$section_link = pw_get_canonical_url_base() . str_replace( "$1", $page . "#" . $anchor, $wgArticlePath );
 +
$extended_links = "&lt;span class=\"canonical_section_link\">, &lt;a href=\"$section_link\">link&lt;/a>&lt;/span>" .
 +
  "&lt;span class=\"top_link\">, &lt;a href=\"#top\">top&lt;/a>&lt;/span>";
 +
 +
$result = null;
 +
wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result, $lang ) );
 +
if ( !is_null( $result ) ) {
 +
 +
  # For reverse compatibility, add the brackets *after* the hook is
 +
  # run, and even add them to hook-provided text.  (This is the main
 +
  # reason that the EditSectionLink hook is deprecated in favor of
 +
  # DoEditSectionLink: it can't change the brackets or the span.)
 +
 +
  # JE: 2011-08-01: included extended links
 +
  $result = "&lt;span>$result$extended_links&lt;/span>";
 +
 +
  $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language' => $lang ), $result );
 +
  return "&lt;span class=\"editsection\">$result&lt;/span>";
 +
}
 +
 +
# Add the brackets and the span, and *then* run the nice new hook, with
 +
# clean and non-redundant arguments.
 +
 +
# JE: 2011-08-01: included extended links
 +
$link = "&lt;span>$link$extended_links&lt;/span>";

Latest revision as of 16:17, 11 December 2017

Pcwiki is the ProgClub wiki software. That's the software that drives the web-site you're looking at. It's a fork of MediaWiki 1.17.0, with a custom skin called OldSkool, and the NoTitle extension. Pcwiki has also been updated to include a link to the W3C HTML validation service at the bottom of every page, boasting HTML5 support. See the MediaWiki version page for details about our MediaWiki configuration. For other projects see Projects.

Project status

Released! There have been a few releases of the pcwiki software. The latest release is fairly stable, there are only a few niggling issues to address.

Contributors

Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Upstream contributors:

Copyright

Copyright 2011, Contributors. Licensed under the GPLv2 license.

Source code

The repository can be browsed online:

http://www.progclub.org/pcrepo/pcwiki

The code for pcwiki is publicly available from svn:

http://www.progclub.org/svnro/pcrepo/pcwiki/tags/latest

Or privately available for read-write access:

https://www.progclub.org/svn/pcrepo/pcwiki/trunk

Links

TODO

  • Fix the icon graphics for OldSkool, the colours are slightly off.
  • Mod to support "Auto:*" includes, and implement Auto:Motto extension
  • Modify the 'create account' feature to create a fully-fledged member account, with an LDAP entry, subscription to mailing lists, svn user, etc.

Done

Stuff that's done. Latest stuff on top.

  • JE 2011-08-10: Added Notes for implementers
  • JE 2011-08-10: Modified to include section 'link' links next to edit links. These link to the section on the canonical URL.
  • JE 2011-08-01: Modified to include #top links next to edit links
  • JE 2011-07-28: Modified to include link to the W3C HTML validation service
  • JE 2011-07-28: Modified to be valid HTML5
  • JE 2011-07-28: Included NoTitle extension
  • JE 2011-07-28: Fiddled with the Vector skin's graphics to make them #c90 (organge) #000 (black) compatible for OldSkool
  • JE 2011-07-28: Created OldSkool skin
  • JE 2011-07-28: Created svn project: pcwiki
  • JE 2011-07-28: Started with MediaWiki 1.17.0

Notes for implementers

If you are interested in incorporating the ProgClub mods to MediaWiki into your project, here's what you need to know.

OldSkool skin

You like the OldSkool skin? Thanks! I'm flattered. I'd be quite happy for you to use it in your own project, with one condition if you don't mind: that you change the colours. I didn't invent fixed-width fonts, but I did invent #000, #c90 and #37a101. Those colours constitute my brand, and I think it would be rather lame of you to impose on my trade mark by copying my look-and-feel. So, what you need to do if you want to use the OldSkool skin, is open the skins/oldskool/screen.css file for the skin, and find and replace "#000" with your background colour (or keep it as black), find and replace "#c90" with your highlight colour (this replaces the orange), and find and replace "#37a101" with your font colour (this replaces the green). You will then need to create a set of graphics for your chosen colour scheme. You can do this by downloading the free GIMP program and using its 'colorize' feature on each of the files in the skin's skins/oldskool/images directory. Then you'll have your very own brand, and it'll look almost as cool as mine! :)

NoTitle extension

We blatantly copied the NoTitle extension. We used the version for MediaWiki 1.16.

W3C validation icon

Note: this modification explicitly disables features that are reported as being non-standards-compliant, and it requires the addition of an icon file as noted below.

In includes/OutputPage.php commented out the alternate edit link:

/* JE: 2011-07-28: Removed so validator.w3.org doesn't complain
  // Alternate edit link
  $this->addLink( array(
    'rel' => 'edit',
    'title' => $msg,
    'href' => $this->getTitle()->getLocalURL( 'action=edit' )
  ) );
*/

In includes/Skin.php commented out the edit uri:

/* JE: 2011-07-28: Removed so validator.w3.org doesn't complain
  # Real Simple Discovery link, provides auto-discovery information
  # for the MediaWiki API (and potentially additional custom API
  # support such as WordPress or Twitter-compatible APIs for a
  # blogging extension, etc)
  $out->addLink( array(
    'rel' => 'EditURI',
    'type' => 'application/rsd+xml',
    'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ),
  ) );
*/

In includes/DefaultSettings.php added the link to the validation service (note that this required the addition of the validation icon skins/common/images/valid-html5.png):

$pwThisScheme = "http";

if ( isset( $_SERVER[ "HTTPS" ] ) and $_SERVER[ "HTTPS" ] === "on" ) {

  $pwThisScheme = "https";

}

$pwThisUrl = $pwThisScheme . "://" . $_SERVER[ "HTTP_HOST" ] . $_SERVER[ "REQUEST_URI" ];

$pwValidationUrl = "http://validator.w3.org/check?uri=" . urlencode( $pwThisUrl );

$wgFooterIcons = array(
  "copyright" => array(
    "copyright" => array(), // placeholder for the built in copyright icon
  ),
  "valid_html5" => array(
    "valid_html5" => array(
      //"src" => "$wgStylePath/common/images/valid-html5.png",
      "src" => null,
      "url" => $pwValidationUrl,
      "alt" => "This page is valid HTML5",
    )
  ),
  "poweredby" => array(
    "mediawiki" => array(
      "src" => null, // Defaults to "$wgStylePath/common/images/poweredby_mediawiki_88x31.png"
      "url" => "http://www.mediawiki.org/",
      "alt" => "Powered by MediaWiki",
    )
  ),
);

In includes/Setup.php added:

if( isset($wgFooterIcons["valid_html5"]) &&
  isset($wgFooterIcons["valid_html5"]["valid_html5"]) &&
  $wgFooterIcons["valid_html5"]["valid_html5"]["src"] === null ) {
  $wgFooterIcons["valid_html5"]["valid_html5"]["src"] = "$wgStylePath/common/images/valid-html5.png";
}

Extended edit links

This feature adds the canonical section 'link' and 'top' anchors to the section edit links section. These additional links can be disabled in themes by the inclusion of:

span.canonical_section_link { display: none; }
span.top_link { display: none; }

In includes/parser/Parser.php modified to pass $anchor to doEditSectionLink:

# give headline the correct <h#> tag
if ( $showEditLink && $sectionIndex !== false ) {
  // JE: 2011-08-09: passed $anchor variable in doEditSectionLink call
  if ( $isTemplate ) {
    # Put a T flag in the section identifier, to indicate to extractSections()
    # that sections inside <includeonly> should be counted.
    $editlink = $sk->doEditSectionLink( Title::newFromText( $titleText ), "T-$sectionIndex", null, $this->mOptions->getUserLang(), $anchor );
  }
  else {
    $editlink = $sk->doEditSectionLink( $this->mTitle, $sectionIndex, $headlineHint, $this->mOptions->getUserLang(), $anchor );
  }
}

In includes/DefaultSettings.php added:

// JE: 2011-08-10: added for canonical URL linking support
/**
 * Allows specification of the canonical URL components
 */
$wgCanonicalScheme = null;      /* e.g. 'http' or 'https' */
$wgCanonicalHost = null;        /* e.g. 'www.example.com' or 'example.com' */
$wgCanonicalSecureHost = null;  /* e.g. 'www.example.com' or 'secure.example.com' */

// JE: 2011-08-10: there would be a better place for these functions, but I'm not sure where that is
function pw_is_secure() {

  if ( isset( $_SERVER[ 'HTTPS' ] ) and $_SERVER[ 'HTTPS' ] === 'on' ) { return true; }

  return false;

}

function pw_get_canonical_scheme() {

  global $wgCanonicalScheme;

  if ( $wgCanonicalScheme !== null ) { return $wgCanonicalScheme; }

  if ( pw_is_secure() ) {

    return "https";

  }

  return "http";

}

function pw_get_canonical_host() {

  global $wgCanonicalHost;

  if ( $wgCanonicalHost !== null ) { return $wgCanonicalHost; }

  return $_SERVER[ "HTTP_HOST" ];

}

function pw_get_canonical_secure_host() {

  global $wgCanonicalSecureHost;

  if ( $wgCanonicalSecureHost !== null ) { return $wgCanonicalSecureHost; }

  return pw_get_canonical_host();

}

function pw_get_canonical_url_base() {

  global $wgCanonicalScheme, $wgCanonicalHost, $wgCanonicalSecureHost;

  // if no canonical features are used, make relative links
  if (
    $wgCanonicalSchem === null and
    $wgCanonicalHost === null and
    $wgCanonicalSecureHost === null ) { return ""; }

  $scheme = pw_get_canonical_scheme();
  $host = pw_get_canonical_host();

  if ( $scheme === 'https' ) { $host = pw_get_canonical_secure_host(); }

  return $scheme . '://' . $host;

}

In includes/Linker.php modified function doEditSectionLink to include:

// JE: 2011-08-09: Added section link.
$parts = explode( ":", $nt->mPrefixedText );
if ( count( $parts ) === 1 ) {
  $page = $nt->mUrlform;
}
else if ( count( $parts ) === 2 ) {
  $page = urlencode( $parts[ 0 ] ) . ":" . urlencode( str_replace( ' ', '_', $parts[ 1 ] ) );
}
else {
  $project = $parts[ 0 ];
  unset( $parts[ 0 ] );
  $page = implode( ":", $parts );
  $page = urlencode( $project ) . ":" . urlencode( str_replace( ' ', '_', $page ) );
}
global $wgArticlePath;
$section_link = pw_get_canonical_url_base() . str_replace( "$1", $page . "#" . $anchor, $wgArticlePath );
$extended_links = "<span class=\"canonical_section_link\">, <a href=\"$section_link\">link</a></span>" .
  "<span class=\"top_link\">, <a href=\"#top\">top</a></span>";

$result = null;
wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result, $lang ) );
if ( !is_null( $result ) ) {

  # For reverse compatibility, add the brackets *after* the hook is
  # run, and even add them to hook-provided text.  (This is the main
  # reason that the EditSectionLink hook is deprecated in favor of
  # DoEditSectionLink: it can't change the brackets or the span.)

  # JE: 2011-08-01: included extended links
  $result = "<span>$result$extended_links</span>";

  $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language' => $lang ), $result );
  return "<span class=\"editsection\">$result</span>";
}

# Add the brackets and the span, and *then* run the nice new hook, with
# clean and non-redundant arguments.

# JE: 2011-08-01: included extended links
$link = "<span>$link$extended_links</span>";