vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Home Enhancements - Forum Category Icons (Advanced) (https://vborg.vbsupport.ru/showthread.php?t=244351)

tup14 07-26-2012 09:17 PM

New Joe thanks for the sub-forum icon fix. It works as advertized. I installed and all my sub-forum icons showed up..:D

Disco_Stu 07-27-2012 12:48 AM

1 Attachment(s)
Is this what you guys are trying to do? It just takes one simple style change after installing this mod. I will not list the change without the mod authors approval.

Disco_Stu 07-27-2012 01:43 AM

1 Attachment(s)
Here's another example where I removed the commas and have all the sub forums on the same line with the subforum titles centered under the subforum icons. I also changed the link so the icons are hot links to the subforums just like the titles.

I think this one looks better than my first example.

Disco_Stu 07-27-2012 02:25 AM

1 Attachment(s)
And here's one last example with several forums where the last forum has sub forums with the icons. I think you get the idea now so I won't clog up the thread with any more examples.

By the way, I'm using 4.2 PL2

Disco_Stu 07-27-2012 03:28 AM

1 Attachment(s)
Dark Wizard, do I have your permission to list my change? As you can see from my examples it does work for sub forums.

My change is very simple and takes about 1 minute to apply.

I will not post my change without your approval.

Update:

I have a lot of work to do so I'll check back later for your reply otherwise this will have to wait until Monday.

Second Update

I have also figured out how to display the forum icon (or sub forum icon if displaying a sub forum ) at the top of the thread.

Notice in the last screen I removed the "Sub-Forum" header on the forum home display. Do we really need to tell people that these are sub forums? I think they can figure that out on their own.

*** Note that for these examples I changed some of the forums in post 674 to sub forums so you can see that my changes really do work for sub forums

Hey Tup14, are you still "lmao!" ? (post 653) - next time try believing someone when they say something works instead of mocking them.

I will explain how I made these changes after DW approves posting the changes.

Dark_Wizard 07-28-2012 08:32 AM

Quote:

Originally Posted by Disco_Stu (Post 2351778)
Dark Wizard, do I have your permission to list my change? As you can see from my examples it does work for sub forums.

My change is very simple and takes about 1 minute to apply.

I will not post my change without your approval.

Update:

I have a lot of work to do so I'll check back later for your reply otherwise this will have to wait until Monday.

Second Update

I have also figured out how to display the forum icon (or sub forum icon if displaying a sub forum ) at the top of the thread.

Notice in the last screen I removed the "Sub-Forum" header on the forum home display. Do we really need to tell people that these are sub forums? I think they can figure that out on their own.

*** Note that for these examples I changed some of the forums in post 674 to sub forums so you can see that my changes really do work for sub forums

Hey Tup14, are you still "lmao!" ? (post 653) - next time try believing someone when they say something works instead of mocking them.

I will explain how I made these changes after DW approves posting the changes.

It's fine, post away. Been too busy with my own stuff. I'll post your change in the first post of the thread with credit.

Disco_Stu 07-28-2012 04:03 PM

Here are my changes. I suggest you make a copy of your original code first as I am not responsible for any changes to your forums you make.

To display the sub forum icons:

Styles & Templates>Search In Templates>forumhome_subforums

Look for this line of code:

Code:

<a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a>{vb:raw row.comma}
and replace it (comment it out - I don't like to hard delete) with this code:

Code:

<br>
<div style="width:65px;">
<center><a href="{vb:link forum, {vb:raw row}}"><img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw row.forumiconimg}" /><br>{vb:raw row.title}</a></center>
</div>

That's all there is to it. Note that I left off the comma between subforums. If you want that then include "{vb:raw row.comma}" after "</a>". Also I included a <div> to control the width of the icon display and a <center> to center the title below the icon.

I also added a line break at the top of forumhome_subforums to add a line between the forum and sub forums.

If you want to control how many subforums are displayed on each line (I limit it to 4) then do this:

At the top of forumhome_subforums add this:

Code:

<script type="text/javascript">
var counter = 0;
</script>



Then after this line of code

Code:

<vb:each from="subforums" value="row">
add this:

Code:

<script type="text/javascript">
  counter = counter + 1;
  if(counter >4)
    {
      counter = 1;
      document.write("<br>");
    }
 
</script>

I also have some spacing code in the above code to move the sub forums to the right a bit but that's really up to you how you want to position the icons.

If you want to get rid of the "Sub-Forum" heading then comment out or delete this line of code at the top of forumhome_subforums:

Code:

<h4 class="subforumlistlabel">{vb:rawphrase subforums}:</h4>



To add the forum or sub forum icon at the top of a thread do this:

Styles & Templates>Search In Templates>FORUMDISPLAY

after "{vb:raw navbar}" add this line of code:

Code:

<img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw foruminfo.forumiconimg}" />
And that's all there is to it.

Milobil 07-29-2012 02:20 PM

Does it work on 4.2.0 ?

Disco_Stu 07-29-2012 02:34 PM

I'm using it on 4.2 PL2

Disco_Stu 08-01-2012 04:02 PM

Quote:

Originally Posted by Eagle Eyes (Post 2351146)
What is the update on this? Does this work on 4.2 now as it should?

It does if you add my changes after installing the mod. You can see my examples in post 675.


All times are GMT. The time now is 09:56 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.01852 seconds
  • Memory Usage 1,752KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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