I'm trying to figure out how to make the Who's Online global display with each username listed, linked to their profile view. I have the following:
my @found = ();
my $table = $DB->table('Online','User');
my $sth = $table->select( { 'Online.online_invisible' => 0, 'Online.guest_id_fk' => 0 }, ['User.user_username'] );
while (my $userid = $sth->fetchrow_hashref) {
push @found, "<A Href=\"http://www.mydomain.com/cgi-bin/forums/gforum.cgi?username=$userid->{user_username}\">$userid->{user_username}</A>";
}
return (@found ? join(', ', @found) : 'None');
}
This displays the HTML, but it converts the HTML code once it is displayed in a template. I see the actual code, because it converts the <>=" characters to ascii codes. Any advice on how to get this to work would be greatly appreciated!
Sean
Code:
sub { my @found = ();
my $table = $DB->table('Online','User');
my $sth = $table->select( { 'Online.online_invisible' => 0, 'Online.guest_id_fk' => 0 }, ['User.user_username'] );
while (my $userid = $sth->fetchrow_hashref) {
push @found, "<A Href=\"http://www.mydomain.com/cgi-bin/forums/gforum.cgi?username=$userid->{user_username}\">$userid->{user_username}</A>";
}
return (@found ? join(', ', @found) : 'None');
}
This displays the HTML, but it converts the HTML code once it is displayed in a template. I see the actual code, because it converts the <>=" characters to ascii codes. Any advice on how to get this to work would be greatly appreciated!
Sean