Commit Graph

385 Commits (8a0d326a8e134ad4261b9575ce073f9e44b72f60)

Author SHA1 Message Date
Dries Buytaert 01191f7230 - Patch #63267 by profix et al: trim the content of the 'pages' setting so it can be evaluated properly. 2006-11-08 19:49:13 +00:00
Dries Buytaert 42530dc6e3 - Patch #91906 by kkaefer and RobRoy: usability improvement to the block administration interface. 2006-11-08 19:27:59 +00:00
Dries Buytaert 9321ee109d - Patch #93536 by Gabor: eliminate remaining bluemarine traces from core code. 2006-11-08 19:24:11 +00:00
Neil Drumm 0accf8fe1e #90508 by Heine and the security team. Every form gets a token. 2006-10-31 08:06:18 +00:00
Steven Wittens 36d44fbfb0 #84146: Use 'Sentence capitalization' for menu items, page titles, form items, etc 2006-10-22 08:28:47 +00:00
Dries Buytaert 8a478d5068 - Patch #87057 by chx and profix898: fixed problem with not being able to configure blocks per theme. 2006-10-08 06:34:12 +00:00
Dries Buytaert 18b297abf8 - Patch #81740 by merlinofchaos, webchick, moshe, neclimdul et al: added package support to the modules page. 2006-10-05 15:47:57 +00:00
Neil Drumm 5ba0c5969d #42514 by wtanaka and dopry. More thoroughly delete custom blocks. 2006-09-05 02:53:01 +00:00
Neil Drumm 208090eeb0 #82336 by jvandyk. Set the default input format if we don't have one. 2006-09-05 02:36:02 +00:00
Dries Buytaert c64db1da29 - Patch #80952 by earl, webchick, neclimdul et al: .info files 2006-08-31 20:22:37 +00:00
Neil Drumm 4c5b53040a #68187 by Zen. Blovk visibity by path checks both aliased and non-aliased paths. 2006-08-31 08:52:11 +00:00
Dries Buytaert f2f3416549 - Patch #80934 by timnc: more t() fixes. 2006-08-27 12:43:18 +00:00
Neil Drumm 9f641766a4 #80352 by Zacker. Manually created blocks now appear in block listing. 2006-08-25 23:54:18 +00:00
Neil Drumm 02b3898e8f #80150 by webchick. Cleanup from #76666. 2006-08-23 04:44:36 +00:00
Neil Drumm 28feea3cc5 #80079 by drewish, fix some double placeholdering and other bugs with using t(). 2006-08-23 04:40:57 +00:00
Dries Buytaert 4936f4df12 - Patch #76666 by hunmonk: custom block titles. 2006-08-22 07:43:33 +00:00
Dries Buytaert a2be462995 - Use consistent terminology: placement -> region. 2006-08-21 09:18:46 +00:00
Dries Buytaert c27f564e07 - Patch #77924 by RobRoy: fixed race condition in block administration that might have caused data loss. 2006-08-20 06:49:15 +00:00
Steven Wittens 55eec8f66f #79601: module_exist() -> module_exists() 2006-08-20 05:57:41 +00:00
Dries Buytaert 7de41539df - Patch #77919 by chx, eaton, moshe, et al: enable programmaticaly submitted forms via the pull model. 2006-08-18 18:58:47 +00:00
Steven Wittens 81938a3cdc #76802: Introduce placeholder magic into t()
See: http://drupal.org/node/64279#t-placeholders
2006-08-18 12:17:00 +00:00
Neil Drumm 3cc2b1e3d7 #77183 by m3avrck and timcn, split up drupal.css by module. 2006-08-14 07:14:50 +00:00
Dries Buytaert ce85b7c7f8 - Patch #74326 by Eaton, Royboy, chx, et al: building $node->body with arrays like FAPI for viewing.
Once again, we're paving the path for CCK in core ... :)
2006-08-10 15:42:33 +00:00
Dries Buytaert 729fa6c11b - Patch #77422 by timcn: corrected various paths in the documentation. 2006-08-07 15:04:16 +00:00
Dries Buytaert b138793b68 - Patch #72079 by Earl et al: give Drupal an overall administration page ... :-) 2006-07-31 11:25:55 +00:00
Neil Drumm 451f44c4f0 #71772 by Bart Jansens, fix various php warnings 2006-07-02 20:06:31 +00:00
Dries Buytaert 02fa0d85b2 - Patch #18018 by dww, nedjo, tostinne, luke et al: block visibility by role. 2006-05-26 09:21:10 +00:00
Neil Drumm 134314a327 #62262 by dww, fix block help text. 2006-05-23 02:14:26 +00:00
Neil Drumm 9cff02e91b #61802 by Zen, Double spaced sentences clean up 2006-05-07 00:08:36 +00:00
Gerhard Killesreiter 7c941aa5dc #60563, missing block name in delete dialoge, patch by Steve McKenzie 2006-04-26 21:53:24 +00:00
Dries Buytaert d071f99172 - Removing trailing whitespace. 2006-04-17 20:48:26 +00:00
Steven Wittens 21585f66a5 #56813: Simplify admin/block code, and fix sorting of blocks in the listing 2006-04-04 23:32:40 +00:00
Dries Buytaert a9ff6cd372 - Patch #52381 by Zen:
* Converts the block administration page to the fapi model.
    * Removes some 'type=markup' elements.
    * Adds a form_render($form['form_id']); in the theme function. Adding a form_render($form) just outputs an unthemed form. I suspect this is because of the heavy nesting of form elements and the rather dodgy array declaration, but I'm unsure.
    * Documentation/language fixes.
