MyBB Community Forums

Full Version: help me
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
- i have two lang file one in inc/languages/english (i do not know if thats right)
- there will be more to them
- i am doing it by phpmyadmin for now untill i can get the other bits working as i said in
(2008-07-31, 12:40 PM)skippy Wrote: [ -> ]Okay i have been doing a bit of fixing and adding but the one thing i can not get to work is $lang->reason_edit = $lang->sprintf($lang->reason_edit, $post['editmessage']);

is just shows Reason: {1} or Reason:

its like $post is not getting added or used some how.
You should replace:
function topic_editl1()
with:
function topic_editl1(&$post)
however, it still won't work because the postbit_editedby template is eval'd before the plugin hook postbit.

Consider making the template edit have a comment placeholder, then in the postbit hook, str_replace it with your value.
what do you mean by
Consider making the template edit have a comment placeholder, then in the postbit hook, str_replace it with your value.

sorry i am very new to this stuff.
Sorry about that.
In your hooked function, use something like this:

if(!$post['editedmsg']) return;
$post['editedmsg'] = str_replace('<!-- EDIT_REASON -->', $lang->sprintf($lang->reason_edit, $post['editmessage']), $post['editedmsg']);
and during activation/deactivation, stick <!-- EDIT_REASON --> into the template instead of a variable.

Hope that helps.
That you ZiNgA BuRgA ill use that snip of code to work with ill brack it fix it and what not so i can learn.
Pages: 1 2