You are not logged in.
I was wondering if this (very useful!) plugin could be modified to include a magic button to automatically disable any plugins that aren’t being used?
After awhile it’s difficult to remember which plugins are being used, and so currently I manually copy/paste the name of each one into smd_where_used to check.
Just a thought … :)
“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower
Offline
speeke wrote:
I was wondering if this (very useful!) plugin could be modified to include a
magic buttonto automatically disable any plugins that aren’t being used?
Sadly no. “In use” is a very esoteric term that the plugin interprets like this: is there any reference to the plugin from any Page or Form (can’t remember if it checks articles as well… it may do).
This is fine for most cases, but it has a few shortfalls:
There are probably other reasons, but that kind of thing is why I chose to make the plugin report only on what it finds and not take any direct action like delete stuff or change anything — I’m bound to get it wrong and kill something important! My philosophy is: leave humans in the loop :-) So, sorry: no can do.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline
a very valuable plugin, thank you. My usage today: I set up a subdomain (pagetest.mydomain.com) for testing before i will go life with my new txp-site. And soon i will have to look for links (in articles, in static-sites, in sidebars, etc.) that i will have to change from http://pagetest.mydomain.com to http://mydomain.com. None can’t be forgotten – just typed in “pagetest” .. now i can sleep quietly smooth :-))
Last edited by geroldbraun (2010-02-04 17:11:39)
Smile, Breath, Go slowly – Thich Nhat Hanh
Offline
geroldbraun wrote:
And soon i will have to look for links (in articles, in static-sites, in sidebars, etc.) that i will have to change from http://pagetest.mydomain.com to http://mydomain.com.
Here’s a very good reason for not hardcoding your internal URLs :) Use <txp:site_url /> and the only thing that needs to be changed is ‘Site URL’ in preferences.
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline
Ohh what a beautiful tip, Els, thank you
Smile, Breath, Go slowly – Thich Nhat Hanh
Offline
arrgh – i think there is a little bug with <txp:site_url />. If i use it in forms everything is fine, but .. used in “article” to display a picture, the design of the site goes broken.
Example: a hardcoded <img src=“http://www.subpage.mydomain.de/images/6.jpg”> will do what expected; a tag-coded <img src=”<txp:site_url />images/6.jpg”> will not show the picture but “kill” the design.
Smile, Breath, Go slowly – Thich Nhat Hanh
Offline
geroldbraun wrote:
If i use it in forms everything is fine, but .. used in “article” to display a picture, the design of the site goes broken.
It’s not a bug — it’s more than likely Textile getting in the way. If you want Textile in your articles, try:
==<img src="<txp:site_url />images/6.jpg">==
to switch textile off around that tag (or put the image on its own line with two spaces before it, which does the same thing) — I’m not sure if either technique works, I’ve never tried it when embedded inside an anchor.
Better still, if the image is managed by TXP’s Images tab, use:
<txp:image id="6" />
Last edited by Bloke (2010-02-05 12:48:14)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline
@geroldbraun:
Also, for all internal links or references to files, images, etc, you don’t need to specify the domain. You can use an absolute path without including the full domain.
Like: <img src="/images/6.jpg" />
Or: <a href="/contact/">Contact me</a>
Those should remain working when you move your site.
Offline
both of you maniqui and Bloke gave good advice, thank you. The textile turn-off == works fine and also omitting the url at all.
Smile, Breath, Go slowly – Thich Nhat Hanh
Offline
Just a heads-up for those of you running SVN >= 3300. The pre-release version of smd_where_used (v0.3) can be grabbed from the beta download page. It adds the ability to search for text strings inside Stylesheets.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline