Extensions and phpBB 3.2: you should probably read this topic

Discussion forum for Extension Writers regarding Extension Development.
User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Thu Jul 13, 2017 10:16 pm

I'm afraid I don't understand what you're asking.
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Thu Jul 13, 2017 10:22 pm

s9e/TextFormatter is only for PHP?
Do not have javascript version? Like this https://github.com/wGEric/phpBB-BBCode- ... ipt-Parser

User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Thu Jul 13, 2017 10:27 pm

The library can generate a JavaScript parser, yes. There's some doc there: http://s9etextformatter.readthedocs.io/ ... roduction/
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Thu Jul 13, 2017 10:41 pm

Sorry but where do I put the code to generate js? And Can I do it directly in phpBB? Or do I have to install s9e \ TextFormatter?
And after generate js how do I use this (BBCode to HTML and HTML to BBCode)?

User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Thu Jul 13, 2017 10:46 pm

You'd need to use the configurator to get the JS then inject the JS inside the page, then use the JavaScript API to do the thing. In other words you need to write an extension for it.

Ideally there would be an event around the call to finalize() to retrieve the JavaScript parser at the same time the rest is generated. It would make things easier/more efficient.
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Thu Jul 13, 2017 10:59 pm

Thanks, i will try.
But what folder will generate the js file?

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Thu Jul 13, 2017 11:04 pm

JoshyPHP wrote:
Thu Jul 13, 2017 10:46 pm
Ideally there would be an event around the call to finalize() to retrieve the JavaScript parser at the same time the rest is generated. It would make things easier/more efficient.
but i can use this event? https://github.com/phpbb/phpbb/blob/mas ... y.php#L363

User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Thu Jul 13, 2017 11:05 pm

You can use that event, yes.

No folder, it's returned by finalize(). http://s9etextformatter.readthedocs.io/ ... roduction/
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Thu Jul 13, 2017 11:16 pm

Now I understand.
I saw API here, but it looks like it only has BBCode to HTML (s9e.TextFormatter.preview($text, $target);).
So, do not have function for HTML to BBCode? Correct?

User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Thu Jul 13, 2017 11:27 pm

No, there's no HTML-to-BBCode conversion.
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

martec
Registered User
Posts: 171
Joined: Sat Sep 19, 2009 2:15 pm

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by martec » Fri Jul 14, 2017 4:04 am

JoshyPHP wrote:
Thu Jul 13, 2017 11:27 pm
No, there's no HTML-to-BBCode conversion.
Thank you.
Unfortunately it was quite complicated to use this.
I'll have the same problem with new line quantities.

rxu
Extensions Development Team
Posts: 2769
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by rxu » Wed Oct 04, 2017 2:17 pm

Is there some built-in means to render a post partially? Say, certain paragraph of it (if any) and so on.

User avatar
JoshyPHP
Code Contributor
Posts: 735
Joined: Mon Jul 11, 2011 12:28 am

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by JoshyPHP » Wed Oct 04, 2017 2:45 pm

No, there's nothing like that. What would be the typical use case?
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

rxu
Extensions Development Team
Posts: 2769
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Extensions and phpBB 3.2: you should probably read this topic

Post by rxu » Wed Oct 04, 2017 2:52 pm

There's a user request to dynamically load a part of [editable/variable content] post consisting of paragraphs (f.e. from $3 to the end) on external site (or even to another topic).

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests

cron