How to protect plugin/module tags from deleting by addeditor

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
100rk

How to protect plugin/module tags from deleting by addeditor

Post by 100rk »

Average situation: You have CMSMS running and You want to give rights for edit some pages to Your users. Are You afraid they can delete Your plugin or module tags? Users obviously don't know what they doing.... :D

Just:
- copy Your active template with another name
- MOVE Your plugin/module tag from page content to template - at location above or after {content} tag - yes, it is kind of limitation if You use some table-design in Your page content
- edit Your content page properties so it will use this new template.

RESULT:
User can delete anything he want (in page content), but Your module will be still here :-))

It is only small thing, but I hope it will be usefull for someone else also.
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

a more robust solution

Post by uptoeleven »

I'm wondering if a more robust solution might be possible, even allowing WYSIWYG users to add modules in without having to know about the curly brackets and all that.

I'm going to look at the feasibility of writing a module for TinyMCE which does this. To do this it will have to:

Read the available list of modules then
Read available list of commands for that module then
Read the available list of values for that command

Obviously modules will have to be extended so that they list available commands and values for those commands - not a trivial task. Also I wouldn't know how to make these changes for HTMLArea. But TinyMCE is easy to extend and would then give users more control over the content on their pages and its presentation. Needs some serious thought and planning though.
100rk

Re: a more robust solution

Post by 100rk »

uptoeleven wrote:...not a trivial task...
I agree with that - it is almost impossible in case there is no function in CMSModule class which module author needs to redefine and which can provide all module parameters and possible values... But in my opinion changes in module or plugin tags in content pages are obviously not so frequent and doing those changes is work for admin, or some advanced user - and I was talking about content pages with average (or below average) users as additional editors.
100rk

Re: a more robust solution

Post by 100rk »

uptoeleven wrote: I'm wondering if a more robust solution might be possible...
I think Akrabat did great work with implementation of additional content blocks (take a look here http://forum.cmsmadesimple.org/index.ph ... ml#msg3095) - it is partially what I was talking about - from now I can create content blocks with declaration of modules and 'main' content block which user can edit safely - without care about those 'strange {...} things' :-) (In case he has no privs for editing this content)

I mean - solution described by You is a) so hard for implementation in this time (or features of module API) and b) if it will be maked only for TinyMCE then it will be not usable way for user which don't want or can not use TinyMCE.
Last edited by 100rk on Thu Mar 10, 2005 11:18 pm, edited 1 time in total.
RayC

Re: How to protect plugin/module tags from deleting by addeditor

Post by RayC »

Edit Tags

http://www.thebilberry.com/greg/edittag/

Maybe something like this can be converted to php and work as a module or even plugin tags.
In my continuous search for a simple static html/templating system with user editable content
I almost allways end up resorting back to making pages by hand and using good old EditTag.
Post Reply

Return to “Tips and Tricks”