-
AuthorPosts
-
sunnyjey Friend
sunnyjey
- Join date:
- March 2007
- Posts:
- 36
- Downloads:
- 25
- Uploads:
- 5
- Thanks:
- 8
- Thanked:
- 1 times in 1 posts
September 3, 2010 at 4:59 pm #154035Hi, 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
Sunnygray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
September 3, 2010 at 5:08 pm #354547yes, 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.
1 user says Thank You to gray for this useful post
sunnyjey Friendsunnyjey
- Join date:
- March 2007
- Posts:
- 36
- Downloads:
- 25
- Uploads:
- 5
- Thanks:
- 8
- Thanked:
- 1 times in 1 posts
September 7, 2010 at 9:06 am #354807Thank 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 Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
September 7, 2010 at 9:58 am #354817I 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. -
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by gray 14 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum