Page 1 of 5

[ABD] Topic Prefixes

Posted: Tue Feb 09, 2016 10:43 am
by stathisch
Extension Name: Topic Prefixes
Author: github.com/stathis stathisch

Extension Description: Adds topic prefixes to your topics, defined in each ACP/Forum. Aims to be compatible with Topic Prefix MOD for phpBB 3.0!
Extension Version: 1.0.0

Requirements: Please have the latest phpBB 3.1.x installed before trying this.

Bugs and new features: I would be happy for people to make pull requests for this MOD. Please keep it compatible with the old 3.0.x MOD though!

Notes:
  • I have tested this plugin on a board I administer with 130k topics after upgrading to phpBB 3.1 from 3.0 and it seems to work fine.
  • If you are using board3 portal you can make it show the prefixes in the recent list etc with some small changes - can provide the code, although still testing.
Extension Download: https://github.com/stathis/phpbb31-topi ... master.zip
Image

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 11:51 am
by Thunder_one
Thanks for the ext. I have built in my test board but I see in the Source view and in the view of forums no prefix.

When I create a new theme, then I can choose the prefix, but I see the prefix not in the forum view and not in the thread view.

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:02 pm
by stathisch
Thunder_one wrote:Thanks for the ext. I have built in my test board but I see in the Source view and in the view of forums no prefix.

When I create a new theme, then I can choose the prefix, but I see the prefix not in the forum view and not in the thread view.
Hey, thanks for testing it.
I'm sure you've thought of it yourself, but just in case, like I too forget sometimes -- have you cleared your /cache/twig/ ?

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:06 pm
by Thunder_one
Have I made but no change.

see pictures. There appears no prefix.

Image
Image

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:22 pm
by Exabot
phpBB 3.1.7-pl1

Code: Select all

SQL ERROR [ mysql4 ]

Incorrect integer value: 'Golf 2 (1983-1992)' for column 'topic_prefix' at row 1 [1366]

SQL

UPDATE phpbb_topics SET forum_id = 145, icon_id = 0, topic_title = 'Guest', topic_first_poster_name = 'argo', topic_type = 0, topic_time_limit = 0, poll_title = '', poll_start = 0, poll_max_options = 0, poll_length = 0, poll_vote_change = 0, topic_last_view_time = 1455020321, topic_attachment = 0, topic_prefix = 'Golf 2 (1983-1992)', wolfsblvt_poll_votes_hide = 1, wolfsblvt_poll_voters_show = 1, wolfsblvt_poll_voters_limit = 1, wolfsblvt_poll_show_ordered = 1, wolfsblvt_poll_max_value = 1, wolfsblvt_poll_total_value = 1 WHERE topic_id = 124941

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/includes/functions_posting.php
LINE: 1952
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/posting.php
LINE: 1403
CALL: submit_post()

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:37 pm
by stathisch
Thunder_one wrote:Have I made but no change.

see pictures. There appears no prefix.

Image
Image
Please download the latest version from github and see it makes and difference. You can just replace listener.php for now.
Exabot wrote:phpBB 3.1.7-pl1

Code: Select all

SQL ERROR [ mysql4 ]

Incorrect integer value: 'Golf 2 (1983-1992)' for column 'topic_prefix' at row 1 [1366]

SQL

UPDATE phpbb_topics SET forum_id = 145, icon_id = 0, topic_title = 'Guest', topic_first_poster_name = 'argo', topic_type = 0, topic_time_limit = 0, poll_title = '', poll_start = 0, poll_max_options = 0, poll_length = 0, poll_vote_change = 0, topic_last_view_time = 1455020321, topic_attachment = 0, topic_prefix = 'Golf 2 (1983-1992)', wolfsblvt_poll_votes_hide = 1, wolfsblvt_poll_voters_show = 1, wolfsblvt_poll_voters_limit = 1, wolfsblvt_poll_show_ordered = 1, wolfsblvt_poll_max_value = 1, wolfsblvt_poll_total_value = 1 WHERE topic_id = 124941

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/includes/functions_posting.php
LINE: 1952
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/posting.php
LINE: 1403
CALL: submit_post()
Thanks for the feedback, on it.

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:41 pm
by stathisch
Exabot, is this on a live forum where the old 3.0 MOD was installed?

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:52 pm
by Thunder_one
Thanks stathisch. Now it works. :D

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 12:55 pm
by Thunder_one
Would not it also possible the prefixes to display on the Forum site ?

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:00 pm
by stathisch
Thunder_one wrote:Would not it also possible the prefixes to display on the Forum site ?
Where exactly? You mean here?

Image

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:04 pm
by Thunder_one
Yes exactly. Tha'ts what I meant.

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:08 pm
by stathisch
Thunder_one wrote:Yes exactly. Tha'ts what I meant.
I am working on that. :)

Just don't want to make the listing heavier by adding queries, so will probably add another field on the _forums table for what prefix the latest topic had.

Expect an update in the next couple of days!

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:13 pm
by Exabot
stathisch wrote:Exabot, is this on a live forum where the old 3.0 MOD was installed?
phpBB 3.1.7-pl1 and installed https://github.com/stathis/phpbb31-topi ... master.zip

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:22 pm
by stathisch
Exabot wrote:
stathisch wrote:Exabot, is this on a live forum where the old 3.0 MOD was installed?
phpBB 3.1.7-pl1 and https://github.com/stathis/phpbb31-topi ... master.zip
The error you're getting is weird - it's indicating that the topic_prefix column takes an integer value, while my migration sets it as VARCHAR -- as you can see it has worked for Thunder_one for setting the prefix.

Did you have some other extension installed that used that column and was set as int?

Re: [DEV] Topic Prefixes

Posted: Tue Feb 09, 2016 1:31 pm
by Exabot
stathisch wrote:
Exabot wrote:
stathisch wrote:Exabot, is this on a live forum where the old 3.0 MOD was installed?
phpBB 3.1.7-pl1 and https://github.com/stathis/phpbb31-topi ... master.zip
The error you're getting is weird - it's indicating that the topic_prefix column takes an integer value, while my migration sets it as VARCHAR -- as you can see it has worked for Thunder_one for setting the prefix.

Did you have some other extension installed that used that column and was set as int?
Yes, clean board it works.