I used to have a mod in MyBB 1.4 that would default to a certain post icon if the No Icon option was chose, but this solution no longer works in 1.6 Beta 2.
http://community.mybb.com/thread-35864.html
Any ideas on the changes needed to get it to work?
It's not a plugin, the tutorial was a mod on the newthread.php file to change the post icon you chose if you selected the "no post icon" option.
Adding
if($mybb->input['icon'] == "-1")
{
$mybb->input['icon'] = 3;
}
Above
// Set the thread data that came from the input to the $thread array.
$new_thread = array(
"fid" => $forum['fid'],
"subject" => $mybb->input['subject'],
"prefix" => $mybb->input['threadprefix'],
"icon" => $mybb->input['icon'],
"uid" => $uid,
"username" => $username,
"message" => $mybb->input['message'],
"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']
);
In newthread.php works fine in 1.6. Are you sure you did it properly?
Regards,
Jammerx2
Why are you using a Beta version of 1.6?? You do realise that you probably can't upgrade to the latest version??
(2010-08-16, 07:57 AM)Jammerx2 Wrote: [ -> ]Adding
if($mybb->input['icon'] == "-1")
{
$mybb->input['icon'] = 3;
}
Above
// Set the thread data that came from the input to the $thread array.
$new_thread = array(
"fid" => $forum['fid'],
"subject" => $mybb->input['subject'],
"prefix" => $mybb->input['threadprefix'],
"icon" => $mybb->input['icon'],
"uid" => $uid,
"username" => $username,
"message" => $mybb->input['message'],
"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']
);
In newthread.php works fine in 1.6. Are you sure you did it properly?
Regards,
Jammerx2
Just tried it on my 1.6 forum, didn't work :/
(2010-08-16, 09:04 AM)Gaara Wrote: [ -> ]Why are you using a Beta version of 1.6?? You do realise that you probably can't upgrade to the latest version??
I'm not using a beta version of 1.6 anymore. I switched to the final vesion since first posting this thread.
// Set up posthandler.
require_once MYBB_ROOT."inc/datahandlers/post.php";
$posthandler = new PostDataHandler("insert");
$posthandler->action = "thread";
if($mybb->input['icon'] == "-1")
{
$mybb->input['icon'] = 23;
}
// Set the thread data that came from the input to the $thread array.
$new_thread = array(
"fid" => $forum['fid'],
"subject" => $mybb->input['subject'],
"prefix" => $mybb->input['threadprefix'],
"icon" => $mybb->input['icon'],
"uid" => $uid,
"username" => $username,
"message" => $mybb->input['message'],
"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']
);
That's what the entire section looks like. It's exactly how you said.
It works fine for me, are you using the default template?