add button visible for user with no permission to add

Martooti

Member
Hi,
is it possible to make add button visible for the users who do not have permission to add new records?
I would like that everyone can see the add button, but if he is not registered he will be redirected to registration form with message "You have to be registered to add a listing" for example.
I made my own list template and tried to change default_buttons.php but with no success.
Thanks in advance for all suggestions :)
 
I would create a "fake" add button (looking like add and being a link or popup to your message) in your custom template which is shown only to users without add access.
 
in deed this how I go with it :
PHP:
<?php $user = JFactory::getUser();
if ($user->guest) :
        echo '<button style="float:left" type="button" class="btn btn-primary " data-toggle="modal" data-target="#register">
          <span class="icon-plus hasTooltip" title="" data-original-title="Add"></span>Add classified
        </button>';
    endif;
    ?>
:)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top