1
nmshah
d3downloads 1.47 and xoops 2.4.1
  • 2009/12/4 20:57

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


On submitting a download in the d3downloads module, I get following error
Quote:

Fatal error: Class 'XoopsFormDhtmlTextArea' not found in C:\xampp\htdocs\swayams\class\smarty\plugins\function.xoopsdhtmltarea.php on line 34


Lines 22 to 38 in C:\xampp\htdocs\swayams\class\smarty\plugins\function.xoopsdhtmltarea.php, line 34 is bold
Quote:

function smarty_function_xoopsdhtmltarea($params, &$smarty)
{
if (!class_exists('xoopsformelement')) {
require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
}
$form=null;

if( ! empty( $params['name'] ) ) {
$name = trim($params['name']);
$rows = isset($params['rows']) ? intval($params['rows']) : 5;
$cols = isset($params['cols']) ? intval($params['cols']) : 50;
$value = isset($params['value']) ? $params['value'] : "";
$form = new XoopsFormDhtmlTextArea($name,$name,$value,$rows,$cols);
$rendered = $form->render();
print '
'.str_replace( array( '
' ) , array( '
' ) , $rendered ) . '
' ;
}
}


Xoops debug Error info
Quote:

None All Errors (1) Queries (58) Blocks (3) Extra (23) Timers(8)
Errors
Warning: xoopsOption[template_main] should be defined before including header.php in file /footer.php line 62


Xoops info
Quote:

XOOPS Version XOOPS 2.4.1
PHP Version 5.2.8
mySQL Version 5.1.30-community
D3downloads 1.47


How do i get this module to work?

2
trabis
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/4 23:24

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


if (!class_exists('XoopsFormDhtmlTextArea')) {
require_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
}


Try changing the question!

3
nmshah
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/5 4:44

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks trabis
Quote:
if (!class_exists('XoopsFormDhtmlTextArea')) {
require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
}


But can you tell me where to put these lines. I have very little knowledge of php.

4
nmshah
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/5 5:28

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Ok, i figured it out. Thanks, it works perfectly now

5
Mamba
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/5 7:37

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


And what was the solution?

6
ghia
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/5 8:08

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Replacement of the similar code on Line 24 in \class\smarty\plugins\function.xoopsdhtmltarea.php
See both code snippets.

Of course, it is a bug, but it is weird, that suddenly xoopsformelement is loaded but not xoopsformdhtmltextarea, while they both load initially.

7
voltan
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/18 9:33

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


can you fix it in XOOPS 2.4.3?

8
ghia
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/18 10:02

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Should be fixed with this.

9
voltan
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/18 18:42

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


I'm not sure , but I think some times it work and some times it did,t work !!! ( or some times 'xoopsformelement loaded and some times not loaded )
for example some minutes ago I checked it ( whit pico ) and it work whit out problem ! but at morning I installed pico on a website and pico did't work and I was forced to change (( xoopsformelement )) whit (( XoopsFormDhtmlTextArea )) !!!!!!!!!??????????

10
ghia
Re: d3downloads 1.47 and xoops 2.4.1
  • 2009/12/19 1:34

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Should be fixed with this.
Sorry, that was a wrong assumption.
Quote:
can you fix it in XOOPS 2.4.3?

The only way to let it work is to correct the smarty plugin code by replacing the code from the first post by the one Trabis provided.

Login

Who's Online

186 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 186


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