Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Upcoming Events Details »
Upcoming Events
Mod Version: 1.00, by ngcoders (Coder) ngcoders is offline
Developer Last Online: Sep 2012 I like it Show Printable Version Email this Page

vB Version: 4.0.0 Rating: (33 votes - 4.64 average) Installs: 346
Released: 28 Dec 2009 Last Update: Never Downloads: 4
Not Supported Auto-Template  

Upcoming Events

Released 28/12/2009
By Vikas - http://www.ngcoders.com

Installation
  • Goto Admincp->vBullietin CMS->Widgets->Create New Widget
  • Choose PHP Direct Execution as Widget's Type
  • Place a Title. eg Upcoming Events. Keep it short as this is what will appear as title on your pages.
  • Click Save
  • Click Configure on the right of the new created widget.
  • Remove the default code that appears. Be sure to not leave behind even a single letter.
  • Copy and Paste the code that you can find below.
  • Leave the template name as is (vbcms_widget_execphp_page)
  • Click Save
  • Goto Admincp->vBullietin CMS->Layout Manager
  • Click Go on the Default Layout
  • Add the Widget to your Layout
  • Click Save
  • That's all !!

PHP Code


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.

Screenshots

Click image for larger version

Name:	events.jpg
Views:	4837
Size:	14.8 KB
ID:	108359  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #196  
Old 16 Feb 2011, 17:17
ngcoders ngcoders is offline
 
Join Date: Dec 2009
Originally Posted by JimboSlice View Post
does anyone have one of these that works correctly with vb 4.1.x?
Yep it works fine.
Reply With Quote
  #197  
Old 16 Feb 2011, 18:18
JimboSlice JimboSlice is offline
 
Join Date: Jan 2011
the dates are always a day off, or doesnt show todays events, only future.
Reply With Quote
  #198  
Old 23 Feb 2011, 10:43
alexm's Avatar
alexm alexm is offline
 
Join Date: Apr 2005
Originally Posted by JimboSlice View Post
doesnt show todays events, only future.
Originally Posted by Mark4865 View Post
Is there a way to get the event to still show on the day it is taking place and only go away the day after
I think there is an error in the SQL query. It needs greater than or equal and less than or equal operators to include the current day, and the part for ranged events the operators were the wrong way round.

Try replacing the query with this:


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

This should display all day events before and on the day they are happening, and ranged events before and WHILE they are happening.

Alex

Last edited by alexm; 23 Feb 2011 at 10:49.
Reply With Quote
  #199  
Old 24 Feb 2011, 07:57
ash50210 ash50210 is offline
 
Join Date: Feb 2011
HI all,

after spend time reading all thread from pg 1 until 14 finally i was successfully made it happen. Thanks to all that contribute the idea here. so i would like to share the coding as per below:

----------------------------------------------------------------------------------------------------------------------

ob_start();


// %d
$show_count = 100;

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from >= '%1\$d' || ( dateline_from <= '%1\$d' AND dateline_to >= '%1\$d' ) || (dateline_to = 0 AND DATE(FROM_UNIXTIME(dateline_from)) = DATE(FROM_UNIXTIME(%1\$d)))) ORDER BY dateline_from ASC LIMIT %2\$d",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",date('jS M 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"><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>
</div>
',$event['eventid'],$event['title'],$format);

}
$output = $output_bits;


ob_end_clean();
return $output;
---------------------------------------------------------------------------------------------------------------------
This code suppose can show u all range of events.
cheers!
Reply With Quote
  #200  
Old 24 Feb 2011, 12:51
JimboSlice JimboSlice is offline
 
Join Date: Jan 2011
the dates are all wrong when its displayed on my page. In fact, tomorrows events show as happening today and the date listed is todays date, instead of tomorrows.
Reply With Quote
  #201  
Old 26 Feb 2011, 16:49
Ruhl49 Ruhl49 is offline
 
Join Date: Feb 2010
Still one day off, i.e. it's on the calendar for the 27th, but the "Upcoming Events" widget shows "26th Feb 2011"...
Reply With Quote
  #202  
Old 26 Feb 2011, 16:57
jgt58 jgt58 is offline
 
Join Date: May 2010
same here , had to disable
__________________
www.elitestangs.com
www.importnation.org
Awesome Skins!
Bluepearl Skins
Reply With Quote
  #203  
Old 26 Feb 2011, 17:15
jgt58 jgt58 is offline
 
Join Date: May 2010
Originally Posted by NiCForce View Post
I think that some coders already know the answer, but do not show us how?
a friend of mine has been added to my code (or the entire code) =





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

Set your GMT time, standard for me + 1 (change it) and it should work.
if a coder could take the data from the + or - GMT time and replacing the code in my (+ 1)then it should work. but what I was thinking. is that the data is taken from a wrong place.
guys , just fyi , this code fixed my block.
__________________
www.elitestangs.com
www.importnation.org
Awesome Skins!
Bluepearl Skins
Reply With Quote
  #204  
Old 27 Feb 2011, 07:39
lsgworldl lsgworldl is offline
 
Join Date: Sep 2005
Real name: Mike
after i added this all i got was a white screen to my site
__________________
Excellent vBulletin Styles - CinVin and vBSkinworks

Have bought skins from both of these people, ranging from $20 to $25 recomend both

cheat at computer games over 10,000 cheats more every day :bunny:
Reply With Quote
  #205  
Old 01 Mar 2011, 18:20
otterag otterag is offline
 
Join Date: Feb 2011
first i want to say that is a great mod. i have a few questions though.
- Is there a way to change the information that is displayed in the widget box. instead of having it show the date ranges of the event i would like to see it display the Date of the next event upcoming along with the day of the week and the start time

Example
Currently it shows
"Name of Event"
"From 4th March 2011 to 4th July 2011"

What i would like it to show would be
"Name of Event"
"Friday, March 4th @ 3:00pm"
Reply With Quote
  #206  
Old 28 Mar 2011, 06:52
wonderfulwat wonderfulwat is offline
 
Join Date: Jun 2010
I have this on the cms homepage (www.WonderfulWaterloo.com), but I'd like to know how I can have it show up on the forumdisplay template. For example, I want it to show up on this page: www.wonderfulwaterloo.com/election
Reply With Quote
  #207  
Old 26 Apr 2011, 23:16
mmcguire mmcguire is offline
 
Join Date: Oct 2006
Originally Posted by jgt58 View Post
guys , just fyi , this code fixed my block.
Thank you, this worked perfectly.
__________________
Sacramento Pictures |
Reply With Quote
  #208  
Old 29 Apr 2011, 00:32
tomsch tomsch is offline
 
Join Date: May 2003
ok I know why we are having troubles with some of the dates being a day behind.

In my opinion there is a bug in the calendar. when you post a range event is puts in a time zone entry and if DST is active.

a single event does not.

i will be posting a bug report for this.

as a work around just add the missing data to the fields and all works well

does any know how to use the utz and dst fields to adjust our times??

Last edited by tomsch; 29 Apr 2011 at 00:53. Reason: addition
Reply With Quote
  #209  
Old 29 Apr 2011, 01:20
tomsch tomsch is offline
 
Join Date: May 2003

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


see if this work around solves the problem
Reply With Quote
  #210  
Old 05 May 2011, 01:20
tomsch tomsch is offline
 
Join Date: May 2003
Originally Posted by tomsch View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
in this widget the %d is the placeholder for todays date.

can anyone tell me where the placeholder is being set to the date??
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 18:15.

Layout Options | Width: Wide Color: