When editing content Drupal ignores PHP, why is this? I would like to use PHP in the titles of the content, in the body and in the description, how can I get this to work?

[Moved to support - Heine]

Comments

ashishn.cms’s picture

Hello,
Do you want to add PHP String or PHP code please specify?

Thanks

aaronmchale’s picture

PHP Code to my pages, it was posable in Drupal 5, but not in Drupal 6

aaronmchale’s picture

heres an example, from one of my pages, " $sec=="1" Home".
Or,
"Today, print date("l, F j, Y") "

mkalbere’s picture

you should choose php filter
- verify that it is enabled in admin/settings/filters
- .. and of course that the module is enable (disabled by default)

aaronmchale’s picture

PHP filter is not shown under filters, do I need to do something else to enable it?

ashishn.cms’s picture

You have to enable php filter module.

aaronmchale’s picture

Oh, thanks.

ashishn.cms’s picture

You have to enable php filter module for body field but i am not sure for title field.

mkalbere’s picture

title is plain text only

aaronmchale’s picture

Ye, there might be a extension module or a patch that allows other fields to include PHP tags.

beautifulmind’s picture

instead of looking for a module and install it, just need to write few lines of code in your existing custom module to change the way node title displayed or stored in the db.

Regards.

Regards.
🪷 Beautifulmind

aaronmchale’s picture

are you saying you have found a module that does that or do I have to alter the existing PHP Filters module?