I can't make it work. Here is the error
Quote:
Parse error: syntax error, unexpected $end in /home/pandatec/public_html/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 65
|
My code here:
Code:
// Set Your Category ID Here
$category = '48';
// Set The Number of Articles To Display
$limit = '2';
// Set The Height of The Thumbnail Image
$height = '50';
// Set The Width of The Thumbnail Image
$width = '50';
$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_category.category
, ".TABLE_PREFIX."cms_category.categoryid
, ".TABLE_PREFIX."cms_node.setpublish
FROM ".TABLE_PREFIX."cms_node
INNER
JOIN ".TABLE_PREFIX."cms_article
ON ".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid
INNER
JOIN ".TABLE_PREFIX."cms_nodeinfo
ON ".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid
INNER
JOIN ".TABLE_PREFIX."cms_nodecategory
ON ".TABLE_PREFIX."cms_nodecategory.nodeid = ".TABLE_PREFIX."cms_node.nodeid
INNER
JOIN ".TABLE_PREFIX."cms_category
ON ".TABLE_PREFIX."cms_category.categoryid = ".TABLE_PREFIX."cms_nodecategory.categoryid
WHERE ".TABLE_PREFIX."cms_category.categoryid IN ($category)
AND (".TABLE_PREFIX."cms_node.setpublish != 0)
ORDER
BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit
");
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);
$text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text);
$text = strip_bbcode($text);
$text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text);
$text = strip_bbcode($text);
if($text == '') $text = substr($fulltext, 0,150);
$output .= '<center>';
if($image != '') $output .= "<img src='".$image."' width='".$width."px' height='".$height."px' /><br />";
$output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /><p>Publish Date: ".$date."</p></br></center><p>".$text." <a href='content.php?".$nodeid."-".$url."'>Read More <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></a></p><br />";