[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
SalazarAG
Registered User
Posts: 669
Joined: Mon Mar 30, 2015 10:48 am

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

Post by SalazarAG » Sat Feb 27, 2016 5:45 am

imkingdavid wrote:Here is the HTML replacement for the BBcode:

Code: Select all

<span style="display: inline-block;height: 15px;line-height: 15px;padding: 0 5px;font-size: 9px;background: blue;font-weight: bold;text-transform: uppercase;color: #fff;-moz-border-radius: 4px;-webkit-border-radius: 4px;border-radius: 4px;vertical-align: middle;">{TEXT}</span>
Then, it's just using the bbcode like:

Code: Select all

[prefix]TEST[/prefix]
hi david
and what is the "bbcode usage" of BBcode?
I'm sorry for my English. Google Translator does a bad job. :D

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

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

Post by SalazarAG » Sat Feb 27, 2016 6:13 am

Ignore my message above, already got. I'm doing the tests creating multiple prefixes.
David, how do I add between prefixes the symbol "[" and "]"?
Would [test] in the browser tab
I'm sorry for my English. Google Translator does a bad job. :D

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

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

Post by SalazarAG » Sat Feb 27, 2016 7:04 am

Hello David, I did the tests and the news is not good :(

The same strange thing happened, see:

I created 10 prefixes (teste2 to test10) and created the topics with titles equal to the prefix. Prefix test2 to teste9 normally appears. But test10 prefix and all other created after not appear or are changed randomly :(

See the image:

Image

and

Image

I really do not know what's wrong in my forum. I downloaded from github. Was that the problem?

Why anyone have this problem?

The extensions that are in my forum is if it can help:
Advanced warnings 2.0.1 Detalhes Desativar
Avatars on Memberlist 1.0.3 Detalhes Desativar
Avatar Upload - Resize & Crop 1.0.0 Detalhes Desativar
External Links Open in New Window 1.0.1 Detalhes Desativar
Lightbox 1.0.0 Detalhes Desativar
Normal and Special Ranks 1.0 Detalhes Desativar
Rawfield 0.0.1 Detalhes Desativar
Recent Topics 2.0.5 Detalhes Desativar
Reputation System 1.0.0-dev Detalhes Desativar
SlickPanel 1.0.2 Detalhes Desativar
Team Avatar 1.0.0 Detalhes Desativar
[pre]fixed - phpBB Topic Prefixes - v1.0.0 1.0.0 Detalhes
I'm sorry for my English. Google Translator does a bad job. :D

Miri4ever
Registered User
Posts: 409
Joined: Sat Mar 07, 2015 11:18 am

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

Post by Miri4ever » Sat Feb 27, 2016 2:13 pm

Getting this error message if I wanted to edit or post an new topic with this extension active:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/imkingdavid/prefixed/core/manager.php on line 432: Invalid argument supplied for foreach()
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 2416: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
Homepage: Terra Oceanica

User avatar
kustajuspin
Registered User
Posts: 55
Joined: Sat Apr 02, 2016 9:49 am
Location: China,Shandong
Name: Weitong Si
Contact:

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

Post by kustajuspin » Fri Apr 15, 2016 1:41 pm

:) :) Fighting!!!!!!I find that feel perfect,using it!
😄 Hello.
Welcome to '五味杂陈加油站' : http://simus.5v.pl/index.php

User avatar
thebigmattb
Registered User
Posts: 47
Joined: Tue Jan 29, 2008 8:21 pm
Location: Sheffield, UK

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

Post by thebigmattb » Tue Apr 26, 2016 10:36 am

I just wanted to say Good job, I can't wait for this extension to be released so I can use it on my forum.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2330
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

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

Post by kinerity » Sun May 08, 2016 6:36 am

I have a weird issue. I thought maybe it was just me, but I tried it on a clean install of 3.0.9 and the same problem appears.

Image

Shouldn't the boxes be side-by-side? The image is a vanilla 3.1.9 with no other extensions or styles installed.
Kailey Truscott - Community Team

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

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

Post by nextgen » Sun May 08, 2016 3:53 pm

kinerity wrote:I have a weird issue. I thought maybe it was just me, but I tried it on a clean install of 3.0.9 and the same problem appears.

Image

Shouldn't the boxes be side-by-side? The image is a vanilla 3.1.9 with no other extensions or styles installed.
Same problem here...
メルビン・ガルシア • Xtrato SolutionsMy active styles for phpBBphpBB Argentina - Soporte en español🇦🇷

Please do NOT contact for support via PM or email.

TWEagle
Registered User
Posts: 284
Joined: Sat Dec 10, 2005 2:50 pm
Contact:

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

Post by TWEagle » Tue May 17, 2016 7:27 pm

and here
Image

User avatar
Rhino.Freak
Registered User
Posts: 275
Joined: Wed Apr 29, 2015 8:32 am
Contact:

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

Post by Rhino.Freak » Wed May 25, 2016 7:13 am

Nice, been looking for this feature in phpbb since some time. Keep up the good work!

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

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

Post by imkingdavid » Sun Jun 26, 2016 4:10 am

FYI

I pushed a few updates today. These changes are primarily involved with moving the prefix drag-and-drop into a drop-down menu in front of the post subject field.

NOTE: The template event required for this has not yet been merged into the phpBB core. Here is the PR: https://github.com/phpbb/phpbb/pull/4371 you can apply it yourself if you wish to test out the latest version.

Otherwise, to continue how it has been (though perhaps with messed up styling), just rename the file in styles/prosilver/template/event/posting_editor_subject_after_.html by removing the trailing underscore.

This is not necessarily final, and may change further in future updates, but I felt that it is an improvement over what I had.

I still haven't fixed the issue that was reported where the prefixes don't show up on the correct topics once you've got a lot, because I haven't yet been able to reproduce that. But I will keep trying and hopefully I'll figure it out and fix it.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

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

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

Post by SalazarAG » Sun Jun 26, 2016 5:44 am

I loved the change, david, congratulations!

Even if the problem still remains with me and just give me to use 8 or 9 prefixes (after that they disappear or are exchanged) love this and I will continue using the extension :)

