Editcontent.php custom changes...
Posted: Sun Apr 12, 2009 9:51 am
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?
- 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?