Would you please include accepting php code at Premium body text?
It can be userful to inegrated resitration or login fomrs.

Comments

budda’s picture

Priority: Critical » Normal

Why not just implement your own custom theme function and run your PHP in there to generate the output?

function phptemplate_premium_body($node) {
  $output = ''; //whatever php you want
  return $output;
}
Chill35’s picture

tfejos, you may be interested in using Eaton's patch for the premium module.

With it you get many different levels of premium AND you can set your premium message in php for each of these levels. That is, you have access to the "input format" beneath the textarea where you enter your "premium text". It works really well. I am using php myself in there.

If you like this patch, ask for it to be committed please :

http://drupal.org/node/51483

Caroline
11 heavens

Chill35’s picture

Title: Php code in Premium body text » Php code in Premium Message

Just to clarify, we are really talking here about the message that says : "you cannot access this content. Please register, blablabla..." :)

graper’s picture

The problem that seems to be really happening is that if a node has it's input format set to php code and is marked as a premium node, it seems that the php code is not evaluated properly and the premium module spits out all the code as html text instead of blocking it like it should.

I am currently using
$Id: premium.module,v 1.2.2.4 2006/07/19 16:42:01 vauxia Exp $

while I tried the latest 4.7 module uploaded on May 23rd, 2007, it had a bug in it about a brace or paren on line 188. so I switched back. I'm looking into the above patch also to see what it gives in functionality.

Granville
granville[at]kirkhamsystems[dot]com
www.kirkhamsystems.com

allie micka’s picture

Status: Active » Closed (duplicate)

I'm marking this as a duplicate of http://drupal.org/node/231641 . Technically, it's the other way around; but the patch submitted on that issue can address the issue described here.

Thanks!