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:
Add Reply
  • Pages:
  • 1
  • 2
Topic Start Date in Forum Listings
Topic Started: Jul 16 2012, 08:05 PM (1,450 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Topic Start Date in Forum Listings

What the code does: By default, this information is visible by hovering over the topic title, this will make the information readily available via table cell:

Preview

How to use the code: No editing is required, install code as instructed.

How to install the code:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('th.c_cat-starter').after('<th class="c_start-date" style="text-align: center">Topic Start Date</th>');
$('table.posts:not(#announcement_list) td.c_cat-starter, #search_results_topics + table.forums td.c_cat-starter').after('<td class="c_start-date" style="text-align: center"></td>');
$('table.posts td[colspan="7"], table.posts th[colspan="7"]').attr('colspan', '8');
$('table.posts th[colspan="6"]').attr('colspan', '7');

$('table.posts:not(#announcement_list) tr[class*="row"], #search_results_topics + table.forums tr[class*="row"]').each(function () {
var title = $(this).find('td.c_cat-title > a').attr('title');
$(this).find('td.c_start-date').html(title);
var newTitle = $(this).find('td.c_start-date').html().replace('Start Date ', '');
$(this).find('td.c_start-date').html(newTitle)
});
//]]>
</script>
Edited by Cory, Oct 30 2016, 12:22 AM.
Offline Profile Quote Post Goto Top
 
Replies:
RichardInTN
Member Avatar
I believe in I.D.I.C.
[ *  *  * ]
Awesome code!!

Edited to Add:
I'm planning on using the second one. Is there a way to force the date information to be on it's own line?

In my "Test Kitchen" with only that code running, it put the date info on the second line... but on my actual board, it appends the date to the end of the Thread Title line. (I have removed it from my actual board for now, and copied all my codes over to my Test Kitchen.)

You still have Admin access to my Test Kitchen if you need it.
Edited by RichardInTN, Aug 19 2016, 11:32 PM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Harvyy: Find this:
Code:
 
$('#forum_footer tr:has(td.c_view)').prependTo('table.posts > tbody');
Add this below it:
Code:
 
$('table.posts td.c_view').attr('colspan', '7');
RichardInTN: Change this:
Code:
 
$(this).find('td.c_cat-title').append(title);
To this:
Code:
 
$(this).find('td.c_cat-title').append('<br />' + title);
Offline Profile Quote Post Goto Top
 
Harvyy
Member Avatar
Member
[ *  *  * ]
Cory
Aug 21 2016, 10:27 AM
Harvyy: Find this:
Code:
 
$('#forum_footer tr:has(td.c_view)').prependTo('table.posts > tbody');
Add this below it:
Code:
 
$('table.posts td.c_view').attr('colspan', '7');


I use the ctrl + f to search for that line but it cannot find it.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It would be in the Board Template or Theme Layout.
Offline Profile Quote Post Goto Top
 
Harvyy
Member Avatar
Member
[ *  *  * ]
It works thanks
Edited by Harvyy, Aug 23 2016, 04:49 PM.
Offline Profile Quote Post Goto Top
 
RichardInTN
Member Avatar
I believe in I.D.I.C.
[ *  *  * ]
That got me working Cory... You sir, are a Master.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 2