Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
UpComing Events SideBlock/Bar With/Without Image Details »
UpComing Events SideBlock/Bar With/Without Image
Mod Version: 1.10, by ProFifaLeagues (Coder/Designer) ProFifaLeagues is offline
Developer Last Online: Feb 2020 I like it Show Printable Version Email this Page

vB Version: 4.0.0 Rating: (16 votes - 4.31 average) Installs: 95
Released: 06 Nov 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

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 :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then just make sure the template to use is set to Block_HTML

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):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks go to cybaGirl for this fix:
Anyone who has the date showing as the day before can use this code in there forum block.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #121  
Old 01 Apr 2013, 20:39
CptBogo CptBogo is offline
 
Join Date: May 2007
Real name: Ryan
Originally Posted by rhody401 View Post
I had to take out the first few characters on top
im not sure what that means


Originally Posted by rhody401 View Post
and it is case sensitive
use stripos instead. that is a case insensitive search instead of the case sensitive strpos
Reply With Quote
  #122  
Old 02 Apr 2013, 14:13
rhody401's Avatar
rhody401 rhody401 is offline
 
Join Date: Feb 2012
>I removed the first characters
Originally Posted by CptBogo View Post
im not sure what that means


use stripos instead. that is a case insensitive search instead of the case sensitive strpos
Oh what I meant is that it gave an error until i removed this from the start of the snippet: "<?"

It works fine without that at the very top of the code.

I also changed it to stripos, at your suggestion, and tested to confirm that it now works with mixed case.

Thank you so much for taking the time to help me with this. This is one that we use heavily on our forum, to show upcoming meetings and events.

Reply With Quote
  #123  
Old 10 Apr 2013, 19:18
CptBogo CptBogo is offline
 
Join Date: May 2007
Real name: Ryan
Originally Posted by rhody401 View Post
>I removed the first characters


Oh what I meant is that it gave an error until i removed this from the start of the snippet: "<?"

It works fine without that at the very top of the code.

I also changed it to stripos, at your suggestion, and tested to confirm that it now works with mixed case.

Thank you so much for taking the time to help me with this. This is one that we use heavily on our forum, to show upcoming meetings and events.

oops sorry. i forgot to take out the <?. i edited my post to remove it for anyone in the future. and no problem, glad i could help.
Reply With Quote
  #124  
Old 04 Oct 2013, 23:53
gajinoz's Avatar
gajinoz gajinoz is offline
 
Join Date: Nov 2011
Just installed this. Seems to work perfectly, thanks, good job.
Reply With Quote
  #125  
Old 30 Apr 2014, 13:21
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
I cannot get this working properly. it either shows the wrong date or does not display correctly after trying the fixes.

Can someone share their code they are using with 4.2.2?

i have it working now..I took some of the above fixes and made some changes and it is working now.
__________________

Let us take care of your forum, seo, seo reports, maintenance, what ever you need.


Last edited by RichieBoy67; 30 Apr 2014 at 13:32.
Reply With Quote
  #126  
Old 25 Mar 2015, 01:55
audzilla audzilla is offline
 
Join Date: Oct 2013
Thanks, this is excellent!

Since DST started, though, I've noticed that sometimes events display as an hour later than they should, and sometimes they're fine. By default there's an 'ignore DTS' checkbox that is checked when creating a calendar event, but that doesn't really seem to affect what's displaying on the sidebar widget.

I'm not remotely a coder, but basically I can't figure out the interaction between the calendar's automatic DST stuff and the user profiles and this widget. Any suggestions?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:39.

Layout Options | Width: Wide Color: