The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
![]()
Add the following to the global_start hook:
Code:
// Generate Current Date // get the timestamp for the beginning of today, according to vbulletin->userinfo's timezone require_once(DIR . '/includes/functions_misc.php'); $timestamp = vbmktime(0, 0, 0, vbdate('m', TIMENOW, false, false), vbdate('d', TIMENOW, false, false), vbdate('Y', TIMENOW, false, false)); $homedate = vbdate('l, F jS, Y', $timestamp); and then use $homedate wherever you want in the footer. |
#12
|
|||
|
|||
![]()
Not exactly what I was looking to do but you've given me enough of a base that I was able to complete the rest of it myself. Thank you very much for the example code, it was greatly appreciated and very helpful!
![]() |
#13
|
||||
|
||||
![]()
I would be curious to see what it helped you come up with.
![]() |
#14
|
|||
|
|||
![]()
Unfortunately our forums are private or I'd link it, but I've hacked the events display up to appear at the top of the forum home as well as the forum display. I had to do amassive rework of the forumhome_event template and added 2 plugins, one hooking into forumhome_event to modify the data available to the template and one hooking into forumdisplay_start to make event data available there. This basically allowed me to make each event it's own table row and I'm doing conditional formatting based on custom fields from the event (like a priority field that changes the color/bolding/size of the displayed event, etc).
On top of this I've added JavaScript to do a 'count down' to the event start in the event display area. This all worked fine but the game we play is based in the GMT timezone and a lot of members have their user preferences set to this timezone instead of their local time zone. JavaScript however reads the local time from the browser so there was skewing going on with the timer. To fix this I needed to be able to convert time() into whatever timezone the user had selected in their UserCP and provide this to the JavaScript so that 'EventStart' and 'CurrentTime' values were in the same timezone. There are also some other parts involved with the times, mostly from an external application that's populating timestamps into a table for different 'sub-events' that I needed to convert to whatever timezone the user has selected as well so that all of the times displayed to the user in human readable form were in the same timezone and everything worked. ![]() Thanks to your suggestion of vbmktime() I can now close the final bug on this implementation. I would release this mod back to the community but for two things a) I have no idea how to create an importable product and b) It really is an ugly hack. ![]() |
#15
|
||||
|
||||
![]()
PM me if you want to make a product out of this and I will help you set it up and clean up the code.
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|