Count access statistics for anonymous users only (Drupal 7)

Do you want to count access statistics for anonymous visitors only? Do you want to reset access statistics for unpublished articles?

I'm assuming you're using the Drupal 7 statistics module.

Instead of copying the whole statistics module and changing it, there's a simple trick: Undo the +1 of registered users by an -1. Thus, the increase of the statistics module is compensated.

Take an article attachment snapshot of CSS media print page in a Zotero translator

A good Zotero translator should add an article snapshot as attachment. These snapshots are usually taken from the print version of the article since ads, navigation and so one are cut off. Short the print version shows only the essential article. Content management systems (CMS) use different techniques for print pages, e.g. the print page can be accessed with a /print suffix in the URL. Some CMS like Drupal work with CSS media type stylesheets. There, a print page uses a dedicated CSS print stylesheet. Example:

<link type="text/css" rel="stylesheet" media="all" href="default.css" />
<link type="text/css" rel="stylesheet" media="screen" href="screen.css" />
<link type="text/css" rel="stylesheet" media="print" href="print.css" />

Output meta description and keywords for selected paths with Drupal 7

You want to output meta keywords for selected pages like the front page. One solution is to use Meta tags or the Meta tags quick module. They do the job. But if you have only a few pages and you want to avoid the overhead of a module with DB accesses, you can use a simple hook.

Write in your module the following code.

Show related nodes in a block based on taxonomy terms with Views 3 and Drupal 7

You want to show a related nodes to the current node in a block using taxonomy terms?

There is an excellent article giving a step-by-step guide for Views 3 and Drupal 7 on http://www.metachunk.com/blog/adding-related-content-view-drupal-7. Really easy and comfortable!

Subscribe to Front page feed