找回密码
 新猫注册
查看: 1503|回复: 0

Drupal modules

[复制链接]
kernel 发表于 2009-1-18 17:58:38 | 显示全部楼层 |阅读模式
Similar Entries

http://drupal.org/project/similar

A module that displays a block with the most similar nodes to the currently viewed one, based on the title and body fields.

Only supports MySQL-based sites. CCK is not supported for similar matching.

===

Similar By Terms

This Drupal module attempts to provide context for content items by displaying a block with links to other similar content. Similarity is based on the taxonomy terms assigned to content. Blocks are available based on similarity within each of the defined vocabularies for a site as well as a block for similarity within all vocabularies. As of version 1.8 you can now display teasers as well as just the titles.

What does this really mean? How should you use this module?

1) Create a freetagging vocabulary called "Tags" assigned to the content types on which you'd like to display the "Similar" block.
2) Enable the block called "Similar entries from the Tags vocabulary".
3) Add keyword tags to the content.

Done!

Now when you go to the page for a tagged content item, a block will show up displaying other content in descending order of common tags (terms).

*note Version 1.2 has a flaw that causes an error if no node is selected. It is recommended you upgrade to that latest version to fix.

Translation

Project creates .pot files on every string change.

You may be interested in comparison shopping: Comparison of Similiar / Relevant by term block modules..
Issues

