1
vmax2extreme
Xcenter Content Module on 2.5.4

I just upgraded my site to XOOPS 2.5.4 from 2.5.1a where my content module written by Wishcraft on version 2.15 was working fine prior to the upgrade. Now when I edit content and click submit, the content is updated, but it brings you to a blank white page where you need to go back to get out of the blank page. It works, but it would be nice to get this corrected.

Thanks in advance

Mike

2
Anonymous
Re: Content Module on 2.5.4
  • 2012/3/26 19:51

  • Anonymous

  • Posts: 0

  • Since:


Content module version 2.15... I guess you mean Smartsection??? In case it is you better upgrade to Publisher, this is the followup on Smartsection. It works the same, can be installed next to SS and has a nice import function. I did this upgrade yesterday and found out the import works very nice!

3
vmax2extreme
Re: Content Module on 2.5.4

The info button under module is for Content Module as follows:
version: 2.1.5
Author Written by Simon Roberts aka. Wishcraft
Credits: Chronoslabs
License: GPL 2.0 - see /docs/LICENSE
Advanced Mutilingual Content Manual

I guess I will wait for Simon to chime in here.....

4
Mamba
Re: Content Module on 2.5.4
  • 2012/3/26 21:19

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


But what is the name of the module directory?

I don't recall a module by Wishcraft called "content" ....

Maybe you mean "xcenter"?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

5
Anonymous
Re: Content Module on 2.5.4
  • 2012/3/26 21:33

  • Anonymous

  • Posts: 0

  • Since:


Simon once updated Smartsection to 2.15...

6
Mamba
Re: Content Module on 2.5.4
  • 2012/3/26 22:12

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


No, it's his xCenter module

I've tried to run it on XOOPS 2.5.5 Beta, but have a problem saving a new content. But since it was XOOPS 2.5.5 Beta, it might be a XOOPS issue. I'll try to install it on XOOPS 2.5.3 and see if it works properly there.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
vmax2extreme
Re: Content Module on 2.5.4

Sorry, I had to do an update to find out the path and indeed its the xcenter module.

8
vmax2extreme
Re: Content Module on 2.5.4

Anyone? Simon? Assistance greatly appreciated.

9
wishcraft
Re: Content Module on 2.5.4

Hi guys how are you? you have just discovered a core bug, to fix this you will have to patch the following file with this code:

/htdocs/class/xoopsform/formtextdateselect.php
<?php
/**
 * XOOPS form element
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @subpackage      form
 * @since           2.0.0
 * @author          Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
 * @version         $Id: formtextdateselect.php 8995 2012-02-15 13:21:30Z forxoops $
 */

defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");

/**
 * A text field with calendar popup
 */

class XoopsFormTextDateSelect extends XoopsFormText
{

    function 
XoopsFormTextDateSelect($caption$name$size 15$value 0)
    {
        
$value = !is_numeric($value) ? time() : intval($value);
        
$value = ($value == 0) ? time() : $value;
        
$this->XoopsFormText($caption$name$size25$value);
    }

