phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Signature Preview by Default

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Re: Signature Preview by Default

Postby canonknipser » Mon Dec 19, 2011 5:20 pm

Isn't it the same behaviour as the preview button on "normal" posting?

So, if there sometimes will be a WYSIWYG-editor for posting, this editor can also be used for the signature. In this case, is there still a need for a preview button (except for fallback reason) or a live preview?

An extra javascript for live preview of signature is a little bit oversized in my eyes.
Greetings, Frank

Visit us at http://www.dslr-seite.de/forum
english is not my native language
User avatar
canonknipser
Registered User
 
Posts: 45
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Signature Preview by Default

Postby imkingdavid » Mon Dec 19, 2011 7:58 pm

The preview button can (and should remain). The signature should, however, be displayed above the editor by default without having to press "preview". If a change is made in the editor, the user can click "Preview" to view the update (though there should be some indicator that what they are viewing is not live/changes aren't saved). If we can implement live preview and WYSIWYG for that editor as well, all the better, but that is not necessarily in the scope of this request.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 902
Joined: Thu Jul 30, 2009 12:06 pm

Re: Signature Preview by Default

Postby Arty » Tue Dec 20, 2011 8:37 am

Great idea, but instead of ajax it could be a javascript parser. It supports regular expressions, so it should be possible to replicate bbcode parser using javascript, which would make preview instant and would reduce server load. Such preview could also be applied to other posting forms.
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: Signature Preview by Default

Postby callumacrae » Tue Dec 20, 2011 8:57 am

Arty wrote:Great idea, but instead of ajax it could be a javascript parser. It supports regular expressions, so it should be possible to replicate bbcode parser using javascript, which would make preview instant and would reduce server load. Such preview could also be applied to other posting forms.

While it would be possible, I don't think it should be done. Any weird bugs that are in the phpBB BBCode parser might not be carried over, and vice versa. Also, custom BBCodes would be a pain.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Signature Preview by Default

Postby JoshyPHP » Tue Jan 03, 2012 5:06 am

callumacrae wrote:Also, custom BBCodes would be a pain.

I would think that custom BBCodes would be easier than the hardcoded ones because they're basically just regexp-based replacements, so as long as they don't use PCRE features that you don't find in Javascript regexp you can port them straight from PHP. In phpBB's case, URL and LOCAL_URL use (?i) and INTTEXT might use \pL and \pN, but it should be possible to code around using them.

In comparison, the default BBCodes require more PHP code to be ported to Javascript.
JoshyPHP
Registered User
 
Posts: 24
Joined: Fri Jul 08, 2011 9:43 pm

Previous

Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 11 guests