Fork me on GitHub

Theme sensitive topics icons?  Bottom

  • Anyone come across a hack or a module to enable you to call your topics images based on the theme? My images don't look to great with a transparent background, so had to add color to make them look better. (not using a white bg)
  • Code

    <? // look for topic image in theme
    if (file_exists("themes/".$GLOBALS['thename']."/images/topics/".$info['topicimage'])) {
        $image = "themes/".$GLOBALS['thename']."/images/topics/".$info['topicimage'];
    // if not found in theme, use default one
    } else {
        $image = "images/topics/".$info['topicimage'];
    }
    echo "<img src=\"$image\" border=\"0\" alt=\"".$info['topicname']."\">";
    ?>


    Thanks to Shaun at Spidean for the above.

    --
    Zikula Themes
  • GREAT! Thanks so much for this! Didn't realize I could do this within AT...
  • Ok. I am stumped. I went searching through Shaun's site (AT Lite) and couldn't find the info on where I am supposed to put this piece of code. I was going to just add it to the HTML for my 'summary.html' page, where the topic image is supposed to go? Or somewhere else? (Sorry. I did look around first, for a half hour)
    Thanks for your reply
  • Replace

    With the above.

    --
    Zikula Themes
  • Or you could change the command to use that function instead :)

    --
    Home Page | Find on Facebook | Follow on Twitter

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