replace PHP content with module code

pwolanin - May 26, 2008 - 23:43
Project:Drupal.org customizations
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

Here's the start of a patch to replace the dynamic content generated using PHP-format pages in the handbook with a hook_nodeapi() implementation. The advantage of this is that regular doc team members can edit the text at the top of the page to clarify or explain, and we start to move away from the need to have the PHP format enabled on drupal.org. Another advantage is that the dynamic content can be cached, even for authenticated users.

Unfortunately, since I don't have access to those pages, I don't have the current PHP, except for node/14205 which chx pasted for me.

Other obvious nodes to start:
node/318
node/43633
node/43639

AttachmentSize
no-php-nodes.patch3.09 KB

#1

webchick - May 27, 2008 - 01:21

+100 for this.

I did some queries, and found out that there are 37 PHP nodes (32 are published), and 7 PHP blocks (4 are active). There is some work to do. ;)

Oh, btw, I furnished pwolanin with a copy of all of these. I'd prefer to limit its distribution, since I don't even know if I'm supposed to do queries like this in the first place. :P

#2

mikey_p - May 27, 2008 - 02:52

Just a note, and I only noticed this a few days ago, that anyone that can view revisions can view PARTIAL source of a node with the input filter set to PHP. I don't know if this is considered a bit of a security risk or not.

#3

pwolanin - May 27, 2008 - 02:58

I think actually only 3 blocks are active. Here's a start on adding the block code. I guess if we want to go this route, we'll need to add an update function to handle transferring the status of the Contributor links since that block may be enabled/disabled by each user.

AttachmentSize
no-php-format-263028-2.patch7.51 KB

#4

kbahey - July 1, 2008 - 05:05
Status:patch (code needs work)» duplicate

I just saw this after I refactored all the PHP nodes and PHP blocks in this issue http://drupal.org/node/277021

It is in 4 parts as a tar.gz archive.

Reviews welcome.

 
 

Drupal is a registered trademark of Dries Buytaert.