-
AuthorPosts
-
grkats Friend
grkats
- Join date:
- September 2012
- Posts:
- 5
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
August 3, 2011 at 2:56 pm #167018Hi,
I would like to choose only the articles assigned as “frontpage” from all the categories to be displayed in Ja SlideShow 2. How is this possible?
Thanks
Sherlock Friend
Sherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 8, 2011 at 3:42 am #404864Hi grkats,
By default the Ja slideshow2 module did not have this feature, you can try following steps to get it
1) Open the file of modulesmod_jaslideshow2mod_jaslideshow2.xml, Look for this<option value=”modarts”>WITH FEATURED KEYWORD</option>
<option value=”modcats”>FROM CATEGORIES</option>change to
<option value=”modarts”>WITH FEATURED KEYWORD</option>
<option value=”modcats”>FROM CATEGORIES</option>
<option value=”modfront”>Frontpage articles</option>this would help to add an option to select showing the frontpage articles in the module setting.
2) Open the file of modulesmod_jaslideshow2helper.php, Look for this function
[php]
function getCondition( $params ){$condition = ”;
$keyworkd = $params->get( ‘source-articles-display_model-modarts-with_keyword’, ” );
if( $params->get(“source-articles-display_model”, “modcats”) == ‘modcats’ ) {
$categories = $params->get( ‘source-articles-display_model-modcats-category’ , ” );if( $categories != ” ) {
$ids = $this->getIds( $categories );
$condition = ” AND cc.id IN($ids)”;
}
} else {
$keyword = addslashes( $params->get( ‘source-articles-display_model-modarts-with_keyword’,
‘Featured’ ) );
$condition = ” AND a.metakey LIKE ‘%”.$keyword.”%’ “;
}return $condition;
}
[/php]change it to
[php]
function getCondition( $params ){$condition = ”;
$keyworkd = $params->get( ‘source-articles-display_model-modarts-with_keyword’, ” );
if( $params->get(“source-articles-display_model”, “modcats”) == ‘modcats’ ) {
$categories = $params->get( ‘source-articles-display_model-modcats-category’ , ” );if( $categories != ” ) {
$ids = $this->getIds( $categories );
$condition = ” AND cc.id IN($ids)”;
}
} else if($params->get(“source-articles-display_model”, “modcats”) == ‘modarts’ ) {
$keyword = addslashes( $params->get( ‘source-articles-display_model-modarts-with_keyword’,
‘Featured’ ) );
$condition = ” AND a.metakey LIKE ‘%”.$keyword.”%’ “;
} else {
$condition = ” And a.id = (select content_id from #__content_frontpage where content_id=a.id) ” ;
}return $condition;
}
[/php] -
AuthorPosts
This topic contains 2 replies, has 2 voices, and was last updated by Sherlock 13 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum