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
Topic Start Date in Forum Listings
Topic Started: Jul 16 2012, 08:05 PM (1,451 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
 
tobeme
Member Avatar
Member
[ *  * ]
Thanks a lot Cory!

Offline Profile Quote Post Goto Top
 
Annaxas
Member Avatar
Member
[ * ]
Thanks a lot for another great Code
Offline Profile Quote Post Goto Top
 
tobeme
Member Avatar
Member
[ *  * ]
Cory

There is a little problem with the codes. If a thread has more than 1 page, the date won't show.

Please see attachment.

Thanks
Attached to this post:
Attachments: Screen_Shot_2012_07_17_at___8.15.25.png (62.16 KB)
Edited by tobeme, Jul 17 2012, 08:17 AM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code updated to fix that issue.
Offline Profile Quote Post Goto Top
 
Geoffrey
Member Avatar
bury hatchets, keep maps
[ *  *  *  *  * ]
That's very neat. Though, could a second version be made to put the start date below the topic title (and description is there is one) instead off adding a new column?
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Simple enough:
Code:
 
<script type="text/javascript">
$('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_cat-title').append(title);
});
</script>
Offline Profile Quote Post Goto Top
 
tobeme
Member Avatar
Member
[ *  * ]
Awesome! I prefer the second codes. Thanks so much Cory.
Offline Profile Quote Post Goto Top
 
SandyC (PM)
Member Avatar
Member
[ *  *  *  * ]
I'm going to be dumb here and ask if it's either or, and if the second goes below the board, I'm assuming it does..
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Depending on which version you wish to use, either code will go in the Below the Board wrapper.
Offline Profile Quote Post Goto Top
 
Nemomon-ZNR
Member Avatar
What can a God broken by humans do?
[ *  *  *  * ]
There is an error with the second code. It is attached to this post.

In fact I am using a code that links the forum name with its URL, so maybe it is causing this. As You see on the image my Forum column isn't linking to forums anymore (but this is probably because a start date is appended to it.).
Attached to this post:
Attachments: Error.png (43.88 KB)
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
$('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:first > a').attr('title');
$(this).find('td.c_cat-title:first').append(title);
});
</script>
That should fix it.
Offline Profile Quote Post Goto Top
 
Nemomon-ZNR
Member Avatar
What can a God broken by humans do?
[ *  *  *  * ]
Yep, it is fixed.
Offline Profile Quote Post Goto Top
 
Harvyy
Member Avatar
Member
[ *  *  * ]
I'm having this problem with your code on my themes: http://image.prntscr.com/image/9c369d0b4cb34741935ab84bd9d846ab.png

The section viewing list does not stretch out with the column.

Any way to fix this?
Edited by Harvyy, Aug 16 2016, 05:33 PM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Can I see a link to your board? Via PM will be fine if you want to keep it private.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1