View Single Post
Old 12-27-2021, 08:19 PM   #260
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,052
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also, unrelated to the above error:

Is it possible to put a strcat inside a first_non_empty? For icon_fanfics shared template, I want to display multiple icons, but if none exist then use a placeholder. This gave me an error:

Code:
program:

first_non_empty(
   strcat
   (
		if "^foo$" inlist $#taglike then 'foo.png:' fi,		
		if "^bar$" inlist $#taglike then 'bar.png:' fi,
		if "^foobar$" inlist $#taglike then 'foobar.png:' fi,
   )
   if $#taglike then 'placeholder.png' fi 
)
I considered a list_difference (I use one for icons_formats) but I have close to 50 entries!

EDIT: I found a very weird workaround that maybe only works because it's a shared template. I put this in column rules/emblems:

Code:
program:

		if icons_fanfic() then icons_fanfic() 
		else 'placeholder.png' fi

Last edited by ownedbycats; 12-27-2021 at 08:36 PM.
ownedbycats is offline   Reply With Quote