Dries Buytaert
8c02d4ec93
- Patch #45530 by Morbus: filter_form shouldn't default to #weight 0
...
When a form element doesn't specify a #weight, it is assumed internally as #weight 0. However, to ensure that our form elements display visually *as they were defined in the array* we, in form_builder, count the number of elements, divide by 1000, and set that as the weight:
# Assign a decimal placeholder weight to preserve original array order
if (!isset($form[$key]['#weight'])) {
$form[$key]['#weight'] = $count/1000;
}
The above code will set the #weights of elements that have not defined a weight to something like 0 (first element in array definition), 0.001, 0.002, and so on. However, anytime a form element *explicitly* defines a #weight of 0, that #weight is kept at exactly 0, which would cause that form element to appear BEFORE the elements that didn't have a #weight defined (and thus received a #weight such as 0.002).
Consider the following pseudo example:
$form['game_title'] = array(
'#type' => 'textfield',
...
);
$form['game_description'] = array(
'#type' => 'textarea',
...
);
$form['game_format'] = filter_form(variable_get('game_format', NULL));
return $form;
Here, we're not definiing weights on our two textfields. We then add an filter_form. The second parameter of the filter_form is $weight, which defaults to 0. After this $form hits form_builder, we have weights 0 (game_title), 0.001 (game_description), and 0 (filter_form) respectively. This is then sorted by weight, which causes filter_form (the third element in the array) to appear BEFORE game_description (0 is lighter than 0.001).
The short lesson is: explicitly defining #weight 0 for a form element is probably a bad idea. This patch changes the default #weight of filter_form to NULL, instead of 0, and also removes any other explicit setting of #weight to 0 in core.
2006-01-20 09:04:34 +00:00
Dries Buytaert
e84a98a22b
- Patch #45349 by Morbus Iff: input filters aren't sorting correctly infForms API.
2006-01-19 08:54:41 +00:00
Dries Buytaert
47ae354ef5
- Patch #44163 by m3avrck: fixed typo in permission and fixed incorrect description.
2006-01-12 10:01:15 +00:00
Steven Wittens
1b66966a4b
- #43495 : Separate permission for PHP-based block visibility
2006-01-08 03:33:31 +00:00
Dries Buytaert
6c20d333d2
- Patch #35667 by Crell: bug fix: on ?q=admin/block style.css was imported twice.
2006-01-06 07:25:44 +00:00
Dries Buytaert
764f1177ef
- Patch #40631 by Chris Johnson: is_array() slower than isset() or empty().
2005-12-14 20:10:45 +00:00
Dries Buytaert
28fdb3975e
- Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick.
2005-12-05 09:11:33 +00:00
Dries Buytaert
26bd449860
- Patch #39576 by chx: rename '_execute' to '_submit' and '#execute' to '#submit'.
2005-12-02 15:21:01 +00:00
Dries Buytaert
8b02851fee
- Patch #37714 by asimmonds: fixed saving of blocks.
2005-11-16 22:07:48 +00:00
Dries Buytaert
c8f6a2421b
- Patch #35524 by asimmonds / drewish: converted the custom block forms code to the forms API's execute model.
2005-11-13 08:26:01 +00:00
Dries Buytaert
aeed4cd8e4
- Patch #35644 by webchick: forms API simplificiations.
2005-11-12 11:26:16 +00:00
Dries Buytaert
7bd728ef4a
- Patch #36029 by asimmonds: fixed typo that prevents 'admin - block - configure' from working.
2005-11-03 15:39:37 +00:00
Dries Buytaert
a8b218827a
- Patch #26139 by webchick / Kieran / documentation team: improved admin help of core modules! /
2005-11-01 10:17:34 +00:00
Dries Buytaert
f6764cfbd8
- Patch #30930 by m3avrck/deekayen: cured PHP5 warnings.
2005-10-22 15:14:46 +00:00
Dries Buytaert
75fe6b6c0a
- Patch #33752 by chx, adrian, et al: another batch of form API changes/fixes.
2005-10-11 19:44:35 +00:00
Dries Buytaert
a1ae4da70b
- Removing tabs and trailing whitespaces.
2005-10-07 06:51:43 +00:00
Dries Buytaert
7e1527ee61
- Patch #29465 : new form API by Adrian et al.
...
TODO:
+ The contact.module was broken; a new patch for contact.module is needed.
+ Documentation is needed.
+ The most important modules need to be updated ASAP.
2005-10-07 06:11:12 +00:00
Dries Buytaert
da74bce9bc
- Patch #30801 by Allie Micka, m3avrck, 1uv4t4r et al: fixed block problems.
2005-09-14 21:37:11 +00:00
Dries Buytaert
6ea4bc6caa
- Patch #30801 by Allie Micka and m3avrck: performance improvements: improved the database scheme and queries of the block.module.
2005-09-12 18:26:59 +00:00
Dries Buytaert
7b8a409675
- Patch #29385 by chx: no ?> add end of files.
2005-08-25 21:14:17 +00:00
Dries Buytaert
26fa7c730f
- Patch #16216 by nedjo: multiple block regions!
2005-08-16 18:06:18 +00:00
Dries Buytaert
273d7f59b6
- Patch #27713 by tostinni: fixed two problems on the block add page:
...
+ description field isn't marked as requiered
+when the field isn't unique, an error is displayed, but the wrong text field is set as erronous.
2005-08-07 15:30:03 +00:00
Steven Wittens
e4096e1418
- #27551 : Rename check_output() to check_markup(). Needs contrib updates!
2005-07-29 21:06:33 +00:00
Dries Buytaert
7ab84f9fcf
- Patch #26217 by HellRaider: fixed problem <front> setting in presence of slashes.
2005-07-20 11:44:40 +00:00
Dries Buytaert
8e0b516022
- Patch #26233 by Goba: fixed problem with block regions being buggy.
2005-07-03 15:27:52 +00:00
Dries Buytaert
2c10ff4b5f
- Fixed problems with filter formats and problem with XML-RPC server.
2005-06-29 19:53:14 +00:00
Dries Buytaert
58aee8cdad
- Patch #25603 by Stefan: made the sizes of forms consistent.
...
TODO: document the defaults in the PHPdoc comments.
2005-06-27 18:33:33 +00:00
Dries Buytaert
2abaae6baf
- Patch #22192 by tostinne: fixed invalid XHTML code
2005-05-22 12:48:47 +00:00
Dries Buytaert
2debcfb1ef
- Patch #15595 by Stefan and Djun: improved status messages.
...
TODO: we should write down a couple guidelines for these document them in
the PHPDoc code of drupal_set_message()! .
2005-05-05 22:22:46 +00:00
Dries Buytaert
cf1224d57b
- Patch #21939 by Usability Poobah Chris: added missing </p> tag.
2005-05-05 11:24:21 +00:00
Dries Buytaert
8bfcf2c2e4
- Patch #21445 by Goba: added missing t() function.
2005-05-01 18:37:18 +00:00
Dries Buytaert
a93cf89665
- Patch #21353 by chx: implemented PHP-mode for blocks.
2005-04-30 18:16:38 +00:00
Dries Buytaert
a76a1e1f3f
- Patch 20910 by chx: centralize print theme page.
2005-04-24 16:34:36 +00:00
Dries Buytaert
199aab5ff5
- Improved consistency.
2005-04-18 20:31:50 +00:00
Dries Buytaert
f33f9a5fcd
- Patch #19965 by Robin Monks: fixed problem with duplicate block titles.
2005-04-12 18:52:47 +00:00
Dries Buytaert
c7c33cc174
- Modified patch #19694 by chx: makes sure that block.module deals by default only with regions 0 and 1 as it does now but lets you use block_list with any region you define. This opens many possibilites. You may do a multi region module, with your admin UI using the blocks table as storage and the block_list matcher. Or you may do a sections module using the block matcher without cluttering the current blocks list.
2005-04-04 12:27:05 +00:00
Steven Wittens
be14203534
- #18817 : Clean up plain-text checking (see drupal-devel!)
2005-03-31 09:25:33 +00:00
Steven Wittens
c3f1f7345e
- #18939 (Stefan): Always use paragraph tags around page help text.
2005-03-18 07:07:04 +00:00
Dries Buytaert
9a47bc4e7e
- Renamed some more 'region's to 'sidebar's
2005-03-06 15:06:19 +00:00
Dries Buytaert
344f33f6af
- Patch by Neil: fixed typo.
2005-03-05 23:00:32 +00:00
Dries Buytaert
11dd94bde5
- Patch #18382 by Neil: usability improvement: organized the blocks on the block administration page by region. (I wanted to do that myself!)
2005-03-05 09:09:07 +00:00
Steven Wittens
198ec98f75
#18329 : Unify confirmation messages (and make them themable)
2005-03-03 20:51:27 +00:00
Steven Wittens
4a9b9f4aca
- Block admin usability: display block title if no description was given.
2005-03-03 05:54:25 +00:00
Steven Wittens
d4f1b435a1
- #17868 : Remove hardcoded align="center"
2005-02-27 02:48:57 +00:00
Steven Wittens
d5db06d5e9
#17216 : Restore missing "delete" link for blocks.
2005-02-22 06:16:06 +00:00
Dries Buytaert
bb4dff0c92
- Patch #16399 by James: fixed typo in block.module.
2005-01-28 15:24:16 +00:00
Steven Wittens
07acc7920f
Typos.
2005-01-27 22:53:35 +00:00
Steven Wittens
ffcf5ab71b
- Code style
2005-01-27 19:55:22 +00:00
Dries Buytaert
1f91662123
- Patch #16074 by Andre Molnar: add configuration option to show blocks only on pages of certain node type.
2005-01-27 19:41:01 +00:00
Steven Wittens
9d6253374d
#15185 : Fix front page handling of blocks
2005-01-06 01:17:31 +00:00