1
Dhurgan
irritating with inconsistant xoops_version.php
  • 2004/4/26 15:03

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


I dont know if this been mention before...
I'm pretty new to modyle-coding... but...

Why is xoops_version.php so inconsistant?

if the first part...

$modversion['name'] = _MI_MODUL_MODULENAME;

in the blocks part...

$modversion['blocks'][1]['name'] = _MI_MODULE_BLOCKNAME;

and so on...

but then in the config part...

$modversion[config][1]['name'] = '_MI_MODULE_CONFIG1NAME';

suddenly you must have the ' mark around the define for it to work properly, why is that?

also, there is a limit on the length of the define somewhere just beyond thirty characters (32?) Wich is a bit small considering how the naming convention is laid out.


2
Brad
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 15:17

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


Quote:
also, there is a limit on the length of the define somewhere just beyond thirty characters (32?) Wich is a bit small considering how the naming convention is laid out.

Where'd you get that you can only have 32 characters in a constant from?

3
Dhurgan
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 15:23

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


from using it

_MI_CHALLENGE_ICONRESOLUTION_DESC

will not display its content when used as a config desc

_MI_CHALLENGE_ICONRES_DESC

will

I havent tested exactly when it doesnt show it anymore but it wont show the 33 char one when used via xoops_version.php and a config description or name

So it might be that its the config database that cant handle it, not the define itself.

Xoops 2.0.6

4
Dave_L
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 15:29

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The language strings used in xoops_version.php should all start with _MI_XXXX, where XXXX is the module name.

The quotes ('') are needed because in those cases, the name of the constant has to be stored in the array. In other places, the value of the constant needs to be stored. But I agree that it's inconsistent.

The maximum length is determined by the width of the database column(s) that stores it. I thought that was 32, but I just checked, and the width appears to be 30.

5
Dhurgan
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 18:13

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Quote:

Dave_L wrote:
The language strings used in xoops_version.php should all start with _MI_XXXX, where XXXX is the module name.

I know the module naming convention, what I ment was that the convention makes for long names, and with a short space for it it makes it unflexible.

Quote:
The quotes ('') are needed because in those cases, the name of the constant has to be stored in the array. In other places, the value of the constant needs to be stored. But I agree that it's inconsistent.

In other words, its a perk of PHP? Well, I guess I'll have to live with that then...

Quote:
The maximum length is determined by the width of the database column(s) that stores it. I thought that was 32, but I just checked, and the width appears to be 30.

Well, I can probably adjust that then, but I have to check so that no classes use that limit first

Login

Who's Online

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


Members: 0


Guests: 229


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