2006-03-04 17:54:58 +00:00
Dries Buytaert 3603fe1bd8 - Patch #49912: www.drupal.org -> drupal.org. (Today's critical bugfix #5.) 2006-02-21 18:46:54 +00:00
Dries Buytaert 583d5a4ee9 - Patch #48622 by adrian: remove drupal_goto from _submit functions. 2006-02-10 05:25:57 +00:00
Dries Buytaert 15ff8c8e32 - Patch #46827 by wulff: fixed incorrect links. 2006-01-29 07:50:45 +00:00
Dries Buytaert e54db453e0 - Patch #36029 by asimmonds/dopry: fixed critical bug in block administration. 2006-01-26 09:06:23 +00:00
Dries Buytaert 2fa3490ebf - Patch #46106 by markus: usability improvement: moved the block description textfield up. 2006-01-24 08:38:29 +00:00
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
Dries Buytaert 7307de5c9e - Patch #14532 by andre molnar: tidied up some block.module code. 2004-12-18 07:52:59 +00:00
Dries Buytaert 6e3eb60aab - Removed some cruft: left-over xxx_help_page() functions. 2004-12-11 14:13:24 +00:00
Dries Buytaert a0291bb936 - Patch #14209 by nysus: improved the clarity and readability for a group of radio buttons for a block's visibility settings. 2004-12-11 12:32:01 +00:00
Dries Buytaert f37a65cab9 - Patch #12353 by Stefan: usability improvement: don't show 'throttle fields' unless the throttle module is enabled. 2004-11-15 11:26:04 +00:00
Dries Buytaert 9979aceab0 - Patch #12783 by Stefan: various small consistency/usability improvements. 2004-11-15 11:16:39 +00:00
Dries Buytaert ef95773b1c - Modified patch by Jeremy: throttle module improvements and fixes:
+ throttle module: flush cache when the throttle enables/disables
   + throttle module: prevent throttle being enabled by 0 users or guests when disabled
   + system module: remove requirement for statistics.module
   + block module: update help text to reflect access log is no longer required
   + statistics module: throttle is now enabled/disabled, not using levels 0-5
2004-11-14 20:20:09 +00:00
Dries Buytaert 3769665b33 - Refactored the throttle module. Patch by Jeremy and me.
* There are only two throttle levels instead of 5, namely 'enabled' and 'disabled'.  This makes it a _lot_ easier to predict when the throttle will kick in.  However, if you maintain a module that is throttle-aware, it needs to be updated!

  * The throttle mechanism now uses the current number of anonymous users or the current number of authenticated users to kick in.  This is a _lot_ more intuitive than the old throttle mechanism.

  * The throttle block has been removed -- you can now use the "Who's online" block to determine the good throttle settings.

  * Most of the documentation has been removed because it was deprecated.

  * It's less code!
2004-11-07 22:47:00 +00:00
Dries Buytaert b3adcf05a3 - Patch #11875 by Neil Drumm: block module configuration improvements.
The primary goal of this patch is to take the 'custom' and 'path' columns of the block overview page and make them into something understandable. As of Drupal 4.5 'custom' lacked an explanation which wasn't buried in help text and path required dealing with regular expressions.

Every block now has a configuration page to control these options. This gives more space to make form controls which do not require a lengthy explanation. This page also gives modules a chance to put their block configuration options in a place that makes sense using new operations in the block hook.

The only required changes to modules implementing hook_block() is to be careful about what is returned. Do not return anything if $op is not 'list' or 'view'. Once this change is made, modules will still be compatible with Drupal 4.5. Required changes to core modules are included in this path.

An additional optional change to modules is to implement the additional $op options added. 'configure' should return a string containing the configuration form for the block with the appropriate $delta. 'configure save' will come with an additional $edit argument, which will contain the submitted form data for saving. These changes to core modules are also included in this patch.
2004-10-31 07:34:47 +00:00
Dries Buytaert df4ec83120 - Patch #10677 by drumm: removed dead code. Leftover. 2004-10-14 21:27:33 +00:00
Steven Wittens 9e4399aae8 #10677: Confirmation when deleting a block + unifying confirmation screens. 2004-10-14 15:28:24 +00:00
Dries Buytaert cca3c34faa - Patch #11401 by Goba: documentation updates:
+ Made error strings in blog.module consistent.
   + Explained a bit better what the RSD setting is for in the blog module.
   + Removed the notes about PHP content from block module and book module, since everything is handled via the input formats now.
2004-10-09 06:29:16 +00:00
Steven Wittens 30b69380af - #10689: Group permissions by module in UI + minor code cleanups.
- Adding a drupal_goto to the block admin.
2004-09-17 22:07:17 +00:00
Dries Buytaert 5c7983c4de - Patch #8179 by JonBob: reintroduced menu caching. 2004-09-16 07:17:56 +00:00
Dries Buytaert 7b716e8e77 - Patch #10622 by Adrian: fixes various PostgreSQL related problems.
1) Menu problems with Postgres (this is a highly critical 1 line fix)
  2) Archive module fails with Postgres
  3) Postgres setup problems - changes to database.pgsql (although i made these changes myself before finding this patch)
  4) Book module fails with Postgres
  5) Postgres problems following creation of a new type of user - which is actually about a taxonomy.module bug.
  6) Creating accregator_item_table in PostgreSQL
  7) Postgres - Polls not displayed on Poll Page
  8) Blog module has sql errors with postgres

  This should not affect MySQL users (hopefully).
2004-09-08 15:38:26 +00:00
Steven Wittens 51cf18e531 - #9292: Make Drupal (somewhat) PHP5 compatible. xtemplate is still horribly broken. 2004-08-22 17:03:42 +00:00
Dries Buytaert 94e30bf776 - Patch by JonBob: for consistency and readability, add brief descriptions of each source file inside the @file comment block at the head of the file. This helps with Doxygen indexing, and also allows neophytes to see what a file does immediately on opening the source, regardless of the organization of the hooks. 2004-08-21 06:42:38 +00:00
Dries Buytaert fa25c7a0ca - Code improvements by Stefan: use capital letters for header titles (and added some missing t() functions). 2004-08-19 15:41:57 +00:00
Dries Buytaert 2f33b939c5 - Patch #9983 by Stefan: usability improvement: made sure all status messages start with a capital letter. 2004-08-16 18:02:48 +00:00
Steven Wittens 660f99287d The Input formats - filter patch has landed. I still need to make update instructions for modules and update the hook docs.
Here's an overview of the changes:
1) Multiple Input formats: they are complete filter configurations (what filters to use, in what order and with which settings). Input formats are admin-definable, and usage of them is role-dependant. For example, you can set it up so that regular users can only use limited HTML, while admins can free HTML without any tag limitations.
The input format can be chosen per content item (nodes, comments, blocks, ...) when you add/edit them. If only a single format is available, there is no choice, and nothing changes with before.

The default install (and the upgrade) contains a basic set of formats which should satisfy the average user's needs.

2) Filters have toggles
Because now you might want to enable a filter only on some input formats, an explicit toggle is provided by the filter system. Modules do not need to worry about it and filters that still have their own on/off switch should get rid of it.

3) Multiple filters per module
This was necessary to accomodate the next change, and it's also a logical extension of the filter system.

4) Embedded PHP is now a filter
Thanks to the multiple input formats, I was able to move the 'embedded PHP' feature from block.module, page.module and book.module into a simple filter which executes PHP code. This filter is part of filter.module, and by default there is an input format 'PHP', restricted to the administrator only, which contains this filter.
This change means that block.module now passes custom block contents through the filter system.
As well as from reducing code duplication and avoiding two type selectors for page/book nodes, you can now combine PHP code with other filters.

5) User-supplied PHP code now requires <?php ?> tags.
This is required for teasers to work with PHP code. Because PHP evaluation is now just another step in the filter process, we can't do this. Also, because teasers are generated before filtering, this would result in errors when the teaser generation would cut off a piece of PHP code.

Also, regular PHP syntax explicitly includes the <?php ?> tags for PHP files, so it makes sense to use the same convention for embedded PHP in Drupal.

6) Filter caching was added.
Benchmarking shows that even for a simple setup (basic html filtering + legacy URL rewriting), filtercache can offer speedups. Unlike the old filtercache, this uses the normal cache table.

7) Filtertips were moved from help into a hook_filter_tips(). This was required to accomodate the fact that there are multiple filters per module, and that filter settings are format dependant. Shoehorning filter tips into _help was ugly and silly. The display of the filter tips is done through the input format selector, so filter_tips_short() no longer exists.

