Unregistered
Unregistered
Guest   2006-12-28, 14:58
#1
My pictures are all numbered. The latest additions have larger numbers. However if i sort by filename the photos are being displayed from old to new (001.jpg -> 999.jpg). Is there any way to reverse this? I am sure there is since I found some earlier solutions on this forum (but I don't think they work with the latest version). I have no programming skills myself so I was hpoing someone could help me out here.
Member
Member
jayray999   2006-12-28, 18:44
#2
Try this:

Identify the file classes.php in the /zen folder. Find line 579:

ksort($images);

Change it to:

krsort($images);

Now if you sort by filename or title in the Admin Panel, the largest filename (or title) will be first.
Unregistered
Unregistered
Guest   2006-12-28, 19:17
#3
Brilliant, works like a charm. Thanks
Unregistered
Unregistered
Guest   2006-12-28, 20:08
#4
is there also an easy way to order the album the same way
Unregistered
Unregistered
Guest   2006-12-29, 09:02
#5
There is a small problem , now I use krsort instead of ksort 'prev' en 'next' buttons work the other way around. I guess this is because the order hasn't been changed in the database. Any other way to fix this?
Member
Member
jayray999   2006-12-29, 14:25
#6
@bart

1. I believe in the same file classes.php there is a ksort($album); which when changed to krsort($album); will reverse the existing order of your album folders. Play with it and see.

2. Regarding the prev-next issue this has to be solved in the theme. A dirty way to do this for the default theme

Find the file image.php (/themes/default/image.php).

In it find the section: <div class="imgnav"> at line 24.

Within the section replace two lines

Replace line 26 which reads:
<div class="imgprevious"><a>" title="Previous Image">« prev</a></div>

With:
<div class="imgnext"><a>" title="Next Image">next »</a></div>

Replace line 28 which reads:
<div class="imgnext"><a>" title="Next Image">next »</a></div>

With:
<div class="imgprevious"><a>" title="Previous Image">« prev</a></div>

Don't change anything else and please backup your original files so you can revert easily.
Member
Member
jayray999   2006-12-29, 14:26
#7
@bart USE THIS INSTEAD

1. I believe in the same file classes.php there is a ksort($album); which when changed to krsort($album); will reverse the existing order of your album folders. Play with it and see.

2. Regarding the prev-next issue this has to be solved in the theme. A dirty way to do this for the default theme

Find the file image.php (/themes/default/image.php).

In it find the section: <div class="imgnav"> at line 24.

Within the section replace two lines

Replace line 26 which reads:
'<div class="imgprevious"><a>" title="Previous Image">« prev</a></div>'

With:
'<div class="imgnext"><a>" title="Next Image">next »</a></div>'

Replace line 28 which reads:
'<div class="imgnext"><a>" title="Next Image">next »</a></div>'

With:
'<div class="imgprevious"><a>" title="Previous Image">« prev</a></div>'

Don't change anything else and please backup your original files so you can revert easily.
Member
Member
jayray999   2006-12-29, 14:28
#8
@bart

I always have trouble posting code on this forum since some characters do not show up. Send me your email and I will mail you the correct version.
Member
Member
jayray999   2006-12-29, 15:59
#9
Basically in the above use:

« for &laquo
&» for &raquo
Member
Member
jayray999   2006-12-29, 16:00
#10
Just send me the email
Unregistered
Unregistered
Guest   2006-12-29, 21:19
#11
Thanks for your help jayray999 appreciate it. My email address: anangelheadedhipster at hotmail.com
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.