vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Thread Creation Date - Enhanced Version (https://vborg.vbsupport.ru/showthread.php?t=68878)

Ocean 08-29-2004 10:00 PM

Thread Creation Date - Enhanced Version
 
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.

Polo 08-30-2004 08:30 PM

how many queries does this hack adds to a board?

Ocean 08-30-2004 08:43 PM

Quote:

Originally Posted by Polo

how many queries does this hack adds to a board?

Zero!

How's that? :)

Polo 08-30-2004 08:47 PM

Quote:

Originally Posted by Ocean
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

Quote:

Originally Posted by sblum

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

Quote:

Originally Posted by sblum

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

Quote:

Originally Posted by btappan

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

Quote:

Originally Posted by btappan

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:


PHP Code:

 
'sortby' => 'lastpost'


2. Change it to this:


PHP Code:

 
'sortby' => 'threadstart'


3. Now, Find:


PHP Code:

 
$sortby 
'lastpost'


4. And change that to this:


PHP Code:

 
$sortby 
'threadstart'



That should do it! :)

btappan 09-01-2004 11:11 PM

still having problems

https://vborg.vbsupport.ru/showthrea...d=1#post548909

Ocean 09-02-2004 03:22 AM

Quote:

Originally Posted by btappan

Try this, and see if it does the trick for the "New Posts" link:


In the "Search.php" file, Find:

PHP Code:

 
ORDER BY lastpost DESC 


Replace it with this:


PHP Code:

 
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

Quote:

Originally Posted by btappan

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

Quote:

Originally Posted by btappan
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

Quote:

Originally Posted by nelto

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

Quote:

Originally Posted by nelto

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

Quote:

Originally Posted by nelto

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:


Code:


<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>


Below, Add:


Code:


<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

Quote:

Originally Posted by Ber|Art

Very nice hack Thx! :)

You're welcome! I'm glad you like it. :)

hexonxonx 10-18-2004 08:44 AM

Quote:

Originally Posted by Ocean
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

Quote:

Originally Posted by hexonxonx

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

Quote:

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

Quote:

Originally Posted by Ber|Art

@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

Quote:

Originally Posted by Ber|Art

OK, solved Thanks a lot for your lighting speed HELP :)

You're welcome! :)

hexonxonx 10-18-2004 04:03 PM

Quote:

Originally Posted by hexonxonx
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

Quote:

Originally Posted by hexonxonx

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

Quote:

Originally Posted by Ocean
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

Quote:

Originally Posted by hexonxonx

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:


Code:


 
5. Open the "SUBSCRIBE" template and Find:
**********
 
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;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&amp;order=asc&amp;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

Quote:

Originally Posted by Ocean
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:


Code:


 
5. Open the "SUBSCRIBE" template and Find:
**********
 
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;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&amp;order=asc&amp;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


All times are GMT. The time now is 04:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01372 seconds
  • Memory Usage 1,860KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete