Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-09-20 16:49:52

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 189
Website

Looking for plugins for a bunch of random tasks

I’ve got a bunch of tasks that I would like make easier, and I bet there are or were plugins to do some of them. I don’t care if they are still supported, since I can probably hack them to work; no need to reinvent the wheel.
  • Txp source search: Looking for an admin-side plugin that searches all articles, forms, pages, and plugins for a text string or a regex. (“How did I generate this stupidity? Where do I use this form?”)
  • direct ‘image’ insertion: I have a lot of svg and mml (math equations) that are directly inserted into articles, rather than by URL reference. Something like a mashup of Txp images and forms, but with a thumbnail display for the svg/mml like Txp images has now.
  • custom sql table: I’ve got a page with 100+ publication references, painful to maintain. I’d like to have a custom sql table with the data and have a Txp form generate HTML code for each reference.

Last edited by skewray (2024-09-20 16:53:41)

Offline

#2 2024-09-20 20:22:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,706
Website

Re: Looking for plugins for a bunch of random tasks

Well, bloke has you covered for several of those:

1) smd_where_used helps you search through articles, forms and page templates. I forget whether regex is possible, but it is useful.

3) smd_query let’s you construct a custom mysql query and process the results as textpattern output using {placeholders}. etc_query can do similar things and also parse html output using Path. And if your table happens to be in another database on the same server, you can temporarily swap connections using rah_swap. I do that to query a firm database made with different software within textpattern.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2024-09-20 20:27:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,706
Website

Re: Looking for plugins for a bunch of random tasks

New versions of Textpattern (which you upgraded to if I recall correctly) can now handle svg as an image type and shows you a preview of it in the image panel.

com_article_image will show you the article image within the write pane and has an insertion snippet for inserting an image into the body of an article. As far as I recall you can customise the snippet that gets inserted, which means you can make it insert a shortcode tag – e.g. <txp::equation id="123" />, and then make a form of type “shortcode” (add that as a user-defined form type under the _Advanced options” in the settings) called equation that processes how the image should be output. See this docs article for more information.

It doesn’t show you a preview of the item in the article body though. I don’t know of any plugins that do that, unless you switch your entire setup to use something like tinyMCE instead of textile.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2024-09-21 02:08:58

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 189
Website

Re: Looking for plugins for a bunch of random tasks

This is all good stuff! I though svg was only enabled in 4.9, which I have not upgraded to yet.

Offline

#5 2024-09-21 07:19:31

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,706
Website

Re: Looking for plugins for a bunch of random tasks

skewray wrote #337886:

This is all good stuff! I though svg was only enabled in 4.9, which I have not upgraded to yet.

Apologies, you’re right, proper svg support is txp 4.9 only.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2024-09-21 11:38:39

etc
Developer
Registered: 2010-11-11
Posts: 5,137
Website GitHub

Re: Looking for plugins for a bunch of random tasks

jakob wrote #337884:

if your table happens to be in another database on the same server, you can temporarily swap connections using rah_swap.

If you do not need to modify the connection configuration when switching db, etc_query can do it too:

<txp:etc_query markup="db" url="db_name" query="SELECT something..." />
jakob wrote #337885:

It doesn’t show you a preview of the item in the article body though. I don’t know of any plugins that do that, unless you switch your entire setup to use something like tinyMCE instead of textile.

Article preview in txp 4.9 can (optionally) process tags. One more reason to beta-test ;-)

Offline

#7 2024-09-21 17:18:26

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 189
Website

Re: Looking for plugins for a bunch of random tasks

I was thinking I would just add my new tables to the txp sql database. Is there some reason why that would be stupid?

Offline

#8 2024-09-22 11:21:54

etc
Developer
Registered: 2010-11-11
Posts: 5,137
Website GitHub

Re: Looking for plugins for a bunch of random tasks

skewray wrote #337892:

I was thinking I would just add my new tables to the txp sql database. Is there some reason why that would be stupid?

I can’t see any reason why it would be stupid, besides the fact that I’m doing it :-)

Offline

Board footer

Powered by FluxBB