-
AuthorPosts
-
freissmann Developer
freissmann
- Join date:
- February 2011
- Posts:
- 294
- Downloads:
- 0
- Uploads:
- 71
- Thanks:
- 79
- Thanked:
- 29 times in 1 posts
October 25, 2012 at 9:26 pm #181711As we experience module is showing images from folder in alphabetic order.
Can we show images from folder randomly (horizontal view).Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
October 26, 2012 at 4:23 am #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 Developerfreissmann
- Join date:
- February 2011
- Posts:
- 294
- Downloads:
- 0
- Uploads:
- 71
- Thanks:
- 79
- Thanked:
- 29 times in 1 posts
October 28, 2012 at 7:29 am #471293Hi 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 FriendIng. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
January 24, 2013 at 9:13 am #481004I need this feature too…
Any solution???
ThanxStork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
January 25, 2013 at 8:02 am #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 25, 2013 at 10:30 am #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
1 user says Thank You to Ninja Lead for this useful post
Ing. Ervin Zatko EASY FriendIng. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
January 27, 2013 at 12:57 pm #481235Thank 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 categoryNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 28, 2013 at 1:32 am #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
-
AuthorPosts
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