I wanted to be able to provide a teaser item for topics that have no news submitted. Each topic should have a different teaser.
I've hacked up GL 1.3.7 index.php to display a customized "No News Yet" message based on the topic.
Text Formatted Code
--
@@ -261,12 +261,16 @@
$display .= COM_printPageNavigation($base_url,$page, $num_pages);
} else {
- $display .= COM_startBlock($LANG05[1]) . $LANG05[2];
if (!empty($topic)) {
- $result = DB_query ("SELECT topic FROM {$_TABLES['topics']} WHERE tid='$topic'");
+ $result = DB_query ("SELECT topic,emptymsg FROM {$_TABLES['topics']} WHERE tid='$topic'");
$A = DB_fetchArray ($result);
- if (!empty ($A['topic'])) {
- $topic = $A['topic'];
- }
- $display .= $LANG05[3];
+ if (!empty ($A['emptymsg'])) {
+ $display.=COM_startBlock($LANG05[1]) . $A['emptymsg'];
+ } else {
+ $display .= COM_startBlock($LANG05[1]) . $LANG05[2];
+ if (!empty ($A['topic'])) {
+ $topic = $A['topic'];
+ }
+ $display .= $LANG05[3];
+ }
}
$display .= COM_endBlock();
---
If there is interest, I will publish the rest of the hack including a yet to be completed topic administration modification that will prompt for the "emptymsg".
Oh yea... to the guys that created GL...