[ABD] Topic prefix mod for phpBB3

Any abandoned MODs will be moved to this forum.

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

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
ssadal0914
Registered User
Posts: 12
Joined: Mon Nov 23, 2009 6:08 am

Re: [Beta] Topic prefix mod for phpBB3

Post by ssadal0914 »

idiotnesia wrote:
GazNicki wrote:Works perfectly. Thank you.

Is there a way to make it a requirement to select a Topic Prefix. When you submit a Topic with a blank Subject you get an error message. Is there a way to make the forum need a Topic Prefix before the post can be submitted??

I would like to force my members to select a topic prefix for their posts in one particular forum.
open: posting.php
find

Code: Select all

// idiotnesia wuz here - topic prefix mod
	$post_data['topic_prefix']		= request_var('prefix', 0);
// end
add-after

Code: Select all

	$prefix_req_forum = array('2', '4', '6'); // replace with your forum id
	
	if (in_array($forum_id, $prefix_req_forum) && !$post_data['topic_prefix'] && $mode == 'post')
	{
		$error[] = 'Topic title prefix is required';
	}
Thanks.

However, it works only when i submit a new Topic.

when i edit the topic, it do not work.

can i fix it?
User avatar
Mahoney
Registered User
Posts: 196
Joined: Sun Mar 16, 2008 4:07 pm
Contact:

Re: [Beta] Topic prefix mod for phpBB3

Post by Mahoney »

Hello
ssadal0914 wrote:However, it works only when i submit a new Topic.

when i edit the topic, it do not work.

can i fix it?
O.K. - Try this

Code: Select all

$prefix_req_forum = array('2', '4', '6'); // replace with your forum id
   
   if (in_array($forum_id, $prefix_req_forum) && !$post_data['topic_prefix'] && $mode == 'post' || $mode == 'edit' )
   {
      $error[] = 'Topic title prefix is required';
   } 
best regads Mahoney
ssadal0914
Registered User
Posts: 12
Joined: Mon Nov 23, 2009 6:08 am

Re: [Beta] Topic prefix mod for phpBB3

Post by ssadal0914 »

Mahoney wrote: O.K. - Try this

Code: Select all

$prefix_req_forum = array('2', '4', '6'); // replace with your forum id
   
   if (in_array($forum_id, $prefix_req_forum) && !$post_data['topic_prefix'] && $mode == 'post' || $mode == 'edit' )
   {
      $error[] = 'Topic title prefix is required';
   } 
best regads Mahoney
works perfectly. Thanks!!
ssadal0914
Registered User
Posts: 12
Joined: Mon Nov 23, 2009 6:08 am

Re: [Beta] Topic prefix mod for phpBB3

Post by ssadal0914 »

ssadal0914 wrote:
Mahoney wrote: O.K. - Try this

Code: Select all

$prefix_req_forum = array('2', '4', '6'); // replace with your forum id
   
   if (in_array($forum_id, $prefix_req_forum) && !$post_data['topic_prefix'] && $mode == 'post' || $mode == 'edit' )
   {
      $error[] = 'Topic title prefix is required';
   } 
best regads Mahoney
works perfectly. Thanks!!
I looked out again.

There is a problem.

when i edit the topic, error is always shown.

i did select topic title prefix, but 'Topic title prefix is required' error is shown.

can i fix it? thanks.
discountnetz
Registered User
Posts: 1
Joined: Thu Mar 11, 2010 3:07 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by discountnetz »

Hello:)
I built the Mod in my forum and functioned he to perfect.

Now I have the forum changed over with the Ultimate SEO URL in Advanced mode. Unfortunately the Prefix mode does not go now any longer. If I try to provide or to a post office work on new post office always come the error message:
Column was set to data type implicit default; NULL supplied for NOT NULL column 'topic_prefix' at row 1 [1263]

SQL

UPDATE phpbb_topics SET forum_id = 18, icon_id = 0, topic_approved = '1', topic_title = 'Buffalo LinkStation Live 320 GB HS-DH320GL NAS-Festplatte', topic_first_poster_name = 'Monsterbrille', topic_type = 0, topic_time_limit = 0, poll_title = '', poll_start = 0, poll_max_options = 1, poll_length = 0, poll_vote_change = 0, topic_last_view_time = 1268318756, topic_attachment = 0, topic_prefix = NULL, topic_url = 'angebot-und-nachfrage/buffalo-linkstation-live-320-gb-hs-dh320gl-nas-festplatte-t' WHERE topic_id = 319
Can help their me please with a solution?

