The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Display threads creation date Details »» | |||||||||||||||||||||||||
Display thread's creation date
Total hack's description : http://www.vbulletindev.net/forums/h...hack&hackid=69 Please click if you like this hack I've created this hack, and I saw then that it was already done here, but with my hack, you can display the date from the searcH.php and it adds a new column :nervous: With this small hack, you'll add the thread's creation date in the forumdisplay (and search results) Show Your Support
|
Comments |
#12
|
|||
|
|||
Hi! Quick question...
I want to have the Creation Date column come AFTER the "Last Post" column, not before. How do I do this? |
#13
|
|||
|
|||
Quote:
But now, I have one other question - the "Date of Creation" column that's added is the only column you can't sort by. What do I have to change in order to make this column sortable? |
#14
|
|||
|
|||
How about adding this to the "Similar Threads" feature? Also, does this work with 3.01?
|
#15
|
|||
|
|||
Would be great if you can sort from oldest to newest or newest to oldest
|
#16
|
||||
|
||||
Nice one, although I wrote that myself about half a year ago (with ability to sort by thread creation date)
Adding sorting should be fairly straightforward: In Template FORUMDISPLAY REPLACE Code:
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[date_creation]</a></span></td> Code:
<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> In forumdisplay.php FIND PHP Code:
PHP Code:
|
#17
|
||||
|
||||
vBDev, with vBulletin 3.0.3, some of the code has changed - especially in the ThreadBit Template.
Is there any chance you can update this hack for vB 3.0.3? Thanks! |
#18
|
|||
|
|||
Works fine @ 3.0.3
What changes in threadbit do you mean? There are no changes in threadbit. :surprised: |
#19
|
||||
|
||||
Quote:
The threadbit has changed with 3.0.2. In order to make sure that there are no conflicts/problems, I was hoping that the hack code could be brought up to date. |
#20
|
||||
|
||||
There are a number of issues that need to be dealt with, for this hack.
1. The "Threadbit" template has changed between 3.0.0 and 3.0.3, but VBDev has not yet updated his code to reflect that. 2. This hack does not support the Subscribed Threads section in your UserCP. 3. This hack causes problems with the Subscribed Threads section of the UserCP. An additional empty column is created, where the Thread Creation Date should have been - if it were supported - but that throws off the synchronization between column headers and data. Since VBDev no longer seems to be responding to this Thread, nor is he responding on his home forum, I've updated this hack to correct the issues listed above, and to add support for Thread Subscriptions - if anyone is interested. I've listed it as a Revised Version 1.2. Use it if you like. If you want to use it, however, and you've already installed the original 1.0 version - I suggest that you replace the end section of the "Threadbit" template with the Default code before applying that portion of my revision. I made my instructions so that they interfered as little as possible with the original code. Personally, I dislike hacks that say "find this entire huge section, and *replace* it with this one", when they could have just specified the few lines that needed to be changed. If you guys use this revised version, let me know if it works well for you. Version 1.3 Update I took KirbyDE's code suggestions and integrated/modified them. Now, you can sort by Creation Date in both ForumDisplay, as well as Subscribed Threads. Version 1.31 Update I added the Sort by Creation Date option to the ForumDisplay "Display Options" menu. Upgrade Instructions: Upgrade from v1.2 to 1.3: 1. Open the ForumDisplay Template and Find: Code:
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[date_creation]</a></span></td> 2. Replace the above code with: Code:
<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> 3. Repeat steps 1 and 2 for the SUBSCRIBE Template. 4. Open the ForumDisplay.php file and Find: Code:
case 'postusername': $sqlsortfield = $sortfield; break; 5. Below, Add: Code:
case 'threadstarted': $sqlsortfield = 'thread.dateline'; break; 6. Repeat steps 4 and 5 for Subscription.php Upgrade from v1.3 to 1.31: In the ForumDisplay Template, Find: Code:
<option value="lastpost" $sort[lastpost]>$vbphrase[last_post_time]</option> Below, Add: Code:
<option value="threadstarted" $sort[threadstarted]>$vbphrase[date_creation]</option> And you're done! |
#21
|
|||
|
|||
Hi,
Everything looking good, I hit a snag right at the start: Quote:
-snake |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|