BLOG:CMS :: Support Forum

Support Forum for BLOG:CMS

You are not logged in.

#1 07.12.2005 14:11

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Patch allowing AJAX-based previews for comments

I was trying to come up with a comment preview system that worked with Captcha, and came up with the one described at:

http://accidentalweblog.org/patches/blo … ysiwyg.txt

... note that this is a somewhat difficult install. It's not a plug-in, though I suppose it might be possible to make it one.

Full details for use and installation are in the file above. All files (including several new files and a patch) are at:

http://accidentalweblog.org/patches/blo … axwysiwyg/

... all that said, I think it's sorta neat. Uses an AJAX technique to ask the server *just* for the comment preview, so users can preview to their heart's content without hitting the DB, reloading the page, so on. Quite snappy.

You can see it in action at http://accidentalweblog.org/?item=wysiwyg#commentform. Enter something in the comment form, push the blue 'Preview' button.

And yes, this is in core libs. Seeing as it does modify one. And I wasn't sure where else to put it.

Offline

 

#2 07.12.2005 14:23

Radek Hulán
Site Admin
From: Prague, Czech Republic
Registered: 17.03.2004
Posts: 2509
Website

Re: Patch allowing AJAX-based previews for comments

Hm, it does nothing in my Opera 9.0, what should it do?


--= BLOG:CMS developer =--

Offline

 

#3 07.12.2005 16:07

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

Odd. I tested it in 9. It works fine in mine.

The update can be quite fast, quite subtle. If you enter something for a comment and hit 'Preview', you *should* see a preview just above the comment pane (if you're not logged in, just above the Captcha stuff).

As I said: works in my 9. I'm an Opera guy myself. What platform are you on?

Offline

 

#4 07.12.2005 16:15

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

Here's a screen capture from Opera 9.0 build 8031 on XP:

http://accidentalweblog.org/patches/blogcms/ajaxwysiwyg/screencapt.jpg

Offline

 

#5 07.12.2005 16:22

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

... and before anyone asks, yes, the links it builds (for [a href=]...[/a] tags) do work. It's just hard to see in that preview 'cos the link colour in that template is subtle.

Offline

 

#6 07.12.2005 17:01

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

Just checked--works in Opera 9 build 1428 on Debian too.

Offline

 

#7 07.12.2005 23:37

Radek Hulán
Site Admin
From: Prague, Czech Republic
Registered: 17.03.2004
Posts: 2509
Website

Re: Patch allowing AJAX-based previews for comments

ajmilne wrote:

Odd. I tested it in 9. It works fine in mine.

Oh, my mistake. It works. Brilliant!

I will consider including this into standard package, if you don't mind, with full credit given.


--= BLOG:CMS developer =--

Offline

 

#8 08.12.2005 10:16

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

Thanks, that's great to hear. And I'd be honoured if it made the package.

I made a slight update to the readme just now. Nothing relevant to the install process, but I'd munged the descriptions of the new files in the previous edit, when I rearranged the text to clarify how you edit proc_preview.php

Latest edit just clarifies: proc_preview.php is the server component, and minglobaltextfunctions.php is the light lib supporting it.

Offline

 

#9 16.12.2005 16:41

ajmilne
BLOG:CMS Junior
Registered: 13.11.2005
Posts: 15

Re: Patch allowing AJAX-based previews for comments

Minor edit today to the README to cover compatibility with fancy URLs. I'm not actually sure this is necessary--I haven't used fancy URLs on my server--but I've explained how to make the two critical URLs absolute anyway.

Last edited by ajmilne (16.12.2005 16:42)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

TOPlist