View Single Post
Old 03-31-2023, 08:44 PM   #549
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,111
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
program:
	id = list_re($#admintags, ',', 'related:(\d+)', '\1');
	strcat('<a href="', 'calibre://book-details/My%20Books/',id, '">', 'Related Book','</a>')
This looks for related:x entries in #admintags, extracts x and then uses strcat to turn it into a link.

If there's multiple ids returned by the list_re how would I create a link for each one instead of calibre://book-details/My%20Books/x,y,z?

Last edited by ownedbycats; 03-31-2023 at 10:33 PM. Reason: typos
ownedbycats is offline   Reply With Quote