You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 58 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - 2 errors in block code help please [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Guest







PostPosted: Tue Aug 30, 2005 8:03 am Reply with quoteBack to top

I really love this block but when I put it in the homepage I have errors

I think there is 2--> ; missing, but I can't seem to find them.



Here's the code

Quote:

<?php

##############################################################################
# PHP-Nuke Block: Center News Block v.1.0 #
# Made for PHP-Nuke 6.5 #
# Original script from www.pcnuke.com (I just changed it to fit the theme) #
# This block is made only to match the Theme pack #
##############################################################################
# This program is free software. You can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License. #
# If you modify this, let me know for fun. =) #
##############################################################################

if (eregi("block-Forum_Center.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}

global $prefix, $dbi, $sitename, $admin, $multilingual, $currentlang, $db;


$show = " <tr>
<td height=\"28\" colspan=\"6\" align=\"center\" class=\"row1\">&nbsp;<b>Submit news articles and comment on any of these article.</b></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>";

$Count_Topics = 0;
$Topic_Buffer = "";
if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
$content = "<table width=\"100%\" border=\"0\">";
$result = $db->sql_query("SELECT sid, title, comments, counter FROM " . $prefix . "_stories $querylang ORDER BY sid DESC LIMIT 0,10");

while( list( $sid, $title, $comtotal, $counter, $content ) = sql_fetch_row( $result, $dbi ) )
{
$skip_display = 0;
if( $HideViewReadOnly == 1 )
{
$result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_stories where forum_id = '$title'", $dbi );
list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $dbi );
if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
}

if( $content != 0 )
{
// Shadow Topic !!
$skip_display = 1;
}

if( $skip_display == 0 )
{
$Count_Topics += 1;



$viewlast .=" <tr>
<td height=\"30\" nowrap class=\"row1\"><img src=\"images/folder_new.gif\" border=\"0\" /></td>
<td width=\"100%\" class=\"row1\" onclick=\"window.location.href='modules.php?name=News&file=viewtopic&t=$title#$counter'\">&nbsp;<a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">$title</a></td>


<td align=\"center\" class=\"row1\">$counter</td>
<td align=\"center\" class=\"row1\">$comtotal</td>

</tr>";
}

if( $Last_New_Topics == $Count_Topics ) { break 1; }

}

$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" class=\"row1\">
<tr>
<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"row1\">
<tr>
<td><table width=\"100%\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" class=\"row1\">
<tr>
<td height=\"25\" colspan=\"2\" align=\"center\" class=\"row1\"><font color=\"#000000\"><strong>Topics</strong></font></td>

<td width=\"50\" align=\"center\" class=\"row1\"><font color=\"#000000\"><strong>&nbsp;Views&nbsp;</strong></font></td>
<td width=\"50\" align=\"center\" class=\"row1\"><font color=\"#000000\"><strong>&nbsp;Comments&nbsp;</strong></font></td>

</tr>";
$content .= "$viewlast";

$content .= "$show";

?>



any help would be greatly appreciated!
Find all posts by Anonymous
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.743 Seconds - 552 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::