    function 
render()
    {
        static 
$included false;
        include_once 
XOOPS_ROOT_PATH '/language/' $GLOBALS['xoopsConfig']['language'] . '/calendar.php';

        
$ele_name $this->getName();
        
$ele_value $this->getValue(false);
        if (
is_string($ele_value)) {
            
$display_value $ele_value;
            
$ele_value time();
        } else {
            
$display_value date(_CAL_FORMAT$ele_value);
        }

        
$jstime formatTimestamp($ele_value_CAL_FORMAT);
        if (
is_object($GLOBALS['xoTheme'])) {
            
$GLOBALS['xoTheme']->addScript('include/calendar.js');
            
$GLOBALS['xoTheme']->addStylesheet('include/calendar-blue.css');
            if (!
$included) {
                
$included true;
                
$GLOBALS['xoTheme']->addScript('','''
                    var calendar = null;
    
                    function selected(cal, date) {
                    cal.sel.value = date;
                    }
    
                    function closeHandler(cal) {
                    cal.hide();
                    Calendar.removeEvent(document, "mousedown", checkCalendar);
                    }
    
                    function checkCalendar(ev) {
                    var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
                    for (; el != null; el = el.parentNode)
                    if (el == calendar.element || el.tagName == "A") break;
                    if (el == null) {
                    calendar.callCloseHandler(); Calendar.stopEvent(ev);
                    }
                    }
                    function showCalendar(id) {
                    var el = xoopsGetElementById(id);
                    if (calendar != null) {
                    calendar.hide();
                    } else {
                    var cal = new Calendar(true, "' 
$jstime '", selected, closeHandler);
                    calendar = cal;
                    cal.setRange(1900, 2100);
                    calendar.create();
                    }
                    calendar.sel = el;
                    calendar.parseDate(el.value);
                    calendar.showAtElement(el);
                    Calendar.addEvent(document, "mousedown", checkCalendar);
                    return false;
                    }
    
                    Calendar._DN = new Array
                    ("' 
_CAL_SUNDAY '",
                    "' 
_CAL_MONDAY '",
                    "' 
_CAL_TUESDAY '",
                    "' 
_CAL_WEDNESDAY '",
                    "' 
_CAL_THURSDAY '",
                    "' 
_CAL_FRIDAY '",
                    "' 
_CAL_SATURDAY '",
                    "' 
_CAL_SUNDAY '");
                    Calendar._MN = new Array
                    ("' 
_CAL_JANUARY '",
                    "' 
_CAL_FEBRUARY '",
                    "' 
_CAL_MARCH '",
                    "' 
_CAL_APRIL '",
                    "' 
_CAL_MAY '",
                    "' 
_CAL_JUNE '",
                    "' 
_CAL_JULY '",
                    "' 
_CAL_AUGUST '",
                    "' 
_CAL_SEPTEMBER '",
                    "' 
_CAL_OCTOBER '",
                    "' 
_CAL_NOVEMBER '",
                    "' 
_CAL_DECEMBER '");
    
                    Calendar._TT = {};
                    Calendar._TT["TOGGLE"] = "' 
_CAL_TGL1STD '";
                    Calendar._TT["PREV_YEAR"] = "' 
_CAL_PREVYR '";
                    Calendar._TT["PREV_MONTH"] = "' 
_CAL_PREVMNTH '";
                    Calendar._TT["GO_TODAY"] = "' 
_CAL_GOTODAY '";
                    Calendar._TT["NEXT_MONTH"] = "' 
_CAL_NXTMNTH '";
                    Calendar._TT["NEXT_YEAR"] = "' 
_CAL_NEXTYR '";
                    Calendar._TT["SEL_DATE"] = "' 
_CAL_SELDATE '";
                    Calendar._TT["DRAG_TO_MOVE"] = "' 
_CAL_DRAGMOVE '";
                    Calendar._TT["PART_TODAY"] = "(' 
_CAL_TODAY ')";
                    Calendar._TT["MON_FIRST"] = "' 
_CAL_DISPM1ST '";
                    Calendar._TT["SUN_FIRST"] = "' 
_CAL_DISPS1ST '";
                    Calendar._TT["CLOSE"] = "' 
_CLOSE '";
                    Calendar._TT["TODAY"] = "' 
_CAL_TODAY '";
    
                    // date formats
                    Calendar._TT["DEF_DATE_FORMAT"] = "' 
_CAL_FORMAT '";
                    Calendar._TT["TT_DATE_FORMAT"] = "' 
_CAL_FORMAT '";
    
                    Calendar._TT["WK"] = "";
                '
);
            }
        }
        return 
"<input type='text' name='" $ele_name "' id='" $ele_name "' size='" $this->getSize() . "' maxlength='" $this->getMaxlength() . "' value='" $display_value "'" $this->getExtra() . " /><input type='reset' value=' ... ' onclick='return showCalendar("" . $ele_name . "");'>";
    }
}

?>


This core bug means the calendar time object cannot be used at all in the admin until this is updated..
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

10
vmax2extreme
Re: Content Module on 2.5.4

I replaced the file with the updated code to /class/xoopsform/formtextdataselect.php and after updating, all my admin features are blank pages. I changed back to the original file and back to working as before. Something isn't right here with this updated code! Has anyone else tested this yet? Quote:

wishcraft wrote:
Hi guys how are you? you have just discovered a core bug, to fix this you will have to patch the following file with this code:

/htdocs/class/xoopsform/formtextdateselect.php
<?php
/**
 * XOOPS form element
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @subpackage      form
 * @since           2.0.0
 * @author          Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
 * @version         $Id: formtextdateselect.php 8995 2012-02-15 13:21:30Z forxoops $
 */

defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");

/**
 * A text field with calendar popup
 */

class XoopsFormTextDateSelect extends XoopsFormText
{

    function 
XoopsFormTextDateSelect($caption$name$size 15$value 0)
    {
        
$value = !is_numeric($value) ? time() : intval($value);
        
$value = ($value == 0) ? time() : $value;
        
$this->XoopsFormText($caption$name$size25$value);
    }

    function 
render()
    {
        static 
$included false;
        include_once 
XOOPS_ROOT_PATH '/language/' $GLOBALS['xoopsConfig']['language'] . '/calendar.php';

        
$ele_name $this->getName();
        
$ele_value $this->getValue(false);
        if (
is_string($ele_value)) {
            
$display_value $ele_value;
            
$ele_value time();
        } else {
            
$display_value date(_CAL_FORMAT$ele_value);
        }

        
$jstime formatTimestamp($ele_value_CAL_FORMAT);
        if (
is_object($GLOBALS['xoTheme'])) {
            
$GLOBALS['xoTheme']->addScript('include/calendar.js');
            
$GLOBALS['xoTheme']->addStylesheet('include/calendar-blue.css');
            if (!
$included) {
                
$included true;
                
$GLOBALS['xoTheme']->addScript('','''
                    var calendar = null;
    
                    function selected(cal, date) {
                    cal.sel.value = date;
                    }
    
                    function closeHandler(cal) {
                    cal.hide();
                    Calendar.removeEvent(document, "mousedown", checkCalendar);
                    }
    
                    function checkCalendar(ev) {
                    var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
                    for (; el != null; el = el.parentNode)
                    if (el == calendar.element || el.tagName == "A") break;
                    if (el == null) {
                    calendar.callCloseHandler(); Calendar.stopEvent(ev);
                    }
                    }
                    function showCalendar(id) {
                    var el = xoopsGetElementById(id);
                    if (calendar != null) {
                    calendar.hide();
                    } else {
                    var cal = new Calendar(true, "' 
$jstime '", selected, closeHandler);
                    calendar = cal;
                    cal.setRange(1900, 2100);
                    calendar.create();
                    }
                    calendar.sel = el;
                    calendar.parseDate(el.value);
                    calendar.showAtElement(el);
                    Calendar.addEvent(document, "mousedown", checkCalendar);
                    return false;
                    }
    
                    Calendar._DN = new Array
                    ("' 
_CAL_SUNDAY '",
                    "' 
_CAL_MONDAY '",
                    "' 
_CAL_TUESDAY '",
                    "' 
_CAL_WEDNESDAY '",
                    "' 
_CAL_THURSDAY '",
                    "' 
_CAL_FRIDAY '",
                    "' 
_CAL_SATURDAY '",
                    "' 
_CAL_SUNDAY '");
                    Calendar._MN = new Array
                    ("' 
_CAL_JANUARY '",
                    "' 
_CAL_FEBRUARY '",
                    "' 
_CAL_MARCH '",
                    "' 
_CAL_APRIL '",
                    "' 
_CAL_MAY '",
                    "' 
_CAL_JUNE '",
                    "' 
_CAL_JULY '",
                    "' 
_CAL_AUGUST '",
                    "' 
_CAL_SEPTEMBER '",
                    "' 
_CAL_OCTOBER '",
                    "' 
_CAL_NOVEMBER '",
                    "' 
_CAL_DECEMBER '");
    
                    Calendar._TT = {};
                    Calendar._TT["TOGGLE"] = "' 
_CAL_TGL1STD '";
                    Calendar._TT["PREV_YEAR"] = "' 
_CAL_PREVYR '";
                    Calendar._TT["PREV_MONTH"] = "' 
_CAL_PREVMNTH '";
                    Calendar._TT["GO_TODAY"] = "' 
_CAL_GOTODAY '";
                    Calendar._TT["NEXT_MONTH"] = "' 
_CAL_NXTMNTH '";
                    Calendar._TT["NEXT_YEAR"] = "' 
_CAL_NEXTYR '";
                    Calendar._TT["SEL_DATE"] = "' 
_CAL_SELDATE '";
                    Calendar._TT["DRAG_TO_MOVE"] = "' 
_CAL_DRAGMOVE '";
                    Calendar._TT["PART_TODAY"] = "(' 
_CAL_TODAY ')";
                    Calendar._TT["MON_FIRST"] = "' 
_CAL_DISPM1ST '";
                    Calendar._TT["SUN_FIRST"] = "' 
_CAL_DISPS1ST '";
                    Calendar._TT["CLOSE"] = "' 
_CLOSE '";
                    Calendar._TT["TODAY"] = "' 
_CAL_TODAY '";
    
                    // date formats
                    Calendar._TT["DEF_DATE_FORMAT"] = "' 
_CAL_FORMAT '";
                    Calendar._TT["TT_DATE_FORMAT"] = "' 
_CAL_FORMAT '";
    
                    Calendar._TT["WK"] = "";
                '
);
            }
        }
        return 
"<input type='text' name='" $ele_name "' id='" $ele_name "' size='" $this->getSize() . "' maxlength='" $this->getMaxlength() . "' value='" $display_value "'" $this->getExtra() . " /><input type='reset' value=' ... ' onclick='return showCalendar("" . $ele_name . "");'>";
    }
}

?>


This core bug means the calendar time object cannot be used at all in the admin until this is updated..

Login

Who's Online

230 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 230


more...

Donat-O-Meter

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

Latest GitHub Commits