
+2
Renegade Reader Theme For Ubooquity 3.1
Hello all,
Just wanted to move conversations about the Renegade Reader theme to a proper thread.
The current version is here: Renegade Reader complete with documentation on how to install it.
Questions and comments are welcome. But remember, I can't please everyone. :)
Customer support service by UserEcho
Hey Dennis,
I'm still running some tests and trying to brainstorm this, but I keep running into a few problems.
1. It seems as if Ubooquity treats multiple shared folders under a single category the same way it treats a single shared folder under single category with "bypass single root folder" turned off... which inserts a page between the home and library pages... which, in turn, screws up the dynamic navigation on the home page and the dynamic breadcrumbs in the libraries.
2. When you launch a scan, Ubooquity assigns a unique numeric id to every file and folder it scans. Then, it uses those numeric ids in its URLs to access the associated files/folders. Problem being, there is no way to predict what number Ubooquity will assign to your main comic/book/mag/doc/etc page(s) - making dynamic navigation and breadcrumbs MUCH harder to achieve.
3. I'm pretty sure Ubooquity only displays the latest category. So, Latest Comics would be the latest comics across both shared folders - making sliders for both on the home page pretty much impossible.
Personally, I never even thought about adding multiple shared folders under a single category, but a can see the need. I have over 50,000 comics alone. So, I understand. :)
What would help tremendously is if Ubooquity treated multiple shared folders under a single category like an expansion of a single library of comics/books/mags/docs rather than treating them as separate folders. Like when you expand your RAID array with a new drive rather than adding a new drive letter. I mean, it makes sense since the latest and random comics/books/etc already do that. <shugs>
Thoughts? I'm open. You got a vision? Spill it. LOL!
Phoe ..
The system does something...
This is the admin are where we have multiple shared folders with same category
This is what you can see also here ..
http://10.1.1.104:2202/comics
Above Example when I enter this I see the "correct" layout for what we need when we have mutiple libraries.
But this part is not visible in the home page When I press strips or strips2 I get the correct ID of where the other library start
So you have correct pages but in the homepage it is not adapted.
Library 1 .. and I can also go to the 2nd one, but right now it is manually.
So for me there is actually no need to have a start or end as all data seems there
Is that helpful ?
LOL! You just posted the exact behavior I described above.
The strips and strips2 page you showed me mimic the exact behavior of "bypass single root folder" being off using 1 shared folder per library under a single category. I cannot fix that. That is an Ubooquity thing. It's because, as I stated above, Ubooquity does not treat shared library folders in the same way it treats them when displaying the random or latest categories. It separates them. Thus, you get the page between the home page and the libraries. And that creates even more problems for the home page navigation because it will HAVE to show strips and strips2 under the "Browse" tab rather than "Comics" as the category.
So, with the current theme, I would have to rework the entire navigation system on the home page, trap for the strips and strips2 page between the home page and libraries, then rework the breadcrumb navigation throughout the libraries.
And while I "can" and "will" do this, if necessary, the better solution (IMHO) is to have Tom address the way Ubooquity handles multiple shared folders under a single category.
Why? Because if you want the extra page that is generated when "bypass single root folder" is off, you can already do that. What you currently can't do is skip that page if you have multiple shared folders under 1 category. However, again, if Ubooquity treated multiple shared library folders under 1 category as 1 drive rather than insisting on separating them, it would not create the extra page unless you told it to by leaving "bypass single root folder" off.
I know that Tom already has a list of stuff to do and that he is extremely busy for the next few weeks or so. But I will ask about this and see if he has any plans on addressing this or even views it as a viable solution BEFORE I decide how to proceed with fixing the theme.
Thank you for your help in this matter Dennis. And if I do need to completely overhaul the theme, I will probably be asking you more questions about how you think we should address the 'offending' extra page issue in the theme.
Peace!
G
Thanks Gary
I know that it is a lot of work to fix and change that. You are welcome asking more questions. The new version I have on a separate VM so I can do a lot of testing without touching my existing environment ;)
Where I can I will help
Awesome! I posted a request to Tom in the appropriate thread, explained the problem, and will wait for a response before proceeding.
Rest assured, one way or another, I'll come up with something that will work for your setup once I've heard back.
Thanks,
G
I'm also busy with Github's co-pilot and Claude Sonnet ..
first try after 10 min is promising ;)
Gary,
https://drive.google.com/file/d/1XPUX9wN-MoPCHXGUI8QLJSVzDUQvJnlc/view?usp=sharing
Here an example how it could be solved .. ;-) I;ll remove the file when you have it
The plextheme I used for version 2.x works similar
Dennis,
Thanks for the ideas. However, I opted for a quicker (less messy) fix that actually turned out to be beneficial to the overall theme.
First, "bypass single root folder" in Ubooquity MUST BE OFF now. I used page-library-category-root-dirs.html to scrape the root URLS and if there is more than 1 it asks you to choose one. If there is only 1, you're automatically re-directed to it and page-library-category-root-dirs.html is hidden (so you don't even know you were re-directed). That also means there is no longer a reason to pre-define the comic/book/magazine ID numbers in themescript anymore. :)
Second, eventually I will add a way to switch between libraries and shared folders while you're in the libraries. I know exactly what I want it to do and how to achieve it. The thing that will take a while is coming up with a new navigation bar and figuring out exactly where to implement it. But, for now, at least this makes the theme usable.
I updated the "Renegade Reader" link at the beginning of this thread so that the latest version is available.
Peace,
G
Hey Gary,
First off, thanks for creating this great theme! I was reluctant to move to 3.x as I really liked the comixology theme, but your theme sealed the deal.
I also wanted to post some code that might help others who like me want their thumbnail images the same size regardless of the source. I have more than a few books that the first image is the front and back cover, so they don't look very good when rendered with the default thumbnail settings. Here's an example where three of the covers are like that:
This small code tweak provides this look instead:
Not perfect as some covers don't quite align, but I've found it works for the majority of trades or hardcovers with the front/back combined image as the initial image in the book.
I made a couple tweaks to the old mod as there were some issues with the progress bar not showing correctly with the old code. Anyway, just comment out this code block:
and replace it with this one:
Anway, hope that helps someone out. Thanks again Gary!
ListerD,
That's the beauty of writing themes in Java script. People can tweak things to make them aesthetically pleasing.
When I aligned the thumb images at the top of the cells, they looked very disorganized and jumbled to me. So, I tried your method (making them all the same size). But that distorts non-standard images and makes it difficult to know what the folder/file contains at a glance. So, I opted for aligning them to the bottom of the cells so that the folder/file names lined up.
I think it looks more organized without distorting the images. <shrugs>
But, again, the beauty of using Java script is that people can make these kinds of small tweaks without too much effort. You also might want to tweak the space between the cells and the labels so that they don't overlap the cells below them when your comic descriptions are longer. ;)
And thank you for your compliment.
Yeah, thanks for the tip on the spacing. I'll look into that next, but I'm just a hack when it comes to javascript. My career was in databases and analytics. :)
All,
Just some screen shots to show you what's possible with this theme using header pngs in your library folders when "useHeaders" and "useTextHeaders" = true on your themeScript.js.
This is my root comics folder:
Note: "The Comic & Graphic Novel" is a centered text header generated by the theme. The outer image part is a header.png located in my comics library root folder with no background in the center (the beauty of png vs jpg). The images showing the comics groups or publishers are folder.jpg files located in the sub-folders off the root.
Another example:
This is my root book section:
Note: The header is just a header.jpg located in my root book folder library and the pictures of the authors are folder.jpg files located in each of the author's sub-folders.
This is one of the authors in my books section:
Again, the "Book by 'Anne Rice'" is a centered text header generated by the theme. The background picture of the books on both sides is a PNG with no background in the center and the book images are from 1 the books in the collection (Ubooquity's default when no folder.jpg exists).
For everyone's information:
Since I plan on improving/changing this theme as Ubooquity evolves, I just wanted to make everyone aware that the most current version of the theme can always be found at the beginning of the thread (so you don't have to search the entire thread for the latest version).
When there is a new release, I will announce it here and list the revisions I made to it...
Speaking of which, I did update the theme early this morning. Below are the revisions:
Renegade Reader v1.05
Changed: IMPORTANT! MAKE SURE "BYPASS SINGLE ROOT FOLDER IS OFF IN UBOOQUITY (not checked). Previously, it needed to be on (checked) and you needed to pre-define your root category IDs in themeScript.js. Now, the theme scrapes your root folder information from the page-library-category-root-dirs.html file (which is only available when you are NOT bypassing single root folder in Ubooquity). If you do NOT have multiple shared folders under a single category then page-library-category-root-dirs.html automatically re-directs the user to the correct root folder for comics, books, and magazines.
Added: Some support for multiple shared folders under a single category. The theme now uses the page-library-category-root-dir.html file to display your shared folder options. Additionally, as you can see in the navigation above, I'm currently working on adding a way to switch libraries when you have multiple shared folders under a single category - but I've been balked for the time being because the {{#rootFolders}} non-empty mustache list is not working in the inc-library-popups.html.
Changed: The themeeditor to reflect the changes above. comicBaseId, bookBaseId, and magBaseId in themeScript.js are now defined as empty numeric arrays that are filled as the user passes through the page-library-category-root-dirs.html. So, they are no longer a part of the pre-defined settings portion of this theme.
That's all for now folks!
G
Thanks Gary!
Some remarks
from the homepage it is impossible to go to the /comics section as above. There is not a link
I have latest comics in a row, but that's it there is no link to the one above
When pressing ie. strips I get the cartoons I want, I can use the arrows so that works, but you cannot return back to the multiple comic bases detected.
So main thing for me is make the link available from the homepage
When I ask the source I see
But it is not visible..
that's it. Keep up the good work !
Dennis,
What you're asking for is virtually impossible because Ubooquity does not expose the root folders on the home page. The only way it would be possible is to have the sysadmin pre-define what their comic bases IDS are in themeScript.js. And the problem with that is that there is no telling how many shared folders a person has under a single category. This also prevents use of the main navigation on the home page in the libraries - as there are no root links available for a category until you actually go to that page.
ie.. when you go to the comics library your root folders are exposed in page-library-category-root-dirs,html for "comics" but not for "books" or "magazines" or "documents" until you specifically choose one of those categories and go to those libraries.
So, unless Tom decides to expose the root folders on the home page, this is a non-starter because there is no way to get the information I need without scraping it from the page-library-cateogry-root-dirs.html or trying to figure out a way to get an unknown amount of pre-defined variables telling the theme where your root folders are.
See my conundrum?
Having said that, I am completely rewriting the theme from scratch. What I'm planning is to add a way to switch folders when you're in the libraries (which completely breaks the navigation, breadcrumbs, and header system in the current version).
So far, I'm very satisfied with the progress, as I've been wanting to take all the variables I was using in session storage and combine them under 1 "Ubooquity_Settings" object - which I've successfully done in the rewritten version.
Now, when you pass through the page-library-category-root-dirs.html, you're re-directed to the first shared folder in that category where you'll be able to switch shared folders (within that category) with a popup menu (similar to settings or search). Of course, this requires a complete rewrite of the navigation, breadcrumb, and header systems. So, it will be a while before the next update.
However, like I told Tom, when I started this theme, I was experimenting a lot because I wasn't real familiar with how Ubooquity worked. So, there are a lot of "hacks" in the current version rather than "clean" easily followable coding.
So, the rewrite was coming at some point anyway...
Peace,
G
FWIW: I'm probably about 1 week away from needing someone(s) to test this theme re-write for me. I have everything re-incorporated and re-written except the "Series/Story Arcs" sections, the home page navigation bar, the home page sliders, as well as the handling of dynamically created content (such as breadcrumbs and headers) in browser history so they display correctly when a browser forward/backward button is used.
Shared folders under a single category (your biggest issue) are now available in the corresponding library that you're currently in (but only if you have multiple shared folders in that category).
ie: if you have strips and strips2 as shared folders for the "comics" category, a folder icon appears in the library navigation bar to the right of the settings button that allows you to switch folders without breaking the entire breadcrumb and header routines. The folder icon only appears in categories that have multiple shared folders. So, if "comics" has 2 shared folders, but "books" has only 1, the folder icon will appear in "comics", but not books.
The home page navigation to each category (comics/books/magazines/documents) will still appear under the "Browse" tab and will re-direct to the first shared folder in the category you choose. As stated above, from there you'll be able to switch folders if you have multiple shared folders in that library category. I've been testing this for a solid week now and it's pretty slick and solid (even if I do say so myself). ;)
---
Having said all that, there is another small issue with this rewrite that will affect people who've installed the old theme.
You see, in order to make certain variable available on pages that Ubooquity does not natively make them available on (ie.. the {{userName}} mustache tag is only available in the page-home.html file), I have to store them in your browser's session storage or local storage so I can access them across all pages. In the old version, I just gave them names related to what they were used for and stored each variable separately in browser storage. In this version I'm currently working on, I'm storing them AND the settings in Ubooquity's API all in 1 object ("Ubooquity_Settings"). The point being: the new version will store everything differently than the last version. So, upgrading to this new version will lose all existing library and audio bookmarks and the color schemes will be set to default because they're stored under different names and in objects rather than individually in browser storage.
---
Anyway, once I'm ready, I'll post a beta link in this thread for people to try it out. ;)
Peace,
G
The latest beta rewrite is now available here: Renegade Reader v2.0 Beta
Note: This is NOT a finished release. Rather, it's a pre-release of what I'm currently working on.
Some other notes for people who want to try this:
1. Root library folders no longer require URL ids to be predefined in themescript.js. They are now scraped from page-library-category-root-dirs.html (which is something I should have done in the first place to avoid having to predefine them in themescript).
2. You still have to predefine numeric URL Ids for your comic/book/magazine/document series' as well as the folder name you're using for your audiobooks (if applicable) as Ubooquity does not internally support audiobooks or series'.
3. Multiple shared folders under a single category are now supported along with a way to switch folders in the corresponding library instead of displaying them when passing through the page-library-category-root-dirs.html. To switch folders, go to your comics/books/magazine/document library and look for the folder image next to the settings image.
4. Used brand new objects for local and session storage to avoid overwriting old objects stored in session and local storage (which would bread the current theme).
5. The theme checks Ubooquity's "bypass single root folder" setting and will not allow you to use it unless you've turned it off.
6. Added the ability toggle the CSS adjustments on/off on the root folders. If rootFolderAdjustment = true, then the root folders are adjusted to support squared images. If rootFolderAdjustment = false, then the root folders are displayed exactly like the library folders (rectangular images).
7. There is no top bar navigation on the home page and there are no sliders with the latest materials. Rather, it pretty much looks like the default theme's home page (which is necessary for navigation). The navigation bar and sliders with the latest materials will be added once I get verification that the other areas seem stable.
Peace,
G