Commit Graph

216 Commits (2debcfb1efd074f310a64afa7e145d84031ed7f2)

Author SHA1 Message Date
Steven Wittens ea36711d11 - #20910: Centralize print theme page fixes 2005-04-28 19:23:19 +00:00
Dries Buytaert a76a1e1f3f - Patch 20910 by chx: centralize print theme page. 2005-04-24 16:34:36 +00:00
Dries Buytaert 4a66d329b9 - Patch #20312 by mif: fixed problem with blog_link(). 2005-04-12 19:47:06 +00:00
Dries Buytaert 18bd62e71e - Fixed bugs in RSS handling of blogs. 2005-02-12 09:23:06 +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 7415e0b1c8 - 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. 2005-01-26 22:59:41 +00:00
Dries Buytaert dbcda92b76 - Patch #16021 by tangent: changed the format "/blog/feed/52" to "/blog/52/feed". 2005-01-25 20:38:03 +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 60352821bf - 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.
2004-12-07 16:55:38 +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 062a8abdea - Patch #10990 by TDobes: adds a "create new blog entry" link at the top of each user's own blog page, similar to the "post new forum topic" link displayed at the top of forum pages. This adds consistency as well as convenience for users. 2004-11-24 20:06:10 +00:00
Dries Buytaert 9574766ad8 - Patch by Stefan: wrapped the help texts in <p></p> tags. Helps improve consistency. 2004-11-23 22:20:41 +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 f1a087e376 - Patch #11879 by Moshe: deprecated the _content hook.
TODO:
   + Update Doxygen hook list (if required).
   + Document this in the developer's upgrade section.
2004-10-23 17:18:23 +00:00
Dries Buytaert 48bcc19ca2 - Patch #10613 by Gerhard: calling a non-existent username or user ID in the blog module URL now returns a 404 error instead of an empty blog page. 2004-10-09 06:52:35 +00:00
Steven Wittens 1298d2b9c9 Modified version of #10230: Put placement of filter format selector in a module's hands, and move it below the relevant textarea. 2004-09-28 19:13:03 +00:00
Dries Buytaert ff17aa0b94 - Patch #11045 by Stefan: improved consistency of node modules:
+ 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';
2004-09-27 20:15:54 +00:00
Dries Buytaert d37c39dce2 - Revert some changes. 2004-09-21 21:30:26 +00:00
Dries Buytaert 4f5164c980 - Patch #10977 by Gerhard: added missing node access controls for RSS feeds. 2004-09-21 18:43:54 +00:00
Dries Buytaert 5c7983c4de - Patch #8179 by JonBob: reintroduced menu caching. 2004-09-16 07:17:56 +00:00
Dries Buytaert bf3e513be3 - Roll back of earlier patch. 2004-09-14 20:59:04 +00:00
Dries Buytaert 5dfcdf0e28 - Patch #10830 by killes: bugfix: made sticky post feature work for blogs. 2004-09-14 20:00:03 +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 cc5df6e510 Patch #7603 by JonBob: emit absolute URLs where possible (even though it isn't strictly necessary). 2004-08-21 19:37:25 +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 0f088b79ca - Patch #9983 by Stefan: various code style improvements. 2004-08-12 18:00:11 +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 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 702a057683 - Patch #9478 by JonBob: allow printf-style arguments in pager_query.
Currently pager_query() is the black sheep of the database query family, because it does not allow for printf-style arguments to be inserted in the query. This is a problem because it introduces developer confusion when moving from an unpaged query to a paged one, and it encourages substitution of variables directly into the query, which can bypass our check_query() security feature.

  This patch adds this ability to pager_query(). The change is backwards-compatible, but a couple calls to the function in core have been changed to use the new capability.
2004-07-25 14:25:42 +00:00
Dries Buytaert 2a538a399e - Patch by Andy: improved help text / module description. 2004-07-16 08:19:26 +00:00
Dries Buytaert 3613729d4f - 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)
2004-07-13 20:40:46 +00:00
Dries Buytaert 4dbc900d3b - Renamed the blog module's block for sake of clarity.
- Made the blog module's submission form mark required form fields.
2004-07-08 15:09:53 +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 353c05d015 - Made it possible to edit blog posts and made the blog module use tabs. 2004-07-04 10:30:42 +00:00
Dries Buytaert e3e051cc0d - Patch #8585 by Junyor: sort blog items by creation date. Added some database indices. 2004-06-30 07:26:02 +00:00
Dries Buytaert 0a35280978 - Patch #8603 by TDobes: added support for sticky forum topics to the blog
and forum module.
2004-06-27 16:02:31 +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
Kjartan Mannes 9541a3a265 - Fixing bug #8233: User blog pages not displaying. 2004-06-04 19:02:03 +00:00
Dries Buytaert 9281831998 - Patch #7959 by walkah: the 'blog it' link used the wrong SQL tables. 2004-05-24 19:45:11 +00:00
Dries Buytaert f2c7696765 - Patch 7727 by Benjamin Grant: fixed incorrect <channel> URL in blog feeds. 2004-05-24 18:43:13 +00:00
Dries Buytaert e52c0f5d41 - Code improvements by JonBob. Thanks. 2004-05-17 22:00:06 +00:00
Dries Buytaert 3de9d33e67 - Menu and code improvements by JonBob. 2004-05-08 07:17:47 +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 10bdb51c37 - Patch by JonBob/Jonathan: reworked the menu system so that menus are
configurable!  Menu items can be disabled, repositioned, added and
  so on.

  Upgrading to requires you to run update.php.

  This functionality depricates some of the 'navigation modules' in the
  contributions repository.  Furthermore, modules can now 'suggest'
  menu items and site adminstrators can choose to enable them.  Modules
  in the contributions repository should try to take advantage of this.
2004-04-15 20:49:42 +00:00
Dries Buytaert 754f2ac26a - More profile module improvements:
+ Updated the _user() hook's "$type == 'view'" case to match the
     "$type == 'edit'" case.  That is, both have to return an associtive
     array of the format array('category' => 'fields').

   + Updated the profile pages to group fields by category.  Made possible
     thanks to the above change.

   + Moved logic out of the theme_ functions.
2004-03-21 14:28:15 +00:00
Dries Buytaert 2101f6c454 - Rewrote the profile module:
+ Added a 'created' field to the users table and renamed the 'timestamp'
     fied to 'changed' (cfr. node table).  Update.php will try to determine
     a 'created' timestamp for existing users.

   + The profile module no longer uses serialized data but has its own set
     of tables.  Known existing profile data is migrated by these new tables.
       TODO: migrate the birthday field.

   + The profile fields can be grouped, and within each group, profile fields
     can be sorted using weights.

   + The profile pages can be themed.

   + The profiles can be browsed based on certain properties/settings.

   + Change the _user hook: (i) 'private_view' and 'public_view' are merged
     into 'view' as there are no private fields and (ii) 'edit_form' has
     been renamed to 'edit'.

   + Avatar handling has been refactored and is now part of the user module.
     The users table has a dedicted 'picture' field.

   + Simplified the way themes should use display/visualize pictures or
     avatars.

   + Made it possible for administrators to replace or delete avatars.

   + ...

  I hope this make for a good base to build on collectively.
2004-03-11 20:33:59 +00:00
Dries Buytaert ccc9276f45 - Patch #4902 by Goba: fix URLs in RSS feeds.
+ Make all channel links absolute.
   + Always set the $base_url as xml:base, thus providing a solid base for
     relative URLs.
2004-03-06 16:17:48 +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