The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
this plugin code makes my forums have a database error
If this is the wrong place for this, please move it to the proper forum, thanks!
I am using this in one forum that has 3.8.2 running and it works great, so I don't know if 3.8.3 is causing the problem. Code:
$postchars = 250; $news1 = $db->query_first('SELECT title,threadid,views,replycount,postusername,postuserid,dateline FROM ' . TABLE_PREFIX . 'thread WHERE 1 AND forumid = 34 ORDER BY dateline DESC LIMIT 0 , 1'); $news1_title = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news1[threadid]\">$news1[title]</a>"; $news1_readmore = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news1[threadid]\">[Read More]</a>"; $news1_comment = "<a href=\"forums/newreply.php?do=newreply&noquote=1&" . $vbulletin->session->vars['sessionurl'] . "t=$news1[threadid]\">[Post Comment]</a>"; $news1_replies = "$news1[replycount]"; $news1_views = "$news1[views]"; $news1_post = $db->query_first('SELECT pagetext FROM ' . TABLE_PREFIX . 'post WHERE 1 AND threadid = ' . $news1[threadid] . ' ORDER BY dateline ASC LIMIT 0 , 1'); $news1_postfull = "$news1_post[pagetext]"; $news1_postshort = substr($news1_post[pagetext],0,$postchars); $news1_date = vbdate($vbulletin->options['dateformat'], $news1['dateline']); $news1_time = vbdate($vbulletin->options['timeformat'], $news1['dateline']); $news2 = $db->query_first('SELECT title,threadid,views,replycount,postusername,postuserid,dateline FROM ' . TABLE_PREFIX . 'thread WHERE 1 AND forumid = 34 ORDER BY dateline DESC LIMIT 1 , 1'); $news2_title = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news2[threadid]\">$news2[title]</a>"; $news2_readmore = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news2[threadid]\">[Read More]</a>"; $news2_comment = "<a href=\"forums/newreply.php?do=newreply&noquote=1&" . $vbulletin->session->vars['sessionurl'] . "t=$news2[threadid]\">[Post Comment]</a>"; $news2_replies = "$news2[replycount]"; $news2_views = "$news2[views]"; $news2_post = $db->query_first('SELECT pagetext FROM ' . TABLE_PREFIX . 'post WHERE 1 AND threadid = ' . $news2[threadid] . ' ORDER BY dateline ASC LIMIT 0 , 1'); $news2_postfull = "$news2_post[pagetext]"; $news2_postshort = substr($news2_post[pagetext],0,$postchars); $news2_date = vbdate($vbulletin->options['dateformat'], $news2['dateline']); $news2_time = vbdate($vbulletin->options['timeformat'], $news2['dateline']); $news3 = $db->query_first('SELECT title,threadid,views,replycount,postusername,postuserid,dateline FROM ' . TABLE_PREFIX . 'thread WHERE 1 AND forumid = 34 ORDER BY dateline DESC LIMIT 2 , 1'); $news3_title = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news3[threadid]\">$news3[title]</a>"; $news3_readmore = "<a href=\"forums/showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$news3[threadid]\">[Read More]</a>"; $news3_comment = "<a href=\"forums/newreply.php?do=newreply&noquote=1&" . $vbulletin->session->vars['sessionurl'] . "t=$news3[threadid]\">[Post Comment]</a>"; $news3_replies = "$news3[replycount]"; $news3_views = "$news3[views]"; $news3_post = $db->query_first('SELECT pagetext FROM ' . TABLE_PREFIX . 'post WHERE 1 AND threadid = ' . $news3[threadid] . ' ORDER BY dateline ASC LIMIT 0 , 1'); $news3_postfull = "$news3_post[pagetext]"; $news3_postshort = substr($news3_post[pagetext],0,$postchars); $news3_date = vbdate($vbulletin->options['dateformat'], $news3['dateline']); $news3_time = vbdate($vbulletin->options['timeformat'], $news3['dateline']); Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|