Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2008-06-17 22:35:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

Bloody hell, Tevez is a real Frankenstein :-D

Makes me feel a whole lot better about myself, that’s for sure. Thanks maniqui!


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

#32 2008-06-17 22:57:17

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,234

Re: smd_where_used: help keep your admin side tidy

Wow! You’ve managed it! Fine!

In the initial stage I tend to be chaotic and test more and faster than I can delete. smd_wu is the antidote! Thanks, Stef!

I just saw it doesn’t perform search in article titles. Did you consciously leave that out?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#33 2008-06-17 23:12:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

uli wrote:

I just saw it doesn’t perform search in article titles. Did you consciously leave that out?

Yes, since you can’t refer to other things with it — it’s just text.

The primary goal of the plugin (when I started it at least) was to find stuff that articles / forms / pages pointed to or referred to. Currently it only looks at article Body, Excerpt, override_form and section because they are the only things that can refer to other admin-side things. I omitted keywords, article_image and custom fields because they’re just text/numbers and may bloat the search results.

At least, that’s my theory. Feel free to convince me otherwise!

P.S. I think I’ve figured a way to process function aliases inside plugins, so that should fix the stupid plugins list. Just trying it out now.

P.S.2 : Should the plugin list really include admin-side plugins, since they can expose client side tags? e.g. MLP, tru_tags, smd_vars… etc. What do you think?


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

#34 2008-06-17 23:48:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

Yep, indeed fixed it. Sorry to keep bombarding you all with updates.

v0.15 | compressed now does a “deep” search inside plugin source code and pulls out all function names. It treats those as aliases of the ‘visible’ plugin name, so any reference to any of those functions implies the plugin is “used” and will therefore not be listed as an orphan.

It is still limited to working on type 0 (client side) plugins until the consensus decide which it should be, or I find a natty way of giving you the option in the plugin.


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

#35 2008-06-17 23:53:01

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,234

Re: smd_where_used: help keep your admin side tidy

The primary goal of the plugin (when I started it at least) was to find stuff that articles / forms / pages pointed to or referred to.

Stef, you’re absolutely right, hadn’t that in mind anymore. It’s just that I really quickly don’t stick to things’ intended uses.
I think applied this way it could serve very well as a searchbox for article contents, thus saving oneself of installing a special plugin. If this in turn renders its intended use impossible, I’m the first to drop the idea.

Re P.S. 2: The assignment for client side/admin side/library works like a radio button, either … or? Phoo! *scrapes head* I don’t think I want to be challenged to delete smd_vars ;)

Good luck with quelling the function aliases!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#36 2008-06-18 00:59:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

Final update of the night, I promise as I need some sleep now.

v0.16 | compressed adds two features, both courtesy of uli:

  1. When searching for orphans a new toggle button appears next to the ‘search’ button. This allows you to switch between showing client-side plugins and both client side + admin-side plugins that are orphaned. This allows admin plugins with client-side tags to be searched, though it will list pure admin plugins as well since there is no distinction
  2. Article search extended to title and keywords, just for the hell of it

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

#37 2008-06-18 01:00:34

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,234

Re: smd_where_used: help keep your admin side tidy

New versions delivered every 5 hours! Woooo!
Where in the world are you treated more expeditious?

May I contribute to one further update? I think it’s the article title that should be wrapped in a-tags, not only the ID: a) easier to strike b) stronger signalling c) consistency

Sorry! I didn’t want to be a pest! =D Hazard.

Last edited by uli (2008-06-18 01:03:25)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#38 2008-06-18 01:03:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

uli wrote:

I think it’s the article title that should be wrapped in a-tags, not only the ID: a) easier to strike b) stronger signalling c) consistency

I agree, but I couldn’t make it do it without some seriously ugly hacking so I left it on ID only for the time being. It’s on the list of things to work out. But not tonight :-)


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

#39 2008-06-18 01:29:57

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,234

Re: smd_where_used: help keep your admin side tidy

Thanks, Stef, very complaisant! :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#40 2008-06-18 08:27:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: smd_where_used: help keep your admin side tidy

Easier than I thought. Amazing how much difference it makes not falling asleep in front of the keyboard.

v0.17 | compressed fixes the Article hyperlinks so they encompass the title as well as ID. A bigger target.

EDIT: There is a small unexpected ‘feature’ with this version. If you repeatedly click ‘Search’ in orphan mode it toggles the admin plugins on and off. Buggered if I can fix it right now (it’s to do with the way I’ve laid the form out) so I’ll give it some thought.

EDIT2: Updated the code to make a (possibly temporary) fix to the above EDIT. Removed the Admin/Client side toggle button since it does the same as the search button. Now, clicking the search button a 2nd time will toggle between Admin [ A+C ] and Client [ C ] plugins. If you want to re-display the same list without the toggle feature, refresh the browser page instead. If you’ve already downloaded v0.17, grab it again. Sorry for the hassle.

Last edited by Bloke (2008-06-18 19:13:30)


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

Board footer

Powered by FluxBB