- Feb 25, 2011
-
-
The Great Git Migration authored
-
- Mar 27, 2006
-
-
Gerhard Killesreiter authored
-
- Feb 21, 2006
-
-
Dries Buytaert authored
-
- Jan 29, 2006
-
-
Dries Buytaert authored
-
- Jan 20, 2006
-
-
Dries Buytaert authored
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.
-
- Jan 19, 2006
-
-
Dries Buytaert authored
-
- Jan 18, 2006
-
-
Dries Buytaert authored
-
- Dec 15, 2005
-
-
Dries Buytaert authored
-
- Dec 05, 2005
-
-
Dries Buytaert authored
- Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick.
-
- Dec 02, 2005
-
-
Dries Buytaert authored
-
- Nov 23, 2005
-
-
Dries Buytaert authored
-
- Nov 12, 2005
-
-
Dries Buytaert authored
-
Steven Wittens authored
-
- Nov 01, 2005
-
-
Dries Buytaert authored
-
- Oct 11, 2005
-
-
Dries Buytaert authored
-
- Oct 07, 2005
-
-
Dries Buytaert authored
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.
-
- Sep 23, 2005
-
-
Dries Buytaert authored
-
- Aug 29, 2005
-
-
Dries Buytaert authored
-
- Aug 28, 2005
-
-
Dries Buytaert authored
part of the node system! If you have a module that implements node types, you'll have to udpate its CVS HEAD version. We replaced _node_name() and _node_types() by _node(). The new _node() hook let's you define one or more node types, including their names. The implementation of the _node() hook needs to: return array($type1 => array('name' => $name1, 'base' => $base1), $type2 => array('name' => $name2, 'base' => $base2)); where $type is the node type, $name is the human readable name of the type and $base is used instead of <hook> for <hook>_load, <hook>_view, etc. For example, the story module's node hook looks like this: function story_node() { return array('story' => array('name' => t('story'), 'base' => 'story')); } The page module's node hook module like: function page_node() { return array('page' => array('name' => t('page'), 'base' => 'page')); } However, more complex node modules like the project module and the flexinode module can use the 'base' parameter to specify a different base. The project module implements two node types, proejcts and issues, so it can do: function project_node() { return array( array('project_project' => array('name' => t('project'), 'base' => 'project'), array('project_issue' => array('name' => t('issue'), 'base' => 'project_issue')); } In the flexinode module's case there can only one base ... This hook will simplify the CCK, and will make it easy (or easier) to merge the story and page module. In addition, node_list() became node_get_types(). In addition, we created the following functions: node_get_name($type) and node_get_base($type).
-
- Aug 25, 2005
-
-
Dries Buytaert authored
-
- Apr 01, 2005
-
-
Dries Buytaert authored
- Patch #19451 by JonBob: improved consistency of module descriptions. We should write guidelines for this -- maybe in the PHPDoc code of the _help hook.
-
- Feb 08, 2005
-
-
Dries Buytaert authored
-
- Jan 26, 2005
-
-
Dries Buytaert authored
- Patch #16192 by Neil: moved the submission guidelines found in forum, story, and blog and the minimum number of words found in story and blog (blog had a slight bug) into the node module.
-
- Jan 15, 2005
-
-
Dries Buytaert authored
-
- Dec 07, 2004
-
-
Dries Buytaert authored
- Refactored the queue module: removed the queue module's field from the node table. With help from Gerhard. - Slight addition to INSTALL.txt with regard to PHP versions. - Updated/reworded some node type descriptions as per Boris' suggestions. - Adding missing {} around a table name in update.php.
-
- Dec 04, 2004
-
-
Dries Buytaert authored
- Updated the help text a bit.
-
- Nov 23, 2004
-
-
Dries Buytaert authored
-
- Oct 23, 2004
-
-
Dries Buytaert authored
TODO: + Update Doxygen hook list (if required). + Document this in the developer's upgrade section.
-
- Sep 28, 2004
-
-
Steven Wittens authored
Modified version of #10230: Put placement of filter format selector in a module's hands, and move it below the relevant textarea.
-
- Sep 27, 2004
-
-
Dries Buytaert authored
+ made the helptext under the 'Explanation or submission guidelines', more the same (blog & story); + made the form_set_error() texts consistent when the body of a blog/story does not match or exceeds the specified minimal numer of words. + used the $options for form_select() and form_radios() inline like we do in the rest of drupal; + made the textarea sizes for the submission pages the same for all node types and also for the 'Explanation or submission guidelines';
-
- Sep 16, 2004
-
-
Dries Buytaert authored
- Patch #8179 by JonBob: reintroduced menu caching.
-
- Aug 21, 2004
-
-
Dries Buytaert authored
- 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.
-
- Aug 18, 2004
-
-
Dries Buytaert authored
- Code improvements by Stefan: made all status messages consistent (and easier to translate).
-
- Aug 10, 2004
-
-
Steven Wittens authored
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.
-
- Jul 31, 2004
-
-
Dries Buytaert authored
- Patch #9543 by JonBob: added node-level access control!
-
- Jul 13, 2004
-
-
Dries Buytaert authored
- Patch #8398 by TDobes: changed permissions for the blog, story, and page modules (and all occurrances elsewhere) to match their 4.4.x equivalents. In the discussion when these permissions were introduced, it was decided that "edit own ..." was clearer, but "maintain personal ..." slipped into CVS HEAD anyway, while "edit own ..." landed in the 4.4.x branch. Changes are as follows: "maintain personal blog" -> "edit own blog" (aggregator.module, blog.module, blogapi.module) "maintain personal pages" -> "edit own pages" (page.module) "maintain personal stories" -> "edit own stories (story.module)
-
- Jul 08, 2004
-
-
Dries Buytaert authored
- Marked required fields on the node (story, book, page, blog) and comment forms using the $required argument of the form_ functions. - Replaced all Optional's and Required's from the taxonomy forms with proper use of the form_ functions. Please check your contributed modules too!
-
- Jul 04, 2004
-
-
Dries Buytaert authored
- Patch by Steven and me: refactored the form handling of nodes. The node system is now using form_set_error() and friends like the rest of Drupal does. This makes for both a consistent user experience and consistent code. It simplifies the forms and validation code, however, it does change the node API slightly: * The _validate hook and the _nodeapi('validate') hook of the node API (1) no longer take an 'error' parameter and (2) should no longer return an error array. To set an error, call form_set_error(). * The _form hook of the node module no longer takes a form hook and should not worry about displaying errors. Ditto for _nodeapi('form_post') and _nodeapi('form_pre').
-
- Jun 21, 2004
-
-
Dries Buytaert authored
-
- Jun 18, 2004
-
-
Dries Buytaert authored
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').
-