Welcome Guest, Not a member yet? Register   Sign In
Next/Previous Links in Calendar Class
#21

[eluser]lrussell810[/eluser]
Code:
if( $year === FALSE ) $year = date( 'Y' );
#22

[eluser]toymachiner62[/eluser]
If it's these 2 lines, try commenting them out and see if the page even loads.

Code:
if( $year === FALSE ) $year = date( 'Y' );
if( $month === FALSE ) $month = date( 'm' );
#23

[eluser]toymachiner62[/eluser]
If it loads, try changing them to this

Code:
if( $year === FALSE ) {
    $year = date( 'Y' );
}
if( $month === FALSE ) {
    $month = date( 'm' );
}
#24

[eluser]lrussell810[/eluser]
It didn't load, and the following code was already included in the CodeIgniter 2.0.2 (this is the code from the freshly downloaded reactor), and when I was messing with these preferences earlier, it was affecting how my calendar worked/loaded. I could change the start day, the day name length, and everything through the library Calendar.php. It seems like that it wants to be easier, but it's making it complicated for people who are used to older versions of CodeIgniter. I tried to move this around the planner.php controller
Code:
$this->load->helper('url')
but every time I reloaded the page it showed that the line right below this code was the error point. I'm sorry that this may be confusing and frustrating, but it also has been for me for the past few days.

Calendar Library Code
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package        CodeIgniter
* @author        ExpressionEngine Dev Team
* @copyright    Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license        http://ellislab.com/codeigniter/user-guide/license.html
* @link        http://codeigniter.com
* @since        Version 1.0
* @filesource
*/

// ------------------------------------------------------------------------

/**
* CodeIgniter Calendar Class
*
* This class enables the creation of calendars
*
* @package        CodeIgniter
* @subpackage    Libraries
* @category    Libraries
* @author        ExpressionEngine Dev Team
* @link        http://ellislab.com/codeigniter/user-guide/libraries/calendar.html
*/
class CI_Calendar {

    var $CI;
    var $lang;
    var $local_time;
    var $template        = '';
    var $start_day        = 'sunday';
    var $month_type        = 'long';
    var $day_type        = 'abr';
    var $show_next_prev    = FALSE;
    var $next_prev_url    = '';
#25

[eluser]toymachiner62[/eluser]
You're missing a semicolon.
#26

[eluser]lrussell810[/eluser]
I just figured out the issue. You were right about my method. I changed it up in the Calendar.php library to this, and it works now.

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package        CodeIgniter
* @author        ExpressionEngine Dev Team
* @copyright    Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license        http://ellislab.com/codeigniter/user-guide/license.html
* @link        http://codeigniter.com
* @since        Version 1.0
* @filesource
*/

// ------------------------------------------------------------------------

/**
* CodeIgniter Calendar Class
*
* This class enables the creation of calendars
*
* @package        CodeIgniter
* @subpackage    Libraries
* @category    Libraries
* @author        ExpressionEngine Dev Team
* @link        http://ellislab.com/codeigniter/user-guide/libraries/calendar.html
*/
class CI_Calendar {

    var $CI;
    var $lang;
    var $local_time;
    var $template        = '';
    var $start_day        = 'sunday';
    var $month_type        = 'long';
    var $day_type        = 'long';
    var $show_next_prev    = TRUE;
    var $next_prev_url    = 'http://www.discipleshipplanning.com/planner/index/';
#27

[eluser]lrussell810[/eluser]
Thank you so much for all of your help!




Theme © iAndrew 2016 - Forum software by © MyBB