Will this module be updated for drupal 5.0?

spyres - January 16, 2007 - 03:58
Project:Premium
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Just wondering if I need to look for another way to protect certain content.

#1

Chill35 - February 6, 2007 - 01:33

I would like to know too. I tried to contact the maintainer but I got no response. Maybe my e-mail ended up in his/her spam folder.

#2

peterx - February 15, 2007 - 05:39

I am testing the 4.7 version under 5.0. I enclose a premium.info. Delete the .txt from the file name and use with 4.7 under 5.0.

AttachmentSize
premium.info_.txt85 bytes

#3

peterx - February 15, 2007 - 05:51

The .install file needs {} around the table name. I enclose the .install file with that change plus an uninstall function so you can experiment with activate module, deactivate module, uninstall, activate module...

AttachmentSize
premium.install.txt625 bytes

#4

peterx - February 15, 2007 - 06:16

Premium needs CSS to highlight the premium message. Here is a CSS file.

AttachmentSize
premium.css_.txt51 bytes

#5

peterx - February 15, 2007 - 06:21

Here is the module file for 5.0. Added CSS to message.
Removed help stuff that goes into .info.
Changed nodeapi view. It could be moved to nodeapi alter.
Changed settings to use system_settings_form($form) and put the settings function in the menu.
If you want more documentation of the changes then send an owl.

AttachmentSize
premium.module.txt6.33 KB

#6

VeryMisunderstood - February 15, 2007 - 06:22

These should really have been patches not .txt files.

#7

VeryMisunderstood - February 15, 2007 - 06:23

if you roll patches we can set the status as code to be reviewed so that a developer can role them into a release

see: http://drupal.org/node/60108

#8

TheoRichel - March 5, 2007 - 20:17

I'd like to support that last remark/Please make these files available in a 5.1 package that we can actually use. I am sure you will do many people a favor. Thanks!

TR

#9

Chill35 - March 18, 2007 - 23:04

peterx, great work.

Any status on that update? Me has that opinion that premium should be given out by its current maintainer for adoption. I am willing to take over, and I am sure that a few other people are interested too. You, peterx, are interested.. ? There are a few good patches that haven't been applied, and now we should really get this to work for Drupal 5 officially. It really is a quite simple module. Unlike other access modules, premium shows you the teaser... nodes are not just invisible.

The following patch by Eaton should get applied too, after a little more testing, in both the 4.7 version and the 5 one : http://drupal.org/node/51483

Eaton's patch adds the following functionalities :

- several premium 'levels'
- a different "this is premium content' message for each level, customizable, with different input formats...

I also added an implementation of hook_file_download to block download of files attachments...

#10

Sixcolored - March 30, 2007 - 15:05

Subscribing.. I really need this :p

#11

polar-bear - April 9, 2007 - 22:09

Me too.

#12

discursives - April 14, 2007 - 03:53

me three!

#13

zostay - May 1, 2007 - 20:30

Very interested as well.

#14

zostay - May 1, 2007 - 20:54
Status:active» patch (code needs review)

Converted the files provided by peterx into a patch.

AttachmentSize
premium-5.x.patch3.86 KB

#15

ray007 - May 2, 2007 - 18:15

subscribing

#16

neurojavi - May 15, 2007 - 16:52

subscribing

#17

TheoRichel - May 27, 2007 - 13:50

Me too!!

#18

DesignWork - May 31, 2007 - 17:44
Title:Will this module be updated for drupal 5.0?» testing the patch

Hi

I´m testing the patch with 5.1 but i can not find the way to mark node type as premium did i missed some thing?

Dirk

#19

DesignWork - June 1, 2007 - 02:19

Hi

as i´m testing it for me the hook_form_alter() does not work. I have no choise to selcet if a content is premium or not?
Why? I think it´s because of the "case $type.'_node_settings':" it should be somthing like node_settings or system_node_settings.

Let´s see

Dirk

#20

terrybritton - June 16, 2007 - 00:56

Dirk, Any luck on getting the premium setting to show up under default options on the adminster content types? Other than that the 5.X version appears to work for me (so far).

#21

mosh - June 22, 2007 - 13:10

Thanks for your work so far :-)

I changed the patch to make hook_form_alter() work.
This patch is tested with the current DRUPAL-4-7 branch of the premium module.

