[SOLVED] How to modify "Edit Content"-Page in admin-menue

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
MisterT
New Member
New Member
Posts: 8
Joined: Fri Oct 05, 2007 5:18 am

[SOLVED] How to modify "Edit Content"-Page in admin-menue

Post by MisterT »

Hello,

for a new project I need to strongly restrict the options, editors have in modifying pages. Basically, they should only be allowed to edit the content but NOT the content type, menu text etc.

Image

Since there is no option in the backend as far as I know, to do that I thought it wouldn't be a big deal to "just" modify the PHP-file that sets this page. But I noticed it seems to be a bit more than just deleting a few -tags  ;D Unfortunately I am not that good in PHP yet to find out by myself what I need to do.

I guess I need to modify the file /admin/editcontent.php somwhere here:
Code:

Code: Select all

$contentarray = $contentobj->EditAsArray(false, $currenttab, $adminaccess);
			for($i=0;$i<count($contentarray);$i++)
			{
				?>
				<div class="pageoverflow">
					<div class="pagetext"><?php echo $contentarray[$i][0]; ?></div>
					<div class="pageinput"><?php echo $contentarray[$i][1]; ?></div>
				</div>
				<?php
			}

Could anybody tell me, if there is a simple way to just delete the above mentioned options so that a backenduser could not edit these anymore?

THANK YOU!!
Last edited by MisterT on Tue Aug 26, 2008 5:30 am, edited 1 time in total.
User avatar
MisterT
New Member
New Member
Posts: 8
Joined: Fri Oct 05, 2007 5:18 am

Re: How to modify "Edit Content"-Page in admin-menue

Post by MisterT »

O.k., it is the following file:

/lib/classes/contenttypes/Content.inc.php, starting in row 210 where these -tags are found. I just added

Code: Select all

disabled="true"
and thus reached the desired result.

Thanks to Cyberman for helping to find the right file!

It would be great by the way if these settings could be modified in 2.0. with the new rigths-magement, namely that it could also be set, whether a user (-group) has the rights to modify the title, menu text, meta tags etc of a a page or not.

Best regards
M.T.
wolphy
Forum Members
Forum Members
Posts: 33
Joined: Fri Sep 19, 2008 2:26 pm

Re: [SOLVED] How to modify "Edit Content"-Page in admin-menue

Post by wolphy »

I'm trying to do this as well.  MisterT, could you be more specific about what the end result code looks like-- maybe paste the entire line of code so I can see where the disabled="true" goes.  (I'm not php savvy, but I'm pretty good at denial and forging ahead anyway...)
User avatar
confiq
Forum Members
Forum Members
Posts: 21
Joined: Sat Sep 27, 2008 8:00 am

Re: [SOLVED] How to modify "Edit Content"-Page in admin-menue

Post by confiq »

it would be nice if we could see in next version the option to disable those <input for non-admin users...
I'll probably need to write a hack that checks if user is in group and only then to disable it :(
Post Reply

Return to “Developers Discussion”