vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Multiple styles in index (https://vborg.vbsupport.ru/showthread.php?t=216606)

j1mmy 06-20-2009 02:12 AM

Multiple styles in index
 
I know it is possible to apply certain styles to certain fourms, but how can I apply multiple styles to each forum and have the forum respective styles presented on the forum index page?

It's really just changing the colour for each forum for me...

j1mmy 06-21-2009 01:21 PM

Bump...

Lynne 06-21-2009 03:21 PM

I cannot picture what you want. Perhaps you can post some images of what you are wanting.

j1mmy 06-21-2009 03:29 PM

Okay, for example this website has blue table headers for each forum. What I want is for each forum to have their own colour. So for e.g. website lounge would be blue, psychology topics would be red etc. And of course when you click a certain forum, it would be displayed in its respective colour.

Lynne 06-21-2009 03:41 PM

I suppose you can find the template that spits out the table header and then add a conditon - if forumid=xx then add a style tag to the table that is the color you want. Or just add a class to it like class="mycolor$forumid" and then add these classes to the bottom of Main CSS. However, I know of no way to automatically do this. You're gonna have to make template edits and such.

j1mmy 06-21-2009 07:07 PM

I know what the template is, it's forumbit_level1_nopost.

But I've never worked with if tags before, so wouldn't know how to write it at all. I'm not quite sure what you mean by the class="mycolor$forumid" solution.,,

Lynne 06-21-2009 07:18 PM

Just add it into these areas:
HTML Code:

<td class="thead mycolor$forumid" etc
And then define class .mycolor4 for when it is forumid 4, and .mycolor10 for when it is forumid 10, etc.

j1mmy 06-21-2009 09:04 PM

Right, so where would that go in the template?

HTML Code:

<tbody>
        <tr>
                <td colspan="<if condition="$vboptions[showmoderatorcolumn]">4<else />3</if>">
                <!-- forcing space -->
                <img src="$vboptions[cleargifurl]" width="1" height="5" />
                </td>
        </tr>
</tbody>
<tbody>
        <tr>
                <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">4<else />3</if>">
                        <if condition="$childforumbits">
                        <a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
                        </if>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><span class="smallfont" style="font-weight:normal;">- $forum[description]</span></if>
                        <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                </td>
        </tr>
</tbody>
<tbody>
        <tr align="center">
          <td class="thead" >&nbsp;</td>
          <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
          <td class="thead" width="175">$vbphrase[last_post]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</if>


Lynne 06-22-2009 03:37 AM

Quote:

Originally Posted by j1mmy (Post 1834336)
Right, so where would that go in the template?

In this area:
HTML Code:

<tbody>
    <tr align="center">
      <td class="thead" >&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</tbody>


j1mmy 06-22-2009 11:41 AM

Could you give me an example (with colors and forumid's) of how the line of code is written exactly? Then I can copy it to the other forums. The way I wrote it doesn't work at all.


All times are GMT. The time now is 10:19 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.01964 seconds
  • Memory Usage 1,748KB
  • 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
  • (3)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete