PDA

View Full Version : How do I add an image to the bottom of each category


Markjpx
04-30-2002, 07:01 PM
I edited the forumhome_forumbit_level1_nopost template to add a graphic to my category header. But I don't know how or where to add a table to add a similar image to the bottom of each category (after the last forumhome_forumbit_level2_post template).

I enclosed a screenshot hoping it may help.

You can see I have an image for each category header. I'd like to add a small image beneath the last forum of each category to balance out the look. Example: beneath the forum titled Public Server Info, then beneath Ridiculous Onion, then beneath About this Site, etc.

http://www.digitalfumes.com/images/screenshot.jpg

The category header image was pretty simple. I added a table to my forumhome_forumbit_level1_nopost template:


</table>
</td></tr></table><br>

<table align="center" cellpadding"0" cellspacing"0" border="0" width="96%">
<tr id="cat">
<td align="center" height="35" width="96%" bgcolor="#606096" background="images/tus_nunscafe_forumtop2.gif" colspan="6"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="#FFF788"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="#FFF788">$forum[description]</smallfont></td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">

<tr align="center">
<td bgcolor="#8080A6"><smallfont>&nbsp;</smallfont></td>
<td bgcolor="#8080A6" width="80%" align="left"><smallfont color="#EEEEFF"><b>Forum</b></smallfont></td>
<td bgcolor="#8080A6"><smallfont color="#EEEEFF"><b>Posts</b></smallfont></td>
<td bgcolor="#8080A6"><smallfont color="#EEEEFF"><b>Threads</b></smallfont></td>
<td bgcolor="#8080A6" nowrap><smallfont color="#EEEEFF"><b>Last Post</b></smallfont></td>
<td bgcolor="#8080A6" width="20%"><smallfont color="#EEEEFF"><b>Moderator</b></smallfont></td>
</tr>


But I don't know how to code the bottom table graphic so it would know when and where to place the image after the last forum of each category.

Thanks.

Admin
05-01-2002, 09:52 AM
Killer effect, good job. :)

This might work, it should but I can't promise.

In both forumdisplay.php and index.php replace this code:
} else {
$tempext = '_nopost';
}
with this:
} else {
$tempext = '_nopost';
if (!empty($forumbits)) {
eval("\$forumbits .= \"".gettemplate('forumhome_forumbit_closingtable')."\";");
}
}
Now created a new template called 'forumhome_forumbit_closingtable' which will contain the bit that will be added to every "block" of forums.

Markjpx
05-01-2002, 11:20 AM
Wow, thanks for the compliment and thanks for the help, Firefly.

I'll post the result.

Markjpx
05-02-2002, 03:19 PM
Here's the current screenshot after the replacement code to forumdisplay.php and index.php

http://www.digitalfumes.com/images/screenshot2.jpg

There is a mysterious comma between the end of the forumhome_forumbit_level2_post template and the beginning of the forumhome_forumbit_closing template:
<!-- END TEMPLATE: forumhome_forumbit_level2_post -->,<!-- BEGIN TEMPLATE: forumhome_forumbit_closingtable -->

The comma is not present between the closing template and the forumhome_forumbit_level1_nopost template
<!-- END TEMPLATE: forumhome_forumbit_closingtable --><!-- BEGIN TEMPLATE: forumhome_forumbit_level1_nopost -->

This comma shows (if I were to change the color of the table) inside the thick part of the black table between the top category graphic and the rest of the nopost1 template.

I also don't understand why the new forumhome_forumbit_closingtable did not show up below the last category (Bogs' Corner).

Here is my forumhome_forumbit_level1_nopost

<table align="center" cellpadding="0" cellspacing"0" border="0" height="35" width="864">
<tr id="cat">
<td align="center" bgcolor="#606096" background="https://vborg.vbsupport.ru/vbimages/tus_nunscafe_forumtop2.gif" height="35" width="96%" colspan="6"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="#FFF788"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="#FFF788">$forum[description]</smallfont></td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="864"align="center"><tr><td>

<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr align="center">
<td bgcolor="#8080A6"><smallfont>&nbsp;</smallfont></td>
<td bgcolor="#8080A6" width="80%" align="left"><smallfont color="#EEEEFF"><b>Forum</b></smallfont></td>
<td bgcolor="#8080A6"><smallfont color="#EEEEFF"><b>Posts</b></smallfont></td>
<td bgcolor="#8080A6"><smallfont color="#EEEEFF"><b>Threads</b></smallfont></td>
<td bgcolor="#8080A6" nowrap><smallfont color="#EEEEFF"><b>Last Post</b></smallfont></td>
<td bgcolor="#8080A6" width="20%"><smallfont color="#EEEEFF"><b>Moderator</b></smallfont></td>
</tr>


Here is my forumhome_forumbit_level2_post

<tr align="center">
<td bgcolor="#DFDFDF" valign="top"><img src="https://vborg.vbsupport.ru/vbimages/$forum[onoff].gif" border="0" alt=""></td>
<td bgcolor="#F1F1F1" align="left"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont><b>$forum[title]</b></normalfont></a>
<br><smallfont>$forum[description]</smallfont></td>
<td bgcolor="#DFDFDF"><normalfont>$forum[replycount]</normalfont></td>
<td bgcolor="#F1F1F1"><normalfont>$forum[threadcount]</normalfont></td>
<td bgcolor="#DFDFDF"><smallfont>$forum[lastpostinfo]</smallfont></td>
<td bgcolor="#F1F1F1"><smallfont>$forum[moderators]</smallfont></td>
</tr>


Here is my forumhome_forumbit_closingtable

</table>
</td></tr></table>

<table align="center" cellpadding"0" cellspacing"0" border="0" height="25" width="864">
<tr>
<td background="https://vborg.vbsupport.ru/vbimages/tus_nunscafe_forumbottom4.gif" height="25" width="864" colspan="6"></td>
</tr>
</table>

<br>



Firefly, or anyone, can you help get me out the fine mess I've gotten myself into? I have dug myself a hole I can't get out of...

Yeehaw.

Admin
05-02-2002, 04:07 PM
Re-apply the code from my post, I had a bug in there. :)

Markjpx
05-02-2002, 04:26 PM
Lol, thanks Firefly.

Bad Bunny
05-03-2002, 04:05 AM
Hmmm, I guess I did not realize it works on all of the forums, but the last group.