N!ck
03-15-2002, 02:02 AM
this produces a parse error on the last line (supposedly...)
help!
<?
// Latest Threads on Your Desktop
// SPECIAL EDITION
// Settings:
$numposts = 30; // Number of posts to show
$viewprivate = "off"; // View messages and announcements in private forums? ("on"/"off")
// ^-- Note: setting this to "off" may cause less posts than set to appear.
$announcements = "on"; // Show announcements? ("on"/"off")
$announcementsn = 5; // Number of announcements to show.
// Do not edit past this point unless you know what you're doing.
$templatesused .= "latest,latestbit";
if ($announcements == "on") {
$templatesused .= ",latestbit_announcement";
}
require("./global.php");
if ($announcements == "on") {
$announcementsql = $DB_site->query("SELECT * FROM announcement ORDER BY startdate DESC, enddate LIMIT $announcementsn");
if ($viewprivate == "off") {
while ($announcement = $DB_site->fetch_array($announcementsql)) {
$aperms = getpermissions($announcement['forumid']);
if ($aperms[canview]) {
eval("\$latest .= \"".gettemplate("latestbit_announcement")."\";");
}
}
} else {
while ($latestbit_announcement = $DB_site->fetch_array($announcementsql)) {
eval("\$latest .= \"".gettemplate("latestbit_announcement")."\";");
}
}
$threadsql = $DB_site->query("SELECT * FROM thread ORDER BY lastpost DESC LIMIT $numposts");
if ($viewprivate == "off") {
while ($thread = $DB_site->fetch_array($threadsql)) {
$perms = getpermissions($thread[forumid]);
if ($perms[canview]) {
eval("\$latest .= \"".gettemplate("latestbit")."\";");
}
}
} else {
while ($thread = $DB_site->fetch_array($threadsql)) {
eval("\$latest .= \"".gettemplate("latestbit")."\";");
}
}
eval("dooutput(\"".gettemplate('latest')."\");");
?>
help!
<?
// Latest Threads on Your Desktop
// SPECIAL EDITION
// Settings:
$numposts = 30; // Number of posts to show
$viewprivate = "off"; // View messages and announcements in private forums? ("on"/"off")
// ^-- Note: setting this to "off" may cause less posts than set to appear.
$announcements = "on"; // Show announcements? ("on"/"off")
$announcementsn = 5; // Number of announcements to show.
// Do not edit past this point unless you know what you're doing.
$templatesused .= "latest,latestbit";
if ($announcements == "on") {
$templatesused .= ",latestbit_announcement";
}
require("./global.php");
if ($announcements == "on") {
$announcementsql = $DB_site->query("SELECT * FROM announcement ORDER BY startdate DESC, enddate LIMIT $announcementsn");
if ($viewprivate == "off") {
while ($announcement = $DB_site->fetch_array($announcementsql)) {
$aperms = getpermissions($announcement['forumid']);
if ($aperms[canview]) {
eval("\$latest .= \"".gettemplate("latestbit_announcement")."\";");
}
}
} else {
while ($latestbit_announcement = $DB_site->fetch_array($announcementsql)) {
eval("\$latest .= \"".gettemplate("latestbit_announcement")."\";");
}
}
$threadsql = $DB_site->query("SELECT * FROM thread ORDER BY lastpost DESC LIMIT $numposts");
if ($viewprivate == "off") {
while ($thread = $DB_site->fetch_array($threadsql)) {
$perms = getpermissions($thread[forumid]);
if ($perms[canview]) {
eval("\$latest .= \"".gettemplate("latestbit")."\";");
}
}
} else {
while ($thread = $DB_site->fetch_array($threadsql)) {
eval("\$latest .= \"".gettemplate("latestbit")."\";");
}
}
eval("dooutput(\"".gettemplate('latest')."\");");
?>