1
SirTanksAlot
XoopsGallery Sorting Fix

I'm not exactly sure what the correct mechanism is for submitting a hack/fix to this module.. but here goes..

The module wouldn't sort the images in the album correctly.. here are the diffs (visual source safe style) for the changes I made to classes/album.php and sort_album.php

If you want them in a different format.. please let me know..

Thanks

HACK:

album.php
211    Ins:         return $this->save();
220    Ins:         
223 Change:         $this->save();
        
To:         // Don't save yet.. wait until the rest is finished as well..
224 Change
        
To:         //$this->save();
227    Ins:         
306    Ins:         return $this->save();
450 Change
        
To:         
505 Change:             if ($fd fs_fopen($gallery->app->albumDir "/serial.dat""w"
        
To:             $serial2 $gallery->app->albumDir "/serial.dat";
510    Ins:             if ($fd fs_fopen($serial2"w")) {


sort_album.php
46 Change:     if ($confirm) {
        To:     if ($sort) {
 49 Change:             $gallery->album->save();
        To:             //$gallery->album->save();
 54 Change:             $gallery->album->save();
        To:             //echo $gallery->album->save();
 77 Change: echo makeFormIntro("sort_album.php"); ?>
        To: echo makeFormIntro("sort_album.php"
 
78    Ins:             array("name" => "theform"
 
79    Ins:                 "method" => "POST")); ?>
110 Change: 
        To: 
113    Ins: 

2
Boobtoob
Re: XoopsGallery Sorting Fix
  • 2003/3/16 3:36

  • Boobtoob

  • Friend of XOOPS

  • Posts: 202

  • Since: 2001/12/22


Thanks.. I'll hack this in to my xg.... I'm in the process of taking what Ono did and templating it a little further.

3
hal_u1
Re: XoopsGallery Sorting Fix
  • 2003/4/4 8:24

  • hal_u1

  • Just popping in

  • Posts: 5

  • Since: 2003/4/4 8


I can't patch these diffs, so Please show more easy format.

Quote:
220 Ins:

I can't understand this means Insert null line?

Quote:
505 Change: if ($fd = fs_fopen($gallery->app->albumDir . "/serial.dat","w"

This line is
if ($fd = fs_fopen($gallery->app->albumDir . "/serial.dat", "w")) {
but diffs mean exact bellow?
if ($fd = fs_fopen($gallery->app->albumDir . "/serial.dat","w"


4
SirTanksAlot
Re: XoopsGallery Sorting Fix

Initially, I made a bunch of changes trying to track the problem down.. I finally came to this simplification.


Comment out line 223 in album.php..

for some reason, it doesn't like 2 saves on the album... The first would seem to go through ok.. but the second would always fail. by commenting out line 223 and only doing the save after outside that function call, everything else seemed to work ok...

5
hal_u1
Re: XoopsGallery Sorting Fix
  • 2003/4/6 7:22

  • hal_u1

  • Just popping in

  • Posts: 5

  • Since: 2003/4/4 8


Thank you for your reply.
It's great!!
Sorting of Gallery works fine.
There is no problem.

I have the other question.
On the top of Gallery page, [reset counter] does not
work.
I try to comment out line 965 of classes/album.php
( //$this->save($resetModDate); )
Then the album counter was reset and it seems
there is no error, but the photo counters was
not reset.
If you have solved this problem,
Please give me any suggestion.

6
watar
Re: XoopsGallery Sorting Fix
  • 2003/10/13 10:13

  • watar

  • Just popping in

  • Posts: 12

  • Since: 2002/2/7 8


Could someone send me the updated files?
I tried to apply this update but only screwed it up completely.

BTW
the sorting bug, is it that "page not found" when trying to change the sorting order?


7
PureLuXus
Re: XoopsGallery Sorting Fix
  • 2003/10/13 14:14

  • PureLuXus

  • Not too shy to talk

  • Posts: 116

  • Since: 2002/1/3 2


a fixed version is allready in development..
it included all fixes from the forum..
some features request and some more fixes(working gallery remote)..

just wait some days gstarrett is working hard on a new stable version

8
watar
Re: XoopsGallery Sorting Fix
  • 2003/10/13 19:59

  • watar

  • Just popping in

  • Posts: 12

  • Since: 2002/2/7 8


Sounds good :)

9
Booth
Re: XoopsGallery Sorting Fix
  • 2004/5/19 18:08

  • Booth

  • Just popping in

  • Posts: 74

  • Since: 2002/6/13


Has this been fixed in version 1.3.3.3?

I'm using 1.3.3.3 and when I move a gallery into 1st place, all the others go out of order. Then when I attempt to move them back to their correct place the 1st one will move to into the wrong place. So in effect I can't sort the albums, and new albums always go to the last page at the bottom - new albums NEED to appear at the top. Ideally I need my Xoopsgallery to sort albums in date order (date of upload/update).

This is really annoying me and my members!

Login

Who's Online

383 user(s) are online (274 user(s) are browsing Support Forums)


Members: 0


Guests: 383


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits