1
wingrider101
Block and Module "Weight" Values

I'm writing an article for my web site, and I need a little info that I can't find after searching the XO site pretty thouroughly. Knowing that some of you out there know the site a lot better than I, I thought I would pose the questions here.

1. What is (are) the minimum and maximum numeric values that can be put into the weight field in blocks configuration?
2. What is (are) the minimum and maximum numeric values that can be placed into the module weight field in module configuration?
3. In modules setting a value of 0 will cause the module to not be visible in the menu. Will setting a value of 0 in a block have any effect?

Thanks in advance for any help. I'm developing an admin module system to easily order blocks and menus, and an article to go along with it.

Byron
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

2
GPboarder
Re: Block and Module "Weight" Values
  • 2008/7/15 22:12

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


Setting the weight of a block is like giving it a density. The more dense things sink to the bottom and the less dense ones float to the top. 0 in the blocks weight is the equivalent of saying that there is nothing pulling it down so therefore it will compete for the top location with other blocks having a weight of 0.

I just tested 10000 as a weight with no problems but can't tell you an actual limit.

There is a specific setting in the Blocks Administration area that determines if a block is visible or not. The weight does not affect the visibility.
Optimism is the mother of disappointment.

3
iHackCode
Re: Block and Module "Weight" Values

1. smallint(5) unsigned (Not Zero Fill), range: 0 - 65535

2. smallint(3) unsigned (Not Zero Fill), range: 0 - 65535

3. setting blocks to 0 weight makes it appear closer to the top. if two or more are zero, then the one with the lower blockid will appear closer to the top. the greater the number, the block will appear closer the to bottom, compared to other blocks.

==
note. smallint(5) and smallint(3) I don't know if it is phpmyadmin or what but since it is unsigned, they are just smallint. also the input for the text boxes have a limit on 5 characters that was coded.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
wingrider101
Re: Block and Module "Weight" Values

Quote:

Bandit-X wrote:
1. smallint(5) unsigned (Not Zero Fill), range: 0 - 65535

2. smallint(3) unsigned (Not Zero Fill), range: 0 - 65535

3. setting blocks to 0 weight makes it appear closer to the top. if two or more are zero, then the one with the lower blockid will appear closer to the top. the greater the number, the block will appear closer the to bottom, compared to other blocks.

==
note. smallint(5) and smallint(3) I don't know if it is phpmyadmin or what but since it is unsigned, they are just smallint. also the input for the text boxes have a limit on 5 characters that was coded.


Thanks, that's exactly what I needed. I'm developing a module to select the blocks you want from a given section, and alphabetize them, in up or down order, or move them around a little easier. I'm also planning on having the modules move up and down the menu in the same way. I'm using weight as the simple way to do that.

In the interim, I thought I would just write up how it all works so that folks who are new to XOOPS can read up on it. The documentation so far leaves a lot to be desired on this one particular section.

This will be the first (of many I hope) articles on my new XOOPSTyro.com web site that I'm still developing.

As always, the community steps up! Thanks!

Byron
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

5
wingrider101
Re: Block and Module "Weight" Values

Quote:

GPboarder wrote:
Setting the weight of a block is like giving it a density. The more dense things sink to the bottom and the less dense ones float to the top. 0 in the blocks weight is the equivalent of saying that there is nothing pulling it down so therefore it will compete for the top location with other blocks having a weight of 0.

I just tested 10000 as a weight with no problems but can't tell you an actual limit.

There is a specific setting in the Blocks Administration area that determines if a block is visible or not. The weight does not affect the visibility.


Thanks! I like your density analogy. I'll use it in my article if you don't mind. I'm trying to really explain this in a way a XOOPS Newbie will get it.

Byron
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

6
Mamba
Re: Block and Module "Weight" Values
  • 2008/7/16 16:36

  • Mamba

  • Moderator

  • Posts: 11256

  • Since: 2004/4/23


Quote:
This will be the first (of many I hope) articles on my new XOOPSTyro.com web site that I'm still developing.

Fantastic! We definitely need more documentation, so every article showing how to do things with XOOPS, is very helpful.

Thank you!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
wingrider101
Re: Block and Module "Weight" Values

I have a partial document that I'd like some of you guru types to look over. If you can send me an e-mail at my e-mail address. I'll send you back a copy of the OpenOffice odt file I have so far.

I'd love to have some comments/suggestions/finger pokes etc on how I'm doing.

Thanks in advance.

Byron
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Byron McKay
wingrider101 at gmail dot com
http://byron.homelinux.com
http://www.xoopstyro.com
-------------------------------------
Xoops CMS Intranet sites for Business
-------------------------------------

8
Mamba
Re: Block and Module "Weight" Values
  • 2008/10/13 4:10

  • Mamba

  • Moderator

  • Posts: 11256

  • Since: 2004/4/23


Email on the way
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

34 user(s) are online (10 user(s) are browsing Support Forums)


Members: 0


Guests: 34


more...

Donat-O-Meter

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

Latest GitHub Commits