0

Renegade Reader v2.0 (The Old Man Edition) Theme For Ubooquity 3+

Gary 4 weeks ago updated 3 days ago 10

Well folks, it's brand new "stable release" time.  And since the first edition of the Renegade Reader theme is officially dead, I decided to create a new thread dedicated to second edition (or "The Old Man Edition") releases.  

The latest stable releases can always be found here: Renegade Reader v2.0 (The Old Man Edition)

Below are the revisions made between the last v1 (First Edition) and the v2 (Old Man Edition). 

Enjoy!

G


Renegade Reader v2.0 (The Old Man Edition) stable release

Change - All documentation has been updated, not only reflect the changes made between the "first edition" and "the old man edition" of this theme but, to better explain how Ubooquity and this theme interact as well as including more detailed information and examples on how to configure Ubooquity and this theme to get the best results.

Addition - A Windows build of the theme editor is now included in the /themeeditor folder along with the Linux build.

Change - The theme editor program is now updated to reflect the additions/removals of themeScript.js settings variables.

Change - Created a loginBackground.png to reflect the name of this theme's build (The Old Man Edition). Should you desire to do so, feel free to create your own "loginBackground.png" image to suit your needs and replace the existing one for a more customized look.

Change - The login page is changed to only display the Renegade Reader (powered by Ubooquity) logo, the login prompts, and a background image for the login page named "loginBackground.png", located in the "/themes/RR2/login/" folder.

Addition - The theme now has two different home page templates to choose from.
Use: homepageSliders=false variable in themeScript.js to tell the theme to use the default home page template
Use: homepageSliders=true variable in themeScript.js to tell the theme to display the alternate home page template with sliders containing the latest content on the home page

Removal - Since neither Ubooquity nor this theme strictly enforce JPG/PNG decoding, the "imgType" variable was removed from the theme settings in the themeScript.js file because, decoding-wise, it's not necessary to distiguish between the two file extensions. To use the PNG format where the JPG format is expected, simply rename your PNG file's extension to JPG. Likewise, to use the JPG format where the PNG format is expected, simply rename your JPG file's extension to PNG. The decoding routines are the same for both formats. So, the expected "file name.ext" is more far more important to Ubooquity and this theme than the image's actual format.

Removal - The "removeFolders" variable has been removed from the themeScript.js settings because it was specifically meant to remove the story arcs and series pages you create from the cateogry libraries they reside in; as well as the json (mini-database) file that Ubooquity imports to create them. This is now done automatically when a story arc or series page is displayed.

Renegade Reader v2.0 beta released for public testing

Addition - You can now tell the theme "how many pages deep" it should continue to display content header titles (or content text headers) in each category library.
Use: maxFoldersToLookForTitles variable in themeScript.js and adjust numeric values only
Use: adjust numeric values per category under "Max Titles"

Addition - You can now tell the theme "how many pages deep" it should look for a new header.jpg in each category library until it defaults to the last existing one.
Use: maxFoldersToLookForHeaders variable in themeScript.js and adjust numeric values only
Use: adjust numeric values per category under "Max Headers"

Change - Content header titles (or content text headers) will no longer display (regardless of whether they're on or off) if content headers are turned off.

Addition - You can now tell the theme whether or not to adjust category library root pages for squared, rather than rectangular, images.
Use: rootFolderAdjustment=true or rootFolderAdjustment=false in themeScript.js OR
Use: Root Folder Adjustments: [checked] or [unchecked]

Addition - Latest (or new) content in home page sliders can now be bookmarked. However, because bookmark queues are category specific and because the home page does not fall into any specific category, access to the bookmark queues is restricted to the appropriate category library. Ie.. Materials bookmarked from the Latest Comics sliders on the home page are stored in the bookmark queue located in the "comics" library. While materials bookmarks from the Latest Books sliders on the home page are stored in the bookmark queue located in the "books" library. El etc.. And while, in theory, I HAVE a good idea on how to successfully display bookmark queues on the home page, any implementation will require some intense "experimentation" on my part to make it function and display the queues correctly on the home page. So, this still could be a possibility in future releases.

Addition - Library bookmarking is now category specific. Bookmark queues are located under the "Bookmarks" link in their respective category libraries.

Change - The audio books module has been completely re-written and the associated HTML/CSS files were moved from the /common/ to the /library/ folder.

Change - Completely re-wrote the breadcrumb navigation and content header handling routines so that switching between root pages in a category library does not break them.

Addition - The theme now "correctly" supports multiple root pages (shared folders) in all category libraries. Switching between root pages is done in category libraries where the multiple root pages (shared folders) exist.

Addition - If the Ubooquity setting "bypass single root folder" under the Advanced tab is on, the theme will now inform you on the home page that it must be turned off.

Change - The theme now informs you if your have not imported anything into Ubooquity's database. I took this out of the first editions because I thought it was redundant. However, since I am planning on sharing (distributing) this theme in advance, I feel that re-including on the home page is necessary.

Change - All theme related objects stored in your browser's session and local storage bins have been renamed with "Ubooquity_????" prefixes for better data organization as well as to prevent severe data mis-matches between the first and second versions of this theme.

Change - Completely re-wrote many of the base Javascript functions and HTML files used in v1+ of this theme in order to reduce the number of required configuration settings without losing functionality.

Note: The code for the v1 (or first edition) releases needs to be abandoned. The problem is that, when I started writing this theme, I had no intent to distribute it and the code, for all practical purposes, is a series of "successful experiments" rather than being pre-planned and well-structured. Therefore, as much as I wanted to avoid it, a re-write of this theme's base functions has become unavoidable. The v2 (or second edition) releases will be pre-planned and better structured because 1) I don't have to experiment to see what works with Ubooquity anymore. I learned those lessons writing the first edition releases. 2) Knowing that I plan to share the theme in advance will force me to avoid as much 'hard-coding' as possible - which, in turn, will make the theme more customizable for end users who have a minimal understanding of HTML/CSS/Javascript.

