Signature Preview by Default

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
canonknipser
Registered User
Posts: 71
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Signature Preview by Default

Post by canonknipser »

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
phpbb.de support team member - no support via PM or mail
English is not my native language
Extensions and scripts for phpBB
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Signature Preview by Default

Post by imkingdavid »

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
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Signature Preview by Default

Post by Arty »

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.
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Signature Preview by Default

Post by callumacrae »

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.
Made by developers, for developers!
My blog
User avatar
JoshyPHP
Registered User
Posts: 376
Joined: Fri Jul 08, 2011 9:43 pm

Re: Signature Preview by Default

Post by JoshyPHP »

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.
Post Reply