I'm sure this is just me, but here goes. I keep getting just the php code in a gray box in the sidebar where I put the block, like this:
if (module_exist("adsense"))
{
print adsense_display("120x600", 2, 4);
}
I have the very latest CVS version, my block is set to PHP, and I have my client ID in there. I have no idea what I'm doing wrong.
Comments
Comment #1
kbahey commentedCheck the source, and see if the < is put as HTML notation <
Someone had this same problem, and it was the input filters that he had that messes up the code.
http://drupal.org/node/23635#comment-46652
Comment #2
unsafe commentedI'm not sure what you mean. The < marks show up exactly as in the example I posted above. They haven't been converted to html markup on my screen, if that's what you mean.
Comment #3
unsafe commentedI checked the input filters, and raised the weight of the Php one, and everything is fine as far as I can see. You can check the site yourself at http://chillycool.com if that helps.
Comment #4
nevets commentedBy looking at the page source I am guessing you have the code filter enabled and it is running before the php filter (there is a pre tag just before the block of 'code').
Comment #5
unsafe commentedThanks, nevets, I see what you mean. That must be what Kbahey was talking about. And the response in the other post says the person "had a filter active that wasn't useful in that context." I have no idea what that means, or what "code filter" you're describing. There's a "filter" in modules, but it's required. And I looked at the input filters, and I haven't changed anything there, so I assume all is well. The block is set to php.
Sorry I'm not more familiar with all the techie stuff, but if you can tell me where to look, hopefully I can figure out what's going on.
Comment #6
kbahey commentedFrom what I see, the PHP code is not interpreted as PHP, and is output as code.
This means that you have a filter that is supposed to output code as it is and not execute it.
I cannot tell you which filter it is, but look for a code filter and disable it. Only leave the three default ones (HTML, Full HTML and PHP)
?>
Comment #7
unsafe commented: sigh:
I can't find it. I never installed anything but the normal input filters. It must be a module I've installed that's conflicting with it, but I've tried disabling several of them, and it makes no difference.
Has anyone else seen anything like this?
Comment #8
unsafe commentedOk, I turned off FCKeditor in order to post the block, in case it was interfering with the php code. Now the code is no longer showing, but all that shows of the block is the title. The source code says
AdSense
So it's like it's just not even trying to parse it. Any ideas?
Comment #9
nevets commentedAt this point to ways to approach your problem.
1) Take screen dumps of the filter setting page (administer -> 'input formats' and the definition of the block (edit the block for this one).
2) I can try and lend a more active hand if you are willing to provide a login I can use with admin privilages. Contact me by email if this is of interest (click my login name, click the contact tab)
Steve
Comment #10
kbahey commentedAt this point, you need to test if PHP blocks work or not.
Paste this in a block, then enable the block and see what you get:
Do you get the code, or get the code executed.
Comment #11
kbahey commentedClosing this old issue, since it seems specific to the reporter.