We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

shrop on 07/07/08


Tagged

drupal


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

basicmagic
riz
DanS42


Drupal Block Visibility: Show On Blog and Forums


Published in: PHP 


URL: http://www.packtpub.com/drupal-5-themes/book

From Drupal 5 Themes book.

  1. <?php
  2. if (arg(0) == 'blog') {
  3. return TRUE;
  4. }
  5. if (arg(0) == 'node' && ctype_digit(arg(1))) {
  6. $node = node_load(arg(1));
  7. if ($node->type == 'forum') {
  8. return TRUE;
  9. }
  10. }
  11. return FALSE;
  12. ?>

Report this snippet 

You need to login to post a comment.