Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 21 Dec 2015, 20:23
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
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.
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #2  
Old 21 Dec 2015, 20:24
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
current day and month for user? I don't follow, do you mean you want to display the current month and day to users?
Reply With Quote
  #3  
Old 21 Dec 2015, 21:16
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
yes, I want the current day and the current month of the user (you know there is difference regarding to the time zone)
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #4  
Old 21 Dec 2015, 21:21
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
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)

All times are GMT -6. The time now is 03:20 PM.
This line uses the User's Timezone setting
Reply With Quote
  #5  
Old 21 Dec 2015, 21:24
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Try this mod ...

http://www.vbulletin.org/forum/showthread.php?t=243379
Reply With Quote
  #6  
Old 21 Dec 2015, 21:34
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
Originally Posted by Dragonsys View Post
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 21 Dec 2015 at 21:37 ---------------

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.
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #7  
Old 21 Dec 2015, 21:41
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
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?
Reply With Quote
  #8  
Old 21 Dec 2015, 21:47
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
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?
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #9  
Old 21 Dec 2015, 21:50
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
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.
Reply With Quote
  #10  
Old 21 Dec 2015, 22:00
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
Thank you
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #11  
Old 22 Dec 2015, 23:32
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Real name: Malik
I'm still looking for function to do this thing ^_^
__________________
One of highly customized vBCMS used for news site.
www.manshor.net
Reply With Quote
  #12  
Old 22 Dec 2015, 23:58
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.
Reply With Quote
  #13  
Old 23 Dec 2015, 01:15
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Real name: Eric
I'm thinking more along the lines of vbmkdate()
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:09.

Layout Options | Width: Wide Color: