[3.2][3.3][RC] Display Only First Post

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

... So, i realize doing another extension on fly about phpBB WordPress integration, where i liked to unify all form data into a single var (dbhost, dbuser...)
and configured the extension to store these data into the config table.
The result is an error because the config table is 255 VARCHAR so that it cannot contain values longer than 255.

Unfortunately, i did this Display Only First Post extension using same way for the value of the Custom Content option that append arbitrary text or html to the first post text, that so cannot be longer than 255.
It is intended that the first post should may display an ads for non registered or some long html code not limited to 255 chars.

... So the extension will be soon (asap) updated to switch and use the config_text table instead, that will allow to add arbitrary content not limited to 255 chars

ps

all others options will be moved to the config_text table... may forumsIDS also, and even groupsIDS could be longer than 255 chars, if not using the all option that will affect all forums.

Anyway it is hard to imagine soo many ids, and in the while, it is possible to add arbitrary content just adding/changing it here:
https://github.com/axew3/phpbb-display- ... on.php#L43

and activating the option that append the content to the post, but leaving blank/empty the text field.
The above content will display.

[EDITED]
Do not take me too serious
Anyway i do not like Discourse
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

Another TODO logged here (so that asap it will be fixed): doing something else i posted a test post containing bbcode and i note that:
when the first post contain bbcode, the post result is not correctly parsed. The bbcode display as normal text (because the bbcode is NOT parsed).
So that this aspect also require to be fixed
Do not take me too serious
Anyway i do not like Discourse
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

All bugs should have been covered.
The new extension has been tagged (again) on Github as 1.0.3 (like the tag passed for validation here at phpBB.com ext db).
So please disable the old version if already installed, delete data, then remove the old extension folder.

Upload the new 1.0.3 version, that fix all bugs and allow to add custom HTML content into the post:
https://github.com/axew3/phpbb-display ... t/releases

so to have
phpBB/ext/w3all/displayonlyfirstpost

Go to "ACP" > "Customise" > "Extensions" and enable the "Display Only First Post" extension.
Set Groups, Forums IDS and Custom Content options into related extension ACP settings page.

Hints? Just post.
Cheers!
Do not take me too serious
Anyway i do not like Discourse
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

Just to inform that the extension code, version 1.0.4 has been updated on github to fix all and any bug.
Display Only the First Post to specified groups and optionally prepend custom (HTML) content into the post
Note that the extension (i am sorry) has been newly released and tagged as 1.0.4 (like the previous).
Anyway this release (tagged 1.0.4 like the previous) fix some files (has been tagged like the previous to keep it updated to the same code passed here at phpBB.com for validation (that may will be approved, may not)) and resolve all bugs, along with Eng phrases.

To update to the fixed and fully working NEW 1.0.4 RC, may just download the package and upload/substitute into the
/ext/w3all/displayonlyfirstpost/
directory, replacing all old files

https://github.com/axew3/phpbb-display- ... t/releases

(thank for all the help and their patience to Paul and warmweer)

Enjoy!
Do not take me too serious
Anyway i do not like Discourse
User avatar
GTI
Registered User
Posts: 300
Joined: Mon Aug 24, 2020 4:59 pm
Location: West Sussex
Name: Laura

Re: [3.2][3.3][RC] Display Only First Post

Post by GTI »

axe70 wrote: Wed Aug 17, 2022 7:39 am Has been passed for validation this new extension:
Any news on how far along it is in the queue?

I was going to use this: https://www.phpbb.com/customise/db/exte ... _to_guest/ to encourage folk to register but your extension seems to have more configuration functionality.
Most of us will enjoy Christmas in the comfort of our own homes this year, however, sadly, that can't be said for people in the Ukraine who are suffering day after day, due to the Russian invasion.

If you would like to make a small donation to help Ukrainians in their time of need, you can donate to help all Ukrainians via BritishRedCross or you can donate to help the Ukrainian children via Unicef. 🇺🇦 Thank You 🇺🇦
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

Yes. Not to say but... Just downloaded the linked one and looked number of files and structure, so nor opened to look on code.

You can answer your question looking files and listeners used into mine, and sequel of files (and so listeners i assume) used into the other.
You'll immediately realize that this is faster under any aspect, light and non intrusive, in few lines of code at the right point.
And it is more featured with easy.

