Believe it or not it takes 3 months for me to figure out how to make this things out!
Basically Drupal CMS allow us to put PHP code inside every admin post. Posting code below will output exactly as file with .php extension using
eval() function.
<?php
phpinfo();
?>
The results will output phpinfo() information on the posted articles… of course you may use another functions like date(), strtoupper() or what ever. The great things was we also could execute SQL command trough any post. See the sample code below…
<?php
$array = db_fetch_array(db_query('SELECT * FROM {system}'));
print_r($array);
?>
will return
Array ( [filename] => modules/block.module [name] => block [type] => module [description] => Controls the boxes that are displayed around the main content. [status] => 1 [throttle] => 0 [bootstrap] => 0 [schema_version] => 0 [weight] => 0 )
With a little more extended idea you might easily post dynamically post that query probably the most hot topic on your Drupal system.













hum? actually i dont understand what you want to do. you want to create a password post or want to include php script in the post?
What I mean is how to include() or run PHP codes inside each Drupal post … not just limited to pasword prtotection.
I believe Drupal was among the most extendable CMS available. The problem is, learning Drupal codes structure. Even Googling their online manual my questions keeps unsolved. I have not read inside their manual yet.
Whats I’m working on now with Drupal is to create a costom main page.
Thank You