Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Theme sensitive topics icons?
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 118
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) -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
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 -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 118
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 -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
Or you could change the command to use that function instead :)
--
Home Page | Find on Facebook | Follow on Twitter
- Moderated by:
- Support
