How do I make part of the submit form available to author and above user levels

From JReviews Documentation
Revision as of 14:38, 23 August 2011 by Jreviews (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Modify the theme file of the submit form:

  • \com_jreviews\jreviews\views\themes\default\listings\create_form.thtml


And add this code around the content that needs to be hidden from guests and registered users:

<?php if($User->gid >= 19) : ?>
 
     // everything here will be visible to authors and above
 
<?php endif;?>


Note: This code will work only in Joomla 1.5. Joomla 1.7 requires specifying a name of the user group.