vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Category Spacing for Gold+ (https://vborg.vbsupport.ru/showthread.php?t=88983)

Zachery 04-18-2004 10:00 PM

Category Spacing for Gold+
 
The old thread has tons of unneeded info, so heres Category Spacing for Gold+

D7MeEe 04-19-2004 09:43 PM

hello

where screen shot

nice Edit

thanx

Zachery 04-19-2004 10:36 PM

Just like vB.org :)

Tony G 04-19-2004 11:44 PM

Woo! Thanks for releasing this seperate, Zachery. :)

Logik 04-20-2004 01:37 AM

The other one works for gold too, i have it on my board...

Mike_H 04-20-2004 09:34 AM

well this one i also not working, no category spacing, and the alignment is again a mess

OGT 04-20-2004 12:20 PM

typo on last line of the txt

find:
HTML Code:

<div style="padding: 5px 5px 5px p5x;"></div>
replace with:
HTML Code:

<div style="padding: 5px 5px 5px 5px;"></div>

OGT 04-20-2004 01:12 PM

I installed this as posted and a lot of the forum columns were out of alignment. I replaced this code from the mod:
HTML Code:

        <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>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>

with this code that was originally mine, I beleive from the index mod floris put up, that puts index headers below cat names, and it works out much nicer, however, if the last post containes 3-4 large words, whatever method is used to trim post titles doesn't work, and will knock the last post column out of alignment.
HTML Code:

<tr align="center">
<td class="thead" width="38">&nbsp;</td>
<td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="240">$vbphrase[last_post]</td>
<td class="thead" width="70">$vbphrase[threads]</td>
<td class="thead" width="70">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead" width="120">$vbphrase[moderator]</td>

changing width="240" in this:
HTML Code:

<td class="thead" width="240">$vbphrase[last_post]</td>
to something larger would alleviate that, but your mileage may vary. I think I am going to set it to 300 and see how it goes for awhile, but I think if the function that turns "a long postname" into "a long..." to fit table widths were looked at, it would be a cleaner fix.

Zachery 04-20-2004 02:50 PM

I do have an alignment fix to post to help everyone here :) it will come later today ;)

ShutDown23 04-22-2004 06:20 PM

Is it possible that you could install this for me? I tried several times but doesn't seem to be working. PM me if you can please

StarBuG 04-23-2004 10:18 PM

thx for this release.

But you should update your instructions with the fix from OGT cause without it there is no spacing!

Greetings

StarBuG

LOD-squa 04-23-2004 10:21 PM

Thank you for this mod, just what I needed to continue my forums layout. ^^

Floris 04-24-2004 10:47 AM

Quote:

Originally Posted by OGT
I installed this as posted and a lot of the forum columns were out of alignment. I replaced this code from the mod:
HTML Code:

        <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>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>

with this code that was originally mine, I beleive from the index mod floris put up, that puts index headers below cat names, and it works out much nicer, however, if the last post containes 3-4 large words, whatever method is used to trim post titles doesn't work, and will knock the last post column out of alignment.
HTML Code:

<tr align="center">
<td class="thead" width="38">&nbsp;</td>
<td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="240">$vbphrase[last_post]</td>
<td class="thead" width="70">$vbphrase[threads]</td>
<td class="thead" width="70">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead" width="120">$vbphrase[moderator]</td>

changing width="240" in this:
HTML Code:

<td class="thead" width="240">$vbphrase[last_post]</td>
to something larger would alleviate that, but your mileage may vary. I think I am going to set it to 300 and see how it goes for awhile, but I think if the function that turns "a long postname" into "a long..." to fit table widths were looked at, it would be a cleaner fix.

Now apply the same width to the template that makes up the rows, and you are done ;)

The Quibbler 04-24-2004 05:50 PM

Edit: never mind, I found another mod that did what I wanted :)

rebelsrock06 04-24-2004 06:11 PM

your havnig probs with the moderator collumn right ?

Tradjick 04-24-2004 09:21 PM

Thanks Zach. :)

It perfectly worked on my forums.

Here is a before/after (except for the collapse.gif):

Aaron RV 04-25-2004 10:46 AM