8) A more intelligent linebreak convertor was added, which doesn't stop working if you use block-level tags and which adds <p> tags.
2004-08-10 18:34:29 +00:00
Dries Buytaert 9bbdb71ee4 - Patch #9330: ucfirst() gives problem when used with multibyte charset.
Replaced the use of ucfirst() with a CSS-based solution.
2004-08-06 20:15:32 +00:00
Steven Wittens f037130086 - Oopsie when committing. 2004-08-06 11:11:30 +00:00
Steven Wittens 300f91f4a7 - Cleaning up the rediculously long 'if' statement for checking block visibility.
- #9811: Remove session ID before matching block path
2004-08-06 11:10:15 +00:00
Dries Buytaert c6b1eaa20d - Patch #9775 by TDobes: consistency operation. Changed to "edit foo," "delete foo," and "view foo" links into simply "edit," "delete," and "view". 2004-08-05 05:40:53 +00:00
Dries Buytaert a7a5f51c7e - Simplified the block help a bit by removing some dated information. It
should be simplified more.
2004-08-01 19:26:07 +00:00
Dries Buytaert 1f288c11c4 - 'add block' -> 'add' 2004-07-10 16:06:49 +00:00
Dries Buytaert ac5b5616c0 - More tab-improvements by JonBob: improved support for the default tabs! 2004-07-10 15:51:48 +00:00
Dries Buytaert b05086c92f - Patch #8975 by drumm: remove block placement preview. Most themes, if not all the commonly used ones, can handle blocks on either side, and there is no way to see the preview without saving and seeing the results on the site.
Anything else that can be removed?  Less is more.
2004-07-07 05:42:24 +00:00
Dries Buytaert 1b1c47025a I refactored quite a bit of the user.module:
$ diffstat user.patch
database/database.mysql |    4
database/database.pgsql |    2
database/updates.inc    |   10 -
modules/block.module    |   20 +-
modules/locale.module   |    9
modules/profile.module  |  108 +++++++----
modules/system.module   |    8
modules/user.module     |  456 +++++++++++++++++++-----------------------------
8 files changed, 289 insertions(+), 328 deletions(-)

More functionality, less code.  Here is a list of the changes:

- Some user API changes:
   + When $type is 'form', you have to return an associative array of groups.  In turn, each group is an array with a 'title', 'data' and 'weight'.
   + A new $type has been added, namely 'categories'.  User settings can be organized in categories.  Categories can be sorted, as can the groups within a category.  (Ordering 'categories' is somewhat broken due to a bug in the menu system.)

- The 'my account > edit' page will use subtabs for each 'category'.  Read: you can break down the account settings into multiple subpages.

- Profile module improvements:
   + Added support for private fields to the profile module!
   + Improved workflow of profile administration pages.
   + Improved the form descriptions.

- Code improvements:
   + Unified user_edit() and user_admin_edit().
   + Unified and cleaned up the validation code.  Fixed some validation glitches too.
2004-06-27 19:10:52 +00:00
Dries Buytaert 7f06d092a5 - Patch #8708 (modified) by Stefan: refactored the 'add new block' form a but. 2004-06-21 21:11:36 +00:00
Dries Buytaert c2d7419f23 - Patch #8681 by stefan: fixed some broken URLs and help texts. 2004-06-20 19:49:14 +00:00
Dries Buytaert a9c560282b - Patch #8598 by cetron: fixed typo in the help text: 'shuold' -> 'should' 2004-06-18 22:20:36 +00:00
Dries Buytaert 54b77d6435 Tabs patch!
CHANGES
-------

 + Introduced tabs. First, we extended the menu system to support tabs. Next, a tab was added for every link that was (1) an administrative action other than the implicit 'view' (2) relevant to that particular page only. This is illustrated by the fact that all tabs are verbs and that clicking a page's tab leads you to a subpage of that page.

 + Flattened the administration menu. The tabs helped simplify the navigation menu as I could separate 'actions' from 'navigation'. In addition, I removed the 'administer > configuration'-menu, renamed 'blocks' to 'sidebars' which I hope is a bit more descriptive, and made a couple more changes. Earlier, we already renamed 'taxonomy' to 'categorization' and we move 'statistics' under 'logs'.

 + Grouped settings. All settings have been grouped under 'administer > settings'.

TODO
----

 + Update core themes: only Xtemplate default supports tabs and even those look ugly.  Need help.

 + Update contributed modules.  The menu() hook changed drastically.  Updating your code adhere the new menu() function should be 90% of the work.  Moreover, ensure that your modue's admin links are still valid and that URLs to node get updated to the new scheme ('node/view/x' -> 'node/x').
2004-06-18 15:04:37 +00:00
Dries Buytaert 7b9a2453d5 - Patch #8234 by mathias: using block path with Drupal subdirectory installs. 2004-06-02 18:49:22 +00:00
Dries Buytaert e52c0f5d41 - Code improvements by JonBob. Thanks. 2004-05-17 22:00:06 +00:00
Kjartan Mannes b2fd0db672 - Fixed missing block selection on user edit page. 2004-05-17 14:50:58 +00:00
Dries Buytaert c314ff54a6 - Code improvements by JonBob. Thanks again. 2004-05-11 20:10:14 +00:00
Dries Buytaert 7231c88a32 - Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they
  can define 404 pages now.

  This needs to be documented in the "Changes since / migrating to ..."
  pages.
