vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   I want to get the current day and month of users (https://vborg.vbsupport.ru/showthread.php?t=321149)

SilverBoy 12-21-2015 06:23 PM

I want to get the current day and month of users
 
Hi

I'm looking for a function to get the current day and month for user, I think there was a built in function to do this but I don't find it by search here.

Thanks in advance.

Dragonsys 12-21-2015 06:24 PM

current day and month for user? I don't follow, do you mean you want to display the current month and day to users?

SilverBoy 12-21-2015 07:16 PM

yes, I want the current day and the current month of the user (you know there is difference regarding to the time zone)

Dragonsys 12-21-2015 07:21 PM

Like this line in the footer, with the current Month added (Month will not vary by user, unless it is right at the end/start of the month)

Quote:

All times are GMT -6. The time now is 03:20 PM.
This line uses the User's Timezone setting

CAG CheechDogg 12-21-2015 07:24 PM

Try this mod ...

https://vborg.vbsupport.ru/showthread.php?t=243379

SilverBoy 12-21-2015 07:34 PM

Quote:

Originally Posted by Dragonsys (Post 2560916)
Like this line in the footer, with the current Month added (Month will not vary by user, unless it is right at the end/start of the month)



This line uses the User's Timezone setting

I know that, but I need to get the exact day and month for the user who browse the forum in current time.
For example if there is a user browsing from USA when his watch is 2:00 pm it maybe 2 am for other user browsing from china and then they are in different days

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

thanks, but unfortunately it doesn't help, I want the date for the user who browsing the forum at anytime.
I think I'm looking for something like maketime function.

Dragonsys 12-21-2015 07:41 PM

Ok, well you can create a custom plugin and then use a template hook to place it. Where are you wanting this to appear on the page?

SilverBoy 12-21-2015 07:47 PM

Let me explain what I'm looking for exactly.
I have a quote table every day has it is unique quote, the dates stored in database in two columns 1 for day and another one for the month.
So if today is 21 December, I must see the quote for day 21 and month 12 from that table, but other user browsing from china will see the quote for day 22.
could you please help me to get the current day and month for every single user browsing my site?

Dragonsys 12-21-2015 07:50 PM

ok, making a bit more sense now :)
I assume you are using a custom plugin to display the quotes. Give me a bit and I will try to get you the code you need to add to your plugin.

SilverBoy 12-21-2015 08:00 PM

Thank you

SilverBoy 12-22-2015 09:32 PM

I'm still looking for function to do this thing ^_^

kh99 12-22-2015 09:58 PM

I think you want the function vbdate(), in includes/functions.php. It takes a format string like the php function date(), so you could do something like pass it the string 'j,n' then explode it.

Dragonsys 12-22-2015 11:15 PM

I'm thinking more along the lines of vbmkdate()


All times are GMT. The time now is 08:39 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.00979 seconds
  • Memory Usage 1,733KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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