Textpattern Forum

You are not logged in. Register | Login | Help

#1 2008-06-16 14:16:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,712
Website

smd_where_used: help keep your admin side tidy

Really simple admin-side plugin that searches your pages, forms and articles (body, exceprt, 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 used Added 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 names Fixed in v0.15

Have fun.

Download smd_where_used : Requires TXP 4.3.0+

Revision history
————————

All available versions and changes are listed here. Each entry indexes the relevant post(s) in the thread to learn about the features.

Last edited by Bloke (2010-11-05 09:44:40)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

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

#3 2008-06-16 15:14:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,712
Website

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.

v0.11 | gzipped


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2008-06-16 15:50:11

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,041
Website

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
Admin
From: UK
Registered: 2006-03-08
Posts: 1,646

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
Textile | My plugins on GitHub | @netcarver

Offline

#6 2008-06-16 16:19:06

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 685
Website

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

#7 2008-06-16 16:22:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,712
Website

Re: smd_where_used: help keep your admin side tidy

@mrdale

‘ave it | gzipped

@net-carver

:-)

@zanza

I’ll look into a non-wild search. Should be easy.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2008-06-16 16:27:03

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,041
Website

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/Köln
Registered: 2006-08-15
Posts: 2,949

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/Köln
Registered: 2006-08-15
Posts: 2,949

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

Board footer

Powered by FluxBB