2004-04-21 13:56:38 +00:00
Dries Buytaert 5b30c3447f - Patch #6725 by TDobes: update block module _user() hooks. 2004-03-29 18:56:21 +00:00
Dries Buytaert 76c4be3138 Patch 6523 by Steven:
- Strips the leading / from URLs to match with block paths. The reason is that everywhere else in Drupal, we use URLs without leading slash (e.g. URL aliasing). For consistency we should keep this behaviour everywhere. The replacement uses ereg_replace instead of str_replace, but the expression now only match the beginning of the URI so in fact it's faster, esp. for longer URIs.

- Updates the block docs about path matching: gets rid of leading slash, adds initial matching operator '^' and emphasises the slash behaviour (which was not mentioned anywhere before)

- Replaces the example expression for a negative match. It was horribly broken and odd, the replacement in this patch is correct and simpler.
2004-03-25 20:37:32 +00:00
Dries Buytaert 628715e4d9 - Patch #6543 by Michelangelo: block path matching breaks when clean URLs are disabled. 2004-03-21 16:30:01 +00:00
Dries Buytaert 3d5f11e004 - Restored the old block path behavior. 2004-03-05 20:33:02 +00:00
Steven Wittens e3bedc47d7 Fixed an apparently old bug which always defaulted user-togglable blocks to off, and clarified the explanation a bit. 2004-02-25 21:19:31 +00:00
Dries Buytaert 4b0b2d02ee - Patch by Steven: removed redundant permission checks. These are no longer
required thanks to the new 404 handling.
2004-02-15 20:09:46 +00:00
Dries Buytaert e28bbf6739 - Batch two with profile module improvements:
+ Reworked the 'account administration' page.
   + Fixed bug in the 'edit account' page.
   + Removed some dead code from the system.module.
2004-02-07 16:59:34 +00:00
Dries Buytaert 5a8129e0fb - First batch of profile module improvements:
+ Tidied up the profile configuration page: grouped form elements.

   + Tidied up the block configuration settings: removed hard-coded
     table.

   + Changed the profile API to return the preferred group name, and
     changed the user module to group settings.  Modules implementing
     the _user hook will need to be udpated.

   + Removed register_form and register_validate for now.
2004-02-07 16:18:46 +00:00
Dries Buytaert b85eb11e11 Patch 5287 by Stefan: multiline help texts should become inside a single $output. 2004-01-23 18:42:43 +00:00
Dries Buytaert 8d8e3d6ae6 Patch 5187 by Goba:
- puts the long multiline help text into one string
 - fixes the ambiquity of calling two things on the same name: "custom block"
   now the user customizeable blocks are called custom blocks, and the admin
   defined blocks are called Administator Defined Blocks
 - added info on throttle to the explanation on when a block is displyed
 - also fixing some small typos
2004-01-21 06:36:56 +00:00
Dries Buytaert 652fb3474a - Removed instances of the 'throttle_enable' variable. 2004-01-19 22:11:46 +00:00
Dries Buytaert 6e1cb6e003 - Patch #5184: fixed block path and aliases. Patch by Nick. 2004-01-17 11:33:58 +00:00
Dries Buytaert a8b8c247db - Patch #5021: clean up URLs in _help texts. Patch by UnConeD. 2004-01-11 20:31:26 +00:00
Dries Buytaert 80f34e5ab0 - XHTML improvements: <b> -> <strong>. Patch by Stefan. 2003-12-29 17:14:27 +00:00
Dries Buytaert baaa21e131 - Tidied up some inconsistencies in the code: scripts/code-style.sh is your friend. 2003-12-28 10:47:33 +00:00
Dries Buytaert 3904790e03 - Tidied up the DoxyGen comments. Patch by Kjartan. 2003-12-08 06:32:19 +00:00
Dries Buytaert bea3dbb775 - Patch 0185 by Jeremy: made it possible to automatically disable modules when
under heave load.
2003-12-07 18:25:09 +00:00
Dries Buytaert d45bf0f1e7 - Patch 185 by Ax: fixed undefined variables, synchronized xtemplate with sf, etc. 2003-12-04 20:53:19 +00:00
Dries Buytaert 4e2c0b250e - Introduced a drupal_set_message() and drupal_get_message() function.
Contributed themes and modules need to be updated:
   - modules: status() is no more; use drupal_set_message() instead.
   - themes: use drupal_get_message() to check for status messages and
     visualize them.
