The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
UpComing Events SideBlock/Bar With/Without Image Details »» | |||||||||||||||||||||||||||
UpComing Events SideBlock/Bar With/Without Image
Developer Last Online: Nov 2023
Upcoming Events in Forum Block/Sidebar
Add the "Upcoming Events" in the forum side block (Added as a few people seem to have issues with other mods the same) Start by logging into your Admin cp Goto Forums and moderators - Forum Blocks Manager and add a new Block. Call the Block Upcoming Events(Or what ever suits your liking) Set the block to Active And use PhP Format. Now add the content below : PHP Code:
This will then show the latest upcoming event from your calendar with multi-day events shown until the last day of the event. Update Thanks to dcuellar What this does is add a picture centered above the upcoming event. The picture is uploaded to 'images/' as event.jpg. You can change that to whatever you want. It also corrects the issue I had with the date. It's now projecting the proper date. NOTE: I changed the number of events to display to 1. I do not need the range on my forum so I did not test that part. Here you go for those interested (change what's in Red): PHP Code:
Anyone who has the date showing as the day before can use this code in there forum block. PHP Code:
Show Your Support
|
3 благодарности(ей) от: | ||
ggrimes620, NoMatt3r, Toxic2 |
Comments |
#112
|
|||
|
|||
Can i use this on VBadvanced as a module is some way please?
|
#113
|
|||
|
|||
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. |
Благодарность от: | ||
Alibass |
#114
|
|||
|
|||
Is there a simple way to have the date being displayed in a other language than english?
|
#115
|
||||
|
||||
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? |
#116
|
|||
|
|||
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. |
Благодарность от: | ||
ProFifaLeagues |
#117
|
|||
|
|||
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.
|
#118
|
|||
|
|||
My block doesn't show up when PHP is selected. Any ideas? cheers
|
#119
|
||||
|
||||
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 |
#120
|
|||
|
|||
Quote:
PHP Code:
i havnt tested it but it should work. |
#121
|
||||
|
||||
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 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|