Last modified: 2014-08-17 11:28:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65592, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63592 - Add SelfLinkBegin hook in Linker.php
Add SelfLinkBegin hook in Linker.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.23.0
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-06 12:58 UTC by Cindy Cicalese
Modified: 2014-08-17 11:28 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Cindy Cicalese 2014-04-06 12:58:57 UTC
If a link to a page exists on the page itself, it currently is displayed as the page title in bold text. The SelfLinkBegin hook (gerrit  I343e1b1b08ec841d22a1b22bcb8af43bb65a5a50) allows extensions to modify the text that is displayed. This new functionality is desirable in the SemanticTitle extension. The SemanticTitle extension enables the display semantic property on a page as a user-friendly page title instead of the actual page title. The use of the SelfLinkBegin hook can be seen in SemanticTitle in gerrit  I593f263723498aa28ff945c4094f27d817c1ad27.

As an example of how you can test this feature, install Semantic MediaWiki and SemanticTitle and set


      $wgSemanticTitleProperties = array(
             NS_MAIN => "Title"
      );


Create a property page named Property:Title containing "[[Has type::Text]]". Create a test page in the main namespace containing the text:


     {{#set:Title=Semantic Title}}
     [[{{FULLPAGENAME}}]].


Currently, the page will display the title of the test page in bold. With the two patches above applied, the page will display the text "Semantic Title" in bold.

While this example is very simplistic, a more complex example where this is necessary is a page that includes a Semantic MediaWiki #ask query that has a link to the current page in the query results. Consider a page for an author that lists citations to all of the author's works as a result of a query. Each citation would include the list of authors, including co-authors, as links to their author pages. Using SemanticTitle, each author page can exist with a title of the form "Author:xxxxxx" in the Author namespace, where xxxxxx is a unique number, with the page title displayed as the author's name using a property on the page. However, in the citation list, the link to the author in question would be displayed as the bold text Author:xxxxxx, where xxxxxx is the unique number for the current author page, rather than the author's name.
Comment 1 Andre Klapper 2014-04-07 10:50:14 UTC
Hi Cindy, thanks for taking the time to report this and providing a patch.

Setting PATCH_TO_REVIEW status for https://gerrit.wikimedia.org/r/#/c/124149/ (for the records, this is done automatically when following [[mw:Gerrit/Commit message guidelines]])
Comment 2 Andre Klapper 2014-05-03 10:23:13 UTC
Hi Cindy, thanks for your email asking for the status here.

As this is now blocked on reviewing the patch, I'd recommend to add a comment in https://gerrit.wikimedia.org/r/#/c/124149/ asking for another review and/or merge.
Comment 3 Cindy Cicalese 2014-05-05 20:50:52 UTC
Done - thanks for the advice!
Comment 4 Gerrit Notification Bot 2014-05-27 21:35:57 UTC
Change 124149 had a related patch set uploaded by Cicalese:
Add SelfLinkBeginHook

https://gerrit.wikimedia.org/r/124149
Comment 5 Gerrit Notification Bot 2014-05-28 22:07:41 UTC
Change 124149 merged by jenkins-bot:
Add SelfLinkBeginHook

https://gerrit.wikimedia.org/r/124149
Comment 6 Andre Klapper 2014-08-17 11:28:53 UTC
Patch mentioned in this report was merged - assuming this bug is FIXED.
If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links