PDA


View Full Version : Another Module Customize Ques


paul41598
06-14-2005, 09:41 AM
Like in another post of mine, Im putting little graphics on the top of my modules. Kind of like I had on my old homepage that I want to continue to do.

THe first screenshot is a shot of how they look and should look. The second screenshot, is a problem Im running into with the active topics of the day. There are 5 little icons that duplicated. There should be only 1. It did it because I have 5 threads pulling to the homepage. Im not sure why it did this though.

The code I use for these graphics is: (at the top of each template)


<div style="position:relative; top:7px; left:5px; width:100px; z-index:1; margin-bottom: -30px;">
<img src="topics-icon.gif" width="33" height="33"></div>


It works for all my modules it seems except this one so far. Anyone have any ideas?

Brian
06-14-2005, 01:05 PM
Try looking in your modules/latesttopics.php file for this code:
$bgclass = exec_switch_bg();

And just below it add:
$tcount++;

The use this if condition around your code:
<if condition="$tcount == 1">

</if>

paul41598
06-14-2005, 01:37 PM
Jesus, it worked!

What does that code do now exactly?.. Just so I know?

Brian
06-14-2005, 02:04 PM
That template is going to be used 5 times, so the code you added in the PHP file is basically like a counter to see what number the loop is on, then the <if condition> tells it to only display that code if it's the first loop. ;)

paul41598
06-14-2005, 02:25 PM
Genious! Well I appreciate the help :D