I have made a global to display the last post icon (if selected in post) to be displayed before the last post title in the category list.
GLOBAL:
sub {
my $post_id = $_[0];
my $post_icon = $DB->table('Post')->select( ['post_icon'], { post_id => $post_id } )->fetchrow;
return $post_icon;
}
CALLED WITH: <img src="<%image_url%>/<%last_icon($forum_last_id)%>">
As there is no default icon the posts without icons show a "red X" box. I need help with an <%if .... statement.
Most that I have tried just ignore the icon and inserts blank.gif
Can anyone tell me what the missing XXXXX should be?
<%else%>
<img src="<%image_url%>/blank.gif"><%endif%>
( Alternatively could I force a default icon to override "none"? )
Thanks
Code:
TAG: last_icon GLOBAL:
sub {
my $post_id = $_[0];
my $post_icon = $DB->table('Post')->select( ['post_icon'], { post_id => $post_id } )->fetchrow;
return $post_icon;
}
CALLED WITH: <img src="<%image_url%>/<%last_icon($forum_last_id)%>">
As there is no default icon the posts without icons show a "red X" box. I need help with an <%if .... statement.
Most that I have tried just ignore the icon and inserts blank.gif
Can anyone tell me what the missing XXXXX should be?
Code:
<%if XXXXX%><img src="<%image_url%>/<%last_icon($forum_last_id)%>"> <%else%>
<img src="<%image_url%>/blank.gif"><%endif%>
( Alternatively could I force a default icon to override "none"? )
Thanks