View Full Version : Thread Creation Date - Enhanced Version
Ocean
08-29-2004, 10:00 PM
Thread Creation Date - Enhanced Version v1.3.5
Version: 1.3.5
vB Version: 3.0.4
Developer: Ocean
Install Difficulty: Moderate
Description:
This hack will add a new sortable column to your ForumDisplay, as well as the UserCP for Subscribed Threads, that will show the Date of Creation of each of your threads. In addition, you can also sort by Creation Date via the Display Options of ForumDisplay.
Release History:
Version 1.3.5 Notes:
Fixed the column span issue for Searches
Version 1.3.4 Notes:
Fixed the column span issue for Thread Redirects
Version 1.3.3 Notes:
Fixed the column span issue for Announcements and Soft Deleted Threads
Version 1.32 Notes:
Minor changes to code being searched for (Updating for most recent version of vB). If you successfully installed 1.31, you don't need to worry about 1.32.
Version 1.31 Notes:
I have added the sort by Creation Date option for the Display Options of ForumDisplay
Version 1.3 Notes:
I have added the ability to sort by Creation Date for both ForumDisplay, as well as Subscribed Threads. (Thanks, KirbyDE for your help with this!)
Version 1.2 Notes:
This hack was originally released by VBDev. There were a number of issues, however, that needed to be dealt with. As VBDev was no longer responding to his Thread on vBulletin.org, nor was he responding on his home forum, I updated this hack to correct the following issues:
1. The "Threadbit" template had changed between 3.0.0 and 3.0.3.
2. The original version of this hack did not support the Subscribed Threads section in your UserCP.
3. The original version of this hack caused problems with the Subscribed Threads section of the UserCP. An additional empty column was created, where the Thread Creation Date should have been - but that threw the synchronization off between column headers and data.
how many queries does this hack adds to a board?
Ocean
08-30-2004, 08:43 PM
how many queries does this hack adds to a board?
Zero!
How's that? :)
Zero!
How's that? :)
Nice ;)
sblum
08-31-2004, 05:34 AM
I think this will also cause problems with the forumdisplay_announcement and threadbit_deleted templates - though it's just a simple colspan issue. Easily fixable.
Ocean
08-31-2004, 10:52 AM
I think this will also cause problems with the forumdisplay_announcement and threadbit_deleted templates - though it's just a simple colspan issue. Easily fixable.
Hmm. If you can show me the circumstances where these problems might come up, I can test it and make the required changes, if an issue shows itself.
sblum
09-01-2004, 01:16 AM
Unless you make changes in these templates, an announcement will not span the whole width of the table, same with a soft-deleted thread (due to the column you add here). Make an announcement on a board with this hack installed, I'm pretty sure you'll see what I mean.
Ocean
09-01-2004, 12:05 PM
Unless you make changes in these templates, an announcement will not span the whole width of the table, same with a soft-deleted thread (due to the column you add here). Make an announcement on a board with this hack installed, I'm pretty sure you'll see what I mean.
Fixed. I've updated the hack to v1.3.3.
Thanks, sblum, for the heads up! :)
btappan
09-01-2004, 02:21 PM
does this show a creation date column in the search results as well? if so, how could you make the creation date the default sort order?
Ocean
09-01-2004, 06:28 PM
does this show a creation date column in the search results as well? if so, how could you make the creation date the default sort order?
Yes, it will show the Thread Creation Date column in the Search results as well. And as for making it the default sort order - that has nothing to do with this hack directly - you would set it in vBthe same way you would for any other sort order.
For making this change on a person by person basis, in the Advanced Search window, under "Sort Results By" field, just choose "Thread Start Date" and save your search preferences.
If you wanted to make it the defautl for vB in general - I think you would have to edit the Search.php file to set that, as I don't think it's availabel as an option in the AdminCP.
btappan
09-01-2004, 06:54 PM
Ocean, thanks for the reply
thats what i was getting at. do you know how i might modify the search.php file to make the default sort by creation date?
Ocean
09-01-2004, 10:32 PM
Ocean, thanks for the reply
thats what i was getting at. do you know how i might modify the search.php file to make the default sort by creation date?
1. In the "Search.php" file, find:
'sortby' => 'lastpost',
2. Change it to this:
'sortby' => 'threadstart',
3. Now, Find:
$sortby = 'lastpost';
4. And change that to this:
$sortby = 'threadstart';
That should do it! :)
btappan
09-01-2004, 11:11 PM
still having problems
https://vborg.vbsupport.ru/showthread.php?p=548909&posted=1#post548909
Ocean
09-02-2004, 03:22 AM
still having problems
https://vborg.vbsupport.ru/showthread.php?p=548909&posted=1#post548909
Try this, and see if it does the trick for the "New Posts" link:
In the "Search.php" file, Find:
ORDER BY lastpost DESC
Replace it with this:
ORDER BY threadstart DESC
btappan
09-02-2004, 10:27 AM
I tied that as well, no luck ......theres another instance of laspost just after that as well that i tried changing to no work either.
Ocean
09-02-2004, 12:10 PM
I tied that as well, no luck ......theres another instance of laspost just after that as well that i tried changing to no work either.
Hmm. Well, rather than making you jump through more hoops - I'd say the fastest way for you to get an authoritative answer to this is to post this question in the "How Do I" forum on vBulletin.com. :)
Bad Bunny
09-03-2004, 09:20 PM
I tied that as well, no luck ......theres another instance of laspost just after that as well that i tried changing to no work either.
Does this make it possible to make the thread sort by creation date automatically?
nelto
09-04-2004, 08:04 PM
I tried to install this but I cant.
********************************
30. Now, Find:
**********
case 'postusername':
$sqlsortfield = $sortfield;
break;
********************************
That is to find on the subscription.php fiel but I cant find that in there.
Im runing VB 3.0.3
How can I do it?
Ocean
09-04-2004, 08:46 PM
I tried to install this but I cant.
********************************
30. Now, Find:
**********
case 'postusername':
$sqlsortfield = $sortfield;
break;
********************************
That is to find on the subscription.php fiel but I cant find that in there.
Im runing VB 3.0.3
How can I do it?
Be careful that you're searching the right file. vBulletin has a Subscription.php as well as a Subscriptions.php file. You want the singular version of the file, NOT the plural.
In addition, a lot of text editors have a problem doing searches that include a line break. So, try searching for just "case 'postusername':" and make sure that the instance you find is the correct one by visually matching the surrounding code to the code specified it the Instructions. :)
nelto
09-04-2004, 08:54 PM
Ah great Ocean
btw one question
How can I had a new template to the VB?
Im trying to add some other hacks that require a new template but I dont knwo hwo to find it.
I'll let you know in a bit how this hack of yours works :) (if I got it installed.)
Ocean
09-04-2004, 08:59 PM
Ah great Ocean
btw one question
How can I had a new template to the VB?
Im trying to add some other hacks that require a new template but I dont knwo hwo to find it.
I'll let you know in a bit how this hack of yours works :) (if I got it installed.)
In the AdminCP/Style Manager, to the right of the Style Name you wish to add your new Template to, go to the pulldown menu, and you will find "Add New Template". :)
nelto
09-04-2004, 09:04 PM
Tks so much I got that hack working.
As for yours (I think it is since Im trying to install so many of them) I got the column thread started working but not showing the date or time, so Im going to install this again maybe I doen something wrong.
Once again Ocean thank you very much.
Ocean
09-04-2004, 09:08 PM
Tks so much I got that hack working.
As for yours (I think it is since Im trying to install so many of them) I got the column thread started working but not showing the date or time, so Im going to install this again maybe I doen something wrong.
Once again Ocean thank you very much.
You're very welcome. :)
And as something to consider - the template changes are what will create the columns - but the PHP changes are what provide the data.
If you wanted to narrow down the possible areas that you might have mis-installed, that should help you - but if you're going to go over and redo everything, than good for you for being thorough. :)
Ocean
10-02-2004, 03:17 PM
I have just released v1.3.4 of this hack.
I corrected the missing column for Thread Redirects. :)
If anyone needs to upgrade from v1.3.3 to v1.3.4 - all you need is to follow Steps 19-20 in the v1.3.4 file.
Optionally, here are the changes:
Open the Threadbit Template, and Find:
<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>
Below, Add:
<td class="alt1" align="center">-</td>
And that's it! :)
Ber|Art
10-14-2004, 02:42 PM
Very nice hack Thx! :)
Ocean
10-14-2004, 02:53 PM
Very nice hack Thx! :)
You're welcome! I'm glad you like it. :)
hexonxonx
10-18-2004, 08:44 AM
You're welcome! I'm glad you like it. :)
I have the extra column in the subscriced threads part in the usercp. I have gone over and over everything and I can't find the problem. Can anyone help me fix this?
Ber|Art
10-18-2004, 10:22 AM
@Ocean, I PMt you with some questions :)
Ocean
10-18-2004, 11:35 AM
I have the extra column in the subscriced threads part in the usercp. I have gone over and over everything and I can't find the problem. Can anyone help me fix this?
Can you give me more details as to what is going on? Do you mean that you have the Thread Creation Date column, but no data?
Ber|Art
10-18-2004, 11:39 AM
Do you mean that you have the Thread Creation Date column, but no data?That's exactly what my problem is too :)
Ocean
10-18-2004, 11:43 AM
@Ocean, I PMt you with some questions :)
You could have just asked them here. :)
Anyway, as a quick overview - the template changes create the column itself, but the PHP file changes are what supply the data.
So, if you have the column, but no data - chances are that you made a mistake with the code changes for the PHP files. Depending on where you're seeing the problem, that will tell you which file(s) you need to look at.
For example, if it's the main forums that are not showing the data, than you need to recheck the changes to ForumDisplay.php. If the problem is with the Search results, than you need to check Search.php, and if the problem is with Subscribed Threads in the UserCP, than you should check Subscription.php.
:)
Ber|Art
10-18-2004, 12:03 PM
OK, solved Thanks a lot for your lighting speed HELP :)
Ocean
10-18-2004, 12:08 PM
OK, solved Thanks a lot for your lighting speed HELP :)
You're welcome! :)
hexonxonx
10-18-2004, 04:03 PM
I have the extra column in the subscriced threads part in the usercp. I have gone over and over everything and I can't find the problem. Can anyone help me fix this?
Here is a screen cap:
Ocean
10-18-2004, 06:07 PM
Here is a screen cap:
You gave me only a partial screencap - I can't see if the Thread Creation Date header is present or not.
However, I believe that the problem is that you did not execute all of the instructions properly in regards to the SUBSCRIBE Template. Those changes are what would affect the columns in the UserCP/Subscribed Threads page.
Double check that you have correctly implemented those code changes, and we can take it from there. :)
hexonxonx
10-19-2004, 02:48 AM
You gave me only a partial screencap - I can't see if the Thread Creation Date header is present or not.
However, I believe that the problem is that you did not execute all of the instructions properly in regards to the SUBSCRIBE Template. Those changes are what would affect the columns in the UserCP/Subscribed Threads page.
Double check that you have correctly implemented those code changes, and we can take it from there. :)
Ok, I started out with a fresh unhacked style again, and again I come up with the same as in my screen cap. The thread creation date header is not even there in the subscribed threads list in the usercp.
Ocean
10-19-2004, 03:04 AM
Ok, I started out with a fresh unhacked style again, and again I come up with the same as in my screen cap. The thread creation date header is not even there in the subscribed threads list in the usercp.
Well, the header being present is going to be affected by the Template changes as well as the Phrase that needs to be added (which I assume you did).
Make sure that you performed steps 5 and 6:
5. Open the "SUBSCRIBE" template and Find:
**********
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
********************************
6. Below, Add:
**********
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=asc&sort=threadstarted">$vbphrase[date_creation]</a> $sortarrow[threadstarted]</span></td>
I am also assuming that you are not making the mistake of viewing a style that is unaffected by the style you made these template changes to.
In addition, the fact that the data isn't showing up suggests a problem in the PHP file changes. Make sure that you made the changes to Subscription.php (singular) and NOT Subscriptions.php (plural). It's a common mistake.
If you didn't make any of the above mistakes, PM me with your email, and I'll ask you to ZIP up some files for me so that I can examine your code. :)
hexonxonx
10-19-2004, 03:13 AM
Well, the header being present is going to be affected by the Template changes as well as the Phrase that needs to be added (which I assume you did).
Make sure that you performed steps 5 and 6:
5. Open the "SUBSCRIBE" template and Find:
**********
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
********************************
6. Below, Add:
**********
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=asc&sort=threadstarted">$vbphrase[date_creation]</a> $sortarrow[threadstarted]</span></td>
I am also assuming that you are not making the mistake of viewing a style that is unaffected by the style you made these template changes to.
In addition, the fact that the data isn't showing up suggests a problem in the PHP file changes. Make sure that you made the changes to Subscription.php (singular) and NOT Subscriptions.php (plural). It's a common mistake.
If you didn't make any of the above mistakes, PM me with your email, and I'll ask you to ZIP up some files for me so that I can examine your code. :)
I have made the template changes to both the main style and the child style, both have this problem. I also used a fresh subscription.php, made the changes and reuploaded it with no effect at all. Still have the same problem.
hexonxonx
10-19-2004, 03:20 AM
I have given up on this hack. I reverted all my templates. Thanks for your time anyways.
HiDeo
10-19-2004, 03:31 AM
HI, thanks Ocean
hexonxonx
10-19-2004, 03:45 AM
I have made the template changes to both the main style and the child style, both have this problem. I also used a fresh subscription.php, made the changes and reuploaded it with no effect at all. Still have the same problem.
Just so you know, I added a newly purchased style and tried using this hack, same exact thing happened, so I am now positive that it is not because of any mistakes on my part.
Ocean
10-19-2004, 01:22 PM
Just so you know, I added a newly purchased style and tried using this hack, same exact thing happened, so I am now positive that it is not because of any mistakes on my part.
No one else has had any problems with this hack that wasn't due to a mistake on their part during installation.
If you're running vB 3.0.3, there is no reason why this hack shouldn't work. As I said earlier, I'm willing to help you troubleshoot it - but if you don't want to go through the trouble, that's your choice.
If you change your mind, let me know. :)
Lynne
10-22-2004, 12:23 AM
Installed on 3.0.3 with no problems over here. Thanks SOOO much for this!
Ocean
10-22-2004, 12:26 AM
Installed on 3.0.3 with no problems over here. Thanks SOOO much for this!
You're welcome! I'm glad you like it. :)
fcherub
11-04-2004, 07:48 PM
Hi Ocean, thank you for this :)
Just 1 question: when clicking on Creation Date at top of the column, how can I get the dates sorted "most recent first" instead of "oldest first" ?
Thanks,
Federico
Ocean
11-04-2004, 08:06 PM
Hi Ocean, thank you for this :)
Just 1 question: when clicking on Creation Date at top of the column, how can I get the dates sorted "most recent first" instead of "oldest first" ?
Thanks,
Federico
That's a standard vB interface function, Federico. Clicking "Creation Date" sets that as the active column that the table is being sorted by. However, if you wish to reverse the ascending/descending order, just click on the little arrow-button next to the active column.
:)
platnum
12-10-2004, 07:24 PM
Just want to say... Very nice job with this, looks sweet!
I have a question.. I run an auction site.. So when my users post something, they have to post the Creation date/Time in the title... Is there anyway to get it to show the creation time as well? This would help out sooooooo very much :o.
Thanks :D And very nice job with this.
Ocean
12-14-2004, 08:29 PM
Just want to say... Very nice job with this, looks sweet!
I have a question.. I run an auction site.. So when my users post something, they have to post the Creation date/Time in the title... Is there anyway to get it to show the creation time as well? This would help out sooooooo very much :o.
Thanks :D And very nice job with this.
For the purposes of a standard board - most people wouldn't want to show the time, only the date.
But I do understand your reasons for wanting that. I'll look into putting it in as an option for the next version.
Ordinarily, I would just churn it right out - but December is a busy and hectic month for many - so I can't make any promises. :)
Ocean - Grreat Hack! how do I make this user selectable in the user cp? I want memebers to be able to select this as thread display mode option. Like: Creation Date - Oldest First, Creation Date - Newest First. I recently switched to VBulletin from phpbb and this was an option our memebrs had, and it turns out, many of them used it and would like it back. Thanks for your help!
Ocean
01-03-2005, 09:21 PM
Ocean - Grreat Hack! how do I make this user selectable in the user cp? I want memebers to be able to select this as thread display mode option. Like: Creation Date - Oldest First, Creation Date - Newest First. I recently switched to VBulletin from phpbb and this was an option our memebrs had, and it turns out, many of them used it and would like it back. Thanks for your help!
Hi!
First of all, the Thread Display Mode option in the UserCP that you refer to is not for viewing a list of Threads, but for viewing the posts within a Thread.
Controlling how the list of Threads is displayed is done at the bottom of the ForumDisplay screen. Under "Sorted By", you'll see "Date of Creation" listed as one of the options. That should do what you're looking for. :)
Hi!
First of all, the Thread Display Mode option in the UserCP that you refer to is not for viewing a list of Threads, but for viewing the posts within a Thread.
Controlling how the list of Threads is displayed is done at the bottom of the ForumDisplay screen. Under "Sorted By", you'll see "Date of Creation" listed as one of the options. That should do what you're looking for. :)
Ahh, thanks for the clarification on thread display modes. I haven't actually played with that feature much.
I knew of the sort by creation date option at the bottom of forum display, but is there an easy hack to make that the default forum display for users who prefer this sort option (many of them do)? It doesn't have to be in the user CP, it could just be a check box next to the sort options that says "Make Default" or something like that. If not no worries. I'l try to do it myself (which could be rather dangerous...) :eek:
Ocean
01-04-2005, 12:15 AM
Ahh, thanks for the clarification on thread display modes. I haven't actually played with that feature much.
I knew of the sort by creation date option at the bottom of forum display, but is there an easy hack to make that the default forum display for users who prefer this sort option (many of them do)? It doesn't have to be in the user CP, it could just be a check box next to the sort options that says "Make Default" or something like that. If not no worries. I'l try to do it myself (which could be rather dangerous...) :eek:
That question is a stock vB question - so you would be best served asking that at vBulletin.com. If it's not immediately capable of doing so, they might be able to help you out with the code - if it's a simple Template change. :)
Ocean, Thanks for the quick responses! I'll look at vb.com. If I find anything I'll post it here, maybe someone else may want to add it as well.
Ocean
01-07-2005, 12:37 AM
I just updated this hack to v1.3.5. There was only a small change - which fixed a column span issue for the Search screen.
Upgrading from v1.3.4 to 1.3.5 is very easy. Just download the v1.3.5 instructions, and follow Steps 25-30. It will take you about 2 minutes. :)
yellowbird
02-10-2005, 01:44 AM
Just wondering, does this hack also work on version 3.0.6 without any additional changes? Thanks.
Ocean
02-11-2005, 08:30 PM
Just wondering, does this hack also work on version 3.0.6 without any additional changes? Thanks.
I use it on 3.0.6 without any problems. :)
yellowbird
02-12-2005, 12:39 AM
I actually don't need a whole column, I just would like to add the posted date beside the thread starter's name as below:
Title of the Thread
Username - Date Started
And the columns on the right would be as they always have been. Is there an easy way to do this?
Thanks,
Derek
Ocean
02-16-2005, 12:20 AM
I actually don't need a whole column, I just would like to add the posted date beside the thread starter's name as below:
Title of the Thread
Username - Date Started
And the columns on the right would be as they always have been. Is there an easy way to do this?
Thanks,
Derek
Are you just looking to get rid of the column for the main ForumDisplay pages?
Or from any and all pages where that Thread Creation Date column has been added? (I added it also to the Search Results and Thread Subscriptions pages)
yellowbird
02-17-2005, 01:32 AM
I'm looking to get rid of the column from all the pages. I would rather add the date after their username within the cell that contains the title of the thread on the index pages.
gigaenvy
02-27-2005, 02:01 PM
I would rather see the creation date of the thread under the thread title. So, in addition to seeing the thread title and the name of the thread starter, how about some code to insert 'posted by: MyName on [date]'?
This would be a good way instead of creating a new column. Any code for this?
Thanks!
gigaenvy
02-27-2005, 02:02 PM
I'm looking to get rid of the column from all the pages. I would rather add the date after their username within the cell that contains the title of the thread on the index pages.
Sorry I didn't read this post before making my reply. Looks like there's two of us that want this feature :)
yellowbird
03-13-2005, 09:52 PM
So... anyone?
snake-boy
04-16-2005, 04:41 PM
I have installed this in 3.0.7 and it does work, but I need a way to set this as the default sort method. I've tried a few things on my own, but as I know practically nothing about PHP, they did not work.
If you select to sort by creation date and then enter another forum, the setting just changes right back to sort by replied to date.
Since Ocean seems to have abandoned this thread, could ANYONE with some PHP skills please tell me how to force this to be the default option? I assume it's a change in forumdisplay.php and possibly the template as well? But where?
-snake
MustangLisa
06-01-2005, 01:26 AM
It worked great, but all my dates are December 31, 1969 . . . how do I fix this??
MustangLisa
06-25-2005, 04:38 PM
Everything looks good (thanks, btw) but all my dates show as December 31, 1969 -- HELP!
(Here's the forum: http://www.blackmustangclub.com/forum/forumdisplay.php?f=2)
Thanks,
Lisa.
chikkoo
08-07-2005, 08:19 AM
This is what exactly I have been searching...
Can I use this in VB 3.5.0??
Or it need to be converted?
Bates
12-21-2005, 05:12 PM
i have the same question:
Can I use this in VB 3.5.0??
Mark.B
01-07-2006, 09:10 PM
There is *definitely* a problem with a blank column in the subscribed threads block in the user cp.
I have worked round it by putting a blank column in the top bit as well to match it up, make this narrow and it at least looks tidy, even if sloppy.
The solutions posted are barking up the wrong tree...the subscription.php edits are fine, these affect the 'subscibed threads' LINK from the usercp, but the issue is with the subscribed threads BLOCK. The problem is that similar file edits need to be made in the file usercp.php as well, so that the variable $thread_dateline is available in that file. It currently is not, hence the blank column.
I don't know how to make the edits myself, but that is *definitely* the problem, so if anyone fancies having a go at fixing, several people would be grateful methinks. :D
Lynne
01-26-2006, 04:18 PM
I think this should do it:
38. Open the "usercp.php" file and Find:
**********
$thread = process_thread_array($thread, $lastread["$thread[forumid]"]);
$show['unsubscribe'] = true;
********************************
39. Below, Add:
**********
$thread_dateline = vbdate($vboptions['dateformat'], $thread['dateline']);
********************************
40. In the "USERCP" template Find:
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
********************************
41. Below, Add:
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[date_creation]</td>
madkeen
01-18-2007, 12:27 PM
Can this be used in 3.6?
JohnBee
10-31-2007, 07:13 PM
Can this be used in 3.6?
I felt lucky and ran the code through the grinder. Though I was able to squeeze the file edit past the changes. The creation date var never showed up. I suspect there have been to many changes since this MOD was written now.
I hope someone writes something else like this for 3.6.x , our community really enjoyed the added functions this MOD provided us with. :confused:
nofat.co.nz
08-02-2008, 07:50 AM
Is there anything like this for 3.7.2 :confused::confused::erm:
nofat.co.nz
08-05-2008, 02:02 AM
Some of the things you are meant to find to ad the line underneath are no longer in the 3.7 version :( - So it doesn't quite work - I managed to get up the column that says 'date of creation' but didn't manage to actually get the data to show up :( I wish the guy who figured this out in the first place still came online - but doesn't look like he's been online since 2005 :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.