PHP to VB3 Code

Electronic Punk

willalwaysbewithyou
Staff member
Political Access
Joined
2 Dec 2001
Messages
18,694
Mostly for my reference:

template:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html>
<head>
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" type="text/css" href="themes/orbitz/style.css" />
</head>
<body>
<table valign="center" align="center" cellpadding="0" cellspacing="\$stylevar[maincellspacing]" width="100%">
 <tr>
  <td style="background: url('http://forum.osnn.net/orbitz/spread_thing_slice.gif')"><img src="[URL]http://forum.osnn.net/orbitz/spread_thing_slice.gif[/URL]" alt="" /></td>
  <td style="background: url('http://forum.osnn.net/orbitz/spread_thing_slice.gif')">
   <table align="left">
    <tr>
     <td width="200" align="left" valign="top"><img src="themes/orbitz/recenticon.gif" align="bottom" alt="" /> <b>Recent <a href="index.php" target="_top">News</a> Posts</b><hr align="left" style="width:\$stylevar[maintablewidth];color:\$stylevar[bordercolor];border:1px 0px 0px 0px;height:1px" />\$recentnewsposts</td>
     <td width="2">&nbsp;</td>
     <td width="200" align="left" valign="top"><img src="themes/orbitz/recenticon.gif" align="bottom" alt="" /> <b>Recent <a href="[URL]http://forum.osnn.net[/URL]" target="_top">Forum</a> Posts (<a href="[URL]http://forum.osnn.net/search.php?do=getnew[/URL]" target="_top">New</a>)</b><hr align="left" style="width:\$stylevar[maintablewidth];color:\$stylevar[bordercolor];border:1px 0px 0px 0px;height:1px" />\$recentforumposts</td>
    </tr>
   </table>
  </td>
 </tr>
</table>
</body>
</html>

PHP:
unset($recentforumposts);
$recentforumget = 5; // Number of posts to get
$recentforumlength = 25; // Length of title to display before cutting off
$forumexclude = "17,34,22,25,26,27,28,29,40,53,55,57,59,64,65,71"; // Add forum id's to exclude from get (eg private ones) sepetate by a comma
$getposts = query("SELECT threadid,title FROM thread WHERE (visible <> 0)".iif($forumexclude," AND (forumid NOT IN ($forumexclude))")." AND (open <> '10') ORDER BY lastpost DESC LIMIT $recentforumget");
while ($post = fetch_array($getposts)) {
$post[short_title] = iif(strlen($post[title]) > $recentforumlength,substr($post[title],0,$recentforumlength)."...",$post[title]);
$post[full_title] = $post[title];
$recentforumposts .= "<a href=\"http://forum.osnn.net/showthread.php?goto=newpost&amp;t=$post[threadid]\" title=\"$post[full_title]\" target=\"_top\">$post[short_title]</a><br />\n";
}
unset($recentnewsposts);
$recentnewsget = 5; // Number of posts to get
$recentnewslength = 25; // Length of title to display before cutting off
$getnposts = query("SELECT id,title FROM news_news WHERE (display <> 0) AND (program <> 1) ORDER BY time DESC LIMIT $recentnewsget");
while ($npost = fetch_array($getnposts)) {
$npost[short_title] = iif(strlen($npost[title]) > $recentnewslength,substr($npost[title],0,$recentnewslength)."...",$npost[title]);
$npost[full_title] = $npost[title];
$recentnewsposts .= "<a href=\"http://www.osnn.net/comments.php?shownews=$npost[id]\" title=\"$npost[full_title]\" target=\"_top\">$npost[short_title]</a><br />\n";
}

Basically the hack I have in place to fix IE7 rendering issues in IE7 isn't working as well as I want, so am going to try and find a way to integrate the code into vb3 or pull the code out in some other way. Woo.
 
Isn't just banning IE7 easier? :p

Or at least using IE's conditional comment tags.
 
Lies! It is easier... it's just not preferable ;)
 
We could ban Firefox like MS is doing with their new page re-design :p
 
Well Ie7 aside, getting it added would make these pages more efficient anyway, as it will be less code for users to download...

Awaiting a response to a question as my code wasn't working correctly.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back