Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
smd_where_used: help keep your admin side tidy
Really simple admin-side plugin that searches your pages, forms and articles (body, excerpt, overrride_form) for mentions (or not) of something else.
Very useful if, like me, you’re on revision #4 of a site and you have about 14 sections, 35 plugins and 42 forms floating around from previous iterations and you’re scratching your head going “where the hell have I used this form?” or “can I delete this plugin?”
Just install, activate, go to ‘Extensions->Where used’, type and click. If what you typed exists in your design it’ll be listed with a hyperlink to the offending item so you can check it/edit it or simply delete it. When you’re done tidying up, delete the plugin.
Yes, the admin side does give warnings on some items now if they are in use, but it won’t check for plugins or if you have referred to forms from articles.
Note that if smd_where_used reports that something’s not used it’s probably safe to assume it isn’t. But backup first, just in case. I don’t particularly relish an angry mob on my doorstep complaining that the ‘hamper_trombone’ form played a pivotal role in someone’s site.
Possible enhancements:
check override_form and see if it’s usedAdded in v0.11- Search other places if deemed appropriate. Any recommendations?
Look in plugin source code to find tag names if they don’t match the plugin namesFixed in v0.15
Have fun.
Download smd_where_used : Requires TXP 4.7.0+
Revision history
————————
- 27 Apr 2021 | 0.4.0 | Requires Textpattern 4.7.0+ ; added theme-aware searching and tidied up the UI a little.
- 19 May 2010 | 0.3.0 | Requires Textpattern 4.3.0 ; added searching inside Stylesheets
- 12 Aug 2009 | 0.2.0 | Added the ability to specify which article fields to search in (thanks uli/makss)
- 11 Mar 2009 | 0.1.9 | Added long-awaited input auto-focus
- 18 Jun 2008 | 0.1.8 | Added case sensitive searches (thanks geoff777)
- 18 Jun 2008 | 0.1.7 | Article hyperlink encompasses title and ID (thanks uli)
- 18 Jun 2008 | 0.1.6 | Added client/admin plugin toggle ; extended search to title/keywords (both thanks uli)
- 18 Jun 2008 | 0.1.5 | Fixed plugin orphan search to go deep inside the plugin source
- 17 Jun 2008 | 0.1.4 | Added ability to search for orphans (thanks uli/net-carver)
- 16 Jun 2008 | 0.1.3 | Added ability to match whole words (thanks zanza)
- 16 Jun 2008 | 0.1.2 | Added include/exclude (thanks mrdale)
- 16 Jun 2008 | 0.1.1 | Added section and override_form to the searches
- 16 Jun 2008 | 0.1.0 | Initial release
Last edited by Bloke (2021-04-26 23:51:35)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#2 2008-06-16 15:04:10
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: smd_where_used: help keep your admin side tidy
Sounds really really useful, will try it this evening.
Best wishes
Lee
Offline
Re: smd_where_used: help keep your admin side tidy
OK, I realised it was actually useful to add override_form to the mix so I’ve put that in, and added section searching too so you can find if any sections are using a particular page/stylesheet.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_where_used: help keep your admin side tidy
Wow, another addition to “the chump’s” high-kicking cavalcade of plugins. The smd swiss army knife is about 12 feet wide these days. Excellent work, my prolific purple friend.
So you’d think I’d be content to use as directed, but no… mrdale wonders if there’d be a simple way to throw this plugin in reverse… and find pages, forms and articles that are NOT referenced anywhere in a site, so that a messy web-designer such as I might smite them, and wipe them of the face of my install.
This is me looking a gift horse in the mouth.
Last edited by mrdale (2008-06-16 16:33:03)
Offline
#5 2008-06-16 16:03:49
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: smd_where_used: help keep your admin side tidy
Stef
Nice plugin!
Dale/Stef
Crazy plugin idea: smd_halt_and_catch_fire
providing a single tag of the same name that can target either the visitor’s desktop/laptop or alternatively the hosting server.
— Steve
Offline
Re: smd_where_used: help keep your admin side tidy
Wow! Astonishing (whatever this means, I read it on a comic book…)! :)
I miserably add a request to this marvelous thing: I have some templates that are named in a progressive way: home, home_2006, home_new. If I search for ‘home’, it also catch all the derivatives. Can an option be added to search only for the string as a single word, or as a part of longer word?
If not, this still remain a superb, useful plugin. Thanks!
Last edited by Zanza (2008-06-16 16:19:27)
Offline
Re: smd_where_used: help keep your admin side tidy
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_where_used: help keep your admin side tidy
net-carver wrote:
Crazy plugin idea:
smd_halt_and_catch_fire
providing a single tag of the same name that can target either the visitor’s desktop/laptop or alternatively the hosting server.
Um… that’s kind of tedious to type, how about smd_fubar?
Last edited by mrdale (2008-06-16 16:27:22)
Offline
#9 2008-06-16 16:59:54
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: smd_where_used: help keep your admin side tidy
Dam! Dam! Why can’t I code myself? Thanks, again and again! Thrills me! :)
Having said that – as shameful as it may be – I go along with Dale in his wish for reverting the effect. *blush*
Edit before submitting: What? You can code faster than I type?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#10 2008-06-16 17:09:26
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: smd_where_used: help keep your admin side tidy
Stef, is it possible to integrate this onto a dashboard (f.i. jmd_dashboard)?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: smd_where_used: help keep your admin side tidy
@uli :-)
I have no idea what it involves adding it to a dashboard. I’ve never installed such a beast. Can you list or direct me to one or two others that are popular and perhaps give me an idea where this thing might be located on the page please? It takes up quite a bit of space so I’m not sure if it’d fit. Might have to be a popup/lightbox affair which kind of adds a load of extra gubbins to the codebase. But if it’s useful I’ll see what I can do.
Let me go eat some dinner and ponder it over. I’ll also give zanza’s request some thought but it crossed my mind as I was coding v0.1 so I made sure it was fairly extensible in terms of how it performs the queries; should be pretty simple.
Last edited by Bloke (2008-06-16 17:41:35)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#12 2008-06-16 18:26:13
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_where_used: help keep your admin side tidy
Oh, I’ve been wishing for something like this for ages! Now I can finally do some serious housekeeping…
I’ll let you know how many forms I was able to delete ;)
Offline