tommyxv
12-06-2006, 04:39 PM
The print function for my article script stopped working after I upgraded to vb3.6.x. Unfortunately Cinq, who i paid for the vb 3.5.x Article script is no where to be found. Maybe a PHP & VB code guru can check out this code snippet to see if there is something that needs to be changed due to vb 3.6 code changes.
if ($_REQUEST['do'] == 'printarticle')
{
$vbulletin->input->clean_array_gpc('r', array(
'artid' => TYPE_INT
));
$printquery = $db->query_read("SELECT articles_articleid, title, author, publishdate , content FROM " . TABLE_PREFIX . "cinqarticles_article WHERE articles_articleid = ".$vbulletin->GPC['artid']."");
if ($db->num_rows($printquery)>0)
{
while($printrow = $db->fetch_array($printquery))
{
$artid=$printrow['articles_articleid'];
$title=unhtmlspecialchars($printrow['title']);
$author=unhtmlspecialchars($printrow['author']);
$date = vbdate($vbulletin->options['dateformat'],$printrow['publishdate'],true);
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$content = $parser->do_parse($printrow['content'], true, true, true, true, true, true);
}
eval('print_output("' . fetch_template('cinqarticles_printarticle') . '");');
}
else
eval(standard_error(fetch_error('cinqarticles_cann otfindart')));
}
Thanks
if ($_REQUEST['do'] == 'printarticle')
{
$vbulletin->input->clean_array_gpc('r', array(
'artid' => TYPE_INT
));
$printquery = $db->query_read("SELECT articles_articleid, title, author, publishdate , content FROM " . TABLE_PREFIX . "cinqarticles_article WHERE articles_articleid = ".$vbulletin->GPC['artid']."");
if ($db->num_rows($printquery)>0)
{
while($printrow = $db->fetch_array($printquery))
{
$artid=$printrow['articles_articleid'];
$title=unhtmlspecialchars($printrow['title']);
$author=unhtmlspecialchars($printrow['author']);
$date = vbdate($vbulletin->options['dateformat'],$printrow['publishdate'],true);
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$content = $parser->do_parse($printrow['content'], true, true, true, true, true, true);
}
eval('print_output("' . fetch_template('cinqarticles_printarticle') . '");');
}
else
eval(standard_error(fetch_error('cinqarticles_cann otfindart')));
}
Thanks