vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   reading the vbulletin dateline ? (https://vborg.vbsupport.ru/showthread.php?t=204584)

Vaupell 02-07-2009 08:19 PM

reading the vbulletin dateline ?
 
When importing the dataline from post
i have no clue how to read it..

made a test post on my dev board and the dev line came up like this

1234043899

hehe dosent make sense to me, can someone help me out "converting"
this to a human date/time

im guessing its the timestamp of some sort, or is it a ID reference to another
timestamp in the db somewhere ? ;)

Lynne 02-07-2009 08:26 PM

See this - https://vborg.vbsupport.ru/showthrea...light=joindate

Vaupell 02-07-2009 09:00 PM

hmmm help me out a little im a little retard when it comes to this :P

anyway tryed this
PHP Code:


$content 
$db->........ get content from "post" where user search matches..

while (
$data $vbulletin->db->fetch_array($content))
{
$postinfo['date'] = vbdate($this->registry->options['dateformat'],$data['dateline']);            
$postinfo['time'] = vbdate($this->registry->options['timeformat'],$data['dateline']);
$postdateline $postinfo['date'] .' '$postinfo['time']; 
print_cells_row(array("$data[username]""$userdataline", ......etc.......)


but im just getting a error =
Fatal error: Using $this when not in object context in (linkto error file...)

hmm need it to run each time i print a new row.
and update content from each dateline.


EDIT gonna try replaceing $this with $db

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

HAHA IT WORKED..

TX again lynne.. your my #1 favorite in here.

Dismounted 02-09-2009 05:16 AM

As you have discovered, the $this keyword only exists when you are inside an object. You should be replacing $this->registry with $vbulletin.


All times are GMT. The time now is 02:34 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.02139 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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