MyBB Community Forums
[How To?] make a thread prefix default - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [How To?] make a thread prefix default (/thread-107709.html)



make a thread prefix default - sunjava1 - 2011-11-13

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


RE: make a thread prefix default - Yaldaram - 2011-11-13

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


RE: make a thread prefix default - sunjava1 - 2011-11-13

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


RE: make a thread prefix default - Yaldaram - 2011-11-13

With the above solution, its not possible. It require some more core file edits.


RE: make a thread prefix default - sunjava1 - 2011-11-14

(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 ?


RE: make a thread prefix default - Tankey - 2014-03-05

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.