Go to main content

Textpattern CMS support 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: 11,250
Website GitHub

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 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.7.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 (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

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

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

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
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
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

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

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
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: 11,250
Website GitHub

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. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

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

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
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
Registered: 2006-08-15
Posts: 4,303

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,303

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

#11 2008-06-16 17:41:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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

Board footer

Powered by FluxBB