We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Different section ordering for a particular forum
Topic Started: Nov 22 2011, 03:35 PM (460 Views)
Iben TS
Member Avatar
Member
[ * ]
Board Address: http://s4.zetaboards.com/The_Showroom/index/
Board Software: Zetaboards
Description: Currently we have a section with a lot of subforums. Like this. TBH, it looks really messy and it's very irritating. :doh:
What we would like is the option to change it to two collums. More like this. It would be much less messy. Preferably with the option to decide
which section should be in which collum. For us it would be only important to see the link to the topic with the latest post. The other things, like amount of topics and replies are not necessary and if you would want
to delete those to get extra space we would even be more happy ! XD

Thanks in advance !
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I did this for Planet Nexus and the coding can get a little redundant, but it's certainly possible. Please approve my account so I can see this forum and put together the proper code to make this possible.
Offline Profile Goto Top
 
Iben TS
Member Avatar
Member
[ * ]
I approved your account. Thanks Cory, you're awesome !
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
After playing with it, I figured out how to make it less redundant. This is the result it gave me with Firebug, hopefully it'll give you the same result.

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
if (location.href.indexOf('/forum/3832394') !== -1) {
$("tr.c_info, tr:has(td.c_subforum)").remove();
$("td.c_forum, td.c_mark").attr("rowspan", "1");
$("td.c_forum").css("width", "49%");

$('tr[id*="forum"]:odd').each(function () {
$(this).children().appendTo($(this).next('tr[id*="forum"]'));
});

$('tr').each(function () { if ($(this).children().length < 1) $(this).remove(); });

$('tr[id*="forum"]').after('<tr class="c_last-tr"></tr>').find('td.c_last').attr('colspan', '2');

$('td.c_last').each(function () {
$(this).appendTo($(this).parent().next());
});

$('td.c_forum:odd, td.c_last:odd').after('<td style="background: none; border: 0; padding: 5px"></td>');

$('tr.c_last-tr:not(:last)').after('<tr><td colspan="5" style="background: none; border: 0; padding: 5px"></td></tr>');
}
</script>
Offline Profile Goto Top
 
Iben TS
Member Avatar
Member
[ * ]
Fantastic, thanks mate ! This isn't the first time you really helped me out, I can't believe how much I have to thank you !


There's only one thing though. It's a section to which we often add new subforums , like we did today. Now we have 22 in total, but there's 12 subforums on the left and only 10 on the right. Could you explain me
how I can edit this in the future as well ? So I don't have to ask you ... :giggle:
Edited by Iben TS, Nov 23 2011, 08:56 AM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
if (location.href.indexOf('/forum/3832394') !== -1) {
$("tr.c_info, tr:has(td.c_subforum)").remove();
$("td.c_forum, td.c_mark").attr("rowspan", "1");
$("td.c_forum").css("width", "49%");

$('tr[id*="forum"]:odd').each(function () {
$(this).children().appendTo($(this).prev('tr[id*="forum"]'));
});

$('tr').each(function () { if ($(this).children().length < 1) $(this).remove(); });

$('tr[id*="forum"]').after('<tr class="c_last-tr"></tr>').find('td.c_last').attr('colspan', '2');

$('td.c_last').each(function () {
$(this).appendTo($(this).parent().next());
});

$('td.c_forum:even, td.c_last:even').after('<td style="background: none; border: 0; padding: 5px"></td>');

$('tr.c_last-tr:not(:last)').after('<tr><td colspan="5" style="background: none; border: 0; padding: 5px"></td></tr>');
}
</script>
Try that instead to fix it.

No editing is really required unless you want to make it affect the whole board or different subforums.
Offline Profile Goto Top
 
Iben TS
Member Avatar
Member
[ * ]
Thanks mate, you're awesome !
Offline Profile Goto Top
 
lightfire
Member Avatar
littlegraycloud
[ *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic