MyBB Community Forums

Full Version: How to add prefix name before thread title
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I am using prefixes on forum. And I want to see the prefix name before the thread title when user choose prefix. You can see in attached image what I want.

[attachment=36650]

Sorry for my bad English


Thanks
Thanks MrBrechreiz

I need one more modification.I want prefix should be in under bracket like this and in bold [Prefix]

Please check the attached image.

[attachment=36657]
Remove

$thread['threadprefix'] . 

from

$lastpost_subject = $full_lastpost_subject = $thread['threadprefix'] . $parser->parse_badwords($lastpost_data['lastpostsubject']);

and add

{$thread['displayprefix']}

to forumbit_depth2_forum template before {$lastpost}
Thanks MrBrechreiz as my first question is solved. But my second question is this.

I need one more modification. As you can see that prefix are working properly but I want prefix should be in under bracket like [Prefix] and in bold. Please see the attached image.

[attachment=36663]
(2016-07-30, 01:28 AM)jabber Wrote: [ -> ]Thanks MrBrechreiz

I need one more modification.I want prefix should be in under bracket like this and in bold [Prefix]

Please check the attached image.

You can Add or Edit Styles for Prefix

Example:

Quote:<div style="color:#9f1bff"><b>[Prefix-Name With Bold]</b></div>




[Image: Captura_de_pantalla_2016_07_30_a_las_4_29_43_a_m.png]
Its very hard to me that I edit my approx 2500 prefix with the above method.

Is there is any other way or run sql query to add in display style area <b>[ in front of and add ]</b> at the end.


Like this
if Display Style show this - Display Style - DDFNetwork

when sql query run it adds in front of <b>[ in front of DDFNetwork and add  ]</b> after DDFNetwork and get this result

<b>[DDFNetwork]</b>

Or any other way

Thanks
Open forumdisplay.php and search for

$thread['threadprefix'] = $threadprefix = '';
		if($thread['prefix'] != 0)
		{
			$threadprefix = build_prefixes($thread['prefix']);
			if(!empty($threadprefix))
			{
				$thread['threadprefix'] = $threadprefix['displaystyle'].'&nbsp;';
			}
		}

replace

$thread['threadprefix'] = $threadprefix['displaystyle'].'&nbsp;';

to

$thread['threadprefix'] = "<strong>[".$threadprefix['displaystyle']."]</strong>&nbsp;";
Thanks MrBrechreiz. Its awesome.