View Single Post
Old 06-25-2022, 09:24 AM   #868
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ackomb View Post
So I find action chains very useful, but right now I'm stuck on something. I've use the chains to amend certain tags to something a bit more generic. So for example, I've changed all categories from Supergirl, Supercorp, Danvers into Arrowverse, and Clexa, 100, Ranya into the 100 etc. etc. But there are still tags that are useless such as 'more tags will be added', 'other' or tags that actually belong to the characters rather then category, which I've also tackled with the action chains. But in the end I want Action Chains to remove all tags from category but leave 'the 100' and 'Arrowverse'

I've found a way to remove 'all' tags or remove 'certain' tags but not 'all but' X, Y, Z.

Could use your help on this one.
My guess is you want to use list_intersection() similarly to what I described in post 864, as in
Code:
program:
	list_intersection($tags, 'X, Y, Z', ',')
The function returns items in $tags that are also in the list 'X, Y, Z', e.g. if the tags are 'A, B, X, Z' then the function returns 'X, Z'.
chaley is offline   Reply With Quote