[ABD] [3.1] [pre]fixed - Topic Prefixes extension

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
3Di
Former Team Member
Posts: 15063
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [ALPHA] [pre]fixed - Topic Prefixes extension

Post by 3Di »

Poorly speaking, change this line..

Code: Select all

if ($used_ids && preg_match_all('/(prefix\[\]=(\d)+&?)+/', $used_ids, $prefix_ids) && isset($prefix_ids[2]))
to be ..

Code: Select all

if ($used_ids && preg_match_all('/(prefix\[\]=(\d+)&?)+/', $used_ids, $prefix_ids) && isset($prefix_ids[2]))
for the sake of those are not coders. :) And see if that fixes your issue.

thanks.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
SalazarAG
Registered User
Posts: 673
Joined: Mon Mar 30, 2015 10:48 am

Re: [ALPHA] [pre]fixed - Topic Prefixes extension

Post by SalazarAG »

Hi David!

It did the tests and the same problem disappeared! I made 12 prefixes and all worked perfectly, in the order they should.

I am very happy! Thank you so much for this!

Congratulations for all !!!
I'm sorry for my English. Google Translator does a bad job. :D

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [ALPHA] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

@3Di - true, i probably could have made that clearer, though in any case the change has been made in the repo so to fix the issue, just update to the latest revision, no need to change the files manually yourself. But thanks for the clarification.

@SalazarAG - Wonderful, I'm glad to hear it!

Hopefully I can finish up a few more improvements over the next few days or weeks. I still cannot release this until they add that new template event into the code (pr: https://github.com/phpbb/phpbb/pull/4371). I also am considering waiting to release this until 3.2 is released so that I can confirm compatibility with both 3.1.x and 3.2.x.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

And just to follow up, I've bumped this up to BETA. As I mentioned, there may be some more improvements and changes before the release, but I think it's ready for some more widespread usage and testing. Even still, don't use this on a live site unless you're willing to deal with any issues yourself.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
nextgen
Jr. Style Validator
Posts: 2360
Joined: Mon Jul 26, 2010 10:58 pm
Location: Guatemala
Name: Melvin García
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by nextgen »

Nice one David, I tested with 3.2.0 rc1
But how they put prefixes in the topic? ;)

Image
メルビン・ガルシア • phpBB Development StylesphpBB Argentina - Soporte en español 🇦🇷

Please do NOT contact for support via PM or email.

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

nextgen wrote:Nice one David, I tested with 3.2.0 rc1
But how they put prefixes in the topic? ;)

Image
Traditionally, there were two blue-background columns there next to the Topic Prefixes label. I recently made a change that depends on a template event that is not yet merged, but the PR is here if you wish to apply it yourself: https://github.com/phpbb/phpbb/pull/4371

Otherwise, I think I changed around some of the styling so the two columns don't necessarily have a blue background anymore. I haven't tested it but you *should* still be able to drag and drop there. Try clicking and holding the prefix and dragging and dropping it to the right.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
nextgen
Jr. Style Validator
Posts: 2360
Joined: Mon Jul 26, 2010 10:58 pm
Location: Guatemala
Name: Melvin García
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by nextgen »

imkingdavid wrote:I recently made a change that depends on a template event that is not yet merged, but the PR is here if you wish to apply it yourself: https://github.com/phpbb/phpbb/pull/4371
Apply, works great :)

Image

Image

:)
メルビン・ガルシア • phpBB Development StylesphpBB Argentina - Soporte en español 🇦🇷

Please do NOT contact for support via PM or email.

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

nextgen wrote:
imkingdavid wrote:I recently made a change that depends on a template event that is not yet merged, but the PR is here if you wish to apply it yourself: https://github.com/phpbb/phpbb/pull/4371
Apply, works great :)

Image

Image

:)
Glad to hear it, thanks for letting me know it's working for you! :) Please let me know if you have any problems with it.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

Additionally, just so everyone is aware, I have added a packagist.org package (https://packagist.org/packages/imkingdavid/prefixed) so that you can install this using composer instead of having to mess with uploading and updating the files yourself.

During development, you can add:
"imkingdavid/prefixed": "dev-develop",
to get the latest dev version of the extension. When I release I'll try to look into how to do version numbers properly for this.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
3Di
Former Team Member
Posts: 15063
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by 3Di »

@ imkingdavid

Since you stated your extension will not work as expected if the server is not running under a minimum of PHP 5.4 or greater I created a PR against your repository: https://github.com/imkingdavid/prefixed/pull/15

This way the end user will be not able to install the extension at all if the basic requirements are not met, avoiding you to get in troubles while providing assistance for your extension. I wrote it on the fly there on GitHub, feel free to test it before.

Regards.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
SalazarAG
Registered User
Posts: 673
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG »

Hi again David!

You can take a look at this error? viewtopic.php?f=456&t=2355811&hilit=wel ... #p14440591

It seems to be a conflict between the two extensions and I can not use the other because of it :(
I'm sorry for my English. Google Translator does a bad job. :D

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

@3Di - thanks, I've merged that.

@SalazarAG - I can look into it, thanks for the bug report.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

User avatar
3Di
Former Team Member
Posts: 15063
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by 3Di »

imkingdavid wrote:@3Di - thanks, I've merged that.

@SalazarAG - I can look into it, thanks for the bug report.
1 - Well done, I thank you too.

2 - I guess to know where this issue lies here, since I am using the standard submit_post API there.
Sleepy time has come for me though. Let me think about that tomorrow or when I'll get more spare time, the solution is out of this door: we are speaking about hookable extensions' events (not phpBB ones) if I correctly understood that error log. I believe that also the other extensions that use the same standard API will be in conflict with yours once are both enabled.

Regards.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
3Di
Former Team Member
Posts: 15063
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by 3Di »

imkingdavid wrote:@3Di - thanks, I've merged that.
This new PR handles the correct parenthesis stuff. ;)
https://github.com/imkingdavid/prefixed/pull/16
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
imkingdavid
Former Team Member
Posts: 2670
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid »

@3Di

That error Salazar pointed out likely occurs because both extensions use the core.user_setup event. I use it to instantiate my objects for my other event listeners, and the welcome topic extension uses it to create the new topic (see listener.php::send_topic(), which is subscribed to the 'core.user_setup').

I believe the issue is that my extension's event listener (listener.php::setup()) is being called *after* the welcome topic extension's, so the $this->manager object isn't yet instantiated at the point the create_welcome_topic() method is being called. That method calls some code that then triggers the core.submit_post_edit event, which calls my listener.php::manage_prefixes_on_posting() method, causing this error.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.

Locked

Return to “Abandoned Extensions”