test
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • Robert Bollen Friend
    #133790

    Hi,

    I’m unable to get the images at random in the slideshow.
    It displays in alphabetical order.

    Parameters are set to:
    Name en Random.

    Can someone help me??

    shertmann Friend
    #272659

    well i do not now if that is the way, i now that you can select the categoies ids for images to be shown. maybe if you create a randomizer function and try to insert it in the category id you could see if there are any luck. or try the randomizer in the slide code

    Robert Bollen Friend
    #272668

    Hi shertmann,

    Thanks for your respons, but Ithink you don’t know whatt you’re talking about!
    I asume you didn’t took the time to check the template out.

    In the module mod_jaslideshow there are a few standard parameters.
    One of the parameters is: Sort order – which you can set to Random – Ascending and Descending

    I’m not English but I do know what those words mean.

    When set to random, the module doesn’t produce images at random. But it keeps producing them from A to Z.

    So what code is wrong in the files

    NO OFFENCE:
    I’ve seen it more on this forum, that you gave an answer without knowing the exact details of the subject.
    If you want to answer, please dig deeper into the subject pefore you post.

    shertmann Friend
    #272756

    sorry imagine i confused about the module with vmproducslide.

    really i think you must be gentle when say something to another member in the forum.

    if you make and deep analisis of this module you will found that the code do not include the randomizer function(if you do not are codder i suggest you that make and google investigation about this). so i lacks of some parameter to make that function.

    shertmann Friend
    #272758

    the module jaslideshow has two main components

    mod_jaslideshow.php and mod_jaslideshow.xml
    the first one has all the functions of the aplication the second one has the default parameters and many other parameters for the module to work

    in the second(mod_jaslideshow.xml) you found near of the line 36 you found the following lines of code

    <param name="orderby" type="list" default="0" label="Order by" description="The order of the images">
    <option value="0">File name</option>
    <option value="1">Time</option>
    </param>
    <param name="sort" type="list" default="0" label="Sort Order" description="The sort order of the images">
    <option value="">Random</option>
    <option value="1">Ascending</option>
    <option value="2">Descending</option>
    </param>

    if you review it you see there are two sets of parameter that are key for the randomize function works orderby and sort in fact this are two php variables defined in mod_jaslideshow.php

    checking the code you found this function

    function sortImage($image, $orderby , $sort){

    $sortObj = array();

    $imageName = array();

    if($orderby == 1){

    for($i=0;$i<count($image);$i++){

    $sortObj[$i] = $image[$i][1];

    $imageName[$i] = $image[$i][0];

    }

    }

    else{

    for($i=0;$i<count($image);$i++){

    $sortObj[$i] = $image[$i][0];

    }

    $imageName = $sortObj;

    }

    if($sort == 1) array_multisort($sortObj, SORT_ASC, $imageName);

    elseif($sort == 2) array_multisort($sortObj, SORT_DESC, $imageName);

    else shuffle($imageName);

    return $imageName;

    }
    that is the one that must make the ramdon and it does not appear to include in it.

    donaldwheaton Friend
    #278397

    I had problems with the Random Sort Order also. When selected, it always produced the same “random” order. I didn’t find the solution posted elsewhere, so here’s my fix.

    I editted mod_jaslideshow.xml and changed…

    <param name="sort" type="list" default="0" label="Sort Order" description="The sort order of the images">
    <option value="">Random</option>
    <option value="1">Ascending</option>
    <option value="2">Descending</option>
    </param>

    …to the following…

    <param name="sort" type="list" default="0" label="Sort Order" description="The sort order of the images">
    <option value="0">Random</option>
    <option value="1">Ascending</option>
    <option value="2">Descending</option>
    </param>

    …and the slides now display in a truly random order.

    shertmann Friend
    #278404

    congrats donald fine work.
    in the past i try to solve this with no luck of me. and i try this same solution and did not work, maybe i was doing something wrong i will try again.

    thanks

    nefar Friend
    #278405

    You guys have had no problem with the slider working with firefox 3?

    shertmann Friend
    #278406

    well in fact i use FF 3.0.3 as my default browser and have no problems

    donaldwheaton Friend
    #278439

    <em>@nefar 89790 wrote:</em><blockquote>You guys have had no problem with the slider working with firefox 3?</blockquote>

    It’s working great in Firefox 3 for me. No problems in Safari either.

    rjdjohnston Friend
    #279213

    Yea I cant see the slideshow work in my installation, OR on the Joomlart website. Using IE8 in compatiability mode and FF newest version 3.0.3 i think; the product slide works. Any thoughts why?

    Thanks
    RJ

Viewing 11 posts - 1 through 11 (of 11 total)

This topic contains 11 replies, has 5 voices, and was last updated by  rjdjohnston 16 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum