![]() |
Can i use this on VBadvanced as a module is some way please?
|
i have modified this a little bit for my forum and i thought i would share.
instead of PHP Code:
PHP Code:
first i changed the format to look like 'On 5th Feb, 2013 at 8:00 PM'. the end date wasnt as important to us as the time the event started so i added the time and removed the end date. second it uses the vbulletin 'vbdate' function instead of the PHP 'date' function. this will automatically change the date to the users timezone instead of using the servers timezone. remember to set 'Cache Time' to 0 in the forum block settings or else it will cache someone elses timezone and be incorrect for every other user. hope this helps someone else trying to do something similar. and a screenshot of how it looks on my forum. https://vborg.vbsupport.ru/external/2013/02/43.png |
Is there a simple way to have the date being displayed in a other language than english?
|
I like the changes you made a couple posts before this one(VBDATE), but it still seems to show one day earlier than the scheduled date. (for all events on my calendar)
I have the cache set to 0, etc. Any ideas why? Are you having the same issue? |
Quote:
if you are familiar with PHP you might want to have a look at these functions: http://www.php.net/manual/en/function.setlocale.php http://www.php.net/manual/en/function.strftime.php they work together, you use the first function to set the language you want to use and the second function creates the date string based on the language you defined in the first function. note that the vbdate function includes those 2 functions in it. Quote:
PHP Code:
also for those interested i have updated my own code to show 'Today', 'Tomorrow', etc instead of the day, month and year. if the date is more then a week in the future it will display the full day, month, year format(February 6th, 2013). PHP Code:
Edit: I have discovered an issue where full day events that do not have a start time specified dont display correctly. for example the last event in my screenshot, "Starcraft II Risk", should start at 12AM on Saturday and not on Friday. i do not currently have a way to fix this but when i do i will post an update. |
Hi folks! How/where would you modify the code to insert a page break so you'd have an empty line between the date of the first event and the description/title of the NEXT event... I want to visually separate them.
|
My block doesn't show up when PHP is selected. Any ideas? cheers
|
I have modified this a bit to make it in a format for USA Month Day Year, and some other small changes. (my modified code below)
It would be REALLY nice if I could find a way to have it exclude some calendar items that have a specific string of text in the title. I just don't know where to put the hook to make this happen. Any suggestions appreciated! :) THANK YOU example: If a calendar event has "BOARD MEETING" anywhere in the TITLE, it gets overlooked/ignored by this code. It displays everything else, but these events. Here is my (current/modified from above) code: PHP Code:
Much appreciated! :up: Rhody |
Quote:
PHP Code:
i havnt tested it but it should work. |
Thank you thank you thank you! :)
I had to take out the first few characters on top, and it is case sensitive, but very workable for what i'm trying to fix. I will fix the calendar entries to be the correct case, so they get ignored. It does work! Rhody |
All times are GMT. The time now is 02:51 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:
|