Not work on vb 3.0.1 why? :(

Tradjick 04-25-2004 11:45 AM

Quote:

Originally Posted by Aaron
Not work on vb 3.0.1 why? :(

I did it on vb3.0.1. Maybe you have modified templates, but with a clean install of 3.0.1 all you have to do is to follow the instructions.

imported_Jazzie 04-26-2004 02:23 PM

How do you give it a bigger gap between the categories?

Schwarze Katze 04-26-2004 06:07 PM

I tried this mod and I'm pretty pleased. Still there's a little problem I've got.
There's one forum we've got, that's not put in a categorie. It's the first forum on the list and well, there's no spacing between this forum and the categorie following. Additionally this forum column shows up wider than the others.
I suppose I need to modify the forumhome_forumbit_level1_post too?

Schwarze Katze 04-27-2004 05:18 PM

Nevermind, I solved it.

OGT 04-27-2004 06:36 PM

How Schwarze? I'm sure others have the same issue, so when people solve an issue they ask about, its always good to note how you did it.

Zachery 04-27-2004 07:42 PM

change p5x to 5px

Schwarze Katze 04-27-2004 08:31 PM

@OGT: Of course I will, I'm just doing a bit of refactoring and going to attach it afterwards :)

Zachery 04-27-2004 09:06 PM

Im reworking some of this otherwise i would have posted sooner :)

Schwarze Katze 04-27-2004 09:43 PM

No problem :) Has been better for me anyway 'cause I think I finally understood the code design.

Here's what I did.
Instead of putting a <div> behind every first level categorie I put a <br /> before them. This way it still works when you're having forum on the first level and not only categories. (I hope you understand what I mean *coughs*)

All you've got to do is modify the forumhome_forumbit_level1_nopost.
Replace
Code:

<tbody>
        <tr>
                <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                        <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>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                        <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                </td>
        </tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</if>

with
Code:

</table>
<br />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr>
                <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                        <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>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                        <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                </td>
        </tr>
</thead>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
        <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>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>
$childforumbits
</tbody>
</if>


Aaron RV 04-28-2004 05:55 AM

:D Now work but no space between last category and "What's Going On?".

:( ... http://www.politicaonline.net/forum/images/smile/au.gif




Quote:

Originally Posted by Schwarze Katze
No problem :) Has been better for me anyway 'cause I think I finally understood the code design.

Here's what I did.
Instead of putting a <div> behind every first level categorie I put a <br /> before them. This way it still works when you're having forum on the first level and not only categories. (I hope you understand what I mean *coughs*)

All you've got to do is modify the forumhome_forumbit_level1_nopost.
Replace
Code:

<tbody>
        <tr>
                <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                        <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>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                        <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                </td>
        </tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</if>

with
Code:

</table>
<br />
 
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr>
                <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                        <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>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                        <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                </td>
        </tr>
</thead>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
        <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>
        <td class="thead">$vbphrase[threads]</td>
        <td class="thead">$vbphrase[posts]</td>
        <if condition="$vboptions['showmoderatorcolumn']">
        <td class="thead">$vbphrase[moderator]</td>
        </if>
        </tr>
$childforumbits
</tbody>
</if>



sandrose 04-30-2004 02:45 PM

The column alignment is fixed now.

Replace the following:

Quote:


<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<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>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>


With This one
Quote:

<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<tr align="center">
<td class="thead" width="5%">&nbsp;</td>
<td class="thead" width="50%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="100">$vbphrase[last_post]</td>
<td class="thead" width="64">$vbphrase[threads]</td>
<td class="thead" width="64">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>



This the result:

Aaron RV 04-30-2004 06:27 PM

:confused:
If my Main Table Width is 760 this is my result (see help.gif)

Tony G 04-30-2004 11:12 PM

You have to extend the width of the What's Going On table too, since 760 isn't the default width of those tables.

SaN-DeeP 05-01-2004 12:51 AM

i installed the mod.
need to fix the width of LAST POST..

i tried to made it 240 its not GOING beyond that
dunt know why ??

check attachment pls :)

Tony G 05-01-2004 12:55 AM

It's not going beyond because the whole width of the table cannot exceed the number you have put it.

To make it 240, you either have to make the other table/s smaller, or making the whole table wider, then set 240.

Aaron RV 05-01-2004 05:43 AM

Quote:

Originally Posted by Tony
You have to extend the width of the What's Going On table too, since 760 isn't the default width of those tables.

Thank you Tony, but now I have this result (see gif)

:rolleyes:

Tony G 05-01-2004 06:18 AM

Extend the top table too, as well as the image at the bottom.

Aaron RV 05-02-2004 03:20 PM

Now ok.
In "main table width" is 760 px and my "forumhome_forumbit_level1_nopost" is:

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
thead>
<
tr>
<
td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumidsrc="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<
a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if 
condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if 
condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</
td>
</
tr>
</
thead>
<if 
condition="$childforumbits">
<
tbody id="collapseobj_forumbit_$forumidstyle="{$collapseobj_forumid}">
<
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>
<
td class="thead">$vbphrase[threads]</td>
<
td class="thead">$vbphrase[posts]</td>
<if 
condition="$vboptions['showmoderatorcolumn']">
<
td class="thead">$vbphrase[moderator]</td>
</if>
</
tr>
$childforumbits
</tbody>
</if>
</
tbody>
</
table>
<
div style="padding: 5px 5px 5px 5px;"></div

