test
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • zro2 Friend
    #179970

    Have a problem with “Ja SideNews”, it shows my articles that should actually be published in the future.
    Have reinstalled the last version 2.5.4 of Ja SideNews… but the same problem.
    It listed all my articles of my category by created date, but not by “date to Start Publishing the article”.

    Do you have some idea, how can I fix it?

    Ninja Lead Moderator
    #464549

    I have raised bug to dev team: http://pm.joomlart.com/browse/CUSSER-479

    Please send PM me the details (URL, Admin access and FTP account). I will help you fix it.

    zro2 Friend
    #466465

    Sorry, for my late answer… could you give the instructions, how to fix it?

    Ninja Lead Moderator
    #466587

    I just fixed this issue but it is not released yet, i will contact to QA for verification and release this soon. This is my solution

    <blockquote>Open modules/mod_jasidenews/helper.php </blockquote>

    Find function getListArticles($params) and replace with this function below

    function getListArticles($params)
    {

    $db = JFactory::getDbo();
    $db->getQuery(true);

    // Access filter
    $access = !JComponentHelper::getParams('com_content')->get('show_noauth');
    $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id'));

    // Filter by start and end dates.
    $nullDate = $db->Quote($db->getNullDate());
    $date = JFactory::getDate();
    $nowDate = $db->Quote($date->toSql());

    $query = "SELECT a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.images, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,a.publish_up, a.publish_down, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, c.alias AS category_alias, a.hits, a.featured, a.ordering, LENGTH(a.fulltext) AS readmore";
    $query .= " FROM #__content AS a LEFT JOIN #__languages AS l ON l.lang_code = a.language";
    $query .= " LEFT JOIN #__users AS uc ON uc.id = a.checked_out";
    $query .= " LEFT JOIN #__viewlevels AS ag ON ag.id = a.access";
    $query .= " LEFT JOIN #__categories AS c ON c.id = a.catid";
    $query .= " LEFT JOIN #__users AS ua ON ua.id = a.created_by";
    $query .= " WHERE a.state = 1";
    // Filter by start and end dates.
    $query .= " AND (a.publish_up = " .$nullDate. " OR a.publish_up <= " . $nowDate.")";
    $query .= " AND (a.publish_down = " .$nullDate. " OR a.publish_down >= " . $nowDate.")";
    //Language filter
    $query .= " AND a.language in (".$db->quote(JFactory::getLanguage()->getTag()).",".$db->quote('*').")";
    if($access){
    $query .= " AND a.access = ".$access;
    }
    //get featured setting
    $featured = $params->get('show_featured', 1);
    if ($featured ==0) {
    $query .= " AND a.featured = 0";
    } elseif ($featured == 2) {
    $query .= " AND a.featured = 1";
    }

    $categories = $params->get('display_model-modcats-category', '');
    if ($categories && $categories[0] > 0) {
    $catids_new = $categories;
    foreach ($categories as $k => $catid) {
    $subcatids = $this->getCategoryChildren($catid, true);
    if ($subcatids) {
    $catids_new = array_merge($catids_new, array_diff($subcatids, $catids_new));
    }
    }
    $categories = implode(',', $catids_new);
    $query .= " AND c.id IN ($categories)";
    }

    // Category filter
    if ($params->get("display_model", "modcats") == 'modarts') {
    $query .= " AND a.metakey LIKE '%Featured%'";
    }

    if ($params->get('sort_order_field', 'created') == "random") {
    $query .= " ORDER BY RAND() ".$params->get('sort_order', 'ASC');
    } elseif ($params->get('sort_order_field', 'created') == "ordering") {
    $query .= " ORDER BY a.ordering ".$params->get('sort_order', 'ASC');
    } elseif ($params->get('sort_order_field', 'created') == "hits") {
    $query .= " ORDER BY a.hits ".$params->get('sort_order', 'ASC');
    }else {
    $query .= " ORDER BY a.created ".$params->get('sort_order', 'ASC');
    }

    $query .= " LIMIT 0 ,".$params->get('max_items', 5);
    $db->setQuery($query);
    $items = $db->loadObjectList();

    foreach ($items as &$item) {
    $item->slug = $item->id . ':' . $item->alias;
    $item->catslug = $item->catid . ':' . $item->category_alias;

    if ($access || in_array($item->access, $authorised)) {
    // We know that user has the privilege to view the article
    $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug));
    } else {
    $item->link = JRoute::_('index.php?option=com_user&view=login');
    }
    $item->modified =($item->modified != '' && $item->modified != '0000-00-00 00:00:00') ? $item->created : $item->created;
    $item->introtext = JHtml::_('content.prepare', $item->introtext);
    }
    return $items;
    }

    zro2 Friend
    #466727

    @ninja Lead

    Thx a lot… it works perfect!!!

    mgandon Friend
    #496393

    Hello
    It doesn’t work for me…
    I have Joomla 3.1.
    Can you help me ?

    Error :
    1054
    Unknown column ‘a.title_alias’ in ‘field list’ SQL=SELECT a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.images, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,a.publish_up,

    Ninja Lead Moderator
    #496444

    <em>@mgandon 377450 wrote:</em><blockquote>Hello
    It doesn’t work for me…
    I have Joomla 3.1.
    Can you help me ?

    Error :
    1054
    Unknown column ‘a.title_alias’ in ‘field list’ SQL=SELECT a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.images, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,a.publish_up,</blockquote>

    This problem on your site is different. I would need to take a closer see the problem at your site. Pm me URL of your site, admin access and ftp account. I will check this problem directly on your site.

    Ninja Lead Moderator
    #497291

    Because your site was cached. I cleared it and the problem on your site’s fixed. Please check and let me know if it helps


    1. JA_SlideNewsmodule
    mgandon Friend
    #497695

    My problems with JA sidenews :
    – i can’t display Articles order by Publish Date (it is only possible by Create date)
    – when an Artcile is only for Registred, it is still display on my homepage.

    mgandon Friend
    #497721

    I have another question for you….
    When i do a request via Search Form, the resuts are display on my homepage. I want that this results are display on a new page.
    How can i do that ?

    Thanks for your help !

    Ninja Lead Moderator
    #497768

    @mgandon: JA Sidenews module only supports to show Create date or Modify date if you change content in article.

    About Article set Registred but it still shows in Homepage maybe I need to check it directly on your site.

    The problem Search Form, you can go to Menu > create new menu with type Search Form or Search Results and get ID menu and put it into Search Form module


    1. Search_Module
Viewing 11 posts - 1 through 11 (of 11 total)

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

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