PDA

View Full Version : Letterbar destination


devoslack
07-09-2007, 10:06 PM
Is it possible for the Letterbar to link to the files that start with the selected letter, rather than linking to the user with the selected letter?

Example:

Currently if you click on D in the letterbar, you are taken to a list of users that have posted images.

I would like to:
Click D in the letterbar and be able to list all files that begin with D.

Morgan
07-09-2007, 10:35 PM
Untested, but you would need to edit the if-block of code starting with the following in the PhotoPlog index.php file:
Content visible to registered users only.
Maybe something like the following will do:
Content visible to registered users only.
Though note that, as functions are run on a field, it is not optimal to do this. Large galleries would definitely not, not, not want to do this, as there is a full table scan.

Again untested, but you could try this instead if you are not worried about missing files with the same name:
Content visible to registered users only.
That should use an index but will miss files with the same name, catching only the first one for display.

devoslack
07-09-2007, 10:39 PM
Alrighty. I expect the gallery to grow exponentially, if not during the summer then definitely during the next hockey season. I'll just remove the letter bar and allow users to search for their favorite players.

Thanks for the help!

MikeD
07-10-2007, 08:05 AM
Content visible to registered users only.Exactly the same idea I had yesterday. See here (http://www.photoplog.com/forum/showpost.php?p=12443&postcount=47) :) -Mike

Statice
07-26-2007, 12:47 AM
I've tried this and when i hit any letter it brings up the same files over and over

its not filtering anything.

possible solutions?

Morgan
07-26-2007, 12:52 AM
Sorry, none, as I haven't tested that code though something like it should work.

Statice
07-26-2007, 12:57 AM
i'm not too great with php...so i dont think i'd be able to figure it out lol

hmmm