2003-12-01 13:45:33 +00:00
Dries Buytaert 4201e07670 - More throttle improvements. Patch by Jeremy. 2003-11-29 06:53:03 +00:00
Dries Buytaert ece42b6c93 - Bugfix by Jeremy. 2003-11-28 20:53:23 +00:00
Dries Buytaert 733d286b89 - Made it possible to auto-throttle blocks. That is, blocks can be
configured to be disabled when under excessive load.  Patch by Jeremy.
2003-11-28 20:03:00 +00:00
Dries Buytaert c0494c0a2b - Committed phase 4 of JonBob's menu system changes. 2003-11-25 19:26:21 +00:00
Dries Buytaert 06045ff7fc Patch by Ax to fixe and improve to the core doxygen PHPdoc:
* fixes all doxygen warnings [#]_ in the current code base
    + changes @param style from phpDocumentor (@param type $var desc) to doxygen (@param $var desc)
    + documents all undocumented parameters
    + escapes / fixes html warnings
    + fixes @defgroup in theme.inc
  * adds more groupings [#]_
    + drupal_{set|get}_title, drupal_{set|get}_breadcrumb
    + pager.inc: pager_api (pager_query(), pager_display()), pager pieces
  * adds a new group "themeable" which contains all themeable functions.
2003-11-24 22:46:03 +00:00
Dries Buytaert 4bdac4333b - Patch by JonBob:
Phase 2 of the menu system integration project. This unifies the interface
  used by admin and non-admin pages, and deprecates the _page hook in favor of
  explicit callbacks from menu(). Breadcrumbs, titles, and help text go away
  as a result of this patch; they will return in the phase 3 patch, printed
  by the theme.
2003-11-20 21:51:23 +00:00
Dries Buytaert 980637265c - Block and theme improvements. Patch by Ax.
+ block_list() (in block.module): returns an array of block objects for
     $region.
   + theme_blocks() (in theme.inc): uses block_list() and theme("block") to
     actually render them.

  Advantages:
   + Decouples blocks content and layout, allows block_list() to be used
     for non-output purposes (think "pull").
   + Unifies naming in theme.inc: render_blocks()) didn't really fit there.
   + Puts block_list() in blocks.module where it logically belongs.

- Removed some cruft from the Xtemplate theme.  Patch by Ax.
2003-11-19 16:13:07 +00:00
Dries Buytaert 36bb57555c - table(...) -> theme("table", ...) 2003-11-13 19:52:54 +00:00
Dries Buytaert ef0fa006ed - Usability improvement: replaced many selection boxes by radio buttons.
Patch by Stefan.
2003-11-07 19:03:35 +00:00
Dries Buytaert 1a5fcacdd9 - Committed part 3 of Michael's help system improvements: removed the $help
parameter from the menu() function.
2003-10-09 18:53:22 +00:00
Dries Buytaert 22c889e7c0 - Help system improvements: eliminated the _system hook. Patch by Michael.
- Bloggerapi module fixes.  Patch by Kjartan.

- Coding style fixes.  Patch by Michael.
2003-10-07 18:16:41 +00:00
Dries Buytaert 30bae36aa5 - Bugfix: the block module's help was not being displayed. Patch by Gabor. 2003-10-05 08:41:48 +00:00
Dries Buytaert 058971c33b - Help improvements and translation improvements from Michael. Thanks! 2003-10-03 14:55:27 +00:00
Dries Buytaert b4ceaac375 - Block module fixes. Patch by Kjartan. 2003-09-28 20:08:48 +00:00
Dries Buytaert bcfa6dca1e - Translation improvements for the block module help. Patch by Gabor. 2003-09-28 18:23:13 +00:00
Dries Buytaert 069e1bb87b - More translation fixes for the menu items. Patch by Gabor. 2003-09-28 17:07:46 +00:00
Dries Buytaert fe09d5a786 - Committed Al's new admin link texts. Remarks:
1) As explained by Al, there is still a glitch with the 'create content'
     menu.
  2) The user module part of the patch did not apply due to Kjartan's earlier
     patch.
2003-09-27 06:00:43 +00:00
Dries Buytaert f104d3cc12 - Committed the admin menu integration patch. Thanks Adrian, Stefan and others. 2003-09-26 10:04:09 +00:00
Dries Buytaert 2fbc7fcf27 - Committed a partial administration page integration patch. 2003-09-19 07:41:55 +00:00
Dries Buytaert 796399ffd4 - Fixed bug #2689. Patch by Bruno. 2003-08-30 21:20:21 +00:00
Dries Buytaert 6842d59732 - Documentation fixes by Michael F. 2003-08-13 18:40:26 +00:00
Dries Buytaert e2f098af85 - Block module documentation improvement. Patch by Gerhard. 2003-08-07 16:53:36 +00:00
Dries Buytaert 4131b785f7 - Help system improvements from Michael. 2003-08-05 18:33:39 +00:00
Dries Buytaert 337b3c9de9 - Committed a slightly modified version of Slavica's table prefix patch. 2003-07-10 17:46:44 +00:00
Dries Buytaert 74d9266b3f - Bugfix: fixed calendar block caching. Patch by Al. Fixes bug #2131.
- Improvement: improved the block module documentation.  Patch #59 by
  Gerhard.
