PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Current releases are 3.2/Rhea and 3.3/Proteus.
Post Reply
User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by brunoais »

IMO, not if it is an extension but for code meant to run inside phpBB and as part of the basic phpBB package, yes

User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by Meis2M »

i Hummm...

a agree the core BBcodes must be render, but custom bbcode not necessary ( it is my idea ) like vbulletin ( not rendering in custom bbcode )

i see your works in github and it is great , thank you.
i'm talking about Rineditor that is based on Ckeditor , and every one know ckeditor is better that sceditor and we sure it is support until the end time :D

if you solve the problem with custom bbcode in sceditor i think you can solve it for ckeditor too.
according your post there is one or two issue left , so why stop it , it can be solved and we finally see this beauty feature in phpBB :D

Thanks

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by Ger »

brunoais wrote: Thu Jul 27, 2017 10:26 am The quote tag has many features. It has the user, the post id, the time of posting and the user id from where the post came from.
unfortunately, though, some are dynamic... Maybe too dynamic (just an expression. Not really). See here:
https://github.com/phpbb/phpbb/blob/mas ... er.php#L59

What is featured in there is, what I would call, my biggest nightmare for this ticket. The post and the user_id can be handled somehow with dummy or whatever but the date requires formatting according to the user's preferences.
So I'm stuck at this. I dunno how much can be viably cut out and how much has to stay. I've been waiting for help for a long time with this but I still didn't get any in the last year and some months...
If using dummy information, what level of "dummyness" should I use?
I see your point.

Now, if I'm not mistaken, you have all the information you need when you hit the quote button from viewtopic, since you can simply run the same server sided functions to generate the username, formatted posttime, etc.

When in posting.php and hitting the quote button from the topic review, you'll only have the client side at hand, making it more of a challenge. I guess that's your main problem, correct?

Then you have the username, user_id, time and post_id. Personally I'd say when in editor mode, you shouldn't need to have a link to the user or post in the editor itself. IMHO, it's just complicating for both you as a developer as well as for the end user. I would choose to parse the username, but not the URL to the user nor the URL to the post.

That leaves the time... As I see it, this line provides the information for the quote button: https://github.com/phpbb/phpbb/blob/mas ... w.html#L42

It holds the topic_review_row.POST_TIME, which is the timestamp. We need to keep that, since it's passed to the message parser. But can't we simply add the topic_review_row.POST_DATE, which is the formatted posttime? You can simply pass that value to your editor.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by brunoais »

And what time should be shown to the user? Current time in his PC? Generic time (maybe the epoc)? Time when the page was last loaded?

I've already suggested for all of those except for the time. I got no answer from phpBB main dev team.

I just reread this. I may look aggressive. Not my intention. I just want this to be solved the best way and I want to avoid working for nothing.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by Ger »

It's about the post that's quoted, isn't it?
That already has a post date in a timezone, as stated in my previous post. It's passed as $user->format_date($row['post_time']) so it uses the timezone and formatting for the posting user.
When you also pass the unix timestamp to the message parser, you're fine, aren't you?
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

martec
Registered User
Posts: 6
Joined: Thu Jun 12, 2014 11:44 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by martec »

I did not understand anything.
When you click the reply button, will not this information be obtained?
I did not understand in what situation that information needs to be obtained.
I can not believe that when someone uses the button "quote" in editor. Because in the current editor when you use the quote button it only returns [quote][/quote].

And I do not think it's just to give support to post_id, time and user_id in rendering. Since for this you have an example here https://github.com/samclarke/SCEditor-M ... er.js#L161

About which editor will use i recommend that you use SCEditor. Reason is simple, I can not give the necessary help, and the @brunoais is more accustomed to using SCEditor.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by brunoais »

The major issue is when the user creates a new post and wants to add those information to a new quote tag he makes.
How does editing a tag parameter work? Dunno which way is best. In CKE it is all personalized, IIRC.
Maybe there's a right-click with a menu option which allows editing each field individually?
Maybe allow extensions to hook in and add personalized ways of showing their special BBCode?
Makes sense?
martec wrote: Fri Jul 28, 2017 3:41 am And I do not think it's just to give support to post_id, time and user_id in rendering. Since for this you have an example here https://github.com/samclarke/SCEditor-M ... er.js#L161
That code is from before the new quote tag.
Also, that personalized code was (and still is) meant to go away completely in future iterations of it.

It all seems easy when just thinking about the quote tag. I don't want to solve the problem for the quote tag. I want to solve the problem for all tags.
If, in order to get this moving I need to solve specifically for the quote tag.... ... I don't like it but I guess that's just the only viable way... Also to prevent having this hanging for much longer (it has been for really really very long!!!)

martec
Registered User
Posts: 6
Joined: Thu Jun 12, 2014 11:44 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by martec »

brunoais wrote: Fri Jul 28, 2017 10:55 am The major issue is when the user creates a new post and wants to add those information to a new quote tag he makes.
How does editing a tag parameter work? Dunno which way is best. In CKE it is all personalized, IIRC.
Maybe there's a right-click with a menu option which allows editing each field individually?
Maybe allow extensions to hook in and add personalized ways of showing their special BBCode?
Makes sense?
new quote tag. But quote of other post?
Or quote without precedence?
if is about without precedence, will not have information about post_id etc. So not make sense.
if is about other post can use somethig like https://github.com/martec/Rin-Editor_fo ... er.php#L88. I use this code to generate quickquote.

martec
Registered User
Posts: 6
Joined: Thu Jun 12, 2014 11:44 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by martec »

brunoais wrote: Fri Jul 28, 2017 10:55 am It all seems easy when just thinking about the quote tag. I don't want to solve the problem for the quote tag. I want to solve the problem for all tags.
If, in order to get this moving I need to solve specifically for the quote tag.... ... I don't like it but I guess that's just the only viable way... Also to prevent having this hanging for much longer (it has been for really really very long!!!)
you saying about custom tag like spoiler?
but possible render custom tag that using replacement like

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="View Spoiler" style="text-align:center;width:115px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'View Spoiler'; }" /></div><div class="quotecontent"><div style="display: none;">$1</div></div></div>
?

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Post by brunoais »

martec wrote: Fri Jul 28, 2017 11:47 am
brunoais wrote: Fri Jul 28, 2017 10:55 am -snip -
new quote tag. But quote of other post?
Or quote without precedence?
if is about without precedence, will not have information about post_id etc. So not make sense.
What if the user wants to insert that information him/herself? Will you force that user to go to source code mode for it?
martec wrote: Fri Jul 28, 2017 11:47 am if is about other post can use somethig like https://github.com/martec/Rin-Editor_fo ... er.php#L88. I use this code to generate quickquote.
Alright... Now thing of the quote tag as another BBCode with similar prerequisites. How will you satisfy them?
Or... Will you not satisfy them and decide that the quote tag is special?
martec wrote: Fri Jul 28, 2017 11:51 am
brunoais wrote: Fri Jul 28, 2017 10:55 am - snip -
you saying about custom tag like spoiler?
but possible render custom tag that using replacement like

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="View Spoiler" style="text-align:center;width:115px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'View Spoiler'; }" /></div><div class="quotecontent"><div style="display: none;">$1</div></div></div>
?
No. That one's easy. I'm thinking about the hard ones with lots of complexity.
Anyway, I'm planning on having an extra input as in my example installation which should make matters easier.
I'm having the tendency to lean upon making quote special at this point.... If quote becomes special... No doubt that it allows me to speed things up and move on from this problem....

Post Reply