Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Frontend editing with rich text editor
JEditable with the textile plugin looks pretty well suited to a standard txp setup. Seems to me like to implement that, you’d just have to:
- test whether a person is logged in, before loading the script,
- tie the update button to a callback to the article’s title, body, or excerpt.
Of course I suppose that’s like saying you just have to…
- make a time travel machine
- go back and create facebook in 1998
Offline
Re: Frontend editing with rich text editor
:-)
The first bit you can solve with rvm_if_privileged, the second bit I guess needs a custom script to write the changes back to the database. Stef made something along those lines for the “scheduler” in the example I linked to above but that was a specific situation. I’m not sure that the mem_ plugins lend themselves to this situation as you need to have a form to process.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Frontend editing with rich text editor
mem_form aught to be able handle it, no?
Offline
Re: Frontend editing with rich text editor
mem_form aught to be able handle it, no?
I think mem_form would work if a window or modal box loaded containing a textarea, form and submit button built with mem_simple_form + mem_form or mem_public_article. IIRC mem_form has to process a form made with mem_form tags (if you make your own form elements not using mem_form, it ignores them) and the form processor checks against the unique “nonce” of the form. This a bit like the front end link we have at the moment, except that you load the “admin interface” in a modal box rather than another tab/window and you craft your own simplified interface with mem_form etc.
The jEditable examples all just send a few post variables (see “What is sent to the server” on that page) and you need a separate php script to take over from there and to handle securlty. That could be quite simple for normal txp:body/excerpt situations, or more complex when you want to edit custom_fields, or add new links to a link list etc. To use textile, you also need a small php script to load the textile markup source for txp:body or txp:excerpt from the db as it’s not part of the page source.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Frontend editing with rich text editor
And a simple iframe. Generated by Jquery. As bot_image_upload
?
<txp:rvm_if_privileged>
<script type="text/javascript">
$("body").append(
'<div id="modal_windows">' +
'<iframe id="write_iframe" src ="<txp:site_url />textpattern/index.php?event=article&step=edit&ID=<txp:article_id />" frameborder="0"></iframe>' +
'</div>' );
</script>
</txp:rvm_if_privileged>
Offline
Re: Frontend editing with rich text editor
OK, someone smarter than me want to package all this up into a plugin?
Offline