/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* a list a pages to include in standard block include/exclude format (one per line) */ $include = "some/site/section/* another/page/here node/34"; /* a list a pages to exclude in standard block include/exclude format (one per line) */ $exclude = "some/site/section/page1 some/site/section/page2"; /* ----------- DO NOT TOUCH ANYTHING BELOW THIS LINE ----------- */ $match = FALSE; $path = drupal_get_path_alias($_GET['q']); ?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($include, '/')) .')$/'; ?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($exclude, '/')) .')$/'; $match = TRUE; } } return $match; ?>
Comments
