Register to Reply
Results 1 to 1 of 1

Thread: [vBMods.rocks] Forum Category Spacing - no template editing needed/vBCloud compatible

    1. [vBMods.rocks] Forum Category Spacing - no template editing needed/vBCloud compatible Details »»

      [vBMods.rocks] Forum Category Spacing - no template editing needed/vBCloud compatible

      Version: 1.00, by (Banned) Samhain is offline
      Developer Last Online: Nov 2017 Show Printable Version Email this Page
      Version: 5.x.x Rating:  Installs: 0
      Released: 17th Jul 2017 Last Update: Never Downloads: 0
      Supported

      vB Version: 5.2.5

      Want to separate or group forum categories in its own "table" without editing display_Forums_list template? The entire category and forum directory are displayed using a single <table> tag. This makes it impossible to separate the forums by category in its own table that has border without editing display_Forums_list template and adding multiple <table> tags as others had done. But not until now.

      I thought that mod was great (and it is!) but it requires editing an existing template and most of you know that editing existing vBulletin templates is not recommended and ideal. So I got challenged to create my own version that doesn't require editing using pure CSS. But technically not really using pure CSS as I had no choice but to add a little bit of JavaScript in order to programmatically identify which is the last forum channel in a category. Knowing the last forum in a category enables the CSS to know where to break the table into multiple "tables". The end result is not using multiple actual <table> tags but with a little bit of creativity and imagination, I was able to replicate an illusion or impression of using multiple tables.

      Without much further ado, here's how to accomplish this.

      1. Add in css_additional template or via Sitebuilder (Edit Site ON) > Style > CSS Editor.

      Code:
      Only registered members can view code.
      NOTE: The border colors and spacing used above were based off the default vB5 style. You may need to tweak some values if you have a customized style/theme.


      2. Add a script to dynamically determine the last forum in a category. Ideally, we should use a template hook to insert the script but unfortunately, there is no hook location that is close to the forum directory list. We need to run the script as soon as the forum directory is rendered to avoid flickering or flashing. I chose to add the script in the Mark Channels Read phrase which is right below the forum directory.

      Go to AdminCP > Languages & Phrases > Search in Phrases.
      Search for Mark Channels Read phrase
      Search for text: mark_channels_read
      Search in: Phrase Variable Name Only
      In the English (US) Translation box, enter the following:

      Code:
      Only registered members can view code.
      NOTE: You can change Mark Channels Read with whatever phrase you want.
      Save.


      Compatibility:

      Tested in vB 5.2.5 but this should work in older versions too.
      Compatible with vBCloud.


      Demo:
      See homepage of my mod site at http://vbmods.rocks/

      This mod is also posted at http://vbmods.rocks/forum/vbulletin-...oud-compatible

      Enjoy!

      Show Your Support

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

Register to Reply

Similar Threads

  1. [vBMods.rocks] Event Date That Rocks using CSS
    By Samhain in forum vBulletin 5.x Template Modifications
    Replies: 0
    Last Post: 17th Jul 2017, 21:22
  2. [vBMods.rocks] Display Forum Description on Forum Channel page using an Ad Module
    By Samhain in forum vBulletin 5.x Products & Extensions
    Replies: 0
    Last Post: 17th Jul 2017, 21:09
  3. vb5 forum category spacing
    By Tempus in forum vBulletin 5.x Template Modifications
    Replies: 0
    Last Post: 17th Oct 2015, 18:23
  4. SOLVED
    vB 3.8.x Template Needed!
    By Rockz in forum Solved Requests
    Replies: 12
    Last Post: 28th Apr 2015, 09:02
  5. Template Editing: Show Difference
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 0
    Last Post: 24th Feb 2015, 14:46

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •