Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: 1 2 [3]
Author Topic: How to disable plugin
bondigor69
Newbie
Posts: 13
Post Re: How to disable plugin
on: May 9, 2012, 17:29

well I dont know PHP but I suggest you to post in wordpress forum of in php forum to get some help

Jeff
Administrator
Posts: 26
Post Re: How to disable plugin
on: May 10, 2012, 15:09

So after thinking about this the best way to do it is to make arbitrary URL's able to effect children by using a loop that traverses through the accessed URL to match it to an entry in the database. So for example the URL http://www.wpmason.com/our-plugins/custom-search-forms/documentation/customization/ will do the matching as follows.

http://www.wpmason.com/our-plugins/custom-search-forms/documentation/

http://www.wpmason.com/our-plugins/custom-search-forms/

http://www.wpmason.com/our-plugins/

It will stop on the first match it makes and use that to disable plugins. There is now a checkbox under the URL entry box in the admin to have the url effect children. If the accessed URL exactly matches a URL that has been entered or if it is a post/page/custom post_type that has plugins disabled on its admin page then this matching will be skipped. So in other words the post/page/custom post_type admin page takes precedence over this fuzzy matching.

This approach is quick and it shouldn't slow your site down trying to make a match. With the way that the plugin is built and the fact that it works outside of wordpress this is the closest I can come to regular expression matching. I'm testing the new version now to make sure everything is still working and I can hopefully release it tomorrow or Monday. I will let you know when you can download it.

I also want to add the ability to ignore the protocol when doing matching because https is causing me some issues on a couple of sites. This is going to be a little tricky since all the URL's you have in your database will have to be redone if I simply ignore it and plus some people might not want to ignore it. So I'm going to make it optional by checking a checkbox on the admin page. This is going to be the next release and I can hopefully get that done by the end of next week.

Jeff
Administrator
Posts: 26
Post Re: How to disable plugin
on: May 11, 2012, 14:08

I have released v 2.2 that adds some new admin features as well as the fuzzy URL matching. Hopefully this will accomplish what you are trying to do. Please download it and give it a try.

bondigor69
Newbie
Posts: 13
Post Re: How to disable plugin
on: May 11, 2012, 15:46

sound great I took a fast look and will give you news later
thank you for your work

astra
Newbie
Posts: 2
Post Re: How to disable plugin
on: May 14, 2012, 04:46

Thanks for the new feature.

I am not yet so clear on how it works, though.

Let's say for example, I have this page:

http://www.main-website.com/wordpress-blog/

This is the main blog screen. Now I have several pages, page 1 - xxx

Page 2 would be :

http://www.main-website.com/wordpress-blog/page/2/

and so on with other pages ... /page/3/ ... /page/4/ ...

There is no such URL as http://www.main-website.com/wordpress-blog/page/1/ and also no http://www.main-website.com/wordpress-blog/page/

So, in Fuzzy Matching, how do I work with this ?

If I put http://www.main-website.com/wordpress-blog/page/ under URL Admin, and enable Fuzzy Matching, will it work with all posts that have /page/2/, /page/3/, etc ?

Similarly, for tags, and categories ?

Thanks

Jeff
Administrator
Posts: 26
Post Re: How to disable plugin
on: May 14, 2012, 10:42

Yes that is how it works. Make sure you have Fuzzy URL Matching enabled on the main settings page under Plugin Organizer in the WP admin menu and that you have the checkbox "Also effect children" checked for the URL. It will stop searching for a match at the first URL found. So if you enter http://www.main-website.com/wordpress-blog/page/ and http://www.main-website.com/wordpress-blog/. It will stop looking when it finds http://www.main-website.com/wordpress-blog/page/ because that will be the first match.

tyggis
Newbie
Posts: 1
Post Re: How to disable plugin
on: May 27, 2012, 03:32

I just wonder, now it looks like only the first child are affected when using “Also effect children”. Is it possible to get it to work so that children of children also gets affected?
When I input site.com/page/ I would like site.com/page/1/2 also to get affected.

astra
Newbie
Posts: 2
Post Re: How to disable plugin
on: May 27, 2012, 12:38

Thanks, Jeff, perfect !

Now my URL Admin list is way leaner and meaner. Sometimes, Global just doesn't work for certain applications, so this latest update is great, thumbs all the way up !

Jeff
Administrator
Posts: 26
Post Re: How to disable plugin
on: May 27, 2012, 19:34

Quote from tyggis on May 27, 2012, 03:32
I just wonder, now it looks like only the first child are affected when using “Also effect children”. Is it possible to get it to work so that children of children also gets affected?
When I input site.com/page/ I would like site.com/page/1/2 also to get affected.

It will affect children up to 15 directories deep. It starts searching at one directory up from the accessed URL unless an exact match is made. I've explained this already in this thread but I'll go ahead and explain it again. If you access http://www.wpmason.com/our-plugins/custom-search-forms/documentation/ the full URL will first be checked. If that URL is not in the database it will then search for http://www.wpmason.com/our-plugins/custom-search-forms/. If that URL isnt in the database it will then search for http://www.wpmason.com/our-plugins/. If that URL isnt in the database it will then search for http://www.wpmason.com/. The first one to be found will be used to disable/enable plugins.

Pages: 1 2 [3]
Mingle Forum by cartpauj
Version: 1.0.33.2 ; Page loaded in: 0.125 seconds.