My Recent Pastes (54 and counting)

All Pasties (129 and counting)

Pages: 1 2 3 4

Below are summaries of the 15 most recent pasties by Joon Park.

October 25, 2007
12:02PM EDT
by Joon Park

1
2
3
4
5
<?php
function phptemplate_node_form($form) {

  //This places each element of the form as a variable inside the template file.
  foreach (element_children($form) as $element) {

October 25, 2007
12:00AM EDT
by Joon Park

1
2
3
4
5
/**
 * Intercept template variables.
 *
 * This mimics how themes work in Drupal 6. Instead of using switch cases,
 * separated functions are called to alter the variables per hook. This is

October 24, 2007
11:50PM EDT
by Joon Park

1
2
3
4
5
<?php

function _phptemplate_variables($hook, $vars = array()) { 
  if ($hook == 'node') {
      $vars['template_files][] = 'node-'. $vars['node']->nid;

October 18, 2007
7:52PM EDT
by Joon Park

1
2
3
4
5
--- untitled
+++ (clipboard)
@@ -2,11 +2,5 @@
                       width="320" 
                       height="240"

October 17, 2007
4:34PM EDT
by Joon Park

1
2
3
4
5
<?php

function _phptemplate_variables($hook, $vars = array()) { 
  if ($hook == 'node') {
    if ($vars['teaser']) {

October 13, 2007
12:35PM EDT
by Joon Park

1
2
3
4
5
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/themes/abac/screenshot-drupal.org.jpg
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/themes/aberdeen/screenshot-drupal.org.png
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/themes/activesigns/screenshot-drupal.org.jpg
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/themes/adc/screenshot-drupal.org.png
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/themes/amadou/screenshot-drupal.org.png

October 11, 2007
7:36PM EDT
by Joon Park

1
2
3
4
5
<?php
/**
 * Search box form override.
 */
function phptemplate_search_theme_form($form) {

October 11, 2007
9:56AM EDT
by Joon Park

1
2
3
4
5
<?php

/**
 * To force a section for debugging, set it here! NULL to disable.
 */

October 09, 2007
8:50AM EDT
by Joon Park

1
2
3
4
5
Copyright (c) 2007 Olav Bjorkoy (http://bjorkoy.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

October 07, 2007
4:37PM EDT
by Joon Park

1
2
3
4
5
/**
 * Generate the themed output.
 *
 * All requests for theme hooks must go through this function. It examines
 * the request and routes it to the appropriate theme function. The theme

October 05, 2007
11:49AM EDT
by Joon Park

1
2
3
4
5
warning: Cannot modify header information - headers already sent by (output started at /Users/joon/Sites/projects/drupal/includes/database.mysqli.inc:156) in /Users/joon/Sites/projects/drupal/includes/common.inc on line 141.
user warning: Table 'drupalhead.node' doesn't exist query: CREATE TEMPORARY TABLE missing_nids Engine=HEAP SELECT n.nid, n.changed, n.uid FROM node n LEFT JOIN node_comment_statistics c ON n.nid = c.nid WHERE c.comment_count IS NULL in /Users/joon/Sites/projects/drupal/modules/comment/comment.install on line 9.
user warning: Table 'drupalhead.missing_nids' doesn't exist query: INSERT INTO node_comment_statistics (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, n.changed, NULL, n.uid, 0 FROM missing_nids n in /Users/joon/Sites/projects/drupal/modules/comment/comment.install on line 10.
user warning: Table 'drupalhead.node_type' doesn't exist query: SELECT nt.type, nt.* FROM node_type nt ORDER BY nt.type ASC in /Users/joon/Sites/projects/drupal/modules/node/node.module on line 479.
user warning: Table 'drupalhead.cache_block' doesn't exist query: DELETE FROM cache_block WHERE expire != 0 AND expire < 1191599250 in /Users/joon/Sites/projects/drupal/includes/cache.inc on line 163.

October 05, 2007
11:22AM EDT
by Joon Park

1
2
3
4
5
<?php
function yourTheme_node($node, $teaser = 0, $page = 0) {
  $output = phptemplate_node($node, $teaser, $page);
  if ($teaser && $node->sticky && empty($node->preview)) {
    drupal_set_content('New_Region', $output);

September 30, 2007
11:02PM EDT
by Joon Park

1
2
3
4
5
/**
 * Determine the current section. The default associations are at the very top of this file.
 *
 * @see _section_data()
 */

September 30, 2007
2:03PM EDT
by Joon Park

1
2
3
4
5
<?php

/**
 * To force a section for debugging, set it here! NULL to disable.
 */

September 26, 2007
10:22AM EDT
by Joon Park

1
2
3
4
5
/**
 * Returns a themed representation of all stylesheets that should be attached to the page.
 * It loads the CSS in order, with 'core' CSS first, then 'module' CSS, then 'theme' CSS files.
 * This ensures proper cascading of styles for easy overriding in modules and themes.
 *

Next page