Advertisement:

Author Topic: Tabbed Categories  (Read 89956 times)

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,467
  • Master of BBC Abuse
Re: Tabbed Categories
« Reply #160 on: June 15, 2014, 09:46:18 PM »
Try this:

Code: [Select]
#category_tabs>ul{list-style: none;}

Offline Semetery

  • Semi-Newbie
  • *
  • Posts: 23
  • Gender: Male
  • The Carnival Has Just Begun
Re: Tabbed Categories
« Reply #161 on: June 15, 2014, 09:55:50 PM »
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.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,467
  • Master of BBC Abuse
Re: Tabbed Categories
« Reply #162 on: June 15, 2014, 10:03:38 PM »
Aha. It looks like you aren't calling the jQuery stuff. This code is supposed to be in Sources/BoardIndex.php:

Code: [Select]
// 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.

Offline Semetery

  • Semi-Newbie
  • *
  • Posts: 23
  • Gender: Male
  • The Carnival Has Just Begun
Re: Tabbed Categories
« Reply #163 on: June 15, 2014, 10:09:57 PM »
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! :)
« Last Edit: June 15, 2014, 10:21:16 PM by Semetery »

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,467
  • Master of BBC Abuse
Re: Tabbed Categories
« Reply #164 on: June 15, 2014, 10:20:40 PM »
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.

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,978
    • http://cbasites.net/
Re: Tabbed Categories
« Reply #165 on: June 16, 2014, 07:43:35 AM »
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).

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Tabbed Categories
« Reply #166 on: August 02, 2014, 09:20:30 AM »
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:

Code: [Select]
$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.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,499
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Tabbed Categories
« Reply #167 on: August 02, 2014, 11:34:38 AM »
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.
« Last Edit: August 02, 2014, 11:49:14 AM by 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."

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 860
  • Gender: Male
  • The Tired One
Re: Tabbed Categories
« Reply #168 on: August 04, 2014, 05:28:42 PM »
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.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,499
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Tabbed Categories
« Reply #169 on: August 04, 2014, 06:33:04 PM »
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."

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 860
  • Gender: Male
  • The Tired One
Re: Tabbed Categories
« Reply #170 on: August 04, 2014, 06:46:15 PM »
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.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,499
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Tabbed Categories
« Reply #171 on: August 04, 2014, 06:49:06 PM »
Glad to hear :)
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."

Offline elf_fu

  • Jr. Member
  • **
  • Posts: 109
  • Gender: Female
  • Queen of Derp
    • elffu on LinkedIn
    • @2phatgeeks on Twitter
    • Greater Realms
Re: Tabbed Categories
« Reply #172 on: August 05, 2014, 11:32:38 AM »
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:
Code: [Select]
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:
Code: [Select]
<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)
Code: [Select]
      echo '
         </tbody>';
      }
      echo '
         <tbody class="divider">
            <tr>
               <td colspan="4"></td>
            </tr>
         </tbody>';
   }
   echo '
      </table>
   <>';


Replace:
Code: [Select]
      echo '
         </tbody>
         </table>
      <>';
   }
     
   echo '
   <>';
« Last Edit: August 05, 2014, 01:37:14 PM by elf_fu »

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 860
  • Gender: Male
  • The Tired One
Re: Tabbed Categories
« Reply #173 on: August 05, 2014, 11:37:18 AM »
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.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,499
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Tabbed Categories
« Reply #174 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 :)
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."

Offline elf_fu

  • Jr. Member
  • **
  • Posts: 109
  • Gender: Female
  • Queen of Derp
    • elffu on LinkedIn
    • @2phatgeeks on Twitter
    • Greater Realms
Re: Tabbed Categories
« Reply #175 on: August 05, 2014, 01:42:14 PM »
How many mods are you running ? Have you done any manual edits ?


Quote from: elf_fu
I 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:

Code: [Select]
      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.

 
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

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,499
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: Tabbed Categories
« Reply #176 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.
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."

Offline elf_fu

  • Jr. Member
  • **
  • Posts: 109
  • Gender: Female
  • Queen of Derp
    • elffu on LinkedIn
    • @2phatgeeks on Twitter
    • Greater Realms
Re: Tabbed Categories
« Reply #177 on: August 05, 2014, 04:01:51 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.

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 860
  • Gender: Male
  • The Tired One
Re: Tabbed Categories
« Reply #178 on: August 05, 2014, 08:54:31 PM »
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.

Offline SaltedWeb

  • Sr. Member
  • ****
  • Posts: 860
  • Gender: Male
  • The Tired One
Re: Tabbed Categories
« Reply #179 on: August 05, 2014, 11:19:16 PM »

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.

« Last Edit: August 05, 2014, 11:47:15 PM by Diamondcomputer »
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.