Page 1 of 1

remove all content_actions for people not loged in?

Posted: April 2nd, 2008, 1:13 pm
by aapezzuto
I have found the section in GuMax.php

Code: Select all

    <div id="gumax-content-actions">
        <ul>
            <?php $lastkey = end(array_keys($this->data['content_actions'])) ?>
            <?php foreach($this->data['content_actions'] as $key => $action) if($this->data['loggedin']==1) { ?>
               <li id="ca-<?php echo Sanitizer::escapeId($key) ?>" <?php
                   if($action['class']) { ?>class="<?php echo htmlspecialchars($action['class']) ?>"<?php } ?>
               ><a href="<?php echo htmlspecialchars($action['href']) ?>"><?php
                   echo htmlspecialchars($action['text']) ?></a> <?php
                   // if($key != $lastkey) echo "&#8226;" ?></li>
            <?php } ?>
        </ul>
    </div>
But I dont see how that is leaving some content_actions and not others... is there an array somewhere that I am not finding?

I want to hide everything in the content actions group from users who are not logged in.

Re: remove all content_actions for people not loged in?

Posted: April 2nd, 2008, 11:38 pm
by Paul
Move this: if($this->data['loggedin']==1) outside of the <div id="gumax-content-actions">, it will do the job.

It will look similar like this:

<?php if($this->data['loggedin']==1) { ?>

<div id="gumax-content-actions">
......
</div>

<?php } ?>

That's it.

Re: remove all content_actions for people not loged in?

Posted: April 3rd, 2008, 12:34 am
by aapezzuto
You have some strange magical css power... What a strange super hero you are!

Re: remove all content_actions for people not loged in?

Posted: April 3rd, 2008, 8:04 am
by Paul
Thank you. :D

Re: remove all content_actions for people not loged in?

Posted: January 12th, 2012, 3:17 am
by mediawikinewb
Im not sure I understand Paul, sorry to open an old topic. I have tried to figure this out and I can not seem to hide the gumax-content-actions tab "pages" for anonymous users. If I remove everything between <gumax-content-actions Begin> and <end> it removes it, but then users logged in can not edit pages as the edit tab becomes missing. I am using mw v1.16 and gumax v3.4.5

Re: remove all content_actions for people not loged in?

Posted: January 12th, 2012, 6:27 pm
by Paul
Here is the change for GuMax 3.4.5

Find this in GuMax.php:

Code: Select all

<!-- gumax-content-actions -->
<?php //if($this->data['loggedin']==1) { ?>
...
<?php //} ?>
You will see the code is there, just remove the "//" and it will look like this:

Code: Select all

<?php if($this->data['loggedin']==1) { ?>
...
<?php } ?>
or use the attachment to replace the origin file

Re: remove all content_actions for people not loged in?

Posted: January 12th, 2012, 11:31 pm
by mediawikinewb
Paul, I tried out your response when I recieved it. It worked great! I have never before posted in a forum and appreciate your swift reply and professional conduct. Thank you for helping me with my problem.

Re: remove all content_actions for people not loged in?

Posted: July 14th, 2012, 10:33 am
by vagabondlives
Is it possible to hide content actions from none admin or sysop?

Re: remove all content_actions for people not loged in?

Posted: August 8th, 2012, 8:11 am
by jemozkelon
Paul wrote:Here is the change for GuMax 3.4.5

Find this in GuMax.php:

Code: Select all

<!-- gumax-content-actions -->
<?php //if($this->data['loggedin']==1) { ?>
...
<?php //} ?>
You will see the code is there, just remove the "//" and it will look like this:

Code: Select all

<?php if($this->data['loggedin']==1) { ?>
...
<?php } ?>
or use the attachment to replace the origin file

This means that for logged in users status 1 and for logged off users status 0. Binary operation.