Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Problem with global, return and HTML output

Quote Reply
Problem with global, return and HTML output
Hi,

I've created a global that outputs the last 10 threads in my forums. The global works fine, problem is that the output is not correctly formated. I need it in HTML format but instead of < and > simbols I get &gt; and &lt; and the browser displays it 'as is' not following HTML rules. the only way I can make it work is if I replace return with print, but I get a number 1 at the end of the text. please help

[code]
sub {
my ($output,$first,$db,$sth);
my $db = $DB->table('Post');
$db->select_options ('ORDER BY post_time DESC', 'LIMIT 10');
my $first = $db->select ({ post_root_id => 0});

while (my $row = $first->fetchrow_hashref) {
$output .= "$row->{post_subject}<br>";
}
return $output;
}
[/code]
Subject Author Views Date
Thread Problem with global, return and HTML output jaltuve 1687 Mar 12, 2003, 10:01 PM
Post Re: [jaltuve] Problem with global, return and HTML output
Paul 1629 Mar 13, 2003, 2:37 AM