The module seems to work for me now with a Drupal 5.1 install.

AttachmentSize
premium-5.x_0.patch5.07 KB

#22

terrybritton - June 23, 2007 - 18:22

Mosh - Thanks for the patch. I tested it this morning and everything seems to work fine.

#23

mrgoltra - July 13, 2007 - 23:11

subscribing

#24

joeWickert - July 16, 2007 - 06:12
Version:4.7.x-1.x-dev» HEAD
Category:feature request» bug report

Didn't work for me with existing premium content. The premium message appeared but so did all the content.

I've made a version of the module that does work for me(and blocks attachments too, which happened by accident but is what i wanted) happy to share it if anyone finds the same problem I did. I used:

$node->body = theme('premium_body', $node->body); to hide the content.

I'm not much of coder, so advice about how to make this useful is appreciated. Sorry if this is posted in the wrong place.

Jow

#25

DesignWork - July 25, 2007 - 19:31

Hi drupallers,

I made a version of the Premium module that works for 5.1 with a link function that shows a member only link on all teasers of premium nodes and a function for restict acceess to attached files. How can i provide that patch/version for everybody?

Dirk

PS. I used the patch of this thread as base.

#26

ckjian - July 27, 2007 - 09:25

got patch for 5.1? sounds nice. that's what i'm waiting for. however, i don't know how to create patch. probably someone else can help. meanwhile i'll try look through the handbook http://drupal.org/patch if i can find out how.

#27

DesignWork - July 27, 2007 - 19:19

Hi ckjian,

nice if you could help. I will ask to some core drupaler to see how it works. Maybe we find a way....

Dirk

#28

DesignWork - August 9, 2007 - 13:53

Hi

as promised the changes to the premium.module.

Changes:
1. function premium_link and funktion theme_premium_links (line 209) for a "Members only" link on teasers, if the node is premium.
2. premium_file_download (line 241) for hidding the att. files of a premium node. But it just works when the file system is private !!!

if your filesystem is public try this dirty hack in the node.tpl.php

<?php global $user;
                    if (!
$node->premium || user_access('access premium content')){
                        print
theme_upload_attachments($files);
                    }
                    else{
                        print
'<span class="premium-message">your premium text</span>';
                    }
                   
?>

AttachmentSize
premium.module_0.txt8.59 KB

#29

pcdonohue - August 16, 2007 - 01:52
Title:testing the patch» Will this module be updated for drupal 5.0?

Hi all.

thanks for everyone's efforts on this, the premium module will be very useful to have ported to 5.x

DesignWork, I planned on using your provided module as a basis to generate a patch for Premium, but I don't understand what "premium_left" is in your code. Can you explain? You seemed to add a fair amount of code to support that.

I'm going to work on rolling a patch based on some of the patches provided in this thread, as well as including issues from http://drupal.org/node/69432 and http://drupal.org/node/117586

I've also been testing some code that lets you set the default for "Access restricted for non-premium users" for a content type like the other workflow options (Published, Promoted to the Front Page, etc.)

p.s. It's much easier to find and to follow an issue if the title of the issue isn't changed, so I'm switching the title back to its original title. This is confusing because with normal comments, supplying a title doesn't change the main node's title, but with issues in the project module it does!

#30

pcdonohue - August 16, 2007 - 02:44

Oops,

that's what I get for just assuming the files at the end of the issue thread were the most relevant ones... I see the patch provided by zostay and peterx seem to do the trick, although I'm going to add in the issues from http://drupal.org/node/69432 and http://drupal.org/node/117586

The module maintainer does seem to be very active lately, posting some code to another project a little over a month ago, but no posts for quite some time. Any one looking to take this over?

#31

DesignWork - August 17, 2007 - 20:43

Hi,

the module provided by me works the same way like that from peterrex. Exept i have a premium_link and a premium_download function in it. The premium left was something that I need for my custom temolate because it has two collums. Just delete it. Sorry i forgott this.

How to use premium. take the install and the info file provided by peterrex and my module. put it in a folder call it premium and copy the folder to your modules dir.. Than administer->modules activate it. After that please go to administer->settings->premium and fil in the text you want to show to non-premium users. You can style it via a css file called premium (put it in the module folder)

If you want a node to be premium go to the workflow section and mark The Access denied for non-premium user checkbox. Now every teaser of this node has Members Only instead of read more. Change it via Location module if you want its a t-string. All attachments to this file are restrict for download only for premium user. To mark a role to be premium just go to the usermanagemt section of your site.

Any more explanation just ask.

Dirk

#32

dagomar - August 18, 2007 - 13:25

Oh no...

I don't seem to get this to work. I applied the patches, and everything seems to be in the right place. I even get some message in place from 'premium', but for the rest it does nothing. It just shows me the complete message, logged in or out. I tried using " " but that doesn't help. I tried using it with the 'node teaser' module, but that doesn't help either; the full message is just shown. I think i must be doing something wrong (obviously), anyone have any suggestion? Thanks!

#33

dagomar - August 18, 2007 - 13:27

" " = the break tag

#34

Allie Micka - August 21, 2007 - 19:12
Version:HEAD» 5.x-1.x-dev
Status:patch (code needs review)» fixed

I have committed an updated version, and the snapshot release should be available within a day or so.

Big thanks to peterx, zostry, mosh, and everyone else who participated in this thread!

DesignWork: I appreciate your feature enhancements, but since development on 5.x is now open, I'm hoping you'll submit separate issues for these. For 5.x, I'm hoping to merge Eaton's changes with other feature requests.

#35

DesignWork - September 3, 2007 - 07:14

Hi Allie Micka,

so how we should go on with the features I updated the module? I think at least the link funcion is good feature. The update_attachement function is not perfect because it depends the filesystem be private. May be we should just make it an option in the premium settings!

Let´s talk about.

Dirk

#36

Allie Micka - September 4, 2007 - 17:24

Good stuff -

your features are welcome, but I wanted to keep them separate from the upgrade itself. It's always easier to discuss and implement one thing at a time.

Please open an additional issue (or several, if you have several feature requests/additions)

Thanks!

#37

nath - September 6, 2007 - 14:01

Thanks for porting this to 5.x. It is a key feature on our site.

#38

Anonymous - September 20, 2007 - 14:11
Status:fixed» closed

#39

Chill35 - July 10, 2008 - 01:41
Status:closed» active

May we have a release version ?

#40

Allie Micka - July 13, 2008 - 18:24

Sure, pending bug fixes such as:

http://drupal.org/node/281414
http://drupal.org/node/112127
http://drupal.org/node/281414

And possibly features such as:
http://drupal.org/node/117575

Testing and followup are most welcome for these issues.

Thanks!

#41

Chill35 - July 13, 2008 - 18:46

Issue marked twice -- and unable to replicate: http://drupal.org/node/281414

http://drupal.org/node/117575 -- a batch operation? Not exactly a killer feature, just a way to save time. One can use SQL to do the same.

#42

Allie Micka - July 13, 2008 - 19:08

http://drupal.org/node/117575 -- a batch operation? Not exactly a killer feature, just a way to save time. One can use SQL to do the same.

Yes and no. When you update the settings/preferences on the admin screen, they don't have any effect on previously-created nodes. I would characterize this as a bug, and I have some usability concerns with popping up an error message that reads "Please learn SQL so that your site can function as expected".

If you'd like to work on / verify / help close the other issue (or any others), your help is appreciated.

Thanks!

#43

jerdavis - August 3, 2008 - 06:42
Status:active» closed

1.0 has been released - let us know if you still see issues! We'll work on getting a few other things in soon.

#44

peterx - August 7, 2008 - 00:07

Thank you zostay for the conversion. I tried creating patches for another module and the software on my computer created patches incompatible with the format used for Drupal.

Thank you to everyone who contributed and started maintaining this module. I applied to formally upgrade another module but the Drupal overlords said I could only upgrade it if I would take on the long term maintenance. This is not possible. Many times I am just installing modules for sites that will be maintained by other people. I cannot maintain a module if it is not used on a site I administer every day.

There is a real problem that should be discussed in a separate post. We cannot tell if a module is actively maintained by people using the module on a site. Perhaps a module description could include a list of sites that use the module. Perhaps there could be demonstration sites for modules. Set up a VPS with Drupal 6 and call it 6.drupal.org. The premium module could then be in premium.6.drupal.org.

petermoulding.com/web_architect

 
 

Drupal is a registered trademark of Dries Buytaert.