2003-06-30 18:34:02 +00:00
Dries Buytaert 1758fe779f *** empty log message *** 2003-06-26 19:13:32 +00:00
Dries Buytaert 1c38cd9099 - Bugfix: renamed "create PHP content" to "create php content". Reported
by Simon, patch by Gerhard.

- Improvement: synchronized the import module help with the version on
drupal.org.
2003-06-24 15:55:22 +00:00
Dries Buytaert 828ba66500 - Bugfix: fixed utf-8 problem for people that use PHP 4.2.x or below. Patch #33 by Al.
- Bugfix: fixed translation problems in the user module and the block module.  Patch by Stefan.

- Improvement: made it impossible to delete user role #1 and #2.  Patch #38 by Al.

- Improvement: fixed the "Allowed HTML tag" issues.  Makes for better code and improved usability.  Patch #35 by Al.

  NOTE: as soon the compose tips make their way into CVS, most of this code can be removed.
2003-06-19 17:26:27 +00:00
Dries Buytaert ef8735614f - Improvements: XHTML-ifications. Patch by GmbH. See feature #1813. 2003-06-16 17:09:23 +00:00
Dries Buytaert eb030cb9d8 - Improvements: XHTML-ifications. Patch by GmbH. 2003-06-15 19:06:25 +00:00
Dries Buytaert 222e1e5583 - Documentation improvements: improved and updated the block module documentation. Patch #44 by Al. We should add some real-life path examples!
- Fixed the "blog it" image size.  Patch #49 by Al.

- Some SQL performance improvements to the forum module.  This should also be more PostgreSQL safe.  Patch by me.

mysql> SELECT n.nid, n.created AS timestamp, u.name AS name, u.uid AS uid FROM forum f, node n LEFT JOIN users u ON n.uid = u.uid WHERE f.tid = 2 AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 ORDER BY timestamp DESC LIMIT 1, 0;
==> 0.63 sec

changed to:

mysql> SELECT n.nid, n.created AS timestamp, u.name AS name, u.uid AS uid FROM forum f LEFT JOIN node n ON n.nid = f.nid LEFT JOIN users u ON n.uid = u.uid WHERE f.tid = 2 AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 ORDER BY timestamp DESC LIMIT 1, 0;
==> 0.00 sec
2003-06-10 17:33:43 +00:00
Steven Wittens e1adc0f780 Fixed some typoes... 2003-06-08 01:19:37 +00:00
Dries Buytaert 8d2b1238b4 - Michael Frankowski's excellent help text improvements! 2003-05-29 09:15:00 +00:00
Dries Buytaert c2d2fb7309 - Fixed a typo in the PostgreSQL database scheme. Patch by Michael Frankowski.
- Fixed a typo in the MSSQL database scheme.  Patch by Michael Frankowski.

- Removed dependency on "register_globals = on"!  Patches by Michael Frankowski.

  Notes:

  + Updated the patches to use $foo["bar"] instead of $foo['bar'].
  + Updated the INSTALL and CHANGELOG files as well.

- Tiny improvement to the "./scripts/code-clean.sh" script.
2003-05-13 18:36:38 +00:00
Dries Buytaert a161110a6b - Applied Michael Caerwyn's "%s -> %d" patch.
- Changed all occurences of '%d' to %d as suggested on the mailing list.
2003-05-07 21:00:36 +00:00
Dries Buytaert c7fc340e83 - Added some missing quotes. 2003-04-21 12:15:12 +00:00
Dries Buytaert b85cf71962 - Applied modified version of Al's "block delta" patch. I left out the
blogroll feature as I think it would get very confusing.  I don't mind
  to add it but it need some thought and documentation as it somewhat
  conflicts with the existing cloud module.

  These changes require you to run update.php.
2003-04-19 16:42:42 +00:00
Dries Buytaert 4742ba3549 - Fixed some SQL query directives. 2003-03-29 16:30:40 +00:00
Dries Buytaert b3225af15a - Fixed typo in the block delete link. Reported by Paul C. 2003-03-29 08:05:37 +00:00
Dries Buytaert 277ceae515 - New menu houskeeping. Prototyped by Zbynek.
The following modules need updating:
    * glossary module
    * feed module (Breyten's version)
    * mailhandler module
    * notify module
    * project module
    * smileys module
    * admin module
    * style module
    * taxonomy_dhtml module

  To avoid unexpected problems menu_add() is deprecated (it will print an
  error message when used) and menu() should be used instead.
2003-02-20 22:44:51 +00:00
Dries Buytaert 83f5d82876 - Everything is using theme("function") now instead of $theme->function(). 2003-02-15 11:39:56 +00:00
Dries Buytaert 637004c539 - Tidied up XHTML. Patch by Ulf.
- Added missing t() function.  Patch by Stefan.
2003-01-23 09:24:20 +00:00
Dries Buytaert 89b2069e4d - Clean URL patch. 2003-01-06 19:51:01 +00:00
Dries Buytaert a728900dba - Bugfix: some variables were not being reset causing wrong links to be
displayed.  Patch by Ax.
2003-01-02 06:08:05 +00:00
Dries Buytaert de95001c92 - Tidied up the use of check_output(). Might make rendering pages a bit
snappier (performance improvement).
2002-12-31 12:34:07 +00:00
Dries Buytaert d626a6cfda CHANGES:
- Usability improvement: made the block administration pages use the
  new table rendering functions.  By the way, the old code rendered
  invalid HTML code.

- Usability improvement: saving block changes will now show a status
  message.

- Usability improvement: quite a few strings could not be translated.

TODO:

- I think the "enabled" and "custom" field are somewhat confusing.
  Suggestions?
2002-12-29 16:03:01 +00:00
Dries Buytaert 22fa9ed70a - Refactored the administration pages. 2002-12-24 15:40:32 +00:00
Dries Buytaert 5b39f6767e * Applied slightly modified version of Marco's taxonomy patch:
- Fixed a bug with get_tree and multiple parents.
 - Fixed 3 wrong caches (this will avoid some queries).
 - Extension to taxonomy_term_count_nodes() (feature #159): "currently
   calling taxonomy_term_count_nodes() returns the amount of nodes in each
   term, would it be possible to extend this function so that it would only
   return the amount of nodes of a certain type under each term.
 - Confirm deleting a vocabulary or a term (requested by Moshe).
 - Use form_weight() in vocabulary and term forms.
 - After submitting a term, we end up at the term page (requested by Moshe).
 - Added status messages when adding, editing and deleting vocabularies and
   terms
 - Minor clean ups

* Made sure all modules use the same link delimiter; "|" for now.
2002-12-02 19:14:41 +00:00
Kjartan Mannes f18697b8d2 - changing case for consistency. 2002-11-20 10:13:42 +00:00
Dries Buytaert 9e32c2e960 Patch based on work of Kjartan:
- Changed cache API.

- Fixed caching bug in comment.module.  Odd this hasn't been reported yet.

- Fixed caching bug in forum.module.

- Fixed caching bug in system.module.

- Fixed caching bug in block.module.

- Simplified caching support in forum.module thanks to improved cache API.
2002-11-17 06:42:52 +00:00
Dries Buytaert 02f0dce5cb - Fixed bug in block module: "Array" was displayed on the user information
page.
2002-11-16 14:28:22 +00:00
Dries Buytaert cc381c1461 - Fixed glitch in block module: the admin links were not composed
correctly.  Patch by Stefan.

- Added missing t() functions and improved the %x directives for
  better readability and to ease the process of translating your
  site.  Patches by Stefan.

- Made two small additions to the 'code-clean.sh' script; it will
  now remove patch related junk.

NOTES:

- I removed the &middot; related bits.  Let's tackle these later on
  in a separate patch after we got some sort of consensus.

- I removed the 'module_exist("drupal")' check in the user module;
  I *think* it is incomplete and therefore incorrect.

- Stefan, try using quotes in your translations and check whether
  everything still works.  Example: translate the "Create account"
  button to "Create \"haha\" account \'hihi\'" and see if you can
  still create new accounts.  Maybe automate this using a quick
  hack in the locale module ...
2002-11-01 10:47:20 +00:00
Dries Buytaert c9157a233b - Made sure blocks are sorted by weight. Patch by Ax. 2002-10-30 08:12:28 +00:00
Dries Buytaert 8d103a0898 - Committed Marco's block rewrite:
+ Blocks are not longer called if not rendered: major performance
     improvement.
   + Fixed some bugs (preview option was broken, path option was broken).
   + Removed "ascii"-type blocks.
   + Added permission to for "PHP blocks"
   + ...

  NOTES:

   + You'll want to run "update.php":

       ALTER TABLE blocks DROP remove;
       ALTER TABLE blocks DROP name;

   + You'll want to update your custom modules as well as the modules in
     the contrib repository.  Block function should now read:

       function *_block($op = "list", $delta = 0) {
         if ($op == "list") {
           return array of block infos
         }
         else {
           return subject and content of $delta block
         }
       }
2002-10-26 15:17:26 +00:00
Kjartan Mannes b60b9ca828 - removed function module_rehash().
- updated database dump.
- removed tables modules, layout and referrer (don't forget to backup!).
2002-10-17 18:34:38 +00:00
Kjartan Mannes 9e85e4b949 - fixing block configuration not working when user is disabling all blocks. 2002-09-30 09:19:50 +00:00