vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   can i show Today's date (09-10-2011) in my widget? would this work? code attached!!!! (https://vborg.vbsupport.ru/showthread.php?t=270034)

benative 09-10-2011 01:54 PM

can i show Today's date (09-10-2011) in my widget? would this work? code attached!!!!
 
PHP Code:

<?php 

$thedate 
date("F d, Y"); 
/*(March 25, 2002)*/ 

mail("EMAIL REMOVED""Your Subject"
Name: 
$name\n 
Date: 
$thedate\n 
Message: 
$message\n""From: $Email\nReply-To: $Email\n"); 

echo 
"The mail was sent."

?>


HMBeaty 09-10-2011 01:59 PM

http://us.php.net/manual/en/function.date.php

PHP Code:

<?php 

$thedate 
date("m-d-Y"); 
/*(March 25, 2002)*/ 

mail("EMAIL REMOVED""Your Subject"
Name: 
$name\n 
Date: 
$thedate\n 
Message: 
$message\n""From: $Email\nReply-To: $Email\n"); 

echo 
"The mail was sent."

?>


benative 09-10-2011 02:24 PM

I looked at that page but still don't know how to generate today's date. could you please teach me more?

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

i think you are talking about this section right?
can I create a bbcode out of it?
for example I just put replace date with {param}
and create a bbcode then wrap that "date" like [whatever]date[/whatever] would show the date right?
PHP Code:

  <?php
// Assuming today is March 10th, 2001, 5:16:18 pm, and that we are in the
// Mountain Standard Time (MST) Time Zone

$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');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$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 17:16:18 MST 2001
$today date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month
$today date("H:i:s");                         // 17:16:18
?>



All times are GMT. The time now is 10:54 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.00937 seconds
  • Memory Usage 1,731KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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