MyBB Community Forums

Full Version: Text in a new thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey, I've been trying to make this plugin for text to be in a new thread for a certain forum.

The best I can do so far is add text to all posts.

Can anyone help me with this?
What exactly are you trying to do? :s
Alright, I'll use my friend's hosting company as an example.
(He has this, but will not show me how he coded it).

So, being a hosting company, you're surely going to have a web hosting forum.
And your users don't like to write anything useful other than their problem.
So, idea, when you click "New Thread" in the fid(#), there is a template in the message.
Like..
Web URL: (Your Site URL)
cPanel Name: (Your cPanel Name)
Etc.
dont think its possible without minor core file edit

if($mybb->input['action'] == "newthread" || $mybb->input['action'] == "editdraft")
{

	$plugins->run_hooks("newthread_start");
	
	$quote_ids = '';
	// If this isn't a preview and we're not editing a draft, then handle quoted posts
	if(!$mybb->input['previewpost'] && !$thread_errors && $mybb->input['action'] != "editdraft")
	{
		$message = '';

as you can see in newthread.php, the $message = ''; line comes after the only hook in this section and there are no other hooks available with a simple newthread first visit.

The only other way I can see it is to try to capture the template variable in the hook and modify it to include the changes you want and pass that template variable back to the main code. however, i have not looked into that to know if it would work in this case.
I knew this would be a tough one, but I know it's definitely possible because my friend has done it for his hosting company, but just will not show the code.
I'm not sure how he did it, all I know was it was done by a plugin, so he says.
Labrocca has a plugin for this called Default Messages.
If you are a subscriber, you can download it from MyBB Central.
Not sure how labrocca's one works but I made one a while ago too as requested by a user on my forum:
http://forums.mybb-plugins.com/Thread-De...Layout-1-2
It's paid though, not sure if there are any free alternatives
Yea, but the thing is, I'm not gonna pay anybody for something when I know there are multiple copies out there that people have but don't feel like sharing, or like you, want to get money from it.
(2010-04-24, 02:05 PM)lichtheman Wrote: [ -> ]Yea, but the thing is, I'm not gonna pay anybody for something when I know there are multiple copies out there that people have but don't feel like sharing, or like you, want to get money from it.

Paid plugins have been discussed a lot of times and we're allowed to sell the plugins we make, you may buy them or not.

If you find any free alternatives, fine. I'm not going to give it for free because some people have subscribed to my service to get that plugin only and wouldn't be fair to make it free now. I coded it and I am free to do what I want with it
Yea, I know.
But I said that I'm not paying anybody for anything added to a free service.
Pages: 1 2