Closed (fixed)
Project:
Node Teaser
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Dec 2006 at 15:20 UTC
Updated:
28 Feb 2007 at 18:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
jillelaine commentedHere is a patch that adds the option to control the nodeteaser visibility with PHP code in administer > settings > nodeteaser.
To apply the patch, copy the nodeteaser-phpcode_for_visibility.patch into the same folder as your nodeteaser.module. Then, at the command line in the same folder:
This command will create a backup of your nodeteaser.module named nodeteaser.module.orig and patch the nodeteaser.module.
To use the "PHP code for visibility" option, you must have permission to:
If your permissions are correctly set, you can:
Please see this section of the Drupal handbook to learn about using PHP code for visibility: http://drupal.org/node/60317
Here is some sample PHP code that will show the nodeteaser on only certain "content types" -> blogs, book pages, and pages:
To use the above code, copy and paste all of the text within the grey block into the "Pages:" textfield. Modify the code to your desired "content type(s)", but be sure to replace the "content type" in both the EXISTING and NEW sections. More information about visibility by "content type" can be found here: http://drupal.org/node/76675
To show the nodeteaser to only certain user roles (in Drupal 4.7), see this page: http://drupal.org/node/86241
This patch has been tested in both my testbed and live Drupal 4.7 sites. Please review and offer feedback. Thank you.
Comment #2
jillelaine commentedplease see this comment for improved code to control Node Teaser visibility and access with PHP code:
http://drupal.org/node/76675#comment-186602
Comment #3
ideaoforder commentedThis has been added officially to the 5.0 release, thanks to Jill.
Comment #4
(not verified) commented