11
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 14:51

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Heh... Great thx, and sorry for silly problem...
IMHO this should be in mod dev on wiki (And lot more)...

12
Mithrandir
Re: Seeking hint for Config Settings in xoops_version

I just added it to the kickstart guide for module development.

What more should be on the dev wiki? It's always easier to spot useful information after problems arise, so if you can give some topics, which are not exactly problems (yet) we may be able to catch it before the problems emerge.

13
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 15:15

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Previusly i have problem with modyfing database when form was submited by GET method, not POST. Use of queryF insted of query. This wasn't mentioned on kickstart.

Now I'm fighting with XoopsFormClass, and stuck on creating Select :P, but still trying to figure it out.

Anyway, IMHO whole Module Development Docs shuld have more "human" readable informations about some XOOPS API's (classes) like $xoopsDB, XoopsForm, accessing XOOPS global config and module config values (how, and what can be accesed).

Now i'm begingin working on huge module for XOOPS for my site, and i want make it proper as XOOPS module, to avoid any problems in future when mooving/reinstaling/upgrading xoops. But now instead of working on my mod, i still learning whole API's and trying what is what and how it work (or why it not working). If i stuck on something else i give know on this forum :P

Anyway, once again thanx for great and fast support on forum, but i think if someone spend some time on making good Module Development Documentation, you All (dev's) will have much more time to work on XOOPS instead replaying to basic forum questions. Think about it.

Btw. Sry for my poor english

14
Mithrandir
Re: Seeking hint for Config Settings in xoops_version

XoopsFormSelect?

I agree that more things could be explained but it is quite difficult to estimate the level needed. In general, the dev wiki is written to be a little more accessible and commented than the phpDoc generated documentation and looking at the code itself. However, the best way to find out, how things work is by reading the code - it is not the easiest way, it is not the quickest way, but it's the most rewarding way

15
kaotik
Re:Seeking hint for Config Settings in xoops_version
  • 2004/10/20 2:58

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I have a couple of questions regarding this.
If I have a form that is currently like this:
input type='text' name='attachmentdirS' value='$attachmentdir'

And in my xoops-version I set up
$modversion['config'][1]['name'] = 'attachdir';
etc.

Would the correct way to replace the var in the form be:
input type='text' name='attachmentdirS' value=$xoopsModuleConfig['attachdir']


Also another question. Do I always have to setup xoops_version like this:
$modversion['config'][2]['name'] = 'maximgwidth';
$modversion['config'][2]['title'] = '_MI_FM_MXIMAGEWIDTH';
$modversion['config'][2]['description'] = '_MI_FM_MXIMAGEWIDTHDSC';
$modversion['config'][2]['formtype'] = 'textbox';
$modversion['config'][2]['valuetype'] = 'text';
$modversion['config'][2]['default'] = '1024';

Or could I cut some options out (at the moment I'm just tring to keep it simple to see if I can understand how things work)? Like this:
$modversion['config'][2]['name'] = 'maximgwidth';
$modversion['config'][2]['formtype'] = 'textbox';
$modversion['config'][2]['valuetype'] = 'text';
$modversion['config'][2]['default'] = '1024';


Thanks

16
Dave_L
Re:Seeking hint for Config Settings in xoops_version
  • 2004/10/20 3:17

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


1) Quote:
input type='text' name='attachmentdirS' value=$xoopsModuleConfig['attachdir']


It depends on the context. Is this in a .php file, output with echo? Is it in a Smarty template?

If it's in a .php file, the correct syntax would be:

echo "{$xoopsModuleConfig['attachdir']}' />";


You might also need
global $xoopsModuleConfig;
preceding that.

By the way, passing a file system directory name as a form input field, and using that directory for file operations, is not really secure, unless you check that the directory name is valid before using it. But maybe you're not using it that way.

2) I'm not sure what happens if you omit the title and description.

17
kaotik
Re:Seeking hint for Config Settings in xoops_version
  • 2004/10/20 13:39

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


So what would be the sugested method for using it? At the moment I'm not using smarty. Only the php echo thing. Would I have to setup iniatlly vars in the php file such as:
$attachments $xoopsModuleConfig['attachdir']

and then use that var in the form?

Thanks for the help.

Login

Who's Online

321 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 321


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