Only last: "forumhome_forumbit_level2_nopost" no modifications?

chrisvonc 05-04-2004 05:21 PM

Ok, this installed real nice except of the column spacing issue. I used the code Sandrose posted, and while everything is lined up now, I too still have the overhanging catagories. I dont quite understand what I am supposed to be modifying to even it out. My test forum is set for 800px width.. did adding this expand the catagories beyond 800px or has my header reduced width? Sorry, not really sure what I need to do to fix this if someone would kindly explain it. :)

Also, I found that a catagory with no posts in it (as in a forum thats actually a direct link to an external link) stays a bit out of alignment.

Thanks in advance!

chrisvonc 05-08-2004 01:12 PM

Anyone please?

imported_Mystic 05-18-2004 02:26 AM

that's cool.

Kairo 05-20-2004 04:19 PM

Getting the next error if i save the edited template: FORUMHOME, tried it a few times.. can someone tell me what it is?

Quote:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/***/domains/***.nl/public_html/forum/includes/adminfunctions_template.php(3037) : eval()'d code on line 25

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
If i save with this error.. the forum doesn't work anymore.. pls Help me! Using Version 3.0.1 of vbulletin..

chrisvonc 05-20-2004 10:43 PM

It seems there was some changes between v3.0.0 and 3.0.1 that effect this because I saw strange results as well after a clean install of 3.0.1 on my local test forum and then applying this.

What I did to get the desired results and correcting both my column and underhanging table problems, was actually go back and visit Zacherys older hack for the gamma versions and mash out a solution. If Zackary doesnt mind, let me try to explain what I did and if he or anyone else want to point out any mistakes, please feel free. Amazingly, having no idea what I was doing and I simply got lucky adding things here, pulling things there until it worked for me.

First off for those of you who have a fixed width forum, applied this and now have the top and bottom tables underhanging from the catagories, the problem is one line of code from the directions in the first post. I replaced it with another line of code from previously mentioned gamma release of this and the overhang goes away. With the current code, despite you having a fixed width, does push the catagory tables out further than your settings so its not that the header or bottom tables need adjusting, the catagories do get bigger.

Again, assuming you have applied this hack, in forumhome_forumbit_level1_nopost, find:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="$stylevar[outertablewidth]" align="center">
and replace it with this code from the gamma instructions:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
That should fix your overhang issues or at least it did on my v3.0.1 test forum and one of my v3.0.0 production forums.

As I said above, there seems to have been a change in vb 3.0.1 and how the original directions for this play together, more specificly in the FORUMHOME template. When the directions from this mod and the gamma version are applied, I ended up with an extra Forum/Last Post/Threads/Posts table at the top so ultimatly, this is how I fully applied Catagory Spacing...

Open the FORUMHOME template and find the first occurence of:
Code:

        <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>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>

remove it and save.

Next apply the following GAMMA version of this mod originally from Zacherys "[vB 3.0.0 RC] - [Release - Gamma] Forum Spacing" post (http://www.vbulletintemplates.com/mo...ead.php?t=5390)

Open forumhome_forumbit_level1_nopost and at the very top of the template add this:
Code:

<if condition="$forum[forumid] == X">
<else />
</table> <br /><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
</if>

Change X to the FIRST forumid that appears on your forumhome

Now you should have your catagories spaced and not have the extra "Forum/Last Post/Threads/Posts" table at the top. However, for those with a fixed width forum (as I do) you may now be having alignment issues with the columns. Using a suggestion from Sandrose earlier in this thread, I fixed my column alignment issue by:

Open forumhome_forumbit_level1_nopost and find:
Code:

<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
Directly under it, I added:
Code:

<tr align="center">
<td class="thead" width="5%">&nbsp;</td>
<td class="thead" width="51%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="30%">$vbphrase[last_post]</td>
<td class="thead" width="30">$vbphrase[threads]</td>
<td class="thead" width="30">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>

and my column alignment problem was fixed.

Now you may need to adjust the numbers and % to fit your needs but those posted above are doing it for me.

I tested this on vB 3.0.0 and vB 3.0.1 and it works on both. Being this really if my first time posting an actual fix with code no less, that worked for me, hopefully I explained that OK and it come out right. If not, admins/mods, please feel free to correct me.


All times are GMT. The time now is 04:47 PM.

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.01561 seconds
  • Memory Usage 1,923KB
  • 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
  • (10)bbcode_code_printable
  • (8)bbcode_html_printable
  • (1)bbcode_php_printable
  • (7)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
  • (40)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