vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Date stamp? (https://vborg.vbsupport.ru/showthread.php?t=98482)

Christine 10-15-2005 04:46 PM

Date stamp?
 
I have figured out the hooks I need to write a datestamp to the database when a signature is submitted, but the date is writing as 0.

Anyone know what the problem may be?


Hook: userdata_start
PHP Code:

$this->validfields['sigdateline'] = array(TYPE_UNIXTIMEREQ_NO); 

Hook: profile_updatesignature_complete
PHP Code:

$vbulletin->input->clean_gpc('p''sigdateline'TYPE_UNIXTIME); 

$userdata->usertextfield['sigdateline']= " . TIMENOW . "


Andreas 10-16-2005 08:02 PM

sigdateline is in which table usertextfield?

Then you need another Plugin

userdata_doset
PHP Code:

if ($fieldname == 'sigdateline')
{
$tables = array('usertextfield');


Also, you should use $userdata->set('sigdateline', TIMENOW); rather tan directly setting the table fields :)

Christine 10-17-2005 10:48 AM

Thanks Kirby!

I didn't see this post before trying something else:
PHP Code:

$userdata->usertextfield['sigdateline']=TIMENOW

That worked with the original userdata_start addition.

Will that be OK, or is there a potential problem with it?

Andreas 10-17-2005 11:14 AM

It will work, but by using this code you are effectively bypassing the Datamanager, therefore it is not recommended.

Christine 10-17-2005 12:31 PM

Gotcha!

Thanks Kirby. Don't know what we would do without you. :)


All times are GMT. The time now is 07:26 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.01130 seconds
  • Memory Usage 1,719KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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