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 |
#72
|
||||
|
||||
Okay Update:
I discovered the code I was using for the image is for a single image event and it will only show the same image for every event in the widget, although I still havent got it to show in the widget. My question is does anyone know how to write the code so a different image for every event will show in the widget. I have the image showing up perfectly in the actual event does someone know what code to use to get the same image to show in the widget. Desperate please |
#73
|
|||
|
|||
Is there any way to display repeated events correctly?
We have an event every 2 weeks on a Tuesday, it displays fine in the calendar. However on the events list it displays Club Night From 7th Jun 2011 to 30th Dec 2012 It displays the start and end of the reoccurring event, but not the date it is on. |
#74
|
||||
|
||||
Quote:
Quote:
|
#75
|
||||
|
||||
Hello,
Just noticed my dates are showing incorrectly as it shows 1 day late so I put in say 12/06 in the event but in the widget is shows 13/06. Code shown below how do I fix this please ob_start(); // %d $show_count = 10; $query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || ( dateline_from > '%d' AND dateline_to > '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); $event_get = vB::$db->query_read($query); $output_bits = ''; while($event = vB::$db->fetch_array($event_get)) { if($event['dateline_to'] == 0 ) { $format = sprintf("On %s%s %s %s",date("j",$event['dateline_from'])+1, date("S",$event['dateline_from']), date("M",$event['dateline_from']), date("Y",$event['dateline_from'])); } else { $format = sprintf("From %s to %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to'])); } $output_bits .= sprintf(' <div class = "cms_widget_post_bit"><a href="calendar.php?do=getinfo&e=%d"><img src="http://www.porscheplanet.co.za/images/misc/motorsport.gif" width="75" height="60" alt="Upcoming Event" HSPACE="7" VSPACE="3" align="left"/><h4 class="cms_widget_post_header"><b>%s</b></a></h4> <p class="cms_widget_post_content"><b>%s</b></p> </div> <BR/><BR/> ',$event['eventid'],$event['title'],$format); } $output = $output_bits; ob_end_clean(); return $output; |
#76
|
|||
|
|||
Quote:
there is a small "bug" in the way events sre stored for single day events as well as the query used to get the events does not adjust for time zone. the "bug" has been reported and is now confirmed. if you use the query for the other upcoming events widget i have posted you should have better luck with the dates. |
#77
|
||||
|
||||
Quote:
|
#78
|
||||
|
||||
Ive tried and tried and I cannot get the block to show up
|
#79
|
||||
|
||||
Oldfan I see your having the same issues with other mods for the forum block too,if you wish to send me some login info for your admin cp i will come across and add this for you later today. |
#80
|
||||
|
||||
Thanks for getting mine to work and adding the custom welcome block rammieone !!
|
#81
|
||||
|
||||
This MOD is working fine in vB 4.0.8 ! Thank you !!!
However, there are two questions left: 1. The dates are shown in english, not in the selected language german, e. g. January instead of Januar. How can I change this ? 2. Is it possible to place the date in front of the event title ? I tried to change the order of the following lines, but it did not work: Code:
<h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4> <p class="cms_widget_post_content">%s</p> Netzwart |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|