31
nayeem
Re: how to change the menu on the left
  • 2004/6/17 19:03

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


oh sorry got it now.

its all in xoops_version.php under $modversion['hasMain']



32
nayeem
how to change the menu on the left
  • 2004/6/17 18:45

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


does anyone know where is the bit of code that defines what goes in the menu on the left.
the news module seems to be able to change it and make submenus. how would i be able to change it from my modules?

thanks in advance.

nsm



33
nayeem
how to add more fields in the user table?
  • 2004/6/17 16:15

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


how would i add more fields to the user table? Mainly my module might have new fields specific to each user. is there a built in way to add more fields to the user table and access them through the member class, or would i need to create my own table for it, then extend the member class and use the derived version of the member class...
but even then the internal functions such as logging in and setting cookies will not use the new extended member class will it?

nsm



34
nayeem
Re: mass update on config table at module install time
  • 2004/6/15 8:42

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


Nope, not working with $msgs.
My xoops_version.php has :

$modversion['onInstall'] = 'installscript.php';


and the installscript.php looks like this :
<?php
function xoops_module_install_il(&$module)
{
        global 
$msgs;
        
$msgs[] = "Install Script has been called!";
}
?>

il is the name of the module directory.



35
nayeem
Re: Album-Modules
  • 2004/6/15 8:05

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


i am working on a module at the moment that would replicate myalbum or xoopsgallery functionalities only it will be fully database driven, have a lot more features and would be using the xoops' own classes and structures.
i am planning to add an option to upload a lot of images as a zip file, that should solve it. i am expecting to have it ready in the next 6-8 weeks however.

nsm



36
nayeem
Re: mass update on config table at module install time
  • 2004/6/14 17:10

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


is there any functions/methods to send output from the post installscript, eg add to msg etc?



37
nayeem
Re: mass update on config table at module install time
  • 2004/6/14 16:39

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


sorry found the error. I missed putting IL_config at the bottom. hadnt realized it would break if i miss out certain tables from this list! might be nicer if it told me



38
nayeem
Re: mass update on config table at module install time
  • 2004/6/14 16:27

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


thanks guys.
i seem to be running into some strange problem when trying to create the tables in the first place however. It doesnt create the tables and doesnt give any error messages either. Below is what my sql file looks like :
Quote:

http://195.188.168.14/~admin/x2/html/modules/il/sql/mysql.sql


the installer shows the following error, i am guessing its to do with how sqlutility.php breaks the sql file up?... is there something obvious i am missing?
Quote:

SQL file found at /Users/admin/Sites/x2/html/modules/il/sql/mysql.sql.
Creating tables...
Module data inserted successfully. Module ID: 15

the xoops_version.php code is like this :
Quote:

$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "IL_albums";
$modversion['tables'][1] = "IL_categories";
$modversion['tables'][2] = "IL_photo_categories";
$modversion['tables'][3] = "IL_comments";
$modversion['tables'][4] = "IL_photos";
$modversion['tables'][7] = "IL_rating";


the sql creates a table fine if i only have one table.



39
nayeem
Re: mass update on config table at module install time
  • 2004/6/14 15:28

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


thanks.

is there a XOOPS standard way of running queries or would it be something like the following by using the db object :
$xoopsDB->execute('insert into config...');

Where can i find the code that actually runs the sql file thats passed on the xoops_version.php. It would help to figure out some of the syntax if i can find that.

nsm



40
nayeem
Re: mass update on config table at module install time
  • 2004/6/14 14:46

  • nayeem

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


Thanks for the replies.

One part of my problem can be now solved if I put the queries updating my own tables inside the sql file in the module.

However, for inserting into the 'config' table using queries, how would I read the module id at install time? even if i run from the postinstall function like dave suggested on (2).

If this is really not possible I guess I will just put them all in the xoops_version.php...

nsm




TopTop
« 1 2 3 (4) 5 »



Login

Who's Online

120 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 120


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