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


Post Reply 
find_replace_templates
08-15-2008, 05:06 AM
Post: #1
find_replace_templates
i never seem to be able to get this to work properly:

i can add things to templates, but when i go to remove it, it doesn't give an error just doesn't remove it, heres what i have:

Code:
function EMS_activate(){
    
    require MYBB_ROOT.'/inc/adminfunctions_templates.php';
    
    find_replace_templatesets('header', "#\<navigation>#", "<navigation><br />{\$messagestyle}{\$boardmessage}");
    
    }
function EMS_deactivate(){
    
    require MYBB_ROOT.'/inc/adminfunctions_templates.php';
    
    find_replace_templatesets('header', "#\<br />\{\$messagestyle\}\{\$boardmessage\}#", "");
    
    }

any ideas?

My mods
-Emergency Message System
-Ad Managment System
-Avatar caption
Find all posts by this user
Quote this message in a reply
08-15-2008, 07:18 AM
Post: #2
RE: find_replace_templates
In the deactivate, try using this instead:
PHP Code:
find_replace_templatesets('header'"#\<br />\{\$messagestyle\}\{\$boardmessage\}#"""0); 

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-15-2008, 07:22 AM
Post: #3
RE: find_replace_templates
that didn't work :\

My mods
-Emergency Message System
-Ad Managment System
-Avatar caption
Find all posts by this user
Quote this message in a reply
08-15-2008, 07:39 AM
Post: #4
RE: find_replace_templates
PHP Code:
function EMS_activate(){    
    require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';
    
find_replace_templatesets(
        
"header",
        
'#'.preg_quote('<navigation>').'#',
        
'<navigation><br />
{$messagestyle}{$boardmessage}'
    
);
}
function 
EMS_deactivate(){    
    require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';    
    
find_replace_templatesets(
        
"header",
        
'#'.preg_quote('<navigation><br />
{$messagestyle}{$boardmessage}'
).'#',
        
'<navigation>',
        
0
    
);


Support for Plugins only at www.mybboard.de or www.mybbcoder.info

[jabber]janmalte@ubuntu-jabber.de[/jabber]
Visit this user's website Find all posts by this user
Quote this message in a reply
08-15-2008, 08:30 AM
Post: #5
RE: find_replace_templates
Ehh, I should've read it more, but Jan got it - thanks Smile

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-15-2008, 08:32 AM
Post: #6
RE: find_replace_templates
yup, working, now, thanks jan

My mods
-Emergency Message System
-Ad Managment System
-Avatar caption
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: