61
theCat
xoopsForm generate heaps of Warning [PHP]: array_push(): ...
  • 2004/8/3 8:03

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Each time I preview my post, for example in the news module (v1.2) or in the wFSection module or other modules, and when the debug mode is active, I can see this warning message :Quote:
Warning [PHP]: array_push(): First argument should be an array in file f:\wwwxoops207\class\module.textsanitizer.php line 113


I have searched for a solution. When I edit the file named class/xoopsform/form.php and when I comment the line 388, the warning disapears. Is this normal ?

(This line 388 was added on v2.07)



62
theCat
Re: Registration-Modify needed
  • 2004/6/17 6:00

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


I have made a tutorial to explain how modify the register form, but available here only in french
Another pint ?



63
theCat
Re: XOBJ_DTYPE_EMAIL
  • 2004/5/15 14:19

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Quote:
Could you put it on the bugs tracker?

Yes, I can



64
theCat
XOBJ_DTYPE_EMAIL
  • 2004/5/15 10:23

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


I think there is a bug with XOBJ_DTYPE_EMAIL in object.php when this object is not required : you have an error if the email ='' and you can't store your object.

line 451
if (!preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-]+)+$/i",$cleanv)) {
$this->setErrors("Invalid Email");

I think this code is better
if ($cleanv != '' && !preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-]+)+$/i",$cleanv)) {
$this->setErrors("Invalid Email");



65
theCat
Re: XOOPS Dev Team: Would it be hard to propagate module name in all reference to the module?
  • 2004/3/17 10:38

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Quote:
- others?

Don't forget functions and blocks.
Examples with news02
Search
Quote:
xoops_version ;
$modversion['search']['func'] = "news02_search";

include\search.inc.php :
function news02_search($queryarray, $andor, $limit, $offset, $userid)


comment
Quote:

xoops_version :
$modversion['comments']['callbackFile'] = 'include/comment_functions.php';
$modversion['comments']['callback']['approve'] = 'news02_com_approve';
$modversion['comments']['callback']['update'] = 'news02_com_update';


Notify
Quote:

xoops_version:
$modversion['notification']['lookup_func'] = 'news02_notify_iteminfo';


Blocks
Quote:

xoops_version:
$modversion['blocks'][3]['file'] = "news_top.php";
$modversion['blocks'][3]['show_func'] = "b_news02_top_show";
$modversion['blocks'][3]['edit_func'] = "b_news02_top_edit";

news_top.php
function b_news02_top_show($options) {

function b_news02_top_edit($options) {




66
theCat
Select box for general setting
  • 2004/3/8 8:46

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


The normal way for select box in general settings is:
$modversion['config'][1]['formtype'] = 'select';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 10;
$modversion['config'][1]['options'] = array('5' => 5'10' => 10'15' => 15'20' => 20'25' => 25);

I search to customize a select box with the result of query:
$modversion['config'][3]['valuetype'] = 'int';
$modversion['config'][3]['default'] = 10;
global 
$xoopsDB;
$sql 'SELECT desc FROM '.$xoopsDB->prefix("mytable");
$result=$xoopsDB->query($sql);
...???
$modversion['config'][1]['options'] = ???

I have tryed with a lot of methods (while (list($desc)=..., while ( $myrow =..., push_array,...)but neither will work.
Is it possible ? Or dou you now a module who use a similar method?



67
theCat
Re: Customizing the Registeration Fields
  • 2004/3/2 8:45

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


look at this document



68
theCat
Re: i need hack in register section
  • 2004/2/20 10:10

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


I try to translate this tutorial here, but I speak very bad english. Perhaps with this new link, is it more comprehensible for you ?



69
theCat
Re: i need hack in register section
  • 2004/2/20 7:25

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


I have made a tutorial to explain all the modifications to make; it's in french, but I think it's comprehensible even you don't speak french. Available here.



70
theCat
Re: xoops struct
  • 2004/2/19 16:09

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Salut frenchy, tu trouveras peut-être ce que tu cherches sur cette page de xoops-fr

2 pdf files to download :
kernel
users




TopTop
« 1 ... 4 5 6 (7) 8 »



Login

Who's Online

229 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

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

Latest GitHub Commits