PDA

View Full Version : Thread start date on forum display


Scribbller
01-03-2007, 05:37 AM
I cant seem to get the thread start date on forum display page, I asked this question over at vbulletin.com but didnt have any luck, can anyone tell me what is the variable which will display the thread start date/time on forum display page.

Here is the link to my thread on vbulletin.com
http://www.vbulletin.com/forum/showthread.php?t=213973

The Geek
01-03-2007, 02:37 PM
You would need to create a hook that would do something along the lines of:

$thread['startdate'] = vbdate($thread['dateline']);

Cant remember off my head if vbdate requires another argument or not.

HTHs

ragtek
01-03-2007, 08:39 PM
i'd made it so:
hook: threadbit_process
code:
if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threadtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
and than use thread[threaddate] and thread[threadtime] in the template

Mad_Griffith
08-19-2008, 08:06 AM
and if you wish to customize the dateformat (though leaving the generic one used in the forums as it is)?

Morgan
08-19-2008, 04:40 PM
Replace $vbulletin->options['dateformat'] and $vbulletin->options['timeformat'] with whatever format you want. Please see http://www.php.net/date for possibilities.

Mad_Griffith
08-19-2008, 05:35 PM
I tried, but was unsuccessful. Can you make a real example please?

uh, and, Morgan, can you please help with this (http://www.thevbgeek.com/showpost.php?p=18909&postcount=306) too? Is it possible to get the forum name shown with each thread listed in the CMPS block?

I already asked on the official topic (http://www.thevbgeek.com/showthread.php?t=1439&page=44), but I'm not confident in anyone's answering...

Morgan
08-21-2008, 10:46 PM
Example number four on this (http://www.php.net/date) page has a number of examples:

$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day z '); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day.
$today = date("D M j G:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month
$today = date("H:i:s"); // 17:16:17

You replace $vbulletin->options['dateformat'] and $vbulletin->options['timeformat'] with "whatever" you want, i.e., "H:i:s" or "whatever" you want. Note that $vbulletin->options['dateformat'] is for day of week and $vbulletin->options['timeformat'] is for time of day, so replace each with "whatever" you want for day of week and time of day, respectively.

As for the vBa CMPS GARS block, it is dated, being made for vB 3.5, probably for vBa CMPS 2.x, and as much of a pain that it poses, the only thing I can suggest is to read through the thread and see if someone posted a solution.