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

From JReviews Documentation
Jump to: navigation, search
(Created page with 'Modify the theme file of the submit form: *<span style="color: blue">\com_jreviews\jreviews\views\themes\default\listings\create_form.thtml</span> And add this code around the …')
 
 
Line 4: Line 4:
  
 
And add this code around the content that needs to be hidden from guests and registered users:
 
And add this code around the content that needs to be hidden from guests and registered users:
 
  
 
<source lang="php">
 
<source lang="php">
Line 15: Line 14:
  
  
 +
'''Note:''' This code will work only in Joomla 1.5. Joomla 1.7 requires specifying a name of the user group.
  
  

Latest revision as of 14:38, 23 August 2011

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.