[prev in list] [next in list] [prev in thread] [next in thread]
List: phorum-dev
Subject: [phorum-dev] Re: More bugs
From: "Juan Antonio Ruiz Zwollo" <J.Antonio () jaruz ! com>
Date: 1999-05-13 21:53:31
[Download RAW message or body]
> > 1)
> > [file: ] form.inc
> oops, fixed.
ok
>
> > 2)
> > [file: ] post.php3
>
> fixed.
couldn't check. post.php3 returns me to /.?
> > 3)
> > [file: ] multi-threads.inc
>
> fixed.
>
> > 4)
> > [file: ] lots
> > [error:] HTML issue. When the user choses not to use a color on a
certain
> > table (for example: $default_nav_color = ""), it will result in errors
on
> > Netscape if the HTML output is [BGCOLOR=""]. (Older versions of)
Netscape
> > considers "" = black.
>
> fixed.
ok, the new multi-threads.inc returned an avalanche of errors. I fixed them
all, including the HTML issues (I'm a kind of 'HTML gotta be
perfect"-freak). I'm attaching multi-threads.inc with this message. I did
not change anything else, just the HTML and the bgcolor() errors.
The issue Netscape cell & transparent image transparency issue cannot be
fixed in any way. Sorry.
The problem with db() was because forums.inf includes abstract and so does
common.inc.
Juan Antonio
["multi-threads.inc" (text/inc)]
<?php
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 1998 Phorum Development Team //
// http://www.phorum.org //
// //
// This program is free software. You can redistribute it and/or modify //
// it under the terms of the GNU General Public License Version 2as //
// published by the Free Software Foundation. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY, without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
////////////////////////////////////////////////////////////////////////////////
$t_gif='<IMG SRC="images/t.gif" WIDTH=12 HEIGHT=21 BORDER=0>';
$l_gif='<IMG SRC="images/l.gif" WIDTH=12 HEIGHT=21 BORDER=0>';
$p_gif='<IMG SRC="images/p.gif" WIDTH=9 HEIGHT=21 BORDER=0>';
$m_gif='<IMG SRC="images/m.gif" WIDTH=9 HEIGHT=21 BORDER=0>';
$c_gif='<IMG SRC="images/c.gif" WIDTH=9 HEIGHT=21 BORDER=0>';
$i_gif='<IMG SRC="images/i.gif" WIDTH=12 HEIGHT=21 BORDER=0>';
$n_gif='<IMG SRC="images/n.gif" WIDTH=9 HEIGHT=21 BORDER=0>';
$space_gif='<IMG SRC="images/trans.gif" WIDTH=5 HEIGHT=21 BORDER=0>';
$trans_gif='<IMG SRC="images/trans.gif" WIDTH=12 HEIGHT=21 BORDER=0>';
function echo_data($image, $topic, $row_color){
GLOBAL $TableWidth,$TableHeaderColor,$TableHeaderFontColor;
GLOBAL $TableBodyColor1,$TableBodyFontColor1,$TableBodyColor2,$TableBodyFontColor2;
GLOBAL $read_page,$ext,$collapse,$id,$UseCookies;
GLOBAL $space_gif,$num,$old_message;
GLOBAL $lNew, $GetVars;
$thread_total="";
if(($row_color%2)==0){
$bgcolor=$TableBodyColor1;
$font_color=$TableBodyFontColor1;
}
else{
$bgcolor=$TableBodyColor2;
$font_color=$TableBodyFontColor2;
}
$subject ="<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0";
if($bgcolor!=""){
$subject.=" BGCOLOR=\"".$bgcolor."\"";
}
$subject.=">\n";
$subject.="<TR>\n<TD>";
$subject.=$space_gif;
$subject.=$image."</TD>\n<TD><FONT COLOR=\"$font_color\"> ";
if($id==$topic["id"] && $read=true){
$subject .= "<b>".$topic["subject"]."</b>";
$author = "<b>".$topic["author"]."</b>";
$datestamp = "<b>".date_format($topic["datestamp"])."</b>";
}
else{
$subject.="<a \
href=\"$read_page.$ext?num=$num&id=".$topic["id"]."&thread=".$topic["thread"]."&$GetVars\">".$topic["subject"]."</a>";
$author = $topic["author"];
$datestamp = date_format($topic["datestamp"]);
}
$subject.=" </font>";
if($old_message<$topic["id"] && $UseCookies){
$subject.="<font face=\"MS Sans Serif,Geneva\" size=\"-2\" \
color=\"#FF0000\">".$lNew."</font>"; }
$subject.="</TD>\n</TR>\n</TABLE>";
?>
<TR VALIGN=middle>
<TD<?php bgcolor($bgcolor);?>><?php echo $subject;?></TD>
<TD<?php bgcolor($bgcolor);?>><FONT COLOR="<?php echo $font_color;?>"><?php echo \
$author;?></FONT></TD> <TD<?php bgcolor($bgcolor);?>><FONT SIZE="-2" COLOR="<?php \
echo $font_color;?>"><?php echo $datestamp;?> </FONT></TD> </TR>
<?php
}
function thread($seed=0){
GLOBAL $row_color_cnt;
GLOBAL $messages,$threadtotal;
GLOBAL $font_color, $bgcolor;
GLOBAL $t_gif,$l_gif,$p_gif,$m_gif,$c_gif,$i_gif,$n_gif,$trans_gif;
$image="";
$images="";
if(!IsSet($row_color_cnt)){
$row_color_cnt=0;
}
$row_color_cnt++;
if($seed!="0"){
$parent=$messages[$seed]["parent"];
if($parent!=0){
if(!IsSet($messages[$parent]["images"])){
$messages[$parent]["images"]="";
}
$image=$messages[$parent]["images"];
if($messages[$parent]["max"]==$messages[$seed]["id"]){
$image.=$l_gif;
}
else{
$image.=$t_gif;
}
}
if(is_array($messages[$seed]["replies"])){
if(IsSet($messages[$parent]["images"])){
$messages[$seed]["images"]=$messages[$parent]["images"];
if($seed==$messages["$parent"]["max"]){
$messages[$seed]["images"].=$trans_gif;
}
else{
$messages[$seed]["images"].=$i_gif;
}
}
$image.=$m_gif;
}
else{
if($messages[$seed]["parent"]!=0){
$image.=$c_gif;
}
else{
if($threadtotal[$messages[$seed]["thread"]]>1){
$image.=$p_gif;
}
else{
$image.=$n_gif;
}
}
}
echo_data($image, $messages[$seed], $row_color_cnt);
}//end of: if($seed!="0")
if(is_array($messages[$seed]["replies"])){
$count=count($messages[$seed]["replies"]);
for($x=1;$x<=$count;$x++){
$key=key($messages[$seed]["replies"]);
thread($key);
next($messages[$seed]["replies"]);
}
}
}
$row=$msg_list->firstrow();
if(is_array($row)){
if(!$read){
$rec=$thread_list->firstrow();
while(is_array($rec)){
$thd=$rec["thread"];
if(!isset($rec["tcount"])) $rec["tcount"]=0;
$tcount=$rec["tcount"];
$threadtotal[$thd]=$tcount;
$rec=$thread_list->getrow();
}
}
else{
$threadtotal[$thread]=$msg_list->numrows();
}
$topics["max"]="0";
$topics["min"]="0";
While(is_array($row)){
$x="".$row["id"]."";
$p="".$row["parent"]."";
$messages["$x"]=$row;
$messages["$p"]["replies"]["$x"]="$x";
$messages["$p"]["max"]=$row["id"];
if(!isset($messages["max"])) $messages["max"]=0;
if(!isset($messages["min"])) $messages["min"]=0;
if($messages["max"]<$row["thread"]) $messages["max"]=$row["thread"];
if($messages["min"]>$row["thread"]) $messages["min"]=$row["thread"];
$row=$msg_list->getrow();
}
}
?>
<TABLE WIDTH="<?php echo $TableWidth;?>" CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD HEIGHT=21<?php bgcolor($TableHeaderColor);?>><FONT COLOR="<?PHP echo \
$TableHeaderFontColor; ?>"> <?php echo $lTopics;?></FONT></TD> <TD \
HEIGHT=21<?php bgcolor($TableHeaderColor);?> NOWRAP WIDTH=150><FONT COLOR="<?php echo \
$TableHeaderFontColor; ?>"><?php echo $lAuthor;?> </FONT></TD> <TD \
HEIGHT=21<?php bgcolor($TableHeaderColor);?> NOWRAP WIDTH=100><FONT COLOR="<?php echo \
$TableHeaderFontColor; ?>"><?php echo $lDate;?></FONT></TD> </TR>
<?php
thread();
?>
</TABLE>
---------------------------------------------------------------------
A demo of the dev version is at:
http://www.phorum.org/phorum-dev/
You can download the entire zip at:
http://www.phorum.org/downloads/download.php3?devcode.php3
You can also download new files at:
http://www.phorum.org/phorum-dev/code.php3
Mailing List Archive:
http://www.progressive-comp.com/Lists/?l=phorum-dev#phorum-dev
To unsubscribe, e-mail: phorum-dev-unsubscribe@phorum.org
For additional commands, e-mail: phorum-dev-help@phorum.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic