Page 5 of 7

Re: FancyIndex: Seeking template feedback

Posted: Fri May 21, 2010 8:16 am
by Conor
I know you have already created a customized copy of the template, but for others stumbling upon this thread here is how to create a copy to cutomize:

Copy the files from inside the program package (control click DVDpedia and use "show package contents") into ~/Library/Application Support/DVDpedia/Templates (the templates folder might have to be created).

Copy both FancyIndex.html and FancyIndexDetails.html files and then "FancyIndexImages" folder into an "Images" folder that might need to be created. Rename all the files to a new name (prefix "My" for example).

Open the MyFancyIndex in a text editor (if using TextEdit use the open command and check the ignore rich text box). Now update the following line with the new name as well.

Code: Select all

<meta name="details" content="FancyIndexDetails.html" />
Now there is a customizable version of the template.

@ RabbitRun

1. Luckily for the sorting April created very clean and commented code that is easy to update. Open up the file inside the FancyIndexImages folder called "fi.shared.js" in that file you will find a function called "initializeTablesorterParsers". Amend the section that reads:

Code: Select all

// remove any instances of "The" and "A " at the beginning of a string
if (s.substr(0,4).toLowerCase() === "the ") { return s.substr(4).toLowerCase(); }
else if (s.substr(0,2).toLowerCase() === "a ") { return s.substr(2).toLowerCase(); }
else { return s.toLowerCase(); }
Replace that with the following:

Code: Select all

// remove any instances of "The" and "A " at the beginning of a string
// Der Die, Das Les, La, Le
s = s.toLowerCase();
twoLetterPrefix = s.substr(0,2);
threeLetterPrefix = s.substr(0,3);
fourLetterPrefix = s.substr(0,4);
if (fourLetterPrefix === "the " || fourLetterPrefix === "der " || fourLetterPrefix === "die " || fourLetterPrefix === "das " || fourLetterPrefix === "les ") { 
	return s.substr(4); 
}
if (threeLetterPrefix === "la " || threeLetterPrefix === "le " || threeLetterPrefix === "an ") { 
	return s.substr(3); 
}
else if (twoLetterPrefix === "a ") { return s.substr(2) }
else { return s; }
2. In the FancyIndexDetails.html look for "Additional Information" and change to "Amazon Link".

3. For updating you can use the built in FTP option that will update instead of replace or use a Transmit or similar FTP program to syncronize your exported folder with your online site. The HTML files will always be updated as they are light weight, but the images will retain their original modification date so that only those that have changed will be uploaded.

Re: FancyIndex: Seeking template feedback

Posted: Fri May 21, 2010 10:02 am
by marumari
Conor - do you have a list of all the articles that the pedias ignore at the front of a title? I'd be happy to update FancyIndex to include all of them.

Re: FancyIndex: Seeking template feedback

Posted: Fri May 21, 2010 10:15 am
by marumari
RabbitRun wrote:I love FancyIndex, thank you so much.

I have a couple of questions:

1.) How would I make the title sorting function ignore foreign articles (e.g. " der, die, das" and "le, la, les") ?

2.) On the details page the entry "Additional Information" links to Amazon and I would like to change the entry to read "Amazon Link" - where would I do that?

3.) Could you think of a way to easily update the list with new entries, without having to reupload everything. At the moment I'm doing it manually, but maybe there's a scripted solution?

Best,
Yann

Btw, my list of films is here: http://itsacut.com/dvd
I'm glad you like it - you've really customized the heck out of it. :) I really like your white-grey-black scheme!

I see that Conor already got to all your questions, but, based on your collection, I'd recommend an obscure Italian film that I think you'd like -- La Decima Vittima. It's excellent, and quite fun.

Re: FancyIndex: Seeking template feedback

Posted: Fri May 21, 2010 6:06 pm
by provoker
Great template ... just awsome.. here are some thoughts for what they are worth.

Wondering if instead of using a pop up window for the info screen which the user needs to manually close, maybe use a mouseover command of some type if possible with the programming used.

The user would simply slide the curser over the title list and the mouseover would pop up the movie info for each title it crosses and hide it just as quickly. Who knows?, maybe then click the title as now for the current pop up result if the user wants the pop up to remain open

Also, is there any way for an user to remove columns not needed?

========
Forget the second question: after reading previous post to Conor on how to create a copy to cutomize: I figured that one out and decided to read all posts next time.

Re: FancyIndex: Seeking template feedback

Posted: Sat May 22, 2010 7:13 am
by Conor
do you have a list of all the articles that the pedias ignore at the front of a title? I'd be happy to update FancyIndex to include all of them.
When looking at your code I added the article "An". As we only ignore English articles by default, All foreigner articles we ignore are in the list that follows. It can't be blindly implemented as otherwise it would move "Die Hard" to "Hard" even though it's not a German movie.

Code: Select all

The, A, An, ", El, Ein, Eine, Einen, Einem, Einer, Eines, Un, Una, Une, Des, Der, Dem, Den, Die, Das, L', Lo, La, Le, Les, Los, Las, Il

