|  10-07-2024, 03:49 AM | #1 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
				
				Dedicated identifier custom column converted into link
			 
			
			Hi,  I want to have a dedicated column for the Goodreads identifier, in order to display it in Book Details. I'm aware that {identifiers:select(goodreads)} can replicate the identifier in text form, however I wanted it to behave just like the default identifiers column, as it allows converting the identifiers into links. The default identifiers column has a clickable Goodreads link, however at the moment I'd prefer to have a dedicated one that can display just the GR link. I've tried... Code: goodreads:{identifiers:select(goodreads)}  | 
|   |   | 
|  10-07-2024, 06:10 AM | #2 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | 
			
			I'm not sure what you want to display. Do you want "Goodreads" or do you want "Goodreads:12345"? Assuming you want to see "Goodreads:12345" as a link and that the text column has "Contains HTML" checked, this should work: Code: program: gr_id = select($identifiers, 'goodreads'); if gr_id then gr_id = 'goodreads:' & gr_id; l = urls_from_identifiers(gr_id, ''); l = re(l, '>goodreads<', '>' & capitalize(gr_id) & '<') else l = '' fi Code: program:
	gr_id = select($identifiers, 'goodreads');
	urls_from_identifiers('goodreads:' & gr_id, '')Last edited by chaley; 10-07-2024 at 06:32 AM. Reason: Forgot to re-add < & > | 
|   |   | 
|  10-07-2024, 11:29 AM | #3 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
			
			And just like that, magic has happened.   Thanks so much Chaley! I think one of the reasons I want this, currently, is to leave more space for other items in Details panel! The first template looks nicer to me, though the second is enough for what I had in mind.   | 
|   |   | 
|  10-07-2024, 12:39 PM | #4 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | 
			
			Given that screenshot I suspect that this template is more to your liking. The "Goodreads:" in the identifier is redundant, given the column name. This template shows only the identifier value without the "goodreads:" prefix. It is also slightly faster. Code: program: gr_id = select($identifiers, 'goodreads'); if gr_id then l = urls_from_identifiers( 'goodreads:' & gr_id, ''); l = re(l, '>goodreads<', '>' & gr_id & '<') else l = '' fi | 
|   |   | 
|  10-07-2024, 12:54 PM | #5 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
			
			Thanks, I'm going to use this to eliminate the redundancy
		 | 
|   |   | 
|  10-17-2024, 08:16 PM | #6 | |
| null operator (he/him)            Posts: 22,009 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
 Is there a there a hidden table tool a'la Summernote  BR | |
|   |   | 
|  10-17-2024, 08:48 PM | #7 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
			
			It's a tweaked version of GR author notes plugin (Terisa has posted a fixed version here: https://www.mobileread.com/forums/sh...8&postcount=54). I just edited a bit the html inside its authornotes.py and changed the plugin name to GR Author notes "2". Modified plugin is attached. I took a look at Summernotes and couldn't figure how to install it. In the past I'd use Macromedia Dreamweaver for stuff like this (I call it mixed code). This time I used a text editor and some (a lot of, actually...) Calibre restarts.  And I had to tweak the BD styling with some negative margin: Code: #_bio div {margin-left: -30px !important;    }Last edited by Comfy.n; 12-21-2024 at 01:47 AM. | 
|   |   | 
|  10-17-2024, 08:58 PM | #8 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
			
			Relevant code for the table is in lines 125-132: PHP Code: 
			 | 
|   |   | 
|  10-17-2024, 09:13 PM | #9 | 
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | 
			
			I have a modified tweak for BD font-size too: # Change the font size of the Book details panel in the interface change_book_details_font_size_by = -1 | 
|   |   | 
|  10-18-2024, 01:11 AM | #10 | |
| null operator (he/him)            Posts: 22,009 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
  I was hoping you'd found a table widget chaley had squirreled away in the long text editor  Don't have time or inclination to be delving into rats nests of td, /tr, br etc tags when I want to insert a row in table, I'll stick to embedded onenote URLs.. BR | |
|   |   | 
|  10-18-2024, 01:35 AM | #11 | |
| want to learn what I want            Posts: 1,679 Karma: 7908443 Join Date: Sep 2020 Device: none | Quote: 
   | |
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Problem with title link custom column | SallyK | Library Management | 2 | 12-18-2020 08:00 AM | 
| Identifier-like custom column | nqk | Library Management | 5 | 05-20-2017 01:38 AM | 
| Custom Column to remember converted books | deadman36g | Library Management | 2 | 06-23-2016 04:22 PM | 
| Creating a Custom Column Link | a_daley | Library Management | 5 | 02-16-2014 05:56 AM | 
| Single column ePUB becomes 2 column when converted to Kindle (mobi) | rmcape | Conversion | 0 | 09-21-2013 12:52 PM |