php

WSOD error from menu_execute_active_handler() - on homepage (using Panels

  1. menu_execute_active_handler(): returned NULL - it's very bad!
  2. WSOD detected!

PHP code put into views repeats for all users on site, opposed to just being displayed once

  1. <?php
  2. global $user;
  3. $rtid = 1; //Relationship type ID.
  4. $max = 1; //The amount of users to show on the block.
  5.  
  6. $user_rel = db_query("
  7. SELECT u.uid
  8. FROM {users} u
  9. LEFT JOIN {user_relationships}

printing a list, instead of a table header

  1. function honu_preprocess_forum_topic_list(&$variables) {
  2.   global $forum_topic_list_header;
  3.  
  4.   // Create the tablesorting header.
  5.   $ts = tablesort_init($forum_topic_list_header);
  6.   $header = '';

printing a list, instead of a table header

  1. function honu_preprocess_forum_topic_list(&$variables) {
  2.   global $forum_topic_list_header;
  3.  
  4.   // Create the tablesorting header.
  5.   $ts = tablesort_init($forum_topic_list_header);
  6.   $header = '';

PHP help, printing a list instead of a table

  1. function template_preprocess_forum_topic_list(&$variables) {
  2.   global $forum_topic_list_header;
  3.  
  4.   // Create the tablesorting header.
  5.   $ts = tablesort_init($forum_topic_list_header);
  6.   $header =

update.php

  1. <?php
  2. // $Id: update.php,v 1.252.2.3 2009/03/30 11:15:11 goba Exp $
  3.  
  4. /**
  5.  * @file
  6.  * Administrative page for handling updates from one Drupal version to another.
  7.  *
  8.  * Point your browser to "ht

sdfsf

  1. <?php
  2. phpinfo();
  3. ?>

Example Block Filter

  1. <?php
  2. $match = FALSE;
  3. $url = request_uri();
  4. $types = array('mycontenttype' => 1);
  5. if (arg(0) == 'node' && is_numeric(arg(1))) {
  6.   $nid = arg(1);
  7.   $node = node_load(array('nid' => $nid));
  8.   $ty

Hey

  1. fffffff

jfhsdkjfahkjsd fkjahskjdfhajks

  1. <?php
  2. /* A simple php script */
  3.  
  4. $choice = $_GET['foo'];
  5. if ( $choice == 1 )
  6. {
  7.   echo 'You like coffee!';
  8. }
  9. elseif ( $choice == 2 )
  10. {
  11.   echo 'I said, "You like coffee!"';
  12. }
  13.  
  14. echo "<br /
Syndicate content