Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Rebuild template?
#1

Hi PN,

After de-activating a plugin, is there any MyBB function to rebuild a template the plugin modified to its default state?

Thanks,
Combus
#2

Nope
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#3

Thanks, I guess I'll just insert a default template manually.

Also, is there any method like find_replace_templatesets but instead of replacing for anything, it just replaces all the content of the template and insert the new content?

Thanks Smile (And sorry for bugging you)
#4

Yes, the test plugin I sent you does that

Edit: Or do you mean the whole template?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#5

Yep, I mean the whole content of the template. Is just that I need a new structure for the forumbit_depth1_cat, and I can't replace it in the templates that uses it (because it's called directly from the index.php). So I thought replacing the whole content is the only solution I have :S
#6

Just do an DB::update_query() to that template and you're done
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#7

I guess update_query, works just like insert_query? I tried to make it using a tid = null, and with tid=125 (the tid of the template I want to change). But I get an error saying: 1062 - Duplicate entry '125' for key 'PRIMARY'. Am I doing it the wrong way?
#8

update_query UPDATES, while insert_query INSERTS (creates a new row).
Just take a look at the arguments it needs or search for a plugin which makes use of it and see how it works
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#9

Thanks Big Grin It's working now. I just needed to add one more parameter, the tid. Instead of declaring it on the array, I had to do it on the update_query.
#10

I'm glad you got it working Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)