![]() |
Poster's local time and date in postbit and profile
Poster's local time and date in postbit and profile for vBulletin 3.7.0 beta 4
Version 1.0.1 (By Boofo) What does this product do? This product will add the local time and date of posters in the posts and profile. That way you will know what the time and date is where they are located. I use this on my site so I will have an idea if it is the middle of the night, where they are at, or daytime. With your users living in all corners of the globe, this hack is a nice gauge of the different time zones without having to figure out each one in your head. Note: This will also show the correct time and date of the poster to guests. You do not have to be logged in to know what time it is in someone else's world. ;) Credits: Thanks goes out to KirbyDE for pointing me in the right direction for the profile time and helping to verify the original code. And thanks goes out to Chen Avinadav for making the first local time hack for vB2 and allowing me to release it for vB3, vB3.5 and now vB3.7.0 beta 4. A special thanks goes out to Dismounted, a distinguished member of the vb.org Staff, for catching my newbie mistake of not checking for new hook placements. Version Information: Version 1.0.1 --Initial release Installation overview: Templates to edit: (3) --postbit --postbit_legacy --memberinfo_block_ministats Products to install: (1) --product-local_time_bh.xml Installation Intructions: Import the product in your Admin CP, do the template edits and you're all set! NOTE: If you do not click install, you do not need support. |
Composite simple wonderful
|
Don't forget the install button. ;)
And thank you. |
i hate the template edits Boofo ... :)
anyway you're a great coder ... keep up the great job dude ... |
Awesome idea! ...however...
I did the template edits, exactly how the install text instructs... and the postbit is epically screwed up now. Had to revert and uninstall. |
Well, the template edit for the postbit is the one I use. The postbit_legacy was a best guess for me as I don't use that one. As long as you have the two phrases and the 2 variables you can put it anywhere.
HTML Code:
$vbphrase[bf2_local_time]: $post[localtime] |
The postbit template is the one I was referring to. No worries, though- decided the info that this mod puts in the user profile is enough. Also, I don't like adding too much to the postbit, so this actually works out well.
Again, WONDERFUL idea for boards with lots of members across the globe- time xones are always an issue when trying to plan something. This will help people plan a bit better, IMO. |
You want the posbit like I have mine? All neatly lined up like in the pic in the first post. It even does a nice break for the location if the location is too long, while lining things up on the left evenly.
I also added the Timezone Image in Profile hack that shows a map and the date/time in the profile. ;) |
Quote:
|
What is TMS?
|
Quote:
BTW: Your hack is really great and I installed it. Thank you very much for this, Bob :) -Mike |
I've never used that. I went straight form 3.5.4 to the latest version, doing a fresh install. I've been out of the loop way too long, it seems. First, will that work on 3.7.0 beta 4? And second, being Kirby write that, [s]I'm hesitant to use it as I'm not sure he knows that much about coding for vb[/s], then it must be good. ;)
And, Mike, do I know you from the old days here? |
Quote:
Bob: I've created 2 TMS Files for you! You can choose whatever you'd like to do. The first one "Product-local_time_bh-TMS" contains the additional TMS Code and its separate Template Codes within your hack. When you have TMS installed all you have to do is to import your Product. That's all :) The second one "TMS_Code_Local_Time" is the small Template Code itself and will imported under TMS itself. Quote:
|
So this will edit the template automatically when you insert the xml? How does it know which template edits go with which hack? This looks like a dream come true on upgrades for template changes. What's the learning curve on it?
I don't know the Acura Legend Forum, so I must have been wrong about knowing you. Better for you, anyway, as knowing me doesn't bring a lot of good luck to anyone. Ask around, you'll see. ;) |
Quote:
Quote:
Quote:
Quote:
Quote:
Sorry for being in the wrong thread. I do know that this do not belong where it belongs to, but I'm strongly convinced about the TMS hack. So I will try to do my best that this hack deserve what it deserves: MOTM |
I will give that a try. Sounds good. ;)
|
Quote:
|
Another one of yours installed :D
Works great,as a uk site we have quite a few US based users and this is handy in knowing what time there at.. Thanks :up: |
I have to admit, this is my favorite of all my hacks. It saves me trying to bother someone who might be in bed. ;)
|
/me clicks install
|
Very kewl :) INSTALLED :)
|
*clicks install*
Awesome! Thanks!!! :) |
I am using this on a board with some restrictions on mods, mostly being that we want to limit physical edits of the templates and use template hooks whenever possible. We only wanted this product for the postbit, so if you want to make this work without the template edit of the postbit legacy here is the code you add in the plugin titled "Local Date/Time in Postbit" right at the end of the plugin:
Code:
$template_hook[postbit_userinfo_right_after_posts] = "<if condition=\"$post[userid]\"> |
Thank you, sir. ;)
|
It made my postbit look all wacky, so i had to uninstall this~
|
Then you installed it wrong.
|
Timber clicks :Installed
Hmm.. It dont work lol Is it because we have 3.7.gold or perhaps php5 Any suggestions. And yep, installed to the letter of the law :) |
Quote:
Thanks for this. Now its all lined up. >>>installed<<< |
Quote:
|
Quote:
However, we migrated server over this weekend, and I have a sneaky feeling, we may have been viewing admin on old server. Will go check now ( my humblest apologies if thats the simple error ) WIll check back. Ozzy |
LOL Most likely it is something simple like that. Let me know.
|
Boofo.
My sincerest apologies. As most foum owners, we have two browsers always open, i use IE and FF FF had dns refreshed for new server, IE didnt ! Guess which one, I was logged in on for admincp !! lol It works a bloody charm mate !! Cheers Ozzy |
Great! Enjoy! ;)
|
Dear Boofo, I imported the XML with the notion that I'll be able to use the variable $userinfo[localdate] for date calculations in a PHP module. However, it returns null.
Can you help me please to figure out how to derive user's local date? |
Where are you trying to use it?
|
In a PHP module on a CMPS page. I need it in order to draw the member's biorhythm chart that is based on their birth of date and their current date.
Quote:
|
This hack is only going to work in the postbit and profile. You could use the date("m-d-y") to get today, but it wouldn't be according to their timezone. It would be according to the server's timezone.
|
Made mine look wacky too. It put everything on the left hand side. (Using postbit) Must be conflicting with another mod. (Used TMS). Let me try adding the temp. mods manully and see if that makes a difference.
|
Even tried it manually, still put everything over to the left hand side.
|
Thank you, Boofo, very much for trying. Please let me know should something comes to your creative mind. I can even pay for it.
Quote:
|
All times are GMT. The time now is 01:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|