You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By doing this, we will be able to generate an easier to style HTML for the readiness markers.
The problem with using readiness markers from inside a wiki page is that we have to style the marker with absolute positioning to make it be visible on the side
Using absolute positioning in our case "works" but has some issues — see #18. A better way to do it would be to get the HTML markup right from the PHP and have the HTML closer to the <body>.
Objective of this task is to improve the HTML render responsible of the Readiness markers by leveraging existing Semantic MediaWiki properties, but from PHP itself.
By doing this, we will be able to generate an easier to style HTML for the readiness markers.
The problem with using readiness markers from inside a wiki page is that we have to style the marker with absolute positioning to make it be visible on the side
Using absolute positioning in our case "works" but has some issues — see #18. A better way to do it would be to get the HTML markup right from the PHP and have the HTML closer to the
<body>
.Objective of this task is to improve the HTML render responsible of the Readiness markers by leveraging existing Semantic MediaWiki properties, but from PHP itself.
Path to a solution
Getting the "Readiness state" of the current page
Call the Api internally, without relying on cURL (!!) see Calling internally the MediaWiki API
Look which hooks to use, OutputPageParserOutput, ArticleAfterFetchContent?Figure out most efficient place in MW execution flow to generate the full HTML. Found: In an instance of
SkinTemplate
Quick and dirty way would be to
str_replace($readiness_state_string, ' ', '_');
as is. (/)Expected output:
Notes
Here is a PoC that reads readiness state from an instance of
SkinTemplate
.Then, use the global $wgParser (in a hook?), and mimick/use what’s done in http://docs.webplatform.org/wiki/Property:State and http://docs.webplatform.org/wiki/Template:Flags
Related mailing-list messages
Reference
SMW\MediaWiki\Search\Search::searchTitle
extensions/SemanticMediaWiki/includes/api/ApiAsk.php
includes/OutputPage.php
includes/SkinTemplate.php
includes/api/ApiBase.php
includes/api/ApiMain.php
includes/WebRequest.php
The text was updated successfully, but these errors were encountered: