The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
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 |
#12
|
||||
|
||||
![]() Quote:
Sorry i cant be more helpful but after a quick look around seems there is a few problems with the date discrepancy on vbull for this type of mod...Only other thing you could try would be copy the original upcoming event code and test that. |
#13
|
|||
|
|||
![]() Quote:
quite nice, thats true. but i would rather the birthdays in the calender widget as well. |
#14
|
|||
|
|||
![]()
This one works well. Anyway to have an image above the event in the forum block. Would be nice for it to automatically pull an image posted in the calendar event.
|
#15
|
|||
|
|||
![]()
Also, I just noticed that the date shown on the forum block is one day before it is set in the calendar.
|
#16
|
|||
|
|||
![]()
Got both of my above comments to work.
Here you go for those interested (change what's in Red): Code:
ob_start(); // %d $show_count = 1; $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"><center><a href="calendar.php?do=getinfo&e=%d"><img src="http://www.YourForum.com/forum/images/event.jpg" width="200px" alt="Upcoming Event"/><h4 class="cms_widget_post_header">%s</a></h4> <p class="cms_widget_post_content">%s</p></center> </div> ',$event['eventid'],$event['title'],$format); } $output = $output_bits; ob_end_clean(); return $output; What I'd really like to do is replace the code related to the image with a piece of code that uses an image that was either attached or placed between img tags in the event. 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. |
#18
|
|||
|
|||
![]() Quote:
Wish me luck. |
#19
|
|||
|
|||
![]()
Nice one mate..sounds cool that does!!
|
#20
|
||||
|
||||
![]() Quote:
Be great to have that option mate keep us informed!!!:up: |
#21
|
|||
|
|||
![]()
Update: I'm trying to get this thing to work but I need help from someone who knows how to deal with plugins.
Update 2: Sorry guys, I gave in. I hired a coder to complete this for me. Unfortunately, I cannot post the code here. ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|