0 Members and 1 Guest are viewing this topic.
include_once('PmxBlogSSI.php');PmxBlogSSI_ShowArticles(owner:2);
include_once('PmxBlogSSI.php');PmxBlogSSI_ShowArticles(2);
include_once('PmxBlogSSI.php');PmxBlogSSI_Recent(5, 1);
include_once('PmxBlogSSI.php');PmxBlogSSI_Recent(5, 1,2,3);
Yes, try this ..Code: [Select]include_once('PmxBlogSSI.php');global $context, $smcFunc, $user_info, $txt;$maxarticles = 5; // max articles to show$context['PmxBlog']['content_len'] = 40; // Teaser lengthif(AllowedToBlog('view')){ $result = array(); $req = $smcFunc['db_query']('', ' SELECT c.ID, c.subject FROM {db_prefix}pmxblog_content AS c LEFT JOIN {db_prefix}members AS m ON (c.owner = m.id_member) LEFT JOIN {db_prefix}pmxblog_manager AS a ON (c.owner = a.owner) WHERE a.blogenabled > 0 AND a.bloglocked = 0 AND c.published = 1 AND (c.allow_view = 0 OR (c.allow_view = 1 AND {int:idmem} > 0) OR (c.allow_view = 2 AND {string:s_idmem} IN (m.buddy_list)) OR (c.allow_view = 3 AND c.owner = {int:idmem}) OR (c.owner = {int:idmem})) GROUP BY c.ID ORDER BY c.date_created DESC LIMIT {int:lim}', array( 's_idmem' => (string) $user_info['id'], 'idmem' => $user_info['id'], 'lim' => $maxarticles, ) ); if($smcFunc['db_num_rows']($req) > 0) { $i = 0; while($row = $smcFunc['db_fetch_assoc']($req)) { $result[$i] = array('id' => $row['ID'], 'subject' => $row['subject']); $i++; } $smcFunc['db_free_result']($req); } // link requested? if(isset($_REQUEST['blogcont'])) $artid = (int) $_REQUEST['blogcont']; elseif(!empty($result)) $artid = $result[0]['id']; else { echo ' '. $txt['PmxBlog_nothing_read']; return; } // get the selected article data $article = PmxBlogSSI_GetArticle($artid, ''); $article['body'] = Post_Teaser($article['body']); // call the teaser PmxBlogArticles_SSI_Out($article, $result, $artid);}Fel
include_once('PmxBlogSSI.php');global $context, $smcFunc, $user_info, $txt;$maxarticles = 5; // max articles to show$context['PmxBlog']['content_len'] = 40; // Teaser lengthif(AllowedToBlog('view')){ $result = array(); $req = $smcFunc['db_query']('', ' SELECT c.ID, c.subject FROM {db_prefix}pmxblog_content AS c LEFT JOIN {db_prefix}members AS m ON (c.owner = m.id_member) LEFT JOIN {db_prefix}pmxblog_manager AS a ON (c.owner = a.owner) WHERE a.blogenabled > 0 AND a.bloglocked = 0 AND c.published = 1 AND (c.allow_view = 0 OR (c.allow_view = 1 AND {int:idmem} > 0) OR (c.allow_view = 2 AND {string:s_idmem} IN (m.buddy_list)) OR (c.allow_view = 3 AND c.owner = {int:idmem}) OR (c.owner = {int:idmem})) GROUP BY c.ID ORDER BY c.date_created DESC LIMIT {int:lim}', array( 's_idmem' => (string) $user_info['id'], 'idmem' => $user_info['id'], 'lim' => $maxarticles, ) ); if($smcFunc['db_num_rows']($req) > 0) { $i = 0; while($row = $smcFunc['db_fetch_assoc']($req)) { $result[$i] = array('id' => $row['ID'], 'subject' => $row['subject']); $i++; } $smcFunc['db_free_result']($req); } // link requested? if(isset($_REQUEST['blogcont'])) $artid = (int) $_REQUEST['blogcont']; elseif(!empty($result)) $artid = $result[0]['id']; else { echo ' '. $txt['PmxBlog_nothing_read']; return; } // get the selected article data $article = PmxBlogSSI_GetArticle($artid, ''); $article['body'] = Post_Teaser($article['body']); // call the teaser PmxBlogArticles_SSI_Out($article, $result, $artid);}