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

CommentFileSizeAuthor
#3 premium_admin.patch3.38 KBjerdavis
#2 premium_bulk_set.patch2.41 KBjerdavis

Comments

allie micka’s picture

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.

jerdavis’s picture

Status: Postponed » Needs review
StatusFileSize
new2.41 KB

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

jerdavis’s picture

StatusFileSize
new3.38 KB

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.

allie micka’s picture

Status: Needs review » Fixed

Thanks jerdavis!

Committed both patches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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