PDA

View Full Version : Latest Announcement in navbar (Need help converting to vb4)


dexodisc
10-10-2010, 05:12 AM
Hi,

I used to have this plugin running on vb3.7. It was awesome.

Here was the plugin code:


//Hook Location: global_start

$query1 = "SELECT * FROM thread WHERE forumid='5' ORDER BY dateline DESC LIMIT 0,1";
$rt1=mysql_query($query1);
echo mysql_error();
while($nt1=mysql_fetch_array($rt1)){
$date = date('M d,20y',$nt1[dateline]);
$lastposter = date('M d, g:i A',$nt1[lastpost]);
$title = $nt1[title];
$comments = $nt1[replycount];
$news2 .= " <b>Latest Announcement:</b> <i> <a href='showthread.php?t=$nt1[threadid]'>$title</a></i> <img src='images/comment.gif' alt='' class='inlineimg' /> <a href='newreply.php?do=newreply&amp;noquote=1&am...p;t=$nt1[threadid]' class='smallfont'><u><b>$comments Comments</b></u></a> "; }




Then I used to have $news2 in the nav bar, and it would display as follows:

Latest Announcement: test 4 comments

Does anyone have any idea how to convert the $news2, into the vb4 variable format?


------------------------------------
EDIT:

Here's a similar mod:

https://vborg.vbsupport.ru/showthread.php?t=97403&highlight=latest+news

Except it doesn't show the comments. If someone could give some heads up on using either one on vb4, it would be much appreciated.

dexodisc
10-11-2010, 11:08 AM
Bump.

BirdOPrey5
10-11-2010, 11:50 AM
You're original code should work, you may need to register it though now:
https://vborg.vbsupport.ru/showthread.php?t=228078

This might be a better question to ask in the VB4 Programming questions forum. I'm not a VB4 expert.

dexodisc
10-12-2010, 03:36 AM
Perfect. That was just what I was looking for. Thank you very much.