News:

Wondering if this will always be free?  See why free is better.

Main Menu

Tabbed Categories

Started by NanoSector, June 16, 2013, 08:30:12 PM

Previous topic - Next topic

Antechinus

Try this:

#category_tabs>ul{list-style: none;}

Semetery

That got rid of the bullets, which makes it much nicer to look at, thanks! I really appreciate your help.

I've still got no style at all on the tabs though. It's a vertical list of the category names without any kind of 'tab' form. They do work, technically, when a name is clicked, it takes you down the page to the proper set of forums but it still has them all listed on the index. Here's another screenshot to show you what I mean.



'Forum Games' should be listed under the second tab, 'Entertainment' ends with 'Share Your Work'. It's showing the category titles, but it's also showing all forums as well.

I looked through the code on the mod page to see if there could be something that was missing but didn't notice anything. I'm not sure why it isn't styling them and lining them up horizontally like everyone elses.

Antechinus

Aha. It looks like you aren't calling the jQuery stuff. This code is supposed to be in Sources/BoardIndex.php:


// Yoshi2889: Tabbed Categories
$context['html_headers'] .= '
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type="text/javascript">
//
$(document).ready(function ()
{
$("#category_tabs").tabs();
$(".ui-tabs-panel").css("padding","0px");
$(".ui-widget-header").addClass("catbg").removeClass("ui-widget-header");
});
//]]]]>>
</script>';
// End Yoshi2889: Tabbed Categories


If that was missing, that would explain the problem. Also, if you are calling jQuery somewhere else, you may have a conflict.

Semetery

#163
You nailed it, it was indeed a mod conflict. I checked for other mods that would be calling jquery and the Fancybox 4 SMF was. I uninstalled it and it now works exactly as it should. EDIT: I checked through the thread and found the answer to my other question.

Thanks again for your help! :)

Antechinus

Personally, I'd be inclined to just delete any stray calls for jQuery, and just call it once in the head section of your index.template.php. That should cover all mods AFAIK.

luuuciano

Check the modifications in your files using the mod parser, maybe it is not aplied in your theme, or something else.
A link to your forum will help too (so we can see it, the code, etc)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Hj Ahmad Rasyid Hj Ismail

Why didn't I notice this before. A very nice mod.

By the way,thanks to SMF Customization Team, I ended up using this code to check that jquery is not yet being called before loading it:

