1
Mkjones
APCal problem with javascript date
  • 2013/1/26 11:20

  • Mkjones

  • Just popping in

  • Posts: 24

  • Since: 2009/7/29


- PHP version = 5.3.3
- XOOPS Version = 2.5.4
- module version = 2.11
site url: apet4life

When I attempt to add a new event the javascript date finder and form filler doesn't seem to work as the only output from it is this: 13-mm-dd. If I could find the template for the page I would remove it I think but I can't. Its using the calendar.js file found in the Xoops include directory which must be faulty I think.

I have added a test user if anyone needs to see what is happening.

user name: test
password: test

You need to login and then attempt to add an event to be able to see the problem page and script.

2
Mkjones
Re: APCal problem with javascript date
  • 2013/1/26 12:23

  • Mkjones

  • Just popping in

  • Posts: 24

  • Since: 2009/7/29


Can't edit the above post?

Please visit the forum to login.

3
goffy
Re: APCal problem with javascript date
  • 2013/1/26 14:44

  • goffy

  • Just can't stay away

  • Posts: 543

  • Since: 2010/12/27


hi

it seems to be a problem of newer xoops versions.
In index.php there is a check, which calendar should be taken, the settings in APCal.php
var $jscalendar 'jscalendar' ;

will be ignored
The check in index.php is
if( is_fileXOOPS_ROOT_PATH '/include/calendarjs.php' ) ) { 
// older jscalendar in XOOPS 2.0.x core

, but the same file exist in xoops 2.3 and newer, and I think, actual version is not fully compatible in all languages.

I solved the problem with deleting the first if-condition, because the last else means the same.

In my index.php it looks like this
if( $action == 'Edit' ) { 
        
//goffy deleted first if condition in order to use recommended jscalendar
         /* if( is_file( XOOPS_ROOT_PATH . '/include/calendarjs.php' ) ) { 
            // older jscalendar in XOOPS 2.0.x core 
            include XOOPS_ROOT_PATH.'/include/calendarjs.php' ; 
            $cal->jscalendar = 'xoops' ; 
        } else */
if( is_dirXOOPS_ROOT_PATH '/common/jscalendar' ) ) { 
            
// jscalendar in common (recommend) 
            
$jscalurl XOOPS_URL '/common/jscalendar' 
            
$xoopsTpl->assign'xoops_module_header' 
                .
$jscalurl.'/calendar-system.css" />
                 .
$jscalurl.'/calendar.js">
                 .
$jscalurl.'/lang/'.$cal->jscalendar_lang_file.'">
                 .
$jscalurl.'/calendar-setup.js">
             ' 
$xoopsTpl->get_template_vars"xoops_module_header" ) ) ; 
            
$cal->jscalendar 'jscalendar' 
        } elseif( 
is_dirXOOPS_ROOT_PATH '/class/calendar' ) ) { 
            
// jscalendar in XOOPS 2.2 core 
            
$jscalurl XOOPS_URL '/class/calendar' 
            
$xoopsTpl->assign'xoops_module_header' 
                .
$jscalurl.'/CSS/calendar-blue.css" title="system" />
                 .
$jscalurl.'/calendar.js">
                 .
$jscalurl.'/lang/'.$cal->jscalendar_lang_file.'">
                 .
$jscalurl.'/calendar-setup.js">
             ' 
$xoopsTpl->get_template_vars"xoops_module_header" ) ) ; 
            
$cal->jscalendar 'jscalendar' 
        } else { 
            
// older jscalendar in XOOPS 2.0.x core 
            
include XOOPS_ROOT_PATH.'/include/calendarjs.php' 
            
$cal->jscalendar 'xoops' 
        }

The jscalendar in folder common must be available, then it works in german version.

4
Mkjones
Re: APCal problem with javascript date
  • 2013/1/26 17:49

  • Mkjones

  • Just popping in

  • Posts: 24

  • Since: 2009/7/29


Thanks. Worked, well partially. I also didn't have the necessary files in the common folder. I must have installed it wrong in the first place. Sorted now and working fine .

Login

Who's Online

320 user(s) are online (212 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits