Code: Select all
<?
$URLPath = "http://www.main.com";
$PostNumber = "10";
$dbhost = "mysql.server.com";
$dbuser = "username";
$dbpass = "password";
$database = "db";
$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($database, $db) or die("Unable to select database!");
$result=mysql_query("SELECT * FROM phpbb_topics where forum_id != '8' and forum_id != '11' ORDER BY topic_time DESC
limit $PostNumber"); \\ where forum_id !='8' and forum_id !='11' is private forums! Remove if you dont have any.
while ($row=mysql_fetch_array($result)) {
$farge=0;
$count = $count +1;
$farge=($count%2)?"#EDEDED":"#F9F9F9";
print "<tr><td bgcolor=\"".$farge."\">";
$j = str_replace("'", "`", stripslashes($row["topic_title"]));
$k = substr($j, 0, 16) . "..";
echo "<a href=\"$URLPath/viewtopic.php?topic=$row[topic_id]\" onMouseover=\"showtip(this,event,'".$j.")')\" onMouseout=\"hidetip()\$
echo "</TD></TR>";
}
?>
Code: Select all
<script>
if (!document.layers&&!document.all&&!document.getElementById)
event="test"
function showtip(current,e,text){
if (document.all||document.getElementById){
thetitle=text.split('<br>')
if (thetitle.length>1){
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
current.title=text
}
else if (document.layers){
document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}
function hidetip(){
if (document.layers)
document.tooltip.visibility="hidden"
}
</script>
Warning: Cannot add header information - headers already sent by (output started at /homepages/27/d28531142/htdocs/vmplay/topinclude.php:7) in /homepages/27/d28531142/htdocs/vmplay/forum/phpBB2/includes/sessions.php on line 186
Warning: Cannot add header information - headers already sent by (output started at /homepages/27/d28531142/htdocs/vmplay/topinclude.php:7) in /homepages/27/d28531142/htdocs/vmplay/forum/phpBB2/includes/sessions.php on line 187
hawk wrote:Warning: Cannot add header information - headers already sent by (output started at /homepages/27/d28531142/htdocs/vmplay/topinclude.php:7) in /homepages/27/d28531142/htdocs/vmplay/forum/phpBB2/includes/sessions.php on line 186
Warning: Cannot add header information - headers already sent by (output started at /homepages/27/d28531142/htdocs/vmplay/topinclude.php:7) in /homepages/27/d28531142/htdocs/vmplay/forum/phpBB2/includes/sessions.php on line 187
Try to remove a space in line 7 of topinclude.php