vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How do I add an image to the bottom of each category (https://vborg.vbsupport.ru/showthread.php?t=38085)

Markjpx 04-30-2002 07:01 PM

How do I add an image to the bottom of each category
 
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:

PHP Code:

</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:
Code:

        } else {
          $tempext = '_nopost';
        }

with this:
Code:

        } 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:
Code:

<!-- 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
Code:

<!-- 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
PHP Code:

<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
PHP Code:

<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
PHP Code:

</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.


All times are GMT. The time now is 07:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01174 seconds
  • Memory Usage 1,795KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete