-
AuthorPosts
-
Ing. Ervin Zatko EASY Friend
Ing. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
February 21, 2014 at 3:31 pm #195049Hi
I use JA Muzic template and in JA Slideshow modul missing random sorting. Please send me solution how I can add this function.
Thank you
Ervinchavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
February 22, 2014 at 3:18 am #5238521. Go to this File : modules/mod_jaslideshow/mod_jaslideshow.xml
Replace this code
<field
name="source-articles-sort_order_field"
type="list"
default="created"
label="SORT_ORDER_BY"
description="SORT_ORDER_BY_DESC">
<option value="created">DATE</option>
<option value="ordering">ORDER</option>
<option value="hits">HITS</option>
</field>with
<field
name="source-articles-sort_order_field"
type="list"
default="created"
label="SORT_ORDER_BY"
description="SORT_ORDER_BY_DESC">
<option value="created">DATE</option>
<option value="ordering">ORDER</option>
<option value="hits">HITS</option>
<option value="rand">RANDOM</option>
</field>2. Go to this File : modules/mod_jaslideshow/helpers/helper.php
Replace this code
case 'hits':
$orderby = 'i.hits';
break;with
case 'hits':
$orderby = 'i.hits';
break;case 'rand':
$orderby = ' RAND() ';
break;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
February 24, 2014 at 12:09 pm #524095Thank you for your reply. Sorry, but it dont work.
I get these warnings:Warning: Invalid argument supplied for foreach() in componentscom_contentmodelsarticles.php on line 491
Warning: Invalid argument supplied for foreach() in modulesmod_jaslideshowmod_jaslideshow.php on line 302chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
February 24, 2014 at 12:36 pm #524102can you post your ftp details in PM. I will fix it for you
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
March 4, 2014 at 3:29 pm #525298Hello….
Please contact me or send me a solution !!!!
Ervin
mykenzy00 Friendmykenzy00
- Join date:
- September 2012
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
March 5, 2014 at 11:26 pm #525531I tried it and got the same error. This would be a great feature for the slideshow mod.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
March 6, 2014 at 2:05 am #525555Go to Administrator -> site -> Configuration -> server tab -> set error reporting to “none”
mykenzy00 Friendmykenzy00
- Join date:
- September 2012
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
March 6, 2014 at 4:36 am #525583OK I recreated the error and turned off error reporting
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
March 8, 2014 at 2:14 am #525852I have fixed the Module random for you. Please check and confirm,
<em>@easypc 413070 wrote:</em><blockquote>Thank you for your reply. Sorry, but it dont work.
I get these warnings:Warning: Invalid argument supplied for foreach() in componentscom_contentmodelsarticles.php on line 491
Warning: Invalid argument supplied for foreach() in modulesmod_jaslideshowmod_jaslideshow.php on line 302</blockquote>chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
March 8, 2014 at 2:22 am #525853Undo all the above suggested post. Do the following
1. Go to this File : modules/mod_jaslideshow/mod_jaslideshow.xml
<field
name="source-articles-sort_order"
type="list"
default="DESC"
label="ASC_OR_DESC"
description="ASC_OR_DESC_DESC">
<option value="ASC">ASC</option>
<option value="DESC">DESC</option>
</field>With
<field
name="source-articles-sort_order"
type="list"
default="DESC"
label="ASC_OR_DESC"
description="ASC_OR_DESC_DESC">
<option value="RAND()">RANDOM</option>
<option value="ASC">ASC</option>
<option value="DESC">DESC</option>
</field>2. Go to this File : modules/mod_jaslideshow/helpers/helper.php
Replace this code
switch ($ordering) {case 'created':
$orderby = 'i.created';
break;case 'hits':
$orderby = 'i.hits';
break;
case 'ordering':
if (JRequest::getInt('featured') == '2')
$orderby = 'i.featured_ordering';
else
$orderby = 'c.ordering, i.ordering';
break;
}
$dir = $params->get('source-articles-sort_order', 'DESC');with
$dir = $params->get('source-articles-sort_order', 'DESC');
switch ($ordering) {case 'created':
$orderby = 'i.created';
break;case 'hits':
$orderby = 'i.hits';
break;case 'rand':
$orderby = ' RAND() '; $dir ='';
break;case 'ordering':
if (JRequest::getInt('featured') == '2')
$orderby = 'i.featured_ordering';
else
$orderby = 'c.ordering, i.ordering';
break;
}
next
Replace this Code
function getArticles($params)
{
$this->setOrder($params->get('source-articles-sort_order_field', 'created'), $params->get('source-articles-sort_order', 'DESC'));$this->setLimit($params->get('source-articles-max_items', 5));
$rows = $this->fetchListArticles($params);
return $rows;
}With
function getArticles($params)
{if($params->get('source-articles-sort_order', 'DESC') == 'RAND()'){
$this->setOrder1($params->get('source-articles-sort_order', 'DESC'), '');
}else{
$this->setOrder($params->get('source-articles-sort_order_field', 'created'), $params->get('source-articles-sort_order', 'DESC'));
}$this->setLimit($params->get('source-articles-max_items', 5));
$rows = $this->fetchListArticles($params);
return $rows;
}
Add this code after this function getArticles($params)
function setOrder1($order, $mode)
{
$this->order = $order;
$this->mode = $mode;
return $this;
}This is the way to achieve random sildeshow. If there is any issues on this report me, will try to customize that for you.
mykenzy00 Friendmykenzy00
- Join date:
- September 2012
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
March 8, 2014 at 3:38 pm #525893Chavan,
Thanks works greats!!!!!!!!!!!!
Thanks,
Bryanmykenzy00 Friendmykenzy00
- Join date:
- September 2012
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
March 8, 2014 at 5:04 pm #525895I do have 2 issue with slideshow, not related to above issue.
1. Only when a Vimeo video is loaded on top (large screen) the site will crash on IE but not on every page return.
2. The thumbnails when clicked (using any browser) shows a blank screen. Until you use the right or left arrows.
Thanks,
Bryan -
AuthorPosts
This topic contains 15 replies, has 3 voices, and was last updated by mykenzy00 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum