Download & Extend

Sopme way to process existing nodes when installing premium.module?

Project:Premium
Version:master
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Would be useful if there was a way to batch process nodes to apply premium restrictions to them based on their created date?

Comments

#1

Version:4.7.x-1.x-dev» master
Status:active» postponed

I would accept a patch that effects this when the premium settings are changed.

#2

Status:postponed» needs review

I've created a patch which will address this. The attached patch uses hook_node_operations() to add a "Make Premium" and "Remove Premium" option on admin/content/node. These options will allow you to select existing nodes and set/remove premium status on those nodes as a bulk operation.

This can be used to make existing nodes premium, without having to edit each one individually.

I've tested the patch locally on d5 and everything seems to be working properly. The patch was made with a CVS Diff of HEAD.

Let me know if there are any issues!

Jer

AttachmentSize
premium_bulk_set.patch 2.41 KB

#3

In addition to the previous patch, here is a patch which addresses the needs you described above. This patch adds a few things to admin/settings/premium. First, there is the ability to set "premium-ness" for existing node types directly from the admin interface. Additionally, you can check a box which allows you to update all nodes based on the current premium admin settings.

When a user first downloads and installs premium, they simply go to admin/settings/premium, pick which node types they would like to make premium, check the box to bulk update nodes and all existing nodes of the types selected will be made premium based on the current admin form settings.

AttachmentSize
premium_admin.patch 3.38 KB

#4

Status:needs review» fixed

Thanks jerdavis!

Committed both patches.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here