The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Detailed Datestamp Display Option AND Timestamp on posts for VB4.2
I found this thread that answered the question of "is it possible"
https://www.vbulletin.com/forum/show...display+option But that thread is outdated. I wish to be able to have each post display the detailed info (23 minutes ago, 3 days ago, 2 weeks ago, etc) AND the "normal" date/time stamp on each post. I like the former function, but when you get past 7 days everything is lumped into "1 week ago" etc and I hate that. Hybrid/dual functionality is what I want and you can't have both without making a plugin. I know there is probably a solution out there, can someone point me to it? Thanks |
#2
|
|||
|
|||
The link you posted doesn't work, and I'm not sure I understand. Are you looking for a way to do it without using a plugin, or do you need the plugin updated for vb4?
|
#3
|
|||
|
|||
Sorry try it now.
This thread describes exactly what I want to do - be able to have posts display both the "detailed" and "normal" time stamp at the same time. |
#4
|
|||
|
|||
OK, if you create a plugin using hook postbit_display_complete and code like this:
Code:
$this->post['postdate_normal'] = vbdate($this->registry->options['dateformat'], $this->post['dateline']); Then you can use {vb:raw post.postdate_normal} and it will always be the "actual" (normal) date. As you can probably see by looking at the existing template, {vb:raw post.postdate} will be the "detailed" date (if you have that set in the options), and {vb:raw post.posttime} will contain the time. |
#5
|
|||
|
|||
Thanks. You are talking to a complete newbie to vBulletin though so I will try to see if I can get this figured out...but be prepared for stupid questions!!!
--------------- Added [DATE]1354253981[/DATE] at [TIME]1354253981[/TIME] --------------- Alright. I tried it and it did not work. I went to Plugins & Products -> Add New Plugin Product: vBulletin Hook Location: postbit_display_complete Execution order: 5 (default, did not change) Code: as stated Pluging Active: yes Save and reload clicked No change on forum. i went into Setting -> Options -> Date and Time and toggled back and forth between 'normal' and 'detailed' and it just works as if the plugin is not there, so what was that plugin supposed to do or what am I missing? |
#6
|
|||
|
|||
The plugin just makes the "normal" date available even if you have "detailed" selected. To see any change you need to edit your postbit or postbit_template and insert {vb:raw post.postdate_normal} where you want the normal date to appear.
So if you're using postbit_legacy (post info on the left side) then you could edit that template and find this section: Code:
<vb:else /> <span class="date">{vb:raw post.postdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw post.posttime}</span></vb:if></span> </vb:if> Code:
<vb:else /> <span class="date">{vb:raw post.postdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw post.posttime}</span><vb:else /><vb:if condition="isset($post[postdate_normal])"><vb:if condition="$post[postdate_normal] !== $post[postdate]"> {vb:raw post.postdate_normal}</vb:if>, <span class="time">{vb:raw post.posttime}</span></vb:if></vb:if></span> </vb:if> |
#7
|
|||
|
|||
Sweet, I think that worked!!
I replaced that code section, turned the plugin on, and set the date/time to detailed and they both show up! One odd thing I did notice is that the detailed stamp disappears off all posts that 2 weeks or older, and just the normal date/time stamp shows up. Odd. |
#8
|
|||
|
|||
The function that does the yesterday, one week ago, etc, seems to only go to 5 weeks, then it just displays the normal date. If you're seeing a cutoff of 2 weeks, I can't explain that. Are you sure it's 2 weeks?
|
#9
|
|||
|
|||
Oh I know why. I installed the forum and started some posts under moderator forums to test things out, then made the site live to the public just over a week ago. So there are no posts that are equal to or greater than 2 weeks old, except for a handful of threads that are greater than 5 weeks old. So the 5+ wk old thread just show the time/date. Of note, the "detailed" datestamp function for posts over 5 weeks old defaults to only the date, and leaves off the time of the post. I don't like that function either, this fix solves that as well
Thanks so very much!!! |
#10
|
|||
|
|||
Yeah, I changed that on purpose because otherwise the time just "disappeared" when the date was 5 weeks old, and it looked strange. The default code didn't display the time at all if you had "detailed" selected, which seemed odd.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|