PDA

View Full Version : Automatically add text to a thread title?


Big_Jason
04-25-2011, 07:20 PM
Hey guys. How do I have some predefined text added to every thread title any user creates?

For example, if JohnSnow creates a thread titled "Hello World", I would like that thread title to display as "Set Test - Hello World" once submitted.

Or even better, I'd like to do this based on which subforum/section the thread was submitted to. So for example if JohnSnow created his "Hello World" thread in the "Newbie" section, I'd like the thread title to show as "Newbie - Hello World". Then later he starts a different thread in the "Help" section called "How do I post a picture?" I'd like this thread to show as "Help - How do I post a picture?"

Thoughts?

Disasterpiece
04-26-2011, 08:27 AM
Did you take a look at thread prefixes?

I have the feeling this is exactly what you're looking for.

You'll find it in the AdminCP, it's native implemented.

Big_Jason
04-26-2011, 02:48 PM
Hi Disaster, thanks but that's not quite it. Unless I'm not seeing it, there's no way to pick a default prefix that is selected automatically. If I force a user to use a prefix, they'll need to pick it from the dropdown before submitting, thereby adding a step... something they're not going to like. If I could specify a default (pre selected) prefix, that would work.

Is there a way? If not, I need to keep looking for a solution...

Disasterpiece
04-26-2011, 03:13 PM
Well, you could use a little trick.
Per plugin you could pre-select a thread-prefix. If the user doesn't change it, the thread will use a pre-defined prefix from the dropdown box.

This could be coded with a little plugin

Big_Jason
04-26-2011, 05:43 PM
Ok got that working, but its not exactly right.

What I'd like to do is have the actual thread title prepended. Its looks to me like the prefix is added for display only, and is not part of the actual thread title (as evidenced by the URL. For example, if my prefix is "Help" and my thread title is "How do I post a picture", I want the URL to be http://www.myforum.com/f35/help-how-do-i-post-a-picture-3630/, but instead its actually http://www.myforum.com/f35/how-do-i-post-a-picture-3630/

Any thoughts on making that happen?