Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

Have broken Topic images in the News page?  Bottom

  • I just "officially" transferred from PHP-nuke to PostNuke last night and found a theme ("DarkNuke") that I wanted to use to get me started until I have time to make my own.

    I had a problem with the topic images not being displayed when I posted a news article so just in case anyone else runs into this, this is how I fixed it.

    Turns out the theme was apparently originally for PHP-nuke and had been converted. Phpnuke uses global vars for the $tipath and in it being set up that way on PostNuke it will make the path for ther topic image "appear" to be in the base directory instead of /images/topics/yourtopicimage.whatever.

    Open up your theme.php and locate the function themeindex().

    Find this section of code:

    Code

    function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
        global $tipath, $anonymous, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4,  $sepcolor;
        if ($informant == "") {
            $informant = $anonymous;
        }


    Now remove the references to $tipath and anonymous from the global vars and add the following just below the global variable section:

    Code

    $anonymous = pnConfigGetVar('anonymous');
        $tipath = pnConfigGetVar('tipath');


    What you should have now once you have made the changes is this:

    Code

    function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
        global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4,  $sepcolor;
        $anonymous = pnConfigGetVar('anonymous');
        $tipath = pnConfigGetVar('tipath');
        if ($informant == "") {
            $informant = $anonymous;
        }


    That is how I corrected the problem for myself so I hope someone else can use the same info.
    wink

This list is based on users active over the last 60 minutes.