Prevent Editor from changing value

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 11, 2011   (RSS)

By willydoit - July 11, 2011

Hi all,

I have just implemented a views counter and wish to show the results in the control panel I have got this working however, It seems the only option I have is to restrict editing to either everyone, editor, or admin, I want to restrict editing to admin only but if I select that then the field doesnt show in the users control panel (the area where they edit their listing). I want the user to be able to see how many times their page has been viewed bit not to be able to edit that figure. Is this possible?

Thanks in advance

Re: [willydoit] Prevent Editor from changing value

By robin - July 11, 2011

Hey,

A trick to show users a value that they are not allowed to edit is to use an HTML seperator. Add a new separator in the section editor and select HTML for it's type. For the HTML content, something like this will display your counter field. You might need to change the variable name:

<tr>
<td colspan='2'>
<?php echo "Counter: " . @$RECORD['counter']; ?>
</td>
</tr>


Hope that helps,
Robin
Robin
Programmer
interactivetools.com