Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-06-30 16:00:08

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

txp:if_plugin to determine if a plugin is present/active

I would like to see a simple new txp tag that can check if a plugin exists and if so output specific (html) code in a form or template. That way it would be simpler to create more flexible templates that could be enhanced if desired by adding plugins or kept simple by just not having specific plugins installed.

I understand this could prove somewhat expensive on a database query level so you could introduce a switch to generally enable this tag (in options have something like dynamic plugin checks yes/no) and if set to yes have one query get an array of all plugins available and check against this array instead of performing individual database dips per tag occurrence.


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#2 2011-06-30 16:37:02

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

Re: txp:if_plugin to determine if a plugin is present/active

Ummmmm, does <txp:if_plugin/> not do what you want?


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

#3 2011-06-30 16:46:16

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: txp:if_plugin to determine if a plugin is present/active

Bloke, I guess you are spot on :-)
Thanks, I shall be using this, that was exactly what I was looking for (and for some reason was too lazy to actually look this far, my apologies for that!).


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

Board footer

Powered by FluxBB