As with all contributed modules, when considering submitting an issue:

   1. Read the documentation (two or three times is better).
   2. Review the existing issues list. (Don't forget to select "<all>" for the "Status" field.)
   3. Gather all the appropriate information. This may include (but is not limited to):
          * Drupal version.
          * Browser type and version.
          * Database type and version.
          * Error messages, if any.
          * Module settings.
   4. Submit the issue. If other modules are involved, you may need to submit the issue to those modules as well.


===

Relevant Content

What is it?This module provides two ways of referencing relevant content.Both of these methods provide configuration to filter for specificcontent types and vocabularies, limit the maximum size of the resultand provide some header text. The result on both cases are a list ofnodes which the module considers most relevant based on thecategorization of the current page. This is achieved by finding othernodes which are of one of the allowed types and have the most number ofterms in common. The two methods are:
BlocksThis module will provide as many customisable blocks as a siteadministrator wants. Each block has its own settings for node type,vocabulary, maximum result size and otional header text. Blocks canappear on any page which causes terms to be loaded into RelevantContent. Usually this is any page which views a node (a node page or aview such as a taxonomy term list). Usually you only want a block toappear on a node page, however you may find situation where you want toplace a block on a non-node page.CCK (new)The new CCK Field Type (available in both 1.3 releases for Drupal 5 & 6). This is a read-only field (much like Node Referrer)which allows the administrator to embed a field that is "display only"(ie, nothing appears on individual node edit forms). This field isconfigured in the same way the blocks are configured; node type &vocabulary filtering, maximum result size limit and header text. Theadvantage of the CCK method is the result set is more "embedded" withinthe content.ExampleSay you have a blog node which is tagged with terms A, B, C & Dand you enabled this module to provide a block of relevant nodes. Whenyou visit this blog node this module will go off and do a lookup on allother blog nodes and filter out so it produces a list of nodes whichare one of the selected types for that block and also tagged with anyof A, B, C or D (our current viewing nodes terms). It then groups thislist on the node ID and counts how many terms each node has. Thiseffectively is finding how many terms each other node has in commonwith the current node. If there is more than 1 node with the same termcount then it falls back to the created time-stamp, placing the mostrecent ones at the top. There is also an option to exclude nodes fromthe listing. This is useful if you are on a node page as it means themodule will automatically exclude the currently viewed node from thelist (it would probably rank as the most relevant node otherwise due tothe number of matching terms).
Also, the the new CCK field type, you could add a field whichappears below the body (but will appear above the comments) so once auser has finished reading they will see a list of content which you canrecommend. Alternatively, with a little CSS magic in your theme, youcould float the CCK Field to the side, add a little padding, border& margin an have a related content section with the content flowingaround it. You could even use the CCK field to find image nodes whichare related by taxonomy terms.
Similar ModulesAfter promising a comparison of "related content" style modules - someone else (Robert Middleswarth) has been brilliant and done it for me! Checkout the in-progress comparison here.


===

Rules

The rules modules allows site administrators to define conditionally executed actions based on occurring events (ECA-rules). It's a replacement with more features for the trigger module in core and the successor of the workflow-ng module.

It opens new opportunities for site builders to extend the site in ways not possible before.
So you can:

&#8226; send customized mails to notify your users about important changes
&#8226; build flexible content publishing workflows
&#8226; create custom redirections, system messages, breadcrumbs, ..
&#8226; and a lot more....

Modules may use the rules module's API to provide new events, conditions, actions, rule sets as well as default rules, which can be customized by users. Users can share their customizations by using the built-in import/export feature.

Furthermore it features
&#8226; a flexible scheduling system - schedule everything!
&#8226; a modular input evaluation system - plug in modules like the token module and make use of it in
every action!
&#8226; The module has been developed with site performance in mind, so it makes use of diverse caching routines to speed up rule evaluation.

Installation notes
To get token replacements in your actions, install the latest development snapshot of token! You need a snapshot which stems from >27.08.08

For a 5.x version have a look at workflow-ng, as the rules module is the improved 6.x version of it. Rules supports upgrading from workflow-ng, read UPGRADE.txt.

Useful links:
List of modules supporting rules: link
Group for discussion and support questions: link
Developer's blog: link

===

Sections

This module allows you to create sections within your site. Each section has an installed template, theme or style attached to it.

Sections are shown based on:

    * Role specific visibility settings
    * Page specific visibility settings (regexped paths)
    * Custom PHP visibility snippets

For example regular expressions for your theme, please visit the handbook

===

Relevance

The main objective of relevance module is to provide a block of related content that can be extensivelly configured, according to the website needs.

It seeks for relevant content by making a kind of 'score' rate for each relevant data. All the relevant data are summed and the greater ones are showed on a block.

The module can be used with taxonomy, dates and statistics. Also, it's possible to set the importance of each one of the itens that compose the calculation of the relevance.

===

Prepopulate

http://drupal.org/project/prepopulate

Allows fields in most forms to be prepopulated from the URL. It uses the $_GET variable in a URL to modify the #default_value of form fields.

For example, the following URL,
http://www.example.com/node/add/blog?edit[title]=this is the title

will automatically fill the Title field on a new blog post with the words "this is the title". Any field can be prepopulated this way, including taxonomy and CCK fields. You can prepopulate more than one field at a time as well. Prepopulate is excellent for creating bookmarklets. For examples on usage for all of these cases, please read the USAGE.txt file that comes with the module or you can read the online handbook page.

===

Queryable Variables

http://drupal.org/project/queryable_variables

What is this module?
It is a replacement for drupal's variable_get(), variable_set(), and variable_del(). The drupal variables system was not meant to hold tons of data and it is now being used by 100s of modules which keep packing more and more data into it. If the variable table gets to big, it significantly impacts the stability of the site and you can start to see completely random errors. Errors that appear to be truely random and it can be VERY difficult to figure out why (almost always due to the variable table being to big and memory_limit to small). This module allows modules to pack GBs of data into a new variables table without impacting stability at all. It does this by using a completely DIFFERENT table from the actual variable table. It instead uses a new table called "queryable_variables"(duh lol). This table is not loaded into memory like the variable table. When the variable table is loaded into memory and it is to large for your servers configuration you will run into the dreaded: "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11346001 bytes)" error. Example, if your memory_limit = 32MB in php then you will probably run into the error around 150,000 rows. But a memory limit that high isnt likely. Most shared servers use a limit of 2M to 8M. This means you will run into this error between 500 and 1500 rows in the variable which is very very low and many times the user cant change the memory_limit value because they dont have access to change the php.ini file. This to me is really an unacceptable stability problem with drupal. It would easily be fixed by not loading the variable table into memory, I'm not sure why they opted to do that. All it does is eat up memory. The speed gain from loading things into memory for the variable table is negligible. I see this problem a lot on many drupal sites and its almost always because some module is putting insane amounts of data into the variable table, something in which it was not intended to do. This module allows other modules to avoid ruining the stability of a site by overusing the easy to use variable_set/get/del functions.

Is this module for me?
If you are a module developer then I would suggest getting to know this module well because you would benefit from it in ways you could never imagine. If you are a non-php type developer and dont really mess with PHP code, then just skip this module unless a module you are trying to install is telling you that you need to install it first. It's more of a backend module than a front end UI module and if you are here its probably likely that a module you are trying to install uses this module as a requirement which is a good thing ;).

===

Private

http://drupal.org/project/private

Private is a very simple node access module that gives each node a 'private' checkbox. If it's set, it can only be seen by the node author, or users with the 'see all private nodes' permission. It's most useful on small sites with limited needs, like single user blogs that want to hide a few posts from the general public without the overhead of a comprehensive access management module.

This module is based on the node_access_example module in the Drupal developer documentation archive.

===

Pagination (Node)

Pagination (Node) allows the main content of arbitrary node types (Page, Story, etc...) to be paginated according to one of two methods:


Method 1: Content is paginated by a selectable "words per page" count.
Method 2: Content is paginated by manual breaks, inserted by the content creator.

Method 1 allows for quick and easy pagination, and is ideal for users who are looking to have their longer content split into multiple pages with the least amount of hassle. Just select the "words per page" threshold for a particular content type, and all existing and future nodes of that type will be automatically paginated accordingly.

Method 2 allows for fine-tuned control over pagination breaks, useful for content creators who need to set specific break points in their content.

Pager display

Pagination (Nodes) offers two styles of pager display. The default display uses Drupal's pagination, which shows as a collection of page numbers, including typical pager controls (such as next page, previous page, etc...). In addition to that, Pagination (Nodes) allows administrators to utilize a "Table of Contents" style list, which creates an index of pages, mapped to an optional page name. Content types may be adjusted to display the default pager, the table of contents pager, or both simultaneously.

In addition, an optional "Show all" link allows users to view the whole article at once.

Page headings

If a particular Content type is set to display a "Table of Contents" style list, page headings may be added for each page under either method 1 or method 2. Method 2 offers the most straight forward approach, as content creators can add the page heading specifically in the page break: ie. [ header = Sample Page Header ]. Regardless of paging method chosen, pages which do not have a specific title set will default to "Page x" within the table of contents. The only exception is the first page, which will always be the original title of the content.


To set page titles under method 1, content creators may enter a collection of page titles while creating / updating their content. The interface will show the expected number of pages the content will have, and content creators may add a page titles (one per line) to match that number. The page estimate will be updated periodically while content is being added or updated.

Update notes

If you are running version 1.01 of Pagination (Node) make sure you update the module after you install (unless you do a full uninstall and install of the new version). You can update the module using Drupal's update.php script (linked in the Admin -> Site Building -> Modules section).

Theming notes

The default pager will respect alterations via the theme_pager hook. The table of contents may likewise be modified. Table of contents links are handled through theme_item_list. In addition, the ToC may be modified by the presence of a toc.tpl.php file in your theme. The ToC is a container (id="toc"), while the ToC menu may be styled based on their respective classes (class="toc-list" and class="toc-item").

===

Outline

In Drupal 6, outline module greatly enhances the functionality of core's book.module.

Outline module is a general purpose module providing great flexibility in how nodes of various types are outlines, and who can outline them in which conditions.

    * Features
    * Roadmap (Planned features)
    * Drupal 6
    * Upgrading from Drupal 5 to Drupal 6
    * Drupal 5
    * Releases

Features
Site wide settings

In addition to book.module's site wide settings, outline offers:

    * default Table Of Content (TOC) depth for the navigation block. With book module, the navigation block at the bottom of the node only displays the links to the direct children of the current node. With this setting, you can display as many levels of children and grand-children as you prefer (within Drupal core's constraints of 9 levels).

Per book settings

Book.module does not have any per book setting. Outline offers:

    * A default content type for each child node in this book.
    * A default TOC depth for each child node in this book.
    * More flexible permissions:
          o For each of the following permissions, there are site-wide settings, and per book settings.
          o Members with specific roles can outline posts in specific books.
          o Hand picked individuals can outline posts in specific books.
          o Users can have their own private outline, where they alone can add nodes.
          o Books can be limited to specified authors, i.e. only nodes by those authored can be outlined in those books.

Node level settings

Beside the basic weight and place in the outline, book.module does not have any per node setting. Outline offers:

    * A default content type for each child node of this node.
    * A custom TOC depth for this node.

Roadmap (planned features)

The current D6 alpha2 release of the module is already replicating all the features that already existing in Drupal 5, minus many bugs and plus many useability improvements, as well as many new features.

The following new features are planned for the upcoming alpha releases:

More flexibility in outlining:

    * Outline nodes in more than one book.
    * Outline external URLs.
    * Since nodes can belong to more than one book, offer a way to browse each of these books separately.

And more. (my private TODO list is more comprehensive... :) )
Drupal 6

The module is currently being completely rewritten for Drupal 6.
The main difference is thus: instead of being a replacement of book.module (like in Drupal 5), the D6 version of outline module will depend on book.module, enhancing the already much improved book.module's capabilities.

Those who can't wait to test it may get a working copy from HEAD in the cvs repository. Use the D6 module for testing purposes only: the module is far from ready for use on a production site.
Upgrading from Drupal 5 to Drupal 6

Please, before attempting to upgrade your whole site to Drupal 6, read these notes carefully.

The database layout for outline and book modules have dramatically changed between Drupal 5 and Drupal 6. As a result, the upgrade involves moving a lot of data around. A full upgrade path for outline module is provided between the two versions.

Note: One specific configuration of D5 outline is not supported during the upgrade because of a limitation of D6 book module. In D5 outline, it was possible to add several pages at the very top level of the outline. Usually, one single page would serve as the topmost level, and all other pages in the same outline would be added as children or grandchildren thereof. However, it was possible to have several nodes at the topmost level. In D6, the very core logic that powers book.module does not make it possible to have this feature, i.e. by design, only one node can be at the topmost level of a book outline. As a result, it is not possible to import D5 outlines where there were several nodes at the top levels of some outlines. It is strongly recommended that you resolve this issue before you upgrade the site to Drupal 6 by reorganizing your outlines and checking that for each outline, there is only one node at the top level.

Because of all the above, it is imperative that you test upgrading your site with a copy of your database first!

   1. backup your database.
   2. make a copy of your site somewhere.
   3. test the upgrade path to Drupal 6.
   4. make sure everything works as expected.
   5. If you experience problems with the outline upgrade, check this issue.
   6. Repeatedly test the whole upgrade until everything works smoothly.
   7. backup your database again.
   8. do the upgrade on your live site according to usual guidelines.

Drupal 5

In Drupal 5, the book.module's features were very limited in some critical ways. Outline.module was conceived as a replacement of book.module, i.e. the two modules were not supposed to be used at the same time. Outline.module copied all of book.module's functions, and added some more. It is in fact the work on outline.module that directly inspired the important changes in Drupal 6's book.module.

The Drupal 5 release of outline.module is barely supported. The code base is entirely different from that of the latest Drupal 6 version and that makes it difficult to backport bug fixes and features.

The Drupal 5 version is somewhat buggy and limited feature-wise. But when you upgrade the site, be sure to check the Drupal 6 version!

===

Node2Node

Node2Node allows you to create relationships between nodes. The main features are:
- Allowed relationships are defined in the admin screen (ie node type A can be a parent of Node type B)
- Relationships are Parent/Child
- Relationships are many-to-many
- Relationships can have a defined sequence, ie the child nodes of a parent will be listed in a user-defined order
- Relationships can be set up by end users (with editing rights)
- Relationships can be named (ie Node 1 Uses Node 2)

Comparison
Here's a brief comparison with some of the other node relationship modules, of which there are several. Here I am comparing:
- Node2Node (N2N)
- Node Hierarchy (NH)
- Node Relativity (NRel)

Features:
- Defining relationships: N2N lets you specify a relationship between specific node types. NH lets you says that a node type can be a parent (of anything that can be a child). NRel is also very specific about node types.
- Cardinality (is that the right word?): N2N allows many-many. NH allows 1-many. NRel is even more specific, letting you specify 1:1, 1-many, many-many etc
- Sequence: N2N and NH both allow to you to put the child nodes in a specific order. NRel does not seem to specify order.
- Display: N2N displays the parent and child nodes on the View screen. NH puts the parent node in the breadcrumb and the child nodes in a separate tab. (Not sure about NRel)
- Edit: N2N integrates the editing of relationships into the main Edit screen. NH uses a separate tab. (Have to say I'm still working on this and may add other ways of creating relationships later.) (Not sure about NRel.)
- Named relationships: N2N relationships are named (Parent "owns" Child, Child "belongs to" Parent) - you can configure the names for each relationship. Don't think the others have this feature.

http://drupal.org/project/node2node

===

Nodereferrer Create

Add tabs to existing nodes to create new related nodes. By creating nodes in context, the user avoids having to select the referenced node manually.
Requires

    * Nodereferrer
    * Nodereference module from CCK

Drupal 6

The following features are available in the Drupal 6 version only :

    * For consistency, it is possible to create both references and referrers
    * It is possible to create relationships with existing nodes. In particular it handles CCK build-in multiple values, so it is possible to create a relationship with a node that already has relationships
    * When creating related content, it is possible to use fields of the original node as default values for other fields in the newly created content
    * Menus to create related content can be on a different page ; on the same page (hidden with a javascript effect) ; or attached to each of the fields (when present) that represent the related data
    * Menus are themeable

At the time of writting, Nodereferrer itself has not been fully ported to Drupal 6, however a patch is available at http://drupal.org/node/259837 . Nodereferrer Create will function with the patched version of Nodereferrer.

http://drupal.org/project/nodereferrer_create

===

Nodes In Block

Nodes in block makes it possible to add nodes into a block. A number of configurable blocks are generated which you can assign to a region. Visibility settings of this block are automatically set to 'Show on only the listed pages'. On the node content form, you define the weight and visibility per node thus making it easier for content administration as all your content is now in the same place. With this module, you don't have to explain your customers how blocks work but is still able to decide on which pages content must be rendered.
Configuration


After installation, goto admin/settings/nodesinblock and select how many blocks you want and which content types will benefit from this feature. After submitting your settings, an extra fieldset is generated where you select which block is associated per content type. After that, go to admin/build/block and assign one or more blocks to a region. That's it, visibility paths are set on the node content form.
Theming

Every node in the block is rendered as a teaser. An extra property is also added to the node object which you can use in your node template file.
<?php
// node.tpl.php
if (isset($node->nodesinblock)) {
  // Theming for node in block
}
else {
  // Normal theming
}
?>
Comparison with other modules

The major difference with modules like Teaser block, Node Blocks and Node as block is that this module doesn't create a new block for every node. Nodes in block uses its own hook_block implementation to render content in a block and makes it possible to render multiple nodes in one block and to set the visibility per node in that block. Administrators assign a block to a region and content administrators only have to configure on which page they want to show one node or more nodes in that region.

===
您需要登录后才可以回帖 登录 | 新猫注册

本版积分规则

手机版|小黑屋|[漫猫]动漫论坛

GMT+8, 2024-4-20 21:38

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表