test melih
 melih
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • grkats Friend
    #167018

    Hi,

    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
    #404864

    Hi 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]

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

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