Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How do I add an image to the bottom of each category Details »»
How do I add an image to the bottom of each category
Version: , by Markjpx Markjpx is offline
Developer Last Online: Jan 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-30-2002 Last Update: Never Installs: 0
 
No support by the author.

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.



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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-01-2002, 09:52 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 05-01-2002, 11:20 AM
Markjpx Markjpx is offline
 
Join Date: Apr 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, thanks for the compliment and thanks for the help, Firefly.

I'll post the result.
Reply With Quote
  #4  
Old 05-02-2002, 03:19 PM
Markjpx Markjpx is offline
 
Join Date: Apr 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the current screenshot after the replacement code to forumdisplay.php and index.php



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.
Reply With Quote
  #5  
Old 05-02-2002, 04:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Re-apply the code from my post, I had a bug in there.
Reply With Quote
  #6  
Old 05-02-2002, 04:26 PM
Markjpx Markjpx is offline
 
Join Date: Apr 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lol, thanks Firefly.
Reply With Quote
  #7  
Old 05-03-2002, 04:05 AM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, I guess I did not realize it works on all of the forums, but the last group.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04572 seconds
  • Memory Usage 2,321KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete