Quote:
Originally Posted by DivineMessenger
can this be used to turn all posts from a certain section into articles for my news page on the cms?
|
Eh no, you'll need to use the Promote to Article function.
Quote:
Originally Posted by Neptun
OUTPUT
when i change the <center> to <table><tr><td> - i have no changes .... the articles in the widget have the same style not side by side in one row ....
the code is now - this is everything what i have change in the whole code of the widget from you
then i get this output -> see the 1st picture
but it should look like the 2nd picture (after widget.jpg)
SEO URLS
CMS Section Articles List: portal/section/[section_id]-[section_title]-list.html
CMS Section Articles List Pagination: portal/section/[section_id]-[section_title]-page[page].html
this is my url rewrite style for the articles in the cms
|
PHP Code:
// Set Your Section ID Here
$section = '11';
// Set The Number of Articles To Display
$limit = '1';
// Set The Height of The Thumbnail Image
$height = '250';
// Set The Width of The Thumbnail Image
$width = '250';
$articlegrab = vB::$db->query_read("
SELECT ".TABLE_PREFIX."cms_nodeinfo.nodeid
, ".TABLE_PREFIX."cms_nodeinfo.title
, ".TABLE_PREFIX."cms_article.previewimage
, ".TABLE_PREFIX."cms_article.previewtext
, ".TABLE_PREFIX."cms_article.pagetext
, ".TABLE_PREFIX."cms_article.contentid
, ".TABLE_PREFIX."cms_node.nodeid
, ".TABLE_PREFIX."cms_node.parentnode
, ".TABLE_PREFIX."cms_node.contentid
, ".TABLE_PREFIX."cms_node.url
, ".TABLE_PREFIX."cms_node.publishdate
, ".TABLE_PREFIX."cms_node.setpublish
FROM ".TABLE_PREFIX."cms_article
, ".TABLE_PREFIX."cms_nodeinfo
, ".TABLE_PREFIX."cms_node
WHERE (".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid)
AND (".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid)
AND (".TABLE_PREFIX."cms_node.parentnode IN ($section))
AND (".TABLE_PREFIX."cms_node.setpublish != 0)
ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit
");
$output .= '<table><tr>';
while($articleinfo = vB::$db->fetch_array($articlegrab)) {
$title = $articleinfo['title'];
$image = $articleinfo['previewimage'];
$text = $articleinfo['previewtext'];
$nodeid = $articleinfo['nodeid'];
$url = $articleinfo['url'];
$unixdate = $articleinfo['publishdate'];
$date = date("F j, Y, g:i a", $unixdate);
$fulltext = strip_bbcode($fulltext);
if($text == '') $text = substr($fulltext, 0,150);
$output .= '<td><center>';
if($image != '') $output .= "<img src='".$image."' width='".$width."px' height='".$height."px' /><br />";
$output .= "<a href='/portal/".$url .'-'.$nodeid."/'>".$title."</a><br /><p>Publish Date: ".$date."</p></br></center><p>".$text." <a href='/portal/".$url .'-'.$nodeid."/'>(more)</a></p></td>";
}
$output .= '</tr></table>';
Just a guess on the url rewrite. I actually need the format for your CMS Entry setting in vbSEO.