Tạo mới một node với Node Option Premium.module

Tạo mới một node với Node Option Premium.module

Node Option Premium is a module for people who want to encourage visitors to register on their site.

Node Option Premium lets you show a content teaser to the public but show the full content only to people who are logged in and have a certain role. This is typical of the strategy used by many newspapers and magazines with their paywall.

In this tutorial, we'll demonstrate how to use this simple, yet effective module.

Step 1. Install Node Option Premium

Step 2. Configuration

The main task of configuration is to add messages for each content type. There's a sample already filled in for you, which will be displayed for all content types. However, you might want to customize it for specific types, for example: "Full content of this page is only available to paid subscribers. Click here to join our site and get full access to these articles" or videos or pages, etc. Simply write the custom message in the appropriate field. You can use HTML to make Click here an active link.

tutuploadstutuploadsmedia_1347387905812.png

Step 3. Permissions

  • Go to People > Permissions
  • There is a set of permissions specifically for Node Option Premium as you can see below.

Tạo mới một node với Node Option Premium.module

Here's what you need to know about these permission options:

Who can fully view a premium node of a particular content type? 

  • Any user with the View full premium content permission 
  • Any user with the administer nodes permission
  • The author of the node
  • Any user with the edit any NODE_TYPE content permission

Step 4. Set up the content type

  • Go to Structure > Content types and create or edit a new content type.
  • Go to the Edit tab

I'm going to edit the Article content type. The goal is to make it so the public will be able to read the teaser, but when they click to read more, they'll get the message that we defined during configuration. 

  • Click the check box next to Premium Content.
    Click Save content type.

tutuploadstutuploadsmedia_1347391015295.png

Step 5. Set up the teaser

Because we're showing both the teaser and the full content in different ways, we need to make sure that the teaser is showing:

  • Go to the Manage Display tab.
  • Expand Custom Display Settings.
  • Click the box next to Teaser.

tutuploadstutuploadsmedia_1347391410144.png

  • Go to the Manage Display tab.
  • Click the Teaser button.

tutuploadstutuploadsmedia_1347391222707.png

  • Click the gear icon on the Body row.
  • That will allow you to edit the length of the teaser.

tutuploadstutuploadsmedia_1347391563177.png

  • Set the Trim length. I set the teaser to 25 characters. That will make the read more link appear after a very short teaser. The default of 600 is kind of long. You may not want that much of a teaser before the link.
  • Click Update
  • Click Save after the update

tutuploadstutuploadsmedia_1347391593973.png

Step 6. Mark the content as premium content

  • Go to Content
  • Add an Article or whatever content type you want to mark as premium
  • This module adds a new node option, Premium content, to go along with the existing core publishing options (Published, Promoted to front page, Sticky at top of lists). Go to Publishing Options and check the box next to Premium Content. 

tutuploadstutuploadsmedia_1347392403504.png

Step 7. Check your published content

  • Here is my content the front page with my 25 character teaser and the Read more link.
  • Click Read more and I'll be able to read the full content.

> tutuploadstutuploadsmedia_1347393191420.png

  • Log out as admin before you test the read more link. You should get the message that this content is for premium users only.

tutuploadstutuploadsmedia_1347393076638.png

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Google Tiếp Tục Cập Nhật Ứng Dụng Gmail Cho iOS

Google Tiếp Tục Cập Nhật Ứng Dụng Gmail Cho iOS

Sau khi khắc phục được một số lỗi mà phiên bản đầu tiên dành cho hệ điều hành iOS, ứng dụng Gmail đã được Google mang trở lại chạy ổn định hơn 

Động cơ nào khiến Facebook "biếu không" người dùng những công nghệ tuyệt đỉnh

Facebook biếu không người dùng những công nghệ tuyệt đỉnh

Liên tiếp hàng loạt những công nghệ đình đám của Facebook ra mắt trong thời gian gần đây đều được hãng miễn phí cho người dùng

Embarking

Giới thiệu Embarking on a Drupal 8 adventure

We know Drupal 7 pretty well, we know what it can do but we also know what its limitations are.

Công ty diệt chuột T&C

 

Diet con trung