Friendly greetings
January
pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by pawelooss »

I found a bug & fix it. ;)

When in forum exists any shadow topic, there are a PHP notices "Undefined index: prefix" and "Undefined index: prefix_colour".

Find:

Code: Select all

$row['topic_reported'] = 0;
After add:

Code: Select all

$row['prefix'] = $row['prefix_colour'] = '';

BTW, in $template: maybe that code will be better? ;)

Code: Select all

			'TOPIC_PREFIX'		=> $row['topic_prefix'] ? $row['prefix'] : '',
			'PREFIX_COLOUR'		=> $row['topic_prefix'] ? $row['prefix_colour'] : '',

Best regards,
pawelooss
phpBB3 fan! ;)
User avatar
Balsa
Registered User
Posts: 57
Joined: Mon Jul 06, 2009 1:12 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by Balsa »

Does this mod work with phpBB 3.0.7?
Sixers2329
Registered User
Posts: 24
Joined: Tue Mar 16, 2010 11:57 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by Sixers2329 »

Can you make the prefixes different colors? Are there any pictures of this mod?
Hexcode
Registered User
Posts: 77
Joined: Fri Apr 10, 2009 4:51 pm
Location: Cologne, Germany

Re: [Beta] Topic prefix mod for phpBB3

Post by Hexcode »

Can you make the prefixes different colors?
Yes ;) Demo: http://www.script-base.eu/guest-support-f14/
Sixers2329
Registered User
Posts: 24
Joined: Tue Mar 16, 2010 11:57 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by Sixers2329 »

Hexcode wrote:
Can you make the prefixes different colors?
Yes ;) Demo: http://www.script-base.eu/guest-support-f14/
Ah thanks. Looks cool, I'll try it out. :)
Weird, when I try to extract it keeps telling me the archive is corrupt. This happened to anyone else? Is there another mirror where I can download it? I could really use this mod.
Hexcode
Registered User
Posts: 77
Joined: Fri Apr 10, 2009 4:51 pm
Location: Cologne, Germany

Re: [Beta] Topic prefix mod for phpBB3

Post by Hexcode »

Sixers2329
Registered User
Posts: 24
Joined: Tue Mar 16, 2010 11:57 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by Sixers2329 »

Works like a charm now ^, thank's a lot. Love this mod. ;)
Binaries4You
Registered User
Posts: 18
Joined: Wed Mar 24, 2010 5:54 pm
Name: brendan de wit

Re: [Beta] Topic prefix mod for phpBB3

Post by Binaries4You »

Hmm it works perfectly but when i go to a forum categorie i get this error:

Code: Select all

SQL ERROR [ mysqli ]

Unknown column 'tx.prefix' in 'field list' [1054]

SQL

SELECT t.*, tp.topic_posted, tt.mark_time, ft.mark_time AS forum_mark_time, tx.prefix, tx.prefix_colour FROM (phpbb_topics t) LEFT JOIN phpbb_topics_posted tp ON (tp.topic_id = t.topic_id AND tp.user_id = 2) LEFT JOIN phpbb_topics_track tt ON (tt.topic_id = t.topic_id AND tt.user_id = 2) LEFT JOIN phpbb_forums_track ft ON (ft.forum_id = t.forum_id AND ft.user_id = 2) WHERE t.forum_id IN (30, 0) AND t.topic_type IN (2, 3) ORDER BY t.topic_time DESC

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: viewforum.php
LINE: 409
CALL: dbal_mysqli->sql_query()
Got a fix for me?
Binaries4You
Registered User
Posts: 18
Joined: Wed Mar 24, 2010 5:54 pm
Name: brendan de wit

Re: [Beta] Topic prefix mod for phpBB3

Post by Binaries4You »

Someone help me please
Balamand
Registered User
Posts: 64
Joined: Sun Jan 31, 2010 12:18 pm

Re: [Beta] Topic prefix mod for phpBB3

Post by Balamand »

does it work with subsilver2 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Locked

Return to “[3.0.x] Abandoned MODs”