$context['html_headers'] .= '<script type="text/javascript">
        window.jQuery || document.write(\'<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"><\/script>\');
    </script>';


May be this can be used as a fix in the next update for this mod too.

NanoSector

#167
Thank you! I'll fix this right away :)

ETA: Updated. v0.1.3 is not a required update; it only updates jQuery and implements ahrasis's suggestion.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SaltedWeb

Installed just fine on Inferno theme, oddly enough it failed on Curve, only default was ok so thats weird.
It may be a mod issues. So wouldn't say this is the mod cause.
Nice very nice.

Questions, how many tabs wide will this handle and still look clean ? Anyone with demo and allot of tabs ?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

NanoSector

Not sure, but the general idea is that too many categories doesn't benefit usability of a site.

The mod installs fine in a clean installation, so that's most definitely a mod conflict.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SaltedWeb

Great though , best mod ive found in awhile very useful.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

elf_fu

#172
Hello!

The theme I am using is Crip's Back n' Black, here: http://custom.simplemachines.org/themes/index.php?lemma=126 on a 2.0.8 forum.

I have two errors during the pre-check of installing this mod in my BoardIndex.template.php. I attempted a manual install (with backed up files) to no success My BoardIndex.template.php I've attached in hopes that someone can make sense of this!

I really like the look of this, this helps a large forum like mine (An RP forum) remove a lot of clutter from the main index and seem a lot easier to navigate & not overwhelm newcomers. If anyone could help, It would be much appreciated!

The two areas that are a problem:

Find:
echo '
   <div id="boardindex_table">
      <table class="table_list">';

   /* Each category in categories is made up of:
   id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
   new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
   and boards. (see below.) */
   foreach ($context['categories'] as $category)
   {
      // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
      if (empty($category['boards']) && !$category['is_collapsed'])
         continue;

      echo '
         <tbody class="header" id="category_', $category['id'], '">
            <tr>
               <td colspan="4">
                  <div class="cat_bar">
                     <h3 class="catbg">';

      // If this category even can collapse, show a link to collapse it.
      if ($category['can_collapse'])
         echo '
                        <a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';

      if (!$context['user']['is_guest'] && !empty($category['show_unread']))
         echo '
                        <a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';

      echo '
                        ', $category['link'], '
                     </h3>
                  <>
               </td>
            </tr>
         </tbody>';

      // Assuming the category hasn't been collapsed...
      if (!$category['is_collapsed'])
      {

      echo '



Replace:
<ul>';

   foreach ($context['categories'] as $category)
   {
      echo '
         <li><a href="#cat_' . $category['id'] . '">' . $category['name'] . '</a></li>';
   }
   
   echo '
      </ul>';
     
   foreach ($context['categories'] as $category)
   {
      echo '
      <div id="cat_', $category['id'], '">
         <table class="table_list">






Find: (I can't find this anywhere in my BoardIndex.template)
      echo '
         </tbody>';
      }
      echo '
         <tbody class="divider">
            <tr>
               <td colspan="4"></td>
            </tr>
         </tbody>';
   }
   echo '
      </table>
   <>';



Replace:

      echo '
         </tbody>
         </table>
      <>';
   }
     
   echo '
   <>';


GR

SaltedWeb

How many mods are you running ? Have you done any manual edits ?

Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

NanoSector

Your board index template is a bit off. If no-one beats me I'll try to fiddle something out for you :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

elf_fu

Quote from: Diamondcomputer on August 05, 2014, 11:37:18 AM
How many mods are you running ? Have you done any manual edits ?


Quote from: elf_fuI attempted a manual install

Yes, :p

A lot of mods

KeyCAPTCHA for SMF   2.5     [ List Files ] [ Delete ]
2.   SimplePortal   2.3.5     [ Uninstall ] [ List Files ] [ Delete ]
3.   Ban List   2.0     [ Uninstall ] [ List Files ] [ Delete ]
4.   Dice Roller BBcode   1.3     [ Uninstall ] [ List Files ] [ Delete ]
5.   SubAccounts Mod   1.0.1     [ List Files ] [ Delete ]
6.   PM to New Members   1.2     [ Uninstall ] [ List Files ] [ Delete ]
7.   Treasury   2.12     [ Uninstall ] [ List Files ] [ Delete ]
8.   Separate the sticky topics   1.0.0     [ Uninstall ] [ List Files ] [ Delete ]
9.   Add Social Media Icons To Profiles   1.1.0     [ Uninstall ] [ List Files ] [ Delete ]
10.   SA KB   1.0.2a     [ Uninstall ] [ List Files ] [ Delete ]
11.   Simple Youtube Video Embedder/BBC   1.1     [ Uninstall ] [ List Files ] [ Delete ]
12.   SA Shop   1.0 RC1     [ Uninstall ] [ List Files ] [ Delete ]
13.   SMF Arcade   2.5     [ Uninstall ] [ List Files ] [ Delete ]
14.   SMF 2.0.5 Update   1.0     [ List Files ] [ Delete ]
15.   Menu Editor Lite   1.0.5     [ Uninstall ] [ List Files ] [ Delete ]
16.   [user] BBC Tag   1.0.1     [ Uninstall ] [ List Files ] [ Delete ]
17.   Default Avatar   2.3     [ Uninstall ] [ List Files ] [ Delete ]
18.   Remove Child Boards   2.3.4     [ List Files ] [ Delete ]
19.   Team Page   3.6     [ Uninstall ] [ List Files ] [ Delete ]
20.   Topic Solved   1.1.1     [ Uninstall ] [ List Files ] [ Delete ]
21.   Event Reminder Mod for SMF2   2.31     [ Uninstall ] [ List Files ] [ Delete ]
22.   Member Awards   3.0     [ Uninstall ] [ List Files ] [ Delete ]
23.   SMF 1.1.19 / 2.0.6 Update   1.0     [ List Files ] [ Delete ]
24.   SMF 2.0.7 Update   1.0     [ List Files ] [ Delete ]
25.   Guest Registration Notification   1.5.1     [ Uninstall ] [ List Files ] [ Delete ]
26.   NiceTooltips   1.9     [ Uninstall ] [ List Files ] [ Delete ]
27.   Tapatalk SMF 2.0 Plugin   3.9.3     [ Uninstall ] [ List Files ] [ Delete ]
28.   Boards in Cats   1.5   [ Install Mod ] [ List Files ] [ Delete ]
29.   SCEditor4Smf   0.5.1     [ Uninstall ] [ List Files ] [ Delete ]
30.   SMF 2.0.8 Update   1.0     [ Uninstall ] [ List Files ] [ Delete ]
31.   Users Online Today   2.1     [ Uninstall ] [ List Files ] [ Delete ]
32.   Tabbed Categories   0.1.3   [ Install Mod ] [ List Files ] [ Delete ]




The second part of the code I pasted above, doesn't appear to exist in my BoardIndex.template.php. I was able to find and replace the first part, but the second part...There's no:


      echo '
         </tbody>';
      }
      echo '
         <tbody class="divider">
            <tr>
               <td colspan="4"></td>
            </tr>
         </tbody>';
   }
   echo '
      </table>
   <>';


--anywhere in my BoardIndex.template.php. I attempted to "guess," where this might go....and we all know how well that turns out! Didn't work at all, lol. This theme's BoardIndex has given me issues before because like NanoSector said, it's a bit off/different.

Quote from: NanoSector on August 05, 2014, 12:15:48 PM
Your board index template is a bit off. If no-one beats me I'll try to fiddle something out for you<$1alt="" title="" onresizestart="return false;" id="smiley__$2" style="padding: 0 3px 0 3px;" />

Thanks Nano for the offer! I'm in no rush and happy to have any help from anyone at this point, with my "special," boardindex xD

GR

NanoSector

This modified file *should* do the trick; take a backup beforehand (the file you attached before is one, but a full backup is preferred). Let me know if it works or not.

Once the file is in place, install the mod and ignore any errors coming from the theme.

ETA: Updated file so categories can't be hidden and thus not showing with no UI to unhide them.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

elf_fu

Quote from: NanoSector on August 05, 2014, 02:11:39 PM
This modified file *should* do the trick; take a backup beforehand (the file you attached before is one, but a full backup is preferred). Let me know if it works or not.

Once the file is in place, install the mod and ignore any errors coming from the theme.

ETA: Updated file so categories can't be hidden and thus not showing with no UI to unhide them.


Thanks so much! Currently backing up ALL THE THINGS! before testing/trying this out. So I'll try and return to reply and/or edit this one to let you know how it went.

GR

SaltedWeb

You'll love this Mod, very useful, it should be a paid addition as it very unique to SMF and does a job paid forums usually does.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

SaltedWeb

#179

Ok this is weird, I use firefox, but opened Chrome and IE and they moved the first category back one.
In the AdminCP shows correct but IE and Chrome show the first one as second.
Any ideas?
Disregard, was that Mysql issue reported earlier this year. I am running 2.0.5
Used the http://custom.simplemachines.org/mods/index.php?mod=3865 fix and we are back in business.

Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Advertisement: