Commit Graph

166 Commits (afeff189b8a60bc775a4557e5bda003d8b54dc76)

Author SHA1 Message Date
Dries Buytaert 160a1e0ef8 - Patch #25634 by chx: simplified node_load(). 2005-07-17 18:29:32 +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
Steven Wittens a597354bcb - Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for <link> tags. 2005-05-31 21:14:27 +00:00
Dries Buytaert a76a1e1f3f - Patch 20910 by chx: centralize print theme page. 2005-04-24 16:34:36 +00:00
Dries Buytaert a3e9b35afc - Patch #19451 by JonBob: improved consistency of module descriptions. We should write guidelines for this -- maybe in the PHPDoc code of the _help hook. 2005-04-01 15:55:02 +00:00
Steven Wittens be14203534 - #18817: Clean up plain-text checking (see drupal-devel!) 2005-03-31 09:25:33 +00:00
Steven Wittens 526ac35ae1 - Clean up some db queries in poll.module 2005-03-18 09:00:40 +00:00
Steven Wittens ea5e9704a2 - #14767: Do not display poll block when no polls are active
- Change double to single quotes.
2005-03-18 08:57:52 +00:00
Steven Wittens ab700960e4 - #18597: Resolve conflict in column name between queue.module and poll.module. 2005-03-18 08:02:10 +00:00
Dries Buytaert 5b7ecb8650 - Patch #17208 by asimmonds: help text fixes:
- permissions menu link updates in a number of modules help
    - anchor link fix in distributed auth help
    - "my account" link fix in user help
    - spelling correction in tracker.module help

- I also changed 'admin/access/perms' to 'admin/access/permissions'.
2005-02-12 07:51:14 +00:00
Dries Buytaert 993ea0c6c5 - Patch #16111 by chx: generalized node_rewrite_query to db_rewrite_query. 2005-01-29 22:02:37 +00:00
Dries Buytaert e3f1c92d26 - Patch #14936 by Goba:
+ The "add new comment" was missing for polls.

   + Renames $main to $teaser where appropriate to follow latest Drupal conventions.
2005-01-22 09:02:17 +00:00
Steven Wittens 09bd156ba2 - Fix tracker pager count query being wrong (it did not return a count but a set, and it counted nodes with more than 1 comment as multiple nodes).
- Clean up various SQL queries: removing literally inserted data (db_escape_string is evil!), fixing single "%" which should be "%%", fixing integers being compared as strings.
2005-01-19 01:46:25 +00:00
Dries Buytaert 971a0e24aa - Patch #14731 by chx: made it possible to rewrite node queries. 2005-01-16 18:44:49 +00:00
Dries Buytaert 2b17b3a966 - Patch #13907 by Neil: less ways to set the page title.
* Less logic in theme code.
   * Encourages use of the menu system.
   * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them.
   * Very slightly more efficient.
2004-12-15 21:19:42 +00:00
Dries Buytaert 4726c93156 - Patch #13443 by Moshe: got rid of the semi-implemented 'page link' feature. All themes currently support primary and secondary links so page links are now deprecated. Check your contributed modules and update them accordingly. 2004-11-24 22:56:21 +00:00
Dries Buytaert 30110a8770 - Patch #6166 by Moshe: node preview should not display links. Push the links to the theme instead of the theme having to pull them in using node_link().
TODO:
    1. Update theme upgrade instructions in the handbook: node_link() is gone.
    2. Remove page_link() just like we removed node_link().
2004-11-23 23:11:59 +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
Steven Wittens cb953f8fde Removing dead code from poll.module. 2004-09-18 00:15:54 +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
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 83a739bd89 - Code improvements by Stefan: made all status messages consistent (and easier to translate). 2004-08-18 19:57:27 +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
Dries Buytaert 202eee42a9 - Patch #9543 by JonBob: added node-level access control! 2004-07-31 09:30:09 +00:00
Dries Buytaert aed1b0ca9e - Patch #5347 by JonBob:
Here's a new patch that unifies the node/52 and book/view/52 paths for nodes. It involves a small change to hook_view(), which is discussed first:

Currently hook_view() expects node modules to return a themed node. However, each module does this the same way; they modify $node as necessary, then call theme('node', $node) and return the result. We can refactor this so that the calling function node_view() calls theme('node') instead. By doing this, it becomes possible for hook_nodeapi('view') to be called after hook_view() where the node contents are filtered, and before theme('node') where the body is enclosed in other HTML. This way the book module can insert its navigation into the body right before the theming.

Advantages of this refactoring:
- I can use it for book.module to remove the extra viewing path.
- The function of hook_nodeapi('view') becomes more like hook_view(), as neither will expect a return value.
- We more closely follow the flow of other nodeapi calls, which usually directly follow their corresponding specific node type hooks (instead of preceding them).
- The attachment.module people could use it to append their attachments in a list after the node.
- Gabor could use it instead of his filter perversion for his "articles in a series" module.
- A little less code in each view hook.
- The content hook is no longer needed, so that means even less code.

Disadvantages:
- Any modules written to use nodeapi('view') could be affected (but these would all be post-4.4 modules).
- Implementations of hook_view() would need to be updated (but return values would be ignored, so most would work without updates anyway).

Now the patch takes advantage of this API shift to inject its navigation at the end of all book nodes, regardless of the viewing path. In fact, since the paths become identical, I've removed the book/view handler entirely. We should probably provide an .htaccess rewrite for this (one is still needed for node/view/nn anyway). At the same time, there is a check in book_block() that shows the block appropriately on these pages.
2004-07-30 13:37:26 +00:00
Dries Buytaert 3568ed57e1 - Moving the title.module from core to contrib as discussed on the mailing list. 2004-07-07 20:18:22 +00:00
Dries Buytaert 7bb88809b7 - Patch #9049 by JonBob: fixed a number of tab issues. 2004-07-06 07:33:59 +00:00
Steven Wittens ac27d4bf81 Fixed broken poll results:
- If you are allowed to vote, results are now shown on a separate node tab "node/id/results".
- Poll voting now submits to a separate URL and uses drupal_goto to go back to the poll node
2004-07-04 23:40:14 +00:00
Dries Buytaert fe2b3e7c00 - 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').
2004-07-04 16:50:02 +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 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 a158eca1b0 - Patch #7577 by JonBob: code improvements to the book, forum, page and poll module. 2004-05-09 19:28:43 +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
Steven Wittens 803dacf652 Poll.module / Statistics.module: fixing bug caused by using array_merge and drupal_map_assoc. This causes array keys to be renumbered, leading to bugs.
Remember to use $array1 + $array2 instead.
2004-04-14 14:02:36 +00:00
Dries Buytaert a283a3b7b8 - Patch by Gerhard: move the updates to database/updates.inc so packaging
systems can by-pass update.php.
2004-02-25 22:20:09 +00:00
Steven Wittens 939a816e8f Poll.module cleanup:
* Code cleaning: simpler structures, removed some old leftovers, ...
* Clean URLs everywhere (the old mechanism was broken anyway). Had to get rid of 'inline voting' (i.e. voting with the sideblock and ending up on the same page), but that was a bit confusing anyway.
* Simplified submission form with form_group and streamlined choice mechanism.
* Improved bar rendering in pollresults for themes with avatars, like xtemplate.
2004-02-24 23:34:31 +00:00
Dries Buytaert bd78422715 - Patch 5592 by Goba: let drupal_map_assoc() rule. :-)
- Renamed CHANGELOG to CHANGELOG.txt for Windows uses.
2004-02-15 15:19:36 +00:00
Dries Buytaert 1687dd07c9 - Patch 5049 by JonBob: allow a module to define multiple node types. 2004-01-27 18:47:07 +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 a8b8c247db - Patch #5021: clean up URLs in _help texts. Patch by UnConeD. 2004-01-11 20:31:26 +00:00
Dries Buytaert 3176e66905 - Patch 4948 by Goba: the poll module uses check_output() on the poll options. 2004-01-04 21:54:13 +00:00
Steven Wittens 51208885de General filtering improvements
- Re-added STYLE/ON*= filtering (this got lost a while ago due to reorganisation)
- Added form_group's to node.module's filter options
- Fixed incorrect filter usage in poll.module
2003-12-30 14:02:36 +00:00
Dries Buytaert bf51896e85 - The introduction of the $page parameter for the node _view() hooks and
the theme functions left the poll module's poll_view() function in a
  state where it does not display the poll results or vote forms on their
  own pages, since it uses another (proprietary) $block parameter to
  handle the case when the poll is rendered to be displayed in a block.
  Patch by Goba.
2003-12-22 12:05:07 +00:00
Dries Buytaert d5c8026454 - Updated the calls to menu() to use MENU_HIDE instead of 1 2003-12-17 22:27:23 +00:00
Dries Buytaert c0494c0a2b - Committed phase 4 of JonBob's menu system changes. 2003-11-25 19:26:21 +00:00
Dries Buytaert 26735ac5dd - Committed phase 3 of JonBob's menu changes. Adds an API for modules to
define titles and breadcrumbs for their pages, and updates the theme
  system to display them.
2003-11-23 10:41:04 +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 951b553a98 - Committed stage 2 of the theme system improvements! Patch by CodeMonkeyX. 2003-11-09 23:27:22 +00:00
Dries Buytaert 92995414b4 - Committed stage 1 of the menu callbacks improvements. Patch by Jonathan. 2003-11-08 09:56:22 +00:00