Renegade Reader v1.05 (The First Edition) - final v1 release

While fixing some styling issues that were bugging me, I noticed that my story arcs and series pages were showing up in the libraries (which was something that I thought I had fixed when I removed the "removeFolders" variable from the settings in the themeScript.js file). It was a simple fix.  But, needless to say, hiding those folders and the json file in them is important part of completing a story arcs/series page.  

So, if you downloaded and installed the new version of the theme prior to 10-14-2025, you'll probably want to re-download and re-install it.  I apologize for that in advance.

However, the good news is that this release includes fixes for styling issues that have been bugging me for a long time.

Renegade Reader v2.0 (Old Man Edition) stable release to fix the "stable release". 

Fixed - Story arc and series folders were not being removed because they were still checking label names rather than URL IDS. (SMH! It figures I would find this AFTER the "stable release")

Fixed - The folder.svg and its styling needed slight adjustments for proper display.

Fixed - The bookmark.svg now has a completely transparent background and behaves like the rest of the svg images when color schemes are changed.


Fixed - The page loaders displayed while the latest content is being loaded in the sliders on the home page are now styled correctly and say "Loading..." underneath the circular progress bar(s).

Fixed - Home page sliders are now pre-adjusted when the page loads based on the width of the screen rather than waiting for content to load and then adjusting them based on the width of the content. Looks much better and the layout shift is nearly 0.

I'm very excited to announce that major improvements to the audio book module are close to being completed.

The audio book player now reads JSON files so that it can:
- generate a clickable playlist - complete with track/chapter numbers, names, time stamps, and durations for, both, single MP3/M4A/M4B audio book containers as well as MP3/M4A/M4A audio book containers that are split into tracks/chapters.
- navigate forward and backward through the playlist using the previous and next buttons for, both, single MP3/M4A/M4B audio book containers as well as MP3/M4A/M4B audio book containers that are split into tracks/chapters.
- bookmark the track/chapter and time for, both, single MP3/M4A/M4B audio book containers as well as MP3/M4A/M4B containers split into track/chapters.
- display timestamps and durations in the playlist for MP3/M4A/M4B containers split into tracks/chapters (optional and purely cosmetic).  Which was something I had already implemented when I added JSON support for single MP3/M4A/M4B containers.  

And while resorting to relying on "homemade" JSON files to get the track/chapter information that the player needs to become fully functional when dealing with single MP3/M4A/M4B containers wasn't my first (or even second) choice, I've found that I can do things like customize the time stamps, the track/chapter names, and even calculate track/chapter durations based on the time stamps I provide.  Truly, I found that the benefits of using this method far outweighed the hassle of using MediaInfo to obtain the information I needed and the time it took to create a JSON file for my M4B files with it.  And the best part is that I should never have to touch the JSON files again. :)

Also, with regard to the "homemade" JSON files, I tried to make this as easy as possible for other people to use.  So, the player doesn't require any specific file names for your JSON files.  It only requires that the file name's extension ends with ".json", that it resides in the same folder as the audio book container it's referencing, and that it's structured correctly for single or multiple files so the player can read it.  

The following are examples of the two different JSON file structures I've developed that you can use:

This is an example JSON formatted file for use with single MP3/M4A/M4B audio book containers
{
"Tracks":{"00:00:00.000":{"Prologue":"0"},
"00:20:18.115":{"Sendaria":"1"},
"00:57:02.615":{"Sendaria":"2"},
"01:16:54.530":{"Sendaria":"3"},
"01:44:51.096":{"Sendaria":"4"},
"02:20:12.917":{"Sendaria":"5"},
"02:54:11.173":{"Sendaria":"6"},
"03:14:16.802":{"Sendaria":"7"},
"03:48:58.814":{"Sendaria":"8"},
"04:20:05.889":{"Sendaria":"9"},
"04:44:37.263":{"Sendaria":"10"},
"05:27:12.169":{"Sendaria":"11"},
"06:15:18.542":{"Cherek":"12"},
"06:38:23.867":{"Cherek":"13"},
"07:03:16.296":{"Cherek":"14"},
"07:31:51.156":{"Cherek":"15"},
"07:59:36.435":{"Cherek":"16"},
"08:18:12.544":{"Cherek":"17"},
"08:46:14.908":{"Cherek":"18"},
"09:08:24.515":{"Cherek":"19"},
"09:31:29.031":{"Cherek":"20"},
"09:46:09.644":{"Cherek":"21"}
}
}
In the above JSON example, the player only uses the time stamps at the beginning for functionality.  The track/chapter name and number are purely cosmetic.

