Current time: 03-22-2010, 12:43 AM Hello There, Guest! (LoginRegister)


Post Reply 
help me
07-31-2008, 11:40 AM
Post: #1
help me
i do not know were to post this but here it is if its in the wrong forum move it to were it has to be

PHP Code:
function topic_edit_message_activate()
{
    require_once 
MYBB_ROOT.'inc/adminfunctions_templates.php';
    
find_replace_templatesets('postbit_editedby''#{\$post[\'editedprofilelink\']}.)</span>#''{\$post[\'editedprofilelink\']}. {\$lang->reason_edit} {\$post[\'editmessage\']})</span>');
}

function 
topic_edit_message_deactivate()
{
    require_once 
MYBB_ROOT.'inc/adminfunctions_templates.php';
    
find_replace_templatesets('postbit_editedby''# {\$lang->reason_edit} {\$post[\'editmessage\']}#'''0);


can some one tell me what wrong with that as when i install plugin it give a error page loads to fast for me to get it but it seems to delete all the contents of the template postbit_editedby.

I'm over every thing.....
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 11:47 AM
Post: #2
RE: help me
And that's for what MyBB version ? 1.4 ?

Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 11:49 AM
Post: #3
RE: help me
Oh sorry 1.4.

I'm over every thing.....
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 12:03 PM
Post: #4
RE: help me
PHP Code:
function topic_edit_message_activate()
{
    require_once 
MYBB_ROOT.'inc/adminfunctions_templates.php';
    
find_replace_templatesets("postbit_editedby"'#'.preg_quote('{$post[\'editedprofilelink\']}').'#''{\$lang->reason_edit} {\$post[\'editedprofilelink\']}');
}

function 
topic_edit_message_deactivate()
{
    require_once 
MYBB_ROOT.'inc/adminfunctions_templates.php';
    
find_replace_templatesets("postbit_editedby"'#'.preg_quote('{$lang->reason_edit}').'#''',0);


function 
topic_edit_message($post)
{
    global 
$mybb$lang;
    
$lang->reason_edit $lang->sprintf($lang->reason_edit$post['editmessage']);


And in your langfile use
Code:
$l['reason_edit'] = "Edit Reason: {1}";

Hopefully it helps you a lil; the activate/deactivate function works; just tested them.

Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 12:12 PM
Post: #5
RE: help me
do not know it jsut shows (This post was last modified: Today 12:10 PM by Edit Reason: {1} skippy.)

I'm over every thing.....
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 12:15 PM
Post: #6
RE: help me
You do have to work a lil' on the function topic_edit_message($post) ...
Check if there's a editmessage; if not ... don't show the $lang->reason_edit ...

Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 12:40 PM
Post: #7
RE: help me
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.

I'm over every thing.....
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 12:50 PM
Post: #8
RE: help me
Hmz; can you attach your pluginfile ?

Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 11:34 PM
Post: #9
RE: help me
okay sure

I'm over every thing.....
Visit this user's website Find all posts by this user
Quote this message in a reply
07-31-2008, 11:39 PM (This post was last modified: 07-31-2008 11:39 PM by LeX-.)
Post: #10
RE: help me
- Where did you add that language variable ( reason_edit ) ?
- Did you create a new language file for one sentence ? =/
- How do you add the editmessage ? I don't see a box; or anything where you can enter a reason when you edit a post;

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: