summaryrefslogtreecommitdiff
path: root/modules/node.module
Commit message (Collapse)AuthorAge
* - Patch #11875 by Neil Drumm: block module configuration improvements.Dries Buytaert2004-10-31
| | | | | | | | | | 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.
* - Patch #12232 by Steven/UnConed: search module improvements.Dries Buytaert2004-10-31
| | | | | | | | | | | | | | | | | | | | | | 1) Clean up the text analyser: make it handle UTF-8 and all sorts of characters. The word splitter now does intelligent splitting into words and supports all Unicode characters. It has smart handling of acronyms, URLs, dates, ... 2) It now indexes the filtered output, which means it can take advantage of HTML tags. Meaningful tags (headers, strong, em, ...) are analysed and used to boost certain words scores. This has the side-effect of allowing the indexing of PHP nodes. 3) Link analyser for node links. The HTML analyser also checks for links. If they point to a node on the current site (handles path aliases) then the link's words are counted as part of the target node. This helps bring out commonly linked FAQs and answers to the top of the results. 4) Index comments along with the node. This means that the search can make a difference between a single node/comment about 'X' and a whole thread about 'X'. It also makes the search results much shorter and more relevant (before this patch, comments were even shown first). 5) We now keep track of total counts as well as a per item count for a word. This allows us to divide the word score by the total before adding up the scores for different words, and automatically makes noisewords have less influence than rare words. This dramatically improves the relevancy of multiword searches. This also makes the disadvantage of now using OR searching instead of AND searching less problematic. 6) Includes support for text preprocessors through a hook. This is required to index Chinese and Japanese, because these languages do not use spaces between words. An external utility can be used to split these into words through a simple wrapper module. Other uses could be spell checking (although it would have no UI). 7) Indexing is now regulated: only a certain amount of items will be indexed per cron run. This prevents PHP from running out of memory or timing out. This also makes the reindexing required for this patch automatic. I also added an index coverage estimate to the search admin screen. 8) Code cleanup! Moved all the search stuff from common.inc into search.module, rewired some hooks and simplified the functions used. The search form and results now also use valid XHTML and form_ functions. The search admin was moved from search/configure to admin/search for consistency. 9) Improved search output: we also show much more info per item: date, author, node type, amount of comments and a cool dynamic excerpt à la Google. The search form is now much more simpler and the help is only displayed as tips when no search results are found. 10) By moving all search logic to SQL, I was able to add a pager to the search results. This improves usability and performance dramatically.
* #7607: Sort node types in node/add by translated names.Steven Wittens2004-10-29
|
* - Patch #11728 by Uwe Hermann: fixed some typos in the code comments, ↵Dries Buytaert2004-10-19
| | | | | | Doxygen documentation and screen output. Uwe: I dropped the 'iff' chunks as 'iff' stands for 'if and only if'.
* - Patch #10664 by TDobes: fixed collapsed comments + updated the code comments.Dries Buytaert2004-10-16
|
* - Modified patch #10613 by killes: generate a 'page not found'-page when a ↵Dries Buytaert2004-10-12
| | | | requested node does not exist. I modified the patch to avoid duplicate 'not found'-checking in the second bulk.
* - Code improvement: removed some redundant code from the node module.Dries Buytaert2004-10-10
|
* - Fixed bug #11405: unchecking the "publish" box in the default workflow ↵Dries Buytaert2004-10-09
| | | | admin page (admin/node/configure/defaults) did not cause the default workflow to change. This was caused by the fact that node_validate() forced the value of the status field to "1".
* - Simplified/reorganized version of patch #9620 by Jeremy: fixed errors when ↵Dries Buytaert2004-10-04
| | | | writing to cache.
* Part of #11280: node_preview() should only generate a teaser if none is ↵Steven Wittens2004-10-04
| | | | present (e.g. provided by a module like excerpt.module).
* Modified version of #10230: Put placement of filter format selector in a ↵Steven Wittens2004-09-28
| | | | module's hands, and move it below the relevant textarea.
* - Patch #10977 by Gerhard: added missing node access controls for RSS feeds.Dries Buytaert2004-09-21
|
* - Patch #10884 by killes: node_access_where_sql() lost a parameter.Dries Buytaert2004-09-20
|
* - Bugfix: it was not possible to delete nodes. Reported by Philippe.Dries Buytaert2004-09-20
|
* - Patch #8179 by JonBob: reintroduced menu caching.Dries Buytaert2004-09-16
|
* Removing useless 'read more' title attribute, as discussed.Steven Wittens2004-09-14
|
* #8424: more meaningful link title=".." attributes for node_title_list().Steven Wittens2004-09-14
|
* Replace hardcoded <html lang="en"> with a locale dependant one. This is ↵Steven Wittens2004-09-09
| | | | especially important for asian sites where this has an effect on font selection.
* - Patch #10663 by JonBob: documentation improvements: fixed some typos and ↵Dries Buytaert2004-09-09
| | | | improved consistency to the use of Doxygen/api.module commands in the comments.
* - Bugfix: removed bogus $name parameters.Dries Buytaert2004-09-08
| | | | TODO: when 'previewing' an existing node, the breadcrumb trail is incorrect.
* Node.module: teaser autogeneration should not overwrite user/module-supplied ↵Steven Wittens2004-09-06
| | | | | | teaser data. (makes excerpt.module possible)
* - #10342: PHP5 fix with undefined array.Steven Wittens2004-08-25
|
* - Fixing bug with PHP5 patch.Steven Wittens2004-08-23
|
* - #9292: Make Drupal (somewhat) PHP5 compatible. xtemplate is still horribly ↵Steven Wittens2004-08-22
| | | | broken.
* - Patch #10187 by JonBob: bugfix: added missing permission check.Dries Buytaert2004-08-21
|
* - Patch by JonBob: for consistency and readability, add brief descriptions ↵Dries Buytaert2004-08-21
| | | | 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.
* - Code improvements by Stefan: use capital letters for header titles (and ↵Dries Buytaert2004-08-19
| | | | added some missing t() functions).
* - Code improvements by Stefan: made all status messages consistent (and ↵Dries Buytaert2004-08-18
| | | | easier to translate).
* - The upload (filehandler) module has landed!Dries Buytaert2004-08-17
|
* - Patch #10110 by JonBob: code improvement: looks like we have an artifact ↵Dries Buytaert2004-08-16
| | | | from before clean URLs in node.module. This patch removes the global variable $mod, which is no longer set and not necessary here anyway.
* - Patch #9983 by Stefan: usability improvement: made sure all status ↵Dries Buytaert2004-08-16
| | | | messages start with a capital letter.
* - Patch #10102 by Gerhard: removing some cruft from the node module!Dries Buytaert2004-08-16
|
* #6732: fixing bug 'once anonymous always anoymous' (nodes).Steven Wittens2004-08-14
|
* #10033: by Jonbob, make sure no filter check is done until the first preview.Steven Wittens2004-08-13
|
* Moving all legacy handlers into legacy.module.Steven Wittens2004-08-12
|
* - Patch #9972 by njivy: modified node_feed() for the instances where locale ↵Dries Buytaert2004-08-12
| | | | is not enabled. Without this patch, reset(array_keys($languages['name'])) throws an error.
* - New locale module thanks to Gerhard, Goba, Marco, Kristjan and others.Dries Buytaert2004-08-11
| | | | | | The new locale module provides every functionality on the web interface, so you don't need to edit the configuration files or add columns, when you add a new language. This module is an integration of the old locale and localegettext modules, plus a bunch of logic to parse Gettext Portable Object files (opposed to Machine Object files, as supported by localegettext). Note: I made some minor changes to the context-sensitive help texts and to some of the status messages.
* The Input formats - filter patch has landed. I still need to make update ↵Steven Wittens2004-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* - Patch #9812 by Adrian: fixed some PostgreSQL/ANSI SQL compabitibilityDries Buytaert2004-08-06
| | | | problems created by the new comment and node access permissions code.
* - Patch #9794 by JonBob: a bug introduced late in the review process makes ↵Dries Buytaert2004-08-05
| | | | individual node views inaccessible to users who should have permission. This does not affect node listings, so was missed.
* - Patch #9775 by TDobes: consistency operation. Changed to "edit foo," ↵Dries Buytaert2004-08-05
| | | | "delete foo," and "view foo" links into simply "edit," "delete," and "view".
* - Patch #9497 by gordon: made <!--break--> work even when the teaser lengthDries Buytaert2004-08-04
| | | | is set to unlimited and fixed up some code comments.
* - Patch #7336 by TDobes: in various parts of Drupal, we use the title ↵Dries Buytaert2004-08-03
| | | | attribute for links to provide a slightly more detailed explanation as to the purpose of a link or where it goes.
* - Patch #9543 by JonBob: added node-level access control!Dries Buytaert2004-07-31
|
* - Patch #5347 by JonBob:Dries Buytaert2004-07-30
| | | | | | | | | | | | | | | | | | | | | 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.
* - Patch #8942 by Morbus: when testing under devel.module, the "SELECT ↵Dries Buytaert2004-07-13
| | | | timestamp from {history}" SQL statement is executed multiple times in two different functions. This duplicated code should be placed in a function, and that's been done already with node_last_visited() - the remaining code was just never updated to use the new routine. This patch changes the old code to use node_last_visited, and also modifies node_last_visited() to cache the result of the database call.
* - More tab-improvements by JonBob: improved support for the default tabs!Dries Buytaert2004-07-10
|
* - Marked required fields on the node (story, book, page, blog) and commentDries Buytaert2004-07-08
| | | | | | | | | 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!
* - Added revisions tab to node view (when needed)Steven Wittens2004-07-04
| | | | - Updated node.module to use drupal_goto after submission: this allows people to refresh after submission without any problems.
* - Patch by Steven and me: refactored the form handling of nodes. The node ↵Dries Buytaert2004-07-04
| | | | | | | | 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').