[geeklog-users] some right blocks not showing

geeklog-users-admin at lists.geeklog.net geeklog-users-admin at lists.geeklog.net
Thu Mar 20 10:44:37 EST 2003


Jason Signalness wrote:

>I have found the answer to my problem.  It appears to be a bug, but it's 
>not even noticable once you have stories in all of your topics.  i.e.: 
>Right blocks don't show up on "topic" pages if there are not stories 
>present for that topic.

This only applies to blocks that have been set to show up in that topic
only. But yes, it's a bug.

It's caused by this useless piece of code at the end of index.php:

    $display .= COM_startBlock($LANG05[1]) . $LANG05[2];
    if (!empty($topic)) {
        $result = DB_query ("SELECT topic FROM {$_TABLES['topics']} WHERE
tid='$
topic'");
        $A = DB_fetchArray ($result);
        if (!empty ($A['topic'])) {
            $topic = $A['topic'];
        }
        $display .= $LANG05[3];
    }
    $display .= COM_endBlock();

That was supposed to make the topic name appear in the "There are no news
stories to display" message (instead of the topic id), but it doesn't
even work ...

Shorten it to

    $display .= COM_startBlock($LANG05[1]) . $LANG05[2];
    if (!empty($topic)) {
        $display .= $LANG05[3];
    }
    $display .= COM_endBlock();

and the right blocks will appear properly.

bye, Dirk


-- 
http://www.haun-online.de/
http://www.haun.info/




More information about the geeklog-users mailing list