vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Is there a add on or template for - date for posting a thread (https://vborg.vbsupport.ru/showthread.php?t=255306)

lille L 12-16-2010 04:53 AM

Is there a add on or template for - date for posting a thread
 
1 Attachment(s)
Yes, my header asks the question.
Is there a add on or template, which fix me a date for posting?

In vb only the date for the last post is showing, I need the info to incl date for original posting.
Today it shows nick, header, and date for last post.

In case some wonder, I mean new post, lastest post lists.
In the bolk at the left side.. (see pic) its only showing header, with the nick underneath.
I wonder if its possible to get the date for posting, at the side of the nick. Just like the bolk at the right, has both date and nick.

BirdOPrey5 12-17-2010 02:22 AM

1 Attachment(s)
This can be done but you need two plugins and a template edit.

First go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vbulletin
Hook Location: threadbit_display
Title: make threadbit dates
Execution Order: 5
code:
PHP Code:

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']);
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);

$thread['postdatex'] = $thread['fdate'] .' '$thread['ftime']; 

Set Active to YES

Save The Plugin

Now Add Another Plugin:

Product: vbulletin
Hook Location: search_results_threadbit
Title: make search dates
Execution Order: 5
PHP Code:

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']); 
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']); 

$thread['postdatex'] = $thread['fdate'] .' '$thread['ftime']; 

Set Active to YES

Save The Plugin

Now edit your threadbit template-
I suggest the following but you can put the date anywhere you want.

Find the code:
Code:

<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]', '_self')">$thread[postusername]</span>
Right after it add:
Code:

  - $thread[postdatex]
You can thank Lynne for the plugin code, it was from her mod here.

You'll get something like the attached image (without the "ZZ" I forgot to delete that from my code...)

lille L 12-17-2010 06:37 AM

Oh fantastic !!!! Your are the best ! Thank you, works perfect!



--------------- Added [DATE]1292578307[/DATE] at [TIME]1292578307[/TIME] ---------------

Oh... now I see a bug..

the datestamp shows and works perfect. But it dosent show the original thread postdate. But as the same as in the other bolk. The last post date :)

lille L 12-17-2010 09:11 AM

1 Attachment(s)
As this :)

the wired thing is that the datestamp is correct in CP sub list and inside the forums.
Its only the new post and todays post lists it dosent show correct...

BirdOPrey5 12-17-2010 11:17 AM

Whoopsie... I forgot all about the search results...

OK, no problem... we need to do a couple things...

First in the plugin you already have we need to change $thread['postdate'] to $thread['postdatex']

Next in the template edit you need to change $thread[postdate] to $thread[postdatex].

Finally we have to add 1 more plugin...

go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vbulletin
Hook Location: search_results_threadbit
Title: make search dates
Execution Order: 5
PHP Code:

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']); 
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']); 

$thread['postdatex'] = $thread['fdate'] .' '$thread['ftime']; 

Set Active to YES

Save The Plugin

You should now get the correct dates in both the forums and search results.(Which includes Today's Posts and New Posts). :)

--------------- Added [DATE]1292592135[/DATE] at [TIME]1292592135[/TIME] ---------------

Note: I have updated the original instructions so anyone searching for this later can simply follow the complete instructions in my earlier post, (post #2).

lille L 12-17-2010 11:34 AM

eh.. thanks... :)
But now is all my threads gone???? All content in the forum :)

lille L 12-17-2010 11:36 AM

1 Attachment(s)
But as you see... its three sites of content... supposed to be.. :p

lille L 12-17-2010 11:40 AM

Ah... its working :)

I need to keep the postdate in both plugins... and the template. Then its all working :D
postadatex removed all the headliners ? :)

No its perfect everywhere! THANK you so much !


All times are GMT. The time now is 09:15 AM.

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.01546 seconds
  • Memory Usage 1,744KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete