Heiya,
is there a way to dismiss the dismissable sitenotice the same moment it takes me to the landing page after clicking on the respective link?
E.g. currently the steward elections are on (hope you all participate): When I click on the link within the sitenotice that takes me to metawiki I would like the sitenotice not to reappear as soon as I go back to the originating wiki. Ideally this link should have a _blank link target, i.e. open a new tab when being clicked.
I have the suspicion that this may not work at all, otherwise WMF would probably already do it like this rather than requiring to dismiss the sitenotice sparately, i.e. even though I already followed the link.
I hope you get the point. Any advice will be apprechiated.
Cheers Karsten
CentralNotice (Which is different from DismissableSiteNotice) uses raw html for the banner.
So you could definitely do that if you wanted in the central notice banners. Using the current stewvote banner as an example https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/stewvote
replacing the line <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018">
with <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018" onclick="mw.centralNotice.hideBanner();return true;">
would probably do it [I have not tested this].
-- Brian
On Thu, Feb 15, 2018 at 10:51 PM, [[kgh]] <mediawiki@kghoffmeyer.de> wrote:
Heiya,
is there a way to dismiss the dismissable sitenotice the same moment it takes me to the landing page after clicking on the respective link?
E.g. currently the steward elections are on (hope you all participate): When I click on the link within the sitenotice that takes me to metawiki I would like the sitenotice not to reappear as soon as I go back to the originating wiki. Ideally this link should have a _blank link target, i.e. open a new tab when being clicked.
I have the suspicion that this may not work at all, otherwise WMF would probably already do it like this rather than requiring to dismiss the sitenotice sparately, i.e. even though I already followed the link.
I hope you get the point. Any advice will be apprechiated.
Cheers Karsten
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Heiya Brian,
thanks a lot for your suggestion. To cut it short: It will not be possible to do this with DissmissableSiteNotice alone.
I tried CenralNotice but it already fails to display the banner since it errors out because the geolocation service it imperatively tries to access is not accessible. Did not acitvate geolocation nor configure it still to tries to call home somehow.
Your suggestion made my think that I should probably be possible to use the Widgets extension for this, i.e. adding a widget to the sitenotice that exactly does this.
However I have no idea about JavaScript so I am not able to do it. There a tons of suggestions out there for JavaScript but whithout any clue its still messy to implement.
Cheers Karsten
Am 16.02.2018 um 13:43 schrieb Brian Wolff:
CentralNotice (Which is different from DismissableSiteNotice) uses raw html for the banner.
So you could definitely do that if you wanted in the central notice banners. Using the current stewvote banner as an example https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/stewvote
replacing the line <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018">
with <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018" onclick="mw.centralNotice.hideBanner();return true;">
would probably do it [I have not tested this].
-- Brian
On Thu, Feb 15, 2018 at 10:51 PM, [[kgh]] <mediawiki@kghoffmeyer.de> wrote:
Heiya,
is there a way to dismiss the dismissable sitenotice the same moment it takes me to the landing page after clicking on the respective link?
E.g. currently the steward elections are on (hope you all participate): When I click on the link within the sitenotice that takes me to metawiki I would like the sitenotice not to reappear as soon as I go back to the originating wiki. Ideally this link should have a _blank link target, i.e. open a new tab when being clicked.
I have the suspicion that this may not work at all, otherwise WMF would probably already do it like this rather than requiring to dismiss the sitenotice sparately, i.e. even though I already followed the link.
I hope you get the point. Any advice will be apprechiated.
Cheers Karsten
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org