vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Thread Time Variables (https://vborg.vbsupport.ru/showthread.php?t=22578)

ShadowTech 07-11-2001 11:05 PM

I have tried searching this forum for the answer.. but have come up empty.. so I am sorry if this has already been asked.

I am trying to get the date and time to show under the "Thread Starter" column in the threads listing.. but I cannot figure out the right variable to display the thread creation date and the creation time. Would this be pulled from the original post in the thread or what?

I have tried looking thru all the vB templates and cannot seem to find anything like $thread[postdate] $thread[posttime] .. I hope someone understands what I am trying to do and can help me.

Thanks.

fury 09-22-2001 08:58 AM

I'd like to know this too.

Admin 09-22-2001 09:07 AM

In forumdisplay.php add this code:
PHP Code:

      $thread[startdate]=vbdate($dateformat,$thread[dateline]);
      
$thread[starttime]=vbdate($timeformat,$thread[dateline]); 

right before
PHP Code:

      $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
      
$thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]); 

Now you should be able to use $thread[startdate] and $thread[starttime] in the templates.

fury 09-22-2001 08:38 PM

There are two instances of the code you said to find. Add before both instances?

fury 09-22-2001 08:52 PM

Nevermind, I added it before both instances and it works great

Thanks :)

Admin 09-23-2001 09:07 AM

Sorry about that. :o One is for the open threads, and the second is for the closed.

hacker 10-03-2001 12:54 PM

Quote:

Originally posted by FireFly
In forumdisplay.php add this code:
PHP Code:

      $thread[startdate]=vbdate($dateformat,$thread[dateline]);
      
$thread[starttime]=vbdate($timeformat,$thread[dateline]); 

right before
PHP Code:

      $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
      
$thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]); 

Now you should be able to use $thread[startdate] and $thread[starttime] in the templates.

Could you show me which template and where to place the code?

Admin 10-03-2001 12:59 PM

In the forumdisplaybit template, or any of the templates used inside it.

ShadowTech 03-20-2002 09:37 AM

hate to bring this back up.. but this doesn't appear to work on 2.2.4 .. what would need changed in order for it to work on the new build?

Muellmann 08-19-2006 01:26 PM

I tried all but cannot make it. I have 3.60. I found in the forumdisplay.php not this code mentioned above. Maybe any other File is needed to be edited with 3.60? Any Help would be much appreciated!

Snatch 08-21-2006 07:22 AM

1 Attachment(s)
First, jo must creat a new "Plugin"

Plugin Attitudes:
Produkt - vBulletin
(Hook) - threadbit_process
Titel - your choise
PHP-Code:
PHP Code:

if ($thread['dateline'])
{
    
$thread['creationdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], true);
    
$thread['creationtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
else
{
    
$thread['creationdate'] = '';
    
$thread['creationtime'] = '';


Than save the Plugin.

Now search in template "threadbit":
Code:

<if condition="$show['guestuser']">
                                $thread[postusername]
                        <else />

Below add:
Code:

<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]', '_self')">Von $thread[postusername] : $thread[creationdate] um $thread[creationtime] Uhr</span>
                        </if>
                </div>

GreeTz
Snatch

chetcarson 08-30-2006 03:26 PM

Snatch thats great.

Big Thanks!

Using 3.6.0

I added the plugin as you indicated, however in the threadbit template I found this code already exists:

Code:

<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]', '_self')">$thread[postusername]</span>
Adding $thread[creationdate] and $thread[creationtime] after the closing span is all that was needed there.

It looks like this:

Code:

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


All times are GMT. The time now is 08:04 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.01220 seconds
  • Memory Usage 1,754KB
  • 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
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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