Hi im trying to hide the [view source] tab from annonymous users to my wiki.
i pasted the following code in the MediaWiki:Common.css page but nothing happens.
Any suggestions would be greatly appreciated.
Hi,
I think you forgot to add the code.
Best, Huib
2010/3/24, Makelesi Kora-Gonelevu makelesik@gmail.com:
Hi im trying to hide the [view source] tab from annonymous users to my wiki.
i pasted the following code in the MediaWiki:Common.css page but nothing happens.
Any suggestions would be greatly appreciated. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hi sorry here it is:
<!-- No [view source] tab for anonymous users --> <?php global $wgUser; if( $wgUser->isAnon() ) { ?> <style> #ca-viewsource { display: none !important; } </style> <?php } ?> But nothing happens. I can still see the [view source] tab even when im an anonymous user. On Thu, Mar 25, 2010 at 11:54 AM, Huib Laurens sterkebak@gmail.com wrote:
Hi,
I think you forgot to add the code.
Best, Huib
2010/3/24, Makelesi Kora-Gonelevu makelesik@gmail.com:
Hi im trying to hide the [view source] tab from annonymous users to my
wiki.
i pasted the following code in the MediaWiki:Common.css page but nothing happens.
Any suggestions would be greatly appreciated. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
"The soldiers graves are great preachers of peace...."
http://commons.wikimedia.org/wiki/User:Abigor
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 3/24/2010 6:13 PM, Makelesi Kora-Gonelevu wrote:
Hi sorry here it is:
<!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
<style> #ca-viewsource { display: none !important; } </style> <?php } ?>
[[MediaWiki:Common.css]] is for CSS only, you can't put PHP code in it and expect it to be interpreted.
2010/3/25 Makelesi Kora-Gonelevu makelesik@gmail.com:
#ca-viewsource { display: none !important; }
You should only add this line and remove all the others.
Roan Kattouw (Catrope)
On Wed, Mar 24, 2010 at 7:41 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
2010/3/25 Makelesi Kora-Gonelevu makelesik@gmail.com:
#ca-viewsource { display: none !important; }
You should only add this line and remove all the others.
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Then logged in users who cannot edit a particular page will not see view source either. The OP said he wanted to hide it from anons. Is there a more specific rule he can use here?
-Chad
"Makelesi Kora-Gonelevu" makelesik@gmail.com wrote in message news:8f623ff1003241613r4bb92efcnbb3c19cc015ee115@mail.gmail.com...
Hi sorry here it is:
<!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
<style> #ca-viewsource { display: none !important; } </style><?php } ?>
But nothing happens. I can still see the [view source] tab even when im an anonymous user.
Common.css is a stylesheet; it's parsed as CSS; and only CSS. Quite rightly so, because allowing users to invoke arbitrary PHP code from a wiki page would be... problematic... (understatement of the day).
You need to implement this with pure CSS and/or JS.
--HM
ok i will try to put the code in my skin.php file instead.
On Thu, Mar 25, 2010 at 12:46 PM, Happy-melon happy-melon@live.com wrote:
"Makelesi Kora-Gonelevu" makelesik@gmail.com wrote in message news:8f623ff1003241613r4bb92efcnbb3c19cc015ee115@mail.gmail.com...
Hi sorry here it is:
<!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
<style> #ca-viewsource { display: none !important; } </style><?php } ?>
But nothing happens. I can still see the [view source] tab even when im
an
anonymous user.
Common.css is a stylesheet; it's parsed as CSS; and only CSS. Quite rightly so, because allowing users to invoke arbitrary PHP code from a wiki page would be... problematic... (understatement of the day).
You need to implement this with pure CSS and/or JS.
--HM
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Modifing commons.js should do it. I don't know JavaScript or I would give you the exact code
On Wednesday, March 24, 2010, Makelesi Kora-Gonelevu makelesik@gmail.com wrote:
ok i will try to put the code in my skin.php file instead.
On Thu, Mar 25, 2010 at 12:46 PM, Happy-melon happy-melon@live.com wrote:
"Makelesi Kora-Gonelevu" makelesik@gmail.com wrote in message news:8f623ff1003241613r4bb92efcnbb3c19cc015ee115@mail.gmail.com...
Hi sorry here it is:
<!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
<style> #ca-viewsource { display: none !important; } </style> <?php } ?> But nothing happens. I can still see the [view source] tab even when im
an
anonymous user.
Common.css is a stylesheet; it's parsed as CSS; and only CSS. Quite rightly so, because allowing users to invoke arbitrary PHP code from a wiki page would be... problematic... (understatement of the day).
You need to implement this with pure CSS and/or JS.
--HM
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hi,
On 24 March 2010 23:34, Makelesi Kora-Gonelevu makelesik@gmail.com wrote:
Hi im trying to hide the [view source] tab from annonymous users to my wiki.
Regardless of whether you succeed in hiding the 'view source' tab, how will you counter URL manipulation by the user?
AFAIK anyone can change the URL to
...index.php?title=Pagename&action=edit
and then get presented with the 'view source' results (or the edit window for that matter if the user/anon has edit rights).
Or are you only concerned in the aestethics of the page rendering?
Jean-Marc van Leerdam wrote:
Regardless of whether you succeed in hiding the 'view source' tab, how will you counter URL manipulation by the user?
AFAIK anyone can change the URL to
...index.php?title=Pagename&action=edit
and then get presented with the 'view source' results (or the edit window for that matter if the user/anon has edit rights).
Or are you only concerned in the aestethics of the page rendering?
The [view source] tab appears only when you don't have permission to edit it, so going to the direct url won't allow you to modify it.
Hi everyone
I think i found the answer. Its an extension called GroupPermissionsManager http://www.mediawiki.org/wiki/Extension:GroupPermissionsManager.
Thanks
On Fri, Mar 26, 2010 at 5:21 AM, Platonides Platonides@gmail.com wrote:
Jean-Marc van Leerdam wrote:
Regardless of whether you succeed in hiding the 'view source' tab, how will you counter URL manipulation by the user?
AFAIK anyone can change the URL to
...index.php?title=Pagename&action=edit
and then get presented with the 'view source' results (or the edit window for that matter if the user/anon has edit rights).
Or are you only concerned in the aestethics of the page rendering?
The [view source] tab appears only when you don't have permission to edit it, so going to the direct url won't allow you to modify it.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hi,
On 25 March 2010 17:21, Platonides Platonides@gmail.com wrote:
Jean-Marc van Leerdam wrote:
Regardless of whether you succeed in hiding the 'view source' tab, how will you counter URL manipulation by the user?
AFAIK anyone can change the URL to
...index.php?title=Pagename&action=edit
and then get presented with the 'view source' results (or the edit window for that matter if the user/anon has edit rights).
Or are you only concerned in the aestethics of the page rendering?
The [view source] tab appears only when you don't have permission to edit it, so going to the direct url won't allow you to modify it.
Yes, I know that, what I wanted to add is that suppressing the 'view source' tab as a means to hide the Wiki source from viewers is insufficient.
wikitech-l@lists.wikimedia.org