This extension will never be approved until i do not change (it is very easy!) the fact that html should not be accepted into the extension ACP form, and i should instead replace accepting and parsing only bbcode.
It is not safe they say, i say it is safe. It is very easy to change, i will do asap, maybe.
Anyway you may can trust me, if i say it cannot be exploited: i am also just over to the html on posts extension, that will be soon released on version 1.0.1. I cannot link it, but if you follow into my forum you'll find it under phpBB category.
There is quite well explained why it is secure. I also offered 300$ to anyone able to show and prove that it could be exploited.
Since you should inject at listeners level, like the ext code do, it is substantially impossible to be exploited or it would mean that phpBB would not be safe himself.

Look that into the ACP form, if you want a correct parsing of the html on the post, any HTML or Javascript you add, DO NOT NEED TO CONTAIN SPACES NOR CARRIAGE RETURN.

Spaces can exist into elements like <b> or <p> or <table><tr><td>this is correct, phpBB will not add the <br> tag between ours html tags</td></tr></table>
any carriage return into the text editor will be parsed by phpBB as <br>. Be sure that there is no space between tags.

So as example, to alert hello, and then an <h1> that say welcome to all, then a <p> that say some other, the correct to put will be:

Code: Select all

<script>alert("Hello!");</script><h1>welcome to all</h1><p>that say some other</p>
no spaces between tags and nor carriage return. May write complex and long html/javascript into a text editor then make your code all into one line without spaces between tags, then copy and paste into the form.
If any problem may let know.
Enjoy!
Do not take me too serious
Anyway i do not like Discourse
User avatar
GTI
Registered User
Posts: 300
Joined: Mon Aug 24, 2020 4:59 pm
Location: West Sussex
Name: Laura

Re: [3.2][3.3][RC] Display Only First Post

Post by GTI »

If I was you - I would leave the HTML out of the extension.

Look at it this way, there are several places in the ACP where you can enter text - examples... forum descriptions, contact page settings and group descriptions - none of them allow HTML, so if a phpBB user is typing in those boxes - he knows it has to follow the native way of phpBB which is BBCode for text formatting.

There is an announcements extension which also allows the user to add a message and that also only allows BBCode text formatting.

On a show first post to certain groups extension - I don't think being able to enter HTML will benefit the end user so I think it would be a shame such an awesome extension couldn't get validated just because of a HTML feature that most likely wouldn't get used.
Most of us will enjoy Christmas in the comfort of our own homes this year, however, sadly, that can't be said for people in the Ukraine who are suffering day after day, due to the Russian invasion.

If you would like to make a small donation to help Ukrainians in their time of need, you can donate to help all Ukrainians via BritishRedCross or you can donate to help the Ukrainian children via Unicef. 🇺🇦 Thank You 🇺🇦
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

:| ok it will be switched to bbcode very soon, and re-submitted for validation.
Html version will still be available for those who want it.
I will be in reply here in short!
Do not take me too serious
Anyway i do not like Discourse
User avatar
axe70
Registered User
Posts: 751
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio

Re: [3.2][3.3][RC] Display Only First Post

Post by axe70 »

It has been released on short rush the 1.0.5 version that replace HTML custom content, with default BBCode phpBB way
https://github.com/axew3/phpbb-display-only-first-post

Old 1.0.4 is still available and will be maintained available (and whenever necessary updated):
https://github.com/axew3/phpbb-display- ... t/releases

I did html because i had the necessity to satisfy a request, and javascript code is required to easily accomplish with the requested task.
It has been easily changed to be BBCode now.

I will now maybe pass it for validation.

I will follow with 1.0.4 version,
:D you can follow your way
Enjoy!
Do not take me too serious
Anyway i do not like Discourse
User avatar
GTI
Registered User
Posts: 300
Joined: Mon Aug 24, 2020 4:59 pm
Location: West Sussex
Name: Laura

Re: [3.2][3.3][RC] Display Only First Post

Post by GTI »

Thanks Axe70, will see how it goes :D
Most of us will enjoy Christmas in the comfort of our own homes this year, however, sadly, that can't be said for people in the Ukraine who are suffering day after day, due to the Russian invasion.

If you would like to make a small donation to help Ukrainians in their time of need, you can donate to help all Ukrainians via BritishRedCross or you can donate to help the Ukrainian children via Unicef. 🇺🇦 Thank You 🇺🇦

Return to “Extensions in Development”