As in the title, does anybody could help me to do this?
I want to show "Special Pages" link only for registered member who has logged in .
I'm using gumax-3-3 skin.
Thank you
How to enable special pages only for logged user
Re: How to enable special pages only for logged user
I'm not sure what you want. Do you mean you only allow special pages be accessed by logged user or the special pages only will only show for logged user?
Re: How to enable special pages only for logged user
I mean "special pages" link only visible for logged user, and guest can't see or access "special pages"
Re: How to enable special pages only for logged user
If it is just invisible for guest, it is easy to do it by modifying the GuMax.php, however any user can access the page through the url. If it only can be accessed by logged user. The skin cannot do that, you need an extension.
Re: How to enable special pages only for logged user
yes it is hidden for guest, may I know how to put the modified code ? sorry I just newbie
Re: How to enable special pages only for logged user
Open GuMax.php, you will find code like this:
Use this code inside section below to check for the special page.
Code: Select all
if($this->data['loggedin']==1)
Code: Select all
<div id="gumax-personal-tools">
Re: How to enable special pages only for logged user
I have checked the code, and found this code :
already listed on <div id="gumax-personal-tools">
Could you inform me, how code need to be update..
Code: Select all
if($this->data['loggedin']==1)
Code: Select all
<!-- =================== gumax-page-footer =================== -->
<div id="gumax-page-footer">
<!-- personal tools -->
<div id="gumax-personal-tools">
<ul>
<?php if($this->data['loggedin']==1) { ?>
<?php if($this->data['notspecialpage']) { foreach( array( 'whatlinkshere', 'recentchangeslinked' ) as $special ) { ?>
<li id="t-<?php echo $special?>"><a href="<?php
echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"><?php echo $this->msg($special) ?></a></li>
<?php } } ?><?php if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a> </span><?php } ?></li> <?php } ?>
<?php foreach( array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { ?> <?php
if($this->data['nav_urls'][$special]) {?><li id="t-<?php echo $special ?>"><a href="<?php
echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"><?php $this->msg($special) ?></a> <?php
// if($special != 'specialpages') echo "|" ?> </li>
<?php } ?>
<?php }
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); ?>
<?php } ?>
</ul>
</div>
<!-- end of personal tools -->
Re: How to enable special pages only for logged user
My new skin GuMax 3.3 already has this feature.