test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • freissmann Developer
    #181711

    As we experience module is showing images from folder in alphabetic order.
    Can we show images from folder randomly (horizontal view).

    Stork11 Friend
    #471142

    <em>@freissmann 343718 wrote:</em><blockquote>As we experience module is showing images from folder in alphabetic order.
    Can we show images from folder randomly (horizontal view).</blockquote>
    Hello freissmann,

    As of now, JA Content Slider hasn’t supported this feature yet. It can only sort images list in alphabetic order.

    Feel free to let me know if you need any further assistance.

    Regards.

    freissmann Developer
    #471293

    Hi Stork11,
    thank you for your answer.
    As we try to use as many JA Extension as possible I would like to make this a feature request – any ideas how to do that? :-[

    Ing. Ervin Zatko EASY Friend
    #481004

    I need this feature too…
    Any solution???
    Thanx

    Stork11 Friend
    #481112

    <em>@easypc 356782 wrote:</em><blockquote>I need this feature too…
    Any solution???
    Thanx</blockquote>
    Hello easypc,

    As of now, JA Content Slider does not support this feature yet. It can only sort image list in alphabetic order.

    for now the module uses inbuild file read feature of Joomla! and show them in sequence, to make it random the module will need code update. However, your idea is interesting and we will try to include it in upcoming versions.

    Regards.

    Ninja Lead Moderator
    #481137

    <em>@easypc 356782 wrote:</em><blockquote>I need this feature too…
    Any solution???
    Thanx</blockquote>

    JA Content Slider module does not option set RANDOM IMAGE but you can try that with this trick :

    <blockquote>Open modules/mod_jacontentslider/helper.php file</blockquote>
    from

    function getListFolder($params)
    {
    $folder = $params->get('folder_images');
    $path = JPath::clean(JPATH_ROOT . DS .$folder);

    $data = array();
    if (JFolder::exists($path)) {
    $files = JFolder::files($path, ".(jpg|png|gif|jpeg|bmp)$");

    $i = 0;

    foreach ($files as $file) {
    $image = JURI::root() . JPath::clean( $folder . '/' . $file, '/');
    $item = new stdClass();
    $item->text = '';
    $item->introtext = $item->text;
    $item->catid = 1;
    $item->title = $file;
    $item->cateName = '';
    $item->link = $image;
    $item->image = modJacontentsliderHelper::renderImage($item->title, $item->link, $image, $params, $params->get('iwidth'), $params->get('iheight'));

    $data[$i] = $item;
    $data[$i] = modJacontentsliderHelper::processIntrotext($data[$i], $params->get( 'numchar', 0 ));
    $i++;
    }
    }

    return $data;
    }

    change to

    function getListFolder($params)
    {
    $folder = $params->get('folder_images');
    $path = JPath::clean(JPATH_ROOT . DS .$folder);

    $data = array();
    if (JFolder::exists($path)) {
    $files = JFolder::files($path, ".(jpg|png|gif|jpeg|bmp)$");
    $files=array_rand($files);

    $i = 0;

    foreach ($files as $file) {
    $image = JURI::root() . JPath::clean( $folder . '/' . $file, '/');
    $item = new stdClass();
    $item->text = '';
    $item->introtext = $item->text;
    $item->catid = 1;
    $item->title = $file;
    $item->cateName = '';
    $item->link = $image;
    $item->image = modJacontentsliderHelper::renderImage($item->title, $item->link, $image, $params, $params->get('iwidth'), $params->get('iheight'));

    $data[$i] = $item;
    $data[$i] = modJacontentsliderHelper::processIntrotext($data[$i], $params->get( 'numchar', 0 ));
    $i++;
    }
    }

    return $data;
    }

    Let me know if it helps

    Ing. Ervin Zatko EASY Friend
    #481235

    Thank you for your reply, but it not work.

    When I replace these code I get error:
    JA Content Slide Error: There is not any content in this category

    Ninja Lead Moderator
    #481251

    <em>@easypc 357133 wrote:</em><blockquote>Thank you for your reply, but it not work.

    When I replace these code I get error:
    JA Content Slide Error: There is not any content in this category</blockquote>

    If possible, pm me url, admin access and ftp account. I shall help you out

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

This topic contains 8 replies, has 4 voices, and was last updated by  Ninja Lead 11 years, 11 months ago.

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