This is an example JSON formatted file for use with multiple MP3/M4A/M4B audio book containers (split into chapters)
{
"Chapter 01":"3786.343",
"Chapter 02":"3803.846",
"Chapter 03":"3807.452",
"Chapter 04":"3821.321",
"Chapter 05":"3805.728",
"Chapter 06":"3803.244",
"Chapter 07":"3802.513",
"Chapter 08":"3823.646",
"Chapter 09":"3754.632",
"Chapter 10":"3820.668",
"Chapter 11":"3716.964"
}
In the above JSON example, the player inspects the internal "title" tag for each MP3/M4A/M4B chapter to use the correct duration to calculate time stamps and durations for multiple MP3/M4A/M4B containers.  Again, these are purely cosmetic and do NOT affect the functionality of the player.
-----

On a related note, I would also like to share that I finally figured out a way to make the correct number of audio books (regardless of whether they're stored in single containers or split into chapters) appear under links to subpages so that the audio books library looks exactly like the comic, book, magazine, and document libraries.  That's the good news.  The bad news is that there are no quick "client-side only" methods to recurse subpages.  So, on parent pages (where there are still a lot of subpages to search for audio books), the method I used causes a slight delay before loading subpage links.

So, in cases where the delay becomes bothersome or excessive, I've added a "true/false" constant in the settings part of the themeScript.js file to toggle the {{itemChildrenCount}} mustache tag on/off in the audio books module.
------

As for when you can expect a new release with all these nifty new features... the code is already written and I've been repeatedly testing it under different scenarios for the past few hours.  All seems good - which means I can start working on updating the documentation and theme editor programs as early as tomorrow evening... If all goes well, I should be able to package and distribute a new release as early as next week.
 
TTYL,

G







+2

Apparently, I'm a bit bored in my retirement.  I finished updating the docs and theme editors today.

So, once again, it's "stable new release" time. 

The latest version of the Renegade Reader v2.0 (the Old Man Edition) is available at the top of this thread. :)

The version number of the theme is actually: v2.0R1 (see the included docs).

If you're running an older version of this theme (especially a 1.0 version), I highly encourage updating to this version.  Much of the base code has been completely rewritten to function better with Ubooquity.  Additionally, earlier versions of the audio book player included with the theme have extremely limited playback capabilities and they don't have the ability to create playlists 
for audio books in single containers - something that's been addressed with this release.

Enjoy!
G

hey, thanks for all the work.. took me a bit to get my head around it, not familiar with coding and such, but the way it works / is organized makes it quite easy, so thanks for that too.. 
so im currently reorganizing my library into publisher/series to allow for that breadcrum system.. i assume the base/publisher/author images are manual work.. is there some sort of dropbox for this, where people can share their logos?

Thanks.  Yep.  You'll need to create header.jpg images and put them in the comic base folders you want them displayed in.


Wait until you see what I'm working on next. :)

hhenne,

I did not include the images I use for my libraries because, quite honestly, there are way too many to duplicate.  My comic library, alone, has over 70 publisher folders and hundreds of sub-folders under those.  

However, after considering your request, I put together a small package with examples of directory structures along with the appropriate folder.jpg/header.jpg for the comics, books. magazine, and audio books folders to help you out.

Libraries example: Libraries.zip

Hope that helps.


Hello

I just try to use RR first time and get this error even after put a header.jpg into my Calibre library
What I miss? Oh Second question can I get the header.jpg what u use I like that...

Image 854

Check your browser's console logs (control+shift+i).  It should, at least, give you a hint as to why you're not getting breadcrumbs.  Without more information, I can't tell you what you missed. :)

Hello

Seems the problem only show itself if i choose the grouping folder version. And I have a calibre library directory option in the Ubooquity. I not sure the folder view or the calibre the problem. I tried to put a header.jpg into the main directory still there is a broken jpg icon. But seems if i choose the Upper arrow then seems that ok in the flat view... I am a little confused :D I have only ebooks no comics nothing else in one calibre directory

This when not good: 

Image 855

The header.jpg goes in your library folders

ie...

comics <- header.jpg
comics/marvel <- header.jpg
comics/marvel/avengers <- header.jpg

and so forth.  

The numeric values in maxFoldersToLookForHeaders setting in themescript (or Max Headers field in themeeditor) are to tell the script how many pages deep it should continue to look for header.jpg before it simply uses the last one it found.

ie.. comics: 2

comics <- look for header.jpg
comics/marvel <- look for header.jpg

comics/marvel/avengers <- do not look for header.jpg.  Use last one instead.

Hopefully that helps.

G