Great module, however it would be awesome if it included an additional field for PHP.
Example use case:
PHP is requred for a node
Without PHP cpn - usually this is put into the node body by an admin who knows PHP. However this node needs to be updated by a normal author, they make changes and inadvertently remove the PHP code and cause the page to break.
With PHP cpn - Admin puts PHP in the PHP text field of cpn, author comes in and edits the node body and the PHP remains unchanged. With permissions the author is completely unaware of the PHP. In effect this removes the need for a PHP input format
Comments
Comment #1
joelstein commentedI don't understand... you want to add a PHP field next to the CSS and JS fields? But what does it do? Generate node content? Just get executed once when the page content is generated? Please clarify.
Comment #2
westie commentedPHP can be handy inline in a node / block for a number of reasons, some examples: http://drupal.org/node/21867
Currently the suggested method of including PHP in a node / block is kinda lame and was very similar to how you would include css / js before cpn: http://drupal.org/node/23223
While ill admit it will be less common than requiring a little custom javascript / css it can be an optional feature via permissions. The way cpn displays is so much better as it keeps things organised and separate.
One issues we faced with cpn is we couldn't link to a external js file because we were unable to enter script tags. Every now and then a page requires richer media so we use a jQuery library such as datatables, this might only be on 5 out of 1000 nodes so the ad hoc ability to attach directly to the node via gui is really helpful.
In my case I have created a CCK field called PHP which is only accessible to admin's via permissions we then include code such as the below to call a libary ONLY on the nodes which use it:
Comment #3
geerlingguy commentedI can see the use case for this, but, just like with the PHP input filter, this would introduce a lot of security concerns, and the module might need a lot more evaluation and work to ensure security :-/
Comment #4
westie commentedThe use case is for any time you would need to use the existing method of including php in a node or a block by entering it in the body. However CPN makes this process more granular and a lot cleaner.
It is only a feature suggestion, if in reality it will cause more problems than it is worth feel free to close this.
Comment #5
damienmckennaThis can be done using core functionality, especially in D7, there's no need for CPN to support it.