Re: FancyIndex: Seeking template feedback

Posted: Sat May 22, 2010 10:26 am
by RabbitRun
Thanks a lot :D

Re: FancyIndex: Seeking template feedback

Posted: Mon May 24, 2010 10:49 pm
by pmac
marumari wrote:I've been working on a new template the last couple days, and I was hoping to get people's feedback on it.

...

Any feedback along any lines (like feature requests) would be appreciated. Hopefully I'll keep making progress over the next couple weeks. Thanks!
Hi...

First of all, it's a really nice template... beautifully executed.

However, I do have a question / suggestion... I want to use this export on an organization's website where we have a page quota. But, if I have 1000 books, there are 1000 pages (one for each book) to use for detailed book info. Is there any way of having each info page for each book NOT be an html page?

thanks...

Re: FancyIndex: Seeking template feedback

Posted: Tue May 25, 2010 9:11 am
by marumari
Unfortunately, no. That's a limitation of how the templating system works in the Pedia system.

Re: FancyIndex: Seeking template feedback

Posted: Fri May 28, 2010 1:30 pm
by marumari
I've been getting feedback from people that the searching can be slow for very for large collections (over 2000 items). I spent several hours profiling the code and hacking away at it.

The code optimizations I've made have led to a 40% increase in speed, in my testing. I've also made sure that it doesn't start searching until typing has stopped in the upper box for little less than half a second.

If you are having troubles with speed, please do an export of your library, and then overwrite this file into the Images directory of your export. Please let me know if you are experiencing an improvement in speed. Thanks!

http://www.twoevils.org/html/mygames/Im ... .shared.js

Re: FancyIndex: Seeking template feedback

Posted: Fri May 28, 2010 2:26 pm
by Hubie
Could you please be more specific on exactly how to place this file in images? I'm a novice. The link takes me to code. I can copy and paste that, using BBEdit, but I don't know where to put it. Thanks.

Re: FancyIndex: Seeking template feedback

Posted: Fri May 28, 2010 2:45 pm
by marumari
In your export directory, there should be a folder called Images. Inside that folder, there should be a file called fi.shared.js. Replace the contents of that file with the contents of the link above.

Hope that helps!

Re: FancyIndex: Seeking template feedback

Posted: Fri May 28, 2010 10:23 pm
by Hubie
Thanks for the very clear instructions. I followed them and tried again. This time, I managed to type in the entire search word and Firefox did not completely hang up. However, I immediately got this message:

Warning: Unresponsive Script
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: file:///Users/annehuberman/Desktop/UUCB%20Library/Images/jquery/jquery-1.4.1.min.js:116

If I clicked "continue" rather than "stop script," the sorting would continue for a bit, and then the message would pop up again. I searched for an author of several different books in my database (Fulghum). The title starting with A came to the top quickly, and then it took about fifteen more clicks on "continue" to come up the next one, starting with F. I gave up before I got to I. So I'm afraid it will not be practical to use FancyIndex with a database with 2700 items. Too bad. But many thanks for trying...

Re: FancyIndex: Seeking template feedback

Posted: Sat May 29, 2010 2:59 am
by Conor
Thank you for improving that. It does work a lot faster. I am using Safari and although it does take a while it does search 2260 records when doing more unique searches. For broad searches like "Drama" I do get the unresponsive message. Also I get the message once when clearing the search field. It's a tough one to optimize as there is so much going on there. I am have added this version to the included template for the next version but I will add any other refinements.

Re: FancyIndex: Seeking template feedback

Posted: Sat May 29, 2010 8:52 am
by marumari
I will keep working at it... it's a very tricky problem - searching through 2600 records and then hiding/showing them through CSS/DOM is just slow. So, don't give up hope, Hubie, but it may be a bit before I can try to optimize this further. In the meantime, it's pretty easy to delete the chunk at the top that lets you filter - it won't be searchable for your users, but it's still sortable and you still get all the other nice features (like the lightbox).

Chrome is very, very fast at this, followed by Safari, then by Firefox. You can do all sorts of optimizations with custom-coded server side code, but you're definitely limited when it comes to Javascript only.

Conor - I just now made a slight edit to include "an" in the list of ignored particles. If you want to use the new fi.shared.js file in the templates, that would be great.

Also, now that FancyIndex is included in the programs by default, it seems to ignore the FancyIndex directories that I have in my Applications Support folder. I'd edit the files inside the application directly, but I worry that it would get overridden when I upgrade. Is there any way around this aside from having my Applications Support templates be called FancyIndexDev or the like? Thanks.

Re: FancyIndex: Seeking template feedback

Posted: Sat May 29, 2010 4:43 pm
by Conor
If they have the same name it prefers the one that ships with the program. Naming yours dev would work, but then I would probably forget to change the name when you send it to us. The best would be to remove the version inside the program and then the Pedias will select your templates folder version again. You will only have to remove the version inside the program after an update, but that shouldn't be often. Thank you for looking into the optimization for searching for users with large libraries. I will add the new version.