Heiya,
on the talk page of the ContactPage extension [0] it was reported [1] that adding a link to the contact page in the footer section of the skin [2] does not work when using the MobileFrontend extension [3], i.e. the mobile view. I just shows up for the regular desktop view.
It was suggested that we should try asking for help on this mailing list. Since I am not a programmer ...
Help will be appreciated and the solution will be added to the documentation page of the ContactPage extension as soon as it is known.
Cheers Karsten
[0] https://www.mediawiki.org/wiki/Extension:ContactPage [1] https://www.mediawiki.org/wiki/Topic:T8js2zyu3jt1rr7m [2] https://www.mediawiki.org/wiki/Extension:ContactPage#Further_customization [3] https://www.mediawiki.org/wiki/Extension:MobileFrontend
Karsten,
Thank you for the message.
The MobileFrontend extension doesn't support footer customization, except through other extensions (in this case the ContactPage extension) using the "SkinMinervaOutputPageBeforeExec" hook (history https://phabricator.wikimedia.org/T68350). The ContactPage extension would need to be modified to implement this hook in order to get it working alongside MobileFrontend for the mobile web presentation.
The Wikimedia Foundation is not actively developing the ContactPage extension or reviewing patches for it, excepting security bugs if they're identified. I'm sorry this isn't terribly helpful. One way such features are sometimes built is through a couple of volunteer engineers. Typically one person writes the patch (e.g., for ContactPage), and then another who has elevated permissions to sign off on the code reviews and approves the patch.
-Adam
On Fri, Jul 29, 2016 at 5:46 AM, Karsten Hoffmeyer karsten@hoffmeyer.info wrote:
Heiya,
on the talk page of the ContactPage extension [0] it was reported [1] that adding a link to the contact page in the footer section of the skin [2] does not work when using the MobileFrontend extension [3], i.e. the mobile view. I just shows up for the regular desktop view.
It was suggested that we should try asking for help on this mailing list. Since I am not a programmer ...
Help will be appreciated and the solution will be added to the documentation page of the ContactPage extension as soon as it is known.
Cheers Karsten
[0] https://www.mediawiki.org/wiki/Extension:ContactPage [1] https://www.mediawiki.org/wiki/Topic:T8js2zyu3jt1rr7m [2] https://www.mediawiki.org/wiki/Extension:ContactPage#Further_customization [3] https://www.mediawiki.org/wiki/Extension:MobileFrontend
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
On Fri, Jul 29, 2016 at 2:03 PM, Adam Baso abaso@wikimedia.org wrote:
Karsten,
Thank you for the message.
The MobileFrontend extension doesn't support footer customization, except through other extensions (in this case the ContactPage extension) using the "SkinMinervaOutputPageBeforeExec" hook (history). The ContactPage extension would need to be modified to implement this hook in order to get it working alongside MobileFrontend for the mobile web presentation.
I think this can be done similarly to the instructions given on Extension:ContactPage that implement a SkinTemplateOutputPageBeforeExec handler in LocalSettings.php [0]. To change both the desktop site skin and the mobile site skin you will need to install hook handlers for both SkinTemplateOutputPageBeforeExec and SkinMinervaOutputPageBeforeExec.
Looking at the source, it seems that MobileSiteOutputPageBeforeExec [1] may actually be a better hook to use. It has the same signature as SkinTemplateOutputPageBeforeExec, is not marked as deprecated in the code, and was created in order to make modifying footer links possible [2].
It would be a nice thing for someone to document this hook on mediawiki.org. It seems that there are several hooks for MobileFrontend that are currently undocumented [3].
[0]: https://www.mediawiki.org/wiki/Extension:ContactPage#Further_customization [1]: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/235fbc... [2]: https://phabricator.wikimedia.org/T68350 [3]: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/search?utf8...
On Fri, Jul 29, 2016 at 11:22 PM, Bryan Davis bd808@wikimedia.org wrote:
It would be a nice thing for someone to document this hook on mediawiki.org. It seems that there are several hooks for MobileFrontend that are currently undocumented [3].
Duly Phabricated! [0]
-Sam
SkinTemplateOutputPageBeforeExec should be fine for this but extension loading may interfere.
It's used in WikimediaMessages extension to add the developers and cookie statement links to the footer. https://github.com/wikimedia/mediawiki-extensions-WikimediaMessages/blob/mas... You can restrict to just mobile by wrapping the hook in the if statement: $context= MobileContext::singleton(); if ($context->shouldDisplayMobileView() ) { // add links }
However... this hook needs to be registered after MobileFrontend installs its own hooks. Last time I checked (but didn't verify) pasting into LocalSettings.php caused the hook to register after MobileFrontend (which loads via extension loading). I'm not sure if this is a known bug or a workaround exists.
On Mon, Aug 1, 2016 at 2:22 AM, Sam Smith samsmith@wikimedia.org wrote:
On Fri, Jul 29, 2016 at 11:22 PM, Bryan Davis bd808@wikimedia.org wrote:
It would be a nice thing for someone to document this hook on mediawiki.org. It seems that there are several hooks for MobileFrontend that are currently undocumented [3].
Duly Phabricated! [0]
-Sam
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l