PEAK XOOPS - Randomise display of thumbnails in myalbum index? in englishin japanese

Randomise display of thumbnails in myalbum index?

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/6/9 16:46
ashlyn  ÆóÅùʼ   Posts: 1
Can this be done? All my photos remain in the same order as they were uploaded, but I would like to be able to randomise the display on the index and category pages (like in the side block), to show a different range of photos with each page load.

Any ideas much appreciated.. thankyou.
Votes:6 Average:8.33
Previous post - Next post | Parent - Children.1 | Posted on 2006/6/11 5:25
GIJOE  ÀèǤ·³Áâ   Posts: 4110
fully randomize?

just modify ordering condition.

index.php line48:
$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description,c.title AS cat_title FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid LEFT JOIN $table_cat c ON l.cid=c.cid WHERE l.status>0 ORDER BY date DESC" , $num , $pos ) ;

viecat.php line106:
	$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description $select_append FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid $join_append WHERE $where AND l.status>0 ORDER BY {$myalbum_orders[$orderby][0]}" , $num , $pos ) ;

Both should be "rand()".
ORDER BY rand()

Votes:3 Average:6.67
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/31 8:13
slyss79  »°Åù·³Áâ   Posts: 143
in index.php i have modified ORDER BY rand() (with myalbum 2.90) but it dosn't work... (in viewcat.php he work fine)

do you know why? i need it into index.php
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/9/1 6:44
GIJOE  ÀèǤ·³Áâ   Posts: 4110
I've checked it and it works fine.

Check: Is index.php you edit the module you access.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/1 7:44
slyss79  »°Åù·³Áâ   Posts: 143
yes, index.php is the right....

// Assign Latest Photos
// riga qui sotto mod by sly: era ORDER BY date DESC
$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description,c.title AS cat_title FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid LEFT JOIN $table_cat c ON l.cid=c.cid WHERE l.status>0 ORDER BY rand()" , $num , $pos ) ;

but i have made any test with:

ORDER BY title ASC or DESC or date ASC or DESC etc... and result don't change!!!! so it's mean this is not my lines!!!

i don't remember but maybe i have modified another file with the sort order... do you know what should be ?

thanks a lot...
Votes:3 Average:3.33
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/1 10:32
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Check module cache in admin -> system -> preferences -> general.
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2006/9/1 20:15
slyss79  »°Åù·³Áâ   Posts: 143
it's no cache

i remember wich (maybe) i have modified a file of myalbum with ORDER by ..... .... but i don't remember wich file....
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/2 19:32
slyss79  »°Åù·³Áâ   Posts: 143
Quote:
GIJOE wrote:
I've checked it and it works fine.

Check: Is index.php you edit the module you access.

gijoe belive me.... here dosn't work... i don't know why... i have made all modification correctly...

it's a mystery...
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/5 5:56
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Have you installed the other cache system?
FCH or php base cache system.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/5 7:28
slyss79  »°Åù·³Áâ   Posts: 143
nothing else...
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/9/5 12:51
GIJOE  ÀèǤ·³Áâ   Posts: 4110
There are only two reasons.

- The file you edited is wrong one.
- Cache

That's all.
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2007/6/1 3:45
Montisarts  ÆóÅùʼ   Posts: 3
I don't know if this is what you mean, but I think I had the same problem.

Eventually I found out (with some help) that in the includes folder there is a file called 'draw_functions.php'

In that file at line 201 you will find the following code:

$crs = $xoopsDB->query( "SELECT cid, title, imgurl FROM $table_cat WHERE pid=$parent_id ORDER BY title") or die( "Error: Get Category." ) ;

change the value after ORDER BY to what you want..

Hope this helps,

greetz Frank
Votes:4 Average:7.50

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!