I have two suggestions, if possible:
1 - Add "[" and "]" between the prefix in the browser tab

For example, I do a prefix with bbcode called TEST. In viewtopic before the title appears TEST, but in the browser tab where site is the title would be [TEST]. It's possible?

2 - Add an event to be possible compatibility with Recent Topics of paybas. It would be very helpful.

Again congratulations and await the release of the extension! :)
I'm sorry for my English. Google Translator does a bad job. :D

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

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

Post by imkingdavid » Sun Jun 26, 2016 4:34 pm

Thanks for the feedback, and I'm glad you are enjoying the extension.

I do plan to fix that issue that comes from using more than 8-9 prefixes, so hopefully you won't have to limit yourself once I make a final release.

1. You would need to add [ and ] around the TEST prefix itself, I don't have a way right now to make it different like you are suggesting in the title.

2. I haven't looked at his code yet, but in order to show the topic prefixes in his extension, it would require Paybas to to add a PHP event that I would use to load the prefixes when those topic titles are loaded, and a template event right before the topic title for me to hook into so that the prefixes can show up.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

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

Post by Mauron » Sun Jun 26, 2016 6:14 pm

Guys, as far as I know, PayBas no longer develops Recent Topics; development was taken over by another guy, so you can ask him here.

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

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

Post by imkingdavid » Tue Jun 28, 2016 3:44 am

Mauron wrote:Guys, as far as I know, PayBas no longer develops Recent Topics; development was taken over by another guy, so you can ask him here.
Great, thanks for the info.

@SalazarAG - Good news - I may have just fixed that issue you are having. Would you mind updating and testing again?

To explain the issue technically, here is the code that I *was* using that extracts the prefix IDs that should be set on a topic when it is submitted:

Code: Select all

		// Due to .sortable('serialize') $ids will be a string like: 'prefix[]=4'
		// I need the number. That's in index two of $prefix_ids
		$used_ids = $this->request->variable('prefixes_used', '') ?: [];
		if ($used_ids && preg_match_all('/(prefix\[\]=(\d)+&?)+/', $used_ids, $prefix_ids) && isset($prefix_ids[2]))
		{
			$used_ids = $prefix_ids[2];
		}

		return $used_ids;
The preg_match_all() was supposed to pull the "4" from the string "prefix[]=4". It worked great when the IDs were all single-digit numbers (0-9). However, once I got to prefix ID 10, that preg_match_all() was returning "0" when "prefix[]=10". In other words, it was only pulling the last digit in the number, and therefore it wouldn't assign a prefix (because there was no prefix ID 0). I can see how if you have LOTs of prefixes, it might assign the wrong one. For instance, prefix ID 18 would end up assign prefix ID 8 instead.

So to fix it, I simply had to move the + like so:
(\d)+
becomes:
(\d+)

So yeah, all that to say, I hope I fixed the issue you were seeing, so please test it and let me know if you still have the same problem or if it seems to be working now.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Locked

Return to “Abandoned Extensions”