Jason (squeaky19) wrote in lj_dev,
Jason
squeaky19
lj_dev

  • Mood:

Problem with BML

Okay this is driving me nuts. I am trying to write a new generic.look file, and all this block of code is returning is the word nothing, rather than the sidebar (I have it returning to the word nothing just to make sure it is returning somthing.

<?_code

$ret = "";

sub dump_entry
{
my ($ret, $listref, $depth) = @_;

foreach my $mi (@$listref)
{
if ($depth==0) {
$$ret .= "<P><IMG SRC=\"<?imgprefix>/insane/bullet.gif\" WIDTH=10 HEIGHT=10 HSPACE=2 ALIGN=ABSMIDDLE>";
} else {
$$ret .= " " x ($depth*3+1);
$$ret .= $mi->{'cont'} ? "  " : "- ";
}

my $name = $mi->{'name'};
$name =~ s/ / /g;
if (! defined $mi->{'uri'}) {
if ($depth == 0) {
$$ret .= "<B>$name</B><BR>";
} else {
$$ret .= "$name<BR>";
}
} elsif ($mi->{'match'} ?
(BML::get_uri() =~ /$mi->{'match'}/) :
(BML::get_uri() eq $mi->{'uri'})
){
$$ret .= "<B><SPAN style=\"background-color: #FFFFFF\"><FONT COLOR=#0000D0>$name</FONT></SPAN></B><BR>";
} else {
$$ret .= "<A HREF=\"$mi->{'uri'}\">$name</A><BR>";
}

if ($mi->{'children'} &&
($mi->{'recursematch'} ? $ENV{'REQUEST_URI'} =~ /$mi->{'recursematch'}/ : 1)) {
&dump_entry($ret, $mi->{'children'}, $depth+1);
}
}

}

&dump_entry(\$ret, \@sidebar, 0);

$ret .= "\nnothing\n";
return $ret;

_code?>

Here is an example of what it looks like http://insanejournal.com/?usescheme=insanelooknew
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 7 comments