Add ReplyNew TopicNew Poll

 Hide certain subforums on front page but not others?
#
It is nice to see that jcink, like ZetaBoards, allows for subforums to be shown on the front page of the forum:

user posted image

My question is this: is it possible to display certain subforums for one forum area, but not subforums for another? For example, let's say a forum area has dozens of subforums and they aren't even in use. That can be a bit of an eyesore.

I made this same request on ZetaBoards' support forum back in January, and they gave the following code which worked perfectly:

QUOTE (DaPizzaMan)
CODE
<script type="text/javascript">
   $(function() {
    var hideForumID = [123949, 124000, 124003];
    var i = 0;
    var hiddenForums = hideForumID.length;
    while (i < hiddenForums) {
     $('#forum-' + hideForumID[i]).next().next('tr:has(td.c_subforum)').hide();
     $('#forum-' + hideForumID[i] + ' td.c_mark').attr('rowspan', '2');
     i++;
    }
   });
   </script>


The only modification necessary is this:

CODE
var hideForumID = [123949, 124000, 124003];


Just add any forum ID into that list to hide its subforums.


But I assume such a code wouldn't work with jcink, hence this thread.
#
Can you link to your board? Might be able to figure something out from there.

signature
Kindly: do not contact me on Discord for support, do not PM me for support. Thanks for understanding!
#
Try this:

CODE
<script>
$(function() {
   var hideSubforumLink = [FORUM_ID, FORUM_ID, FORUM_ID];

   $(hideSubforumLink).each(function(i) {
       $('span.subforums a[href$="showforum=' + hideSubforumLink[i] + '"]').hide();
   });

   $('span.subforums').each(function() {
       $(this).html($(this).html().replace(/,/gi, ''));
       $(this).find('a.tooltip:visible:not(:last)').after(',');
   });
});
</script>

signature
user posted image
#
QUOTE (owl @ Aug 8 2018, 04:26 AM)
Can you link to your board? Might be able to figure something out from there.
http://eregime.org/index.php?act=idx

Cory, I tried it and it didn't work.

These are the three forum areas whose subforums I'd like to hide from the main page: http://eregime.org/index.php?c=35

This post has been edited by Ismail: Aug 12 2018, 05:07 AM
#
Add this to the bottom of your CSS (stylesheet):

#cat_35 .subforums {display: none}

signature
Kindly: do not contact me on Discord for support, do not PM me for support. Thanks for understanding!
#
Yep that should do it. You can hide what you need via css here, no javascript required for you case. http://files.b1.jcink.com/html/emoticons/smile.gif

signature
email: admin@jcink.com :: blog: John C.
#
Yes, that indeed worked. Thank you.
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feature Requests | Next Newest »

Options Add ReplyNew TopicNew Poll