Elxis CMS Forum

Support => Administration => Topic started by: rentasite on March 23, 2010, 13:11:12

Title: Locking content items
Post by: rentasite on March 23, 2010, 13:11:12

Hi. Is there a way, to be able to lock content items in the Admin area? So... no one else can open those items, except you.

Why? I have clients, that have been told not to touch some Autonomous pages. Cause those pages include extra script... bla bla bla, and they must first turn of the editor bot exc exc...

Guess what.... They forget  >:( and they keep forgetting!

So, is there any solution through Elxis script plz?
Title: Re: Locking content items
Post by: CREATIVE Options on March 23, 2010, 14:01:29
1st Solution:
What about ACL ?
Separate Group and don't give access to autonomous manager

2nd Solution:
Group + Hack
Babis has post a hack to be placed inside the administrator index pages to permit access ONLY to specific components or go to main admin.
Title: Re: Locking content items
Post by: webgift on March 23, 2010, 14:04:21
If i were you Spyros i will have done the 1st solution that already wrote Nikos.!  ;)
Title: Re: Locking content items
Post by: rentasite on March 23, 2010, 14:15:51
1st Solution:
What about ACL ?
Separate Group and don't give access to autonomous manager

It's not always an Autonomous page. It might be another content item.

Quote
2nd Solution:
Group + Hack
Babis has post a hack to be placed inside the administrator index pages to permit access ONLY to specific components or go to main admin.

Where/?
Title: Re: Locking content items
Post by: CREATIVE Options on March 23, 2010, 14:20:55
Sample:
administrator -> index2.php
Area: //check against db record of session
Aprox Line: 81
After of:
Code: [Select]
if ($session_id == md5( $my->id.$my->username.$my->usertype.$logintime )) {
$database->setQuery( "SELECT * FROM #__session WHERE session_id='".$session_id."'"
." AND username = '".$database->getEscaped( $my->username )."'"
." AND userid = ".intval( $my->id )
);
if (!$result = $database->query()) {
echo $database->stderr();
}
if ($database->getNumRows( $result ) <> 1) {
echo '<script language="javascript" type="text/javascript">document.location.href=\'index.php\'</script>'._LEND;
exit();
}
} else {
echo '<script language="javascript" type="text/javascript">document.location.href=\''.$mosConfig_live_site.'/administrator/index.php\'</script>'._LEND;
exit();
}
Place that:
Code: [Select]
if ((intval($my->id) != 62) && !in_array($option, array('com_media', 'com_content', 'com_contact', 'com_weblinks', 'com_statistics')) && ($task != 'promptlogout')) {
     mosRedirect('index2.php?option=com_content');
}
62 = Group ID
Before of:
Code: [Select]
//update session timestamp
$current_time = time() + ($mosConfig_offset * 3600);
$database->setQuery( "UPDATE #__session SET time='".$current_time."' WHERE session_id='".$session_id."'");
$database->query();
Title: Re: Locking content items
Post by: rentasite on March 23, 2010, 16:44:00


Thanksss Niko!

I will try it.