- Joined
- 2 Dec 2001
- Messages
- 18,694
Mostly for my reference:
template:
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.
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"> </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&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.