Current time: 05-24-2012, 05:52 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); 
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
    
);


If you want to receive support by me, please send me a PM or use Jabber to let me know you're waiting for me.
Jabber: janmalte@ubuntu-jabber.de
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
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:


User(s) browsing this thread: 2 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication