MyBB Community Forums

Full Version: Custom PHP in postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB Version: 1.8
Forum Link: www.CentauriLegion.net/community
(yes I have the powered by MyBB)

Hello, I recently read at this forum post that the following code can be used to allow custom variables in postbit_author_user
function add_to_postbit(&$post)
{
    $post['user_details'] = str_replace('<!-- test -->', 'Testing 1,2,3', $post['user_details']);
} 



I am having trouble using custom variables in that specific template as well. Where would I add this code to fix the problem? I already have the plugin that allows PHP in templates, it's just that when I try to do all of my custom variables and mysql queries and such inside the postbit, it gives me errors regarding "eval" and the page goes blank. The code I am using works in all templates other than postbit templates. So I am assuming that the above code can be used to fix it. Can anybody help me and tell me how I can go about fixing this?
Without seeing your code I can't tell anything. And the code I provided is supposed to be used in a plugin, not templates.