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.
  #61  
Old 07 May 2011, 15:10
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
Has anyone got this to work with images PLEASE.

Cant get the images to show???

HELP!!!!!!!!!
Reply With Quote
  #62  
Old 12 May 2011, 16:57
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
Help!!!!!!!!!! any one got this to work in the CMS with images
Reply With Quote
  #63  
Old 14 May 2011, 11:16
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
Anyone Help Please I have tried everything and I just cant get the images to show, has anyone got this working in cms????????
Reply With Quote
  #64  
Old 14 May 2011, 18:28
ProFifaLeagues's Avatar
ProFifaLeagues ProFifaLeagues is offline
 
Join Date: Aug 2009
Real name: Rob
Sorry Mark i havent used this in the Cms setup at all!

Maybe best to post up Here
for some Advice on the best way to ad the code for the Cms
Reply With Quote
  #65  
Old 14 May 2011, 19:16
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
Thanks I will try that earlier posters seemed to think it would work in the CMS, does it make a huge differnce that I have different images for different events, do all images have to be the same??
Reply With Quote
  #66  
Old 14 May 2011, 22:01
ProFifaLeagues's Avatar
ProFifaLeagues ProFifaLeagues is offline
 
Join Date: Aug 2009
Real name: Rob
No as long as you have them with there correct addresses they should be fine...
Maybe post an exmaple of what your adding in the code to show these and we may spot something wrong
Reply With Quote
  #67  
Old 14 May 2011, 23:25
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
thanks for taking a look code show below

I have used this in the CMS with a few changes (images on right text on left) works great BUT cant get images to show. They show up fine in the actual event but not in the widget here is an example of my image address for one image http://www.mywebsite.co.za/temp%20lo...Beach_2010.jpg

this is the code I have used, how do I get the image to show

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.YourForum.com/forum/images/event.jpg" 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;
Reply With Quote
  #68  
Old 19 May 2011, 07:57
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
Anyone out there who can help me to get this to work with images in the CMS PLEASE
Reply With Quote
  #69  
Old 21 May 2011, 19:04
ProFifaLeagues's Avatar
ProFifaLeagues ProFifaLeagues is offline
 
Join Date: Aug 2009
Real name: Rob
Mark this code is not the one you have entered is it???


<img src="http://www.YourForum.com/forum/images

You would need to link that to your forum address rather then Yourforum.com
Reply With Quote
  #70  
Old 21 May 2011, 19:37
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
No I tried to use my website address and the file locations but it didnt work
Reply With Quote
  #71  
Old 24 May 2011, 15:45
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
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
Reply With Quote
  #72  
Old 27 May 2011, 15:28
TransAmDan TransAmDan is offline
 
Join Date: Nov 2009
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.
Reply With Quote
  #73  
Old 05 Jun 2011, 14:29
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Originally Posted by TransAmDan View Post
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.
Having the same issue. Today is June 5th, and all I have displaying in our events box is the following recurring events from as early as March 1st....

N & D's wedding anniversary
From 1st Mar 2010 to 1st Mar 2013

E's birthday
From 3rd Mar 2010 to 3rd Mar 2020

J's Birthday
From 16th Mar 2010 to 16th Mar 2020

T & L's Wedding Anniversary
From 19th Apr 2010 to 19th Apr 2013

C's birthday
From 9th Jun 2010 to 9th Jun 2020
Kind of defeats the purpose of the mod when the events don't update Which is a shame, because its a great mod concept....
Reply With Quote
  #74  
Old 12 Jun 2011, 15:45
Mark4865's Avatar
Mark4865 Mark4865 is offline
 
Join Date: Sep 2010
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;
Reply With Quote
  #75  
Old 12 Jun 2011, 16:24
tomsch tomsch is offline
 
Join Date: May 2003
Originally Posted by Mark4865 View Post
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
as have said before the query used does not work properly in some cases.

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.
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 07:08.

Layout Options | Width: Wide Color: