11
flymirco
Re: Custom module installation problem
  • 2009/7/14 15:16

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi culex,

you have seen what has come after I solved the problem.
Now I can't install my module due to foreign key creation problem. This is the error I got:
Quote:
CREATE TABLE svy_domande ( id INT NOT NULL AUTO_INCREMENT , riga INT NULL , attributi_id INT NOT NULL , valore INT NULL , alternativa SMALLINT (4) NULL , PRIMARY KEY (id), INDEX fk_domande_attributi1 (attributi_id), CONSTRAINT fk_attr1 FOREIGN KEY (attributi_id) REFERENCES svy_attributi(id) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE = INNODB
Error number: 1005
Error message: Can't create table 'unipolls.xup_svy_domande' (errno: 150)

I setted up correctly XAMPP by changing my.cnf file. Now I think that problem arise from tables prefix during foreign key creation.

Is there a way to tell to the query processor to add prefix also on REFERENCE <table name> (<field>)?

flymirco



12
flymirco
Re: Custom module installation problem
  • 2009/7/14 9:27

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


I found it the problem: it was the comment at the end of all CREATE TABLE statement that causes the module installation fails.

It also doesn't support a CREATE INDEX statement. To do that you have to put the index creation in the CREATE TABLE statement as a UNIQUE KEY <index name> (<field list>).

flymirco



13
flymirco
Re: Custom module installation problem
  • 2009/7/14 7:47

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi Bandit-X,

you are right, no prefix in sql file. That's seems to be the problem. I don't know why, but it can't add the prefix or some errors come when he tried to add.

flymirco



14
flymirco
Re: Custom module installation problem
  • 2009/7/14 2:32

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi Bandit-X,

no sql lines gives errors. I tried all the table creation and there are no errors. Only one doubt, I set the Engine to INNODB for all the tables in the script.



15
flymirco
Custom module installation problem
  • 2009/7/14 2:11

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi all,

I am using XOOPS 2.3.3 on a local XAMPP web server (version 1.7).
I am developing a custom module but I got an error when I try to install it.
The error is _MD_AM_SQL_NOT_VALID:
Quote:
is not a valid SQL!

I find this error coming from file modules\system\admin\modulesadmin\modulesadmin.php at line 197

Starting the debug I can see that the table are created and, after module error dropped. Why I have this problem? The sql is correct and the file is in UTF-8 charset. Can you help me to the right point?

Where I can find a module development tutorial for XOOPS 2.3.3 and the changes between it and the old 2.0.18 release?

Thanks in advance.

flymirco



16
flymirco
Re: Kwicks effect using jQuery in Xoops 2.3.1
  • 2009/2/2 10:29

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi ghia,

first of all I have to tell that I solved the problem. There were a problem with a js file, it was corrupted, that's why it didn't work. Despite that there is still an open question. I am using an old version of xoops.js, built for release 2.0.18 and I don't know if this can compromise something in my 2.3.1 instance.

Now for ghia, I made the change because both XOOPS javascript and jQuery use the $() function, so to avoid conflicts between the two js systems it's better to use the code I wrote, as I found in this post.

flymirco



17
flymirco
Kwicks effect using jQuery in Xoops 2.3.1
  • 2009/1/31 16:48

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi all and thanks for the great work with Xoops.
I am using XOOPS 2.3.1 and try to put the the Kwicks effect using jQuery in my theme.

In the release 2.0.18 there were a modified version of xoops.js, provided by krisfr, that worked with jQuery, so I want to know if there is a similar modified version of the file for the 2.3.1 release.
I followed the step indicated in Jeremy Martin blog but the effect didn't work.
After including jquery library tin the theme I used this code for the effect:
<script type="text/javascript">
jQuery(document).ready(function(){
    
jQuery('.kwicks').kwicks({  
        
max 300,  
        
spacing 0  
    
});  
});      
</
script>

Html and css are the same of the tutorial.

Any idea on how to resolve it? Thanks in advance.

flymirco



18
flymirco
Re: Smarty template in the admin section of a module
  • 2008/11/23 12:09

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Thank you so much trabis, it works fine!

Xoops rocks!

PS: I make a FAQ in the Italian XOOPS Support Community website with your tips, visible at XoopsItalia.org

flymirco



19
flymirco
Smarty template in the admin section of a module
  • 2008/11/22 21:53

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


Hi all,

is there a way to use smarty template in the admin section of a module?
I looked at some old post but the informations founded wasn't helpful.

flymirco



20
flymirco
piCal 0.91 problems
  • 2008/5/27 11:58

  • flymirco

  • Just popping in

  • Posts: 42

  • Since: 2006/9/20


I have installed piCal 0.91 and it is ok.
Now I want to see the mini_calendar block but it isn't displayed yet. Turned on the debug I got this message:
Quote:
Warning: pical_mini_calendar_show(/modules/dropdown/include/read_configs.php) [function.pical-mini-calendar-show]: failed to open stream: No such file or directory in file /modules/piCal/blocks/pical_mini_calendar.php line 57
Warning: pical_mini_calendar_show() [function.include]: Failed opening '/modules/dropdown/include/read_configs.php' for inclusion (include_path='.:/php/lib/php/') in file /modules/piCal/blocks/pical_mini_calendar.php line 57

So I looked to the file pical_mini_calendar.php and I see that the problem is in how the module get his own module directory name:
function pical_mini_calendar_show$options )
{
    global 
$xoopsConfig $xoopsDB $xoopsUser ;

    
$mydirname = empty( $options[0] ) ? basenamedirnamedirname__FILE__ ) ) ) : $options[0] ;

the $mydirname that it get is "dropdown" instead of "piCal". Is it a problem of php version?

My site is under:
XOOPS 2.0.16
PHP 4.4.7
MySQL 5.0.54

Thanks in advance.

flymirco




TopTop
« 1 (2) 3 »



Login

Who's Online

122 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 122


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