"edit content" popup window

Talk about new features for CMSMS and modules.
Post Reply
khyros
Forum Members
Forum Members
Posts: 22
Joined: Sun Apr 15, 2007 11:48 am

"edit content" popup window

Post by khyros »

Hi!

I'm currently using the tag {edit} in my templates because i'm running CMSms on my dept intranet. We use the cms to keep online documents that everyone edits, such as protocol, chemical databases with the locations of those chemicals, seminar calendar, etc etc.

So, by adding that tag, I can allow everyone to edit that page's content automatically.. with no need to go to admin/ then navigate thru all the options.

However, I find and irritagint problem: CMSms does not keep you logged in weh nyou close the browser window. So if you close the browser, open it again and go to the intranet, the "edit content" button is missing because you're not logged into the admin area anymore. So you need to go to admin/ manually and either a) navigate thru all the menus or b) go back the page you wanted to edit and press the "edit" link.

I feel it might be an easier way.....

1) Allow {edit} to be always shown.. i.e. show the link "Edit content" even if you're not logged in.
2) In case you go into Edit content and you're  not logged in, it should ask for ID and password and then get straight to edit the page's content.
3) Wouldn't it be great to have a pop-up window come up with the wysiwyg editor occupying the whole window? You can put point 1 and 2 together with this popup window and that be ideal for those editor users who needn't go to the full admin area. And it's ideal for a quick edit.


What you guys think?
Is it doable thru a module? Maybe a hack? Wait to 2.0?

Thanks!!
khyros
Forum Members
Forum Members
Posts: 22
Joined: Sun Apr 15, 2007 11:48 am

Re: "edit content" popup window

Post by khyros »

well.. i did some research and found a "workaround" althoguh it's rather inelegant.

in plugins/function.edit.php I added this changes (in read), just showing the first lines
function smarty_cms_function_edit($params, &$smarty)
{
global $gCms;

/*if (!check_permission(get_userid(false), 'Modify Any Page'))  return; This stops CMSms from not showing the edit button if user is not logged in. If s/he's not, the link will open the log in window then go to admin's main menu, rather than the appropriate content edit page.*/

$text = isset($params['text']) ? $params['text']:'Edit This Page';
if (isset($params["showbutton"]))
{
return 'config['root_url'].'/'.$gCms->config['admin_dir'].'/editcontent.php?content_id='.$gCms->variables['content_id'].'" target="_blank">config['root_url'].'/images/cms/editbutton.png" alt="'.$text.'"/>';
}
else
{
return 'config['root_url'].'/'.$gCms->config['admin_dir'].'/editcontent.php?content_id='.$gCms->variables['content_id'].'" target="_blank">'.$text.'';
}
/*
global $gCms;
Last edited by khyros on Tue Apr 24, 2007 7:55 pm, edited 1 time in total.
Post Reply

Return to “Feature ideas”