Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • sunnyjey Friend
    #154035

    Hi, I would like to know whether the frontpage modules like latest News, Most read etc can be used with Azrul myblog component.

    I feel therotically it should be used, as myblog functions by saving com_content items.

    Only difference is url generated, instead of com_content to com_myblog.

    Is it possible to achieve this where READ MORE URL directed to the Myblog article?

    Thank you
    Sunny

    gray Friend
    #354547

    yes, it’s possible. as my things with PHP. but not as simple as you could image
    JA Bulletin takes article’s titles and url by
    [php]
    $query = ‘SELECT a.*,’ . ‘ CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(“:”, a.id, a.alias) ELSE a.id END as slug,’ . ‘ CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(“:”, cc.id, cc.alias) ELSE cc.id END as catslug’ . ‘ FROM #__content AS a’ . ‘ LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id’ . ‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ . ‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’ . ‘ WHERE ( a.state = 1 AND s.id > 0 )’ . ‘ AND ( a.publish_up = ‘ . $db->Quote ( $nullDate ) . ‘ OR a.publish_up <= ‘ . $db->Quote ( $now ) . ‘ )’ . ‘ AND ( a.publish_down = ‘ . $db->Quote ( $nullDate ) . ‘ OR a.publish_down >= ‘ . $db->Quote ( $now ) . ‘ )’ . ($access ? ‘ AND a.access <= ‘ . ( int ) $aid . ‘ AND cc.access <= ‘ . ( int ) $aid . ‘ AND s.access <= ‘ . ( int ) $aid : ”) . ($catid ? $catCondition : ”) . ($secid ? $secCondition : ”) . ($show_front == ‘0’ ? ‘ AND f.content_id IS NULL’ : ”) . ‘ AND s.published = 1’ . ‘ AND cc.published = 1’ . ‘ ORDER BY a.hits DESC’;
    $db->setQuery ( $query, 0, $count );
    $rows = $db->loadObjectList ();
    [/php]

    As far as I understand, MyBlog stores article not in jos_content table (otherwise it would work without problems) but in own tables. So, the above query should be hacked to pull data from MyBlog respective tables.

    sunnyjey Friend
    #354807

    Thank you for replying.

    Can you please elaborate- how and where do i put these code to get this URL redirect.

    I am badly looking for this. My new site is launch is getting delayed because of this

    gray Friend
    #354817

    I gave you a piece of code JA Bulletin uses NOW to get latest articles from the database.
    Please check in which table MyBlog stores content (articles), compare wtih jos_content (above code is for jos_content) and try to extract same data from MyBlog’s table.

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

This topic contains 4 replies, has 2 voices, and was last updated by  gray 13 years, 8 months ago.

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