Editcontent.php custom changes...

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
webboy33
Forum Members
Forum Members
Posts: 36
Joined: Thu Jan 22, 2009 10:38 am
Location: I am from Bulgaria (България).

Editcontent.php custom changes...

Post by webboy33 »

I try to make some changes in editcontent.php with these proposes:

- The permissions for Modify a page gives all access in Modify Pages, include the Options (Page Specific Metadata:, Page Alias:, Active: , ets...) also Content Type: field, Menu Text field... I want to hide all these fields , cause the user, who will be a editor dont need to access them (he can crash something or mess it...).

So, i tried to "hide" them and i did, but with errors on the editcontent.php file.

There is the two core parts of code \or maybe more, i dont know\:

row 539============================
$numberoftabs = count($tabnames);
//$numberoftabs = 1;     here i just changed the number of tabs, but when i did that , when i edit some content, the page automatic become Unactive, Unhide in menu and Uncachable.
$showtabs = 1;
if ($numberoftabs == 0)
{
$numberoftabs = 1;
$showtabs = 1;
}
for ($currenttab = 0; $currenttab _c">

:


EditAsArray(false, $currenttab, $adminaccess);
for($i=0;$i









===  //$numberoftabs = 1;     here i just changed the number of tabs, but when i did that , when i edit some content, the page automatic become Unactive, Unhide in menu and Uncachable.


row 436 #Get a list of content_types and build the dropdown to select one
///////// Here i tried to remove this whole code, but the when i did that, the submit button for editing becomes unactive
$typesdropdown = '';
$cur_content_type = '';
foreach ($gCms->contenttypes as $onetype)
{
$contentops->LoadContentType($onetype->type);
$type_obj = new $onetype->type;
$typesdropdown .= 'type . '"';
if ($onetype->type == $content_type)
{
$typesdropdown .= ' selected="selected" ';
$cur_content_type = $onetype->type;
}
$typesdropdown .= ">".($type_obj->FriendlyName())."";
}
$typesdropdown .= "";

if (FALSE == empty($error))
{
    echo $themeObject->ShowErrors($error);
}
else if ($preview)
{
$tmpfname = createtmpfname($contentobj);
?>
<?php
    }


==================

If someone can help, please? Any sugestions?
Last edited by webboy33 on Sun Apr 12, 2009 10:09 am, edited 1 time in total.
Post Reply

Return to “Developers Discussion”