MyBB Community Forums

Full Version: make a thread prefix default
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I make thread prefix default, i.e. when a member posts, he don't need to select from the thread prefix.

e.g. If he posts in health forum with subject: Eat apple

Then it's subject will become [Health forum] Eat apple

Here [Health forum] is the thread prefix
Open ./newthread.php file and find;
$mybb->input['threadprefix'] = 0;
and change 0 to the Prefix ID number you wish to use it as a mendatory. Wink
If I have more than 1 prefix for the more than one forum then?
i.e.
[Health forum] --> default on forum Health
[mybb Forum]--> default on mybb help section forum
With the above solution, its not possible. It require some more core file edits.
(2011-11-13, 03:04 PM)Yaldaram Wrote: [ -> ]With the above solution, its not possible. It require some more core file edits.

How and which one ?
Sorry for bumping an old thread, but this is possible.

I've done it like this:
$plugins->add_hook('datahandler_post_insert_thread', 'myplugin_defaultprefix');

And then this:
function myclanmanagement_testthing($array)
{
	$array->thread_insert_data['prefix'] = 1;
}

I achieved this with this simple thingy, not sure if it's the most proper way.