Current time: 01-09-2009, 09:54 AM Hello There, Guest! (LoginRegister)


Post Reply 
help me
07-31-2008, 11:43 PM
Post: #11
RE: help me
- 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
(07-31-2008 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.

Mysite: LayDesk
Find all posts by this user
Quote this message in a reply
07-31-2008, 11:50 PM
Post: #12
RE: help me
You should replace:
PHP Code:
function topic_editl1() 
with:
PHP Code:
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.

Who is Yumi?


It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 11:52 PM
Post: #13
RE: help me
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.

Mysite: LayDesk
Find all posts by this user
Quote this message in a reply
08-01-2008, 12:08 AM
Post: #14
RE: help me
Sorry about that.
In your hooked function, use something like this:
PHP Code:
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.

Who is Yumi?


It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
Visit this user's website Find all posts by this user
Quote this message in a reply
08-01-2008, 02:07 AM (This post was last modified: 08-01-2008 02:18 AM by skippy.)
Post: #15
RE: help me
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.

Mysite: LayDesk
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: