My Recent Pastes (54 and counting)
All Pasties (over 54 and counting)
Below are summaries of the 15 most recent pasties by Joon Park.
September 24, 2007
12:34PM EDT
by Joon Park
View more (9 lines)
1 2 3 4 5 |
function theme_system_elements($form) {
foreach (element_children($form) as $element) {
if (isset($form[$element]['#size'])) {
$form[$element]['#size'] = '100';
|
September 24, 2007
12:32PM EDT
by Joon Park
View more (9 lines)
1 2 3 4 5 |
function theme_system_elements($form) {
foreach (element_children($form) as $element) {
if (isset($form[$element][#size])) {
$form[$element][#size] = '100';
|
September 21, 2007
8:45PM EDT
by Joon Park
View more (15 lines)
1 2 3 4 5 |
switch ($hook) {
case 'node':
$vars['lesson_number'] = '';
foreach($vars['node']->taxonomy as $key => $keycontent) {
if ($keycontent->vid != 1) {
|
September 21, 2007
8:44PM EDT
by Joon Park
View more (14 lines)
1 2 3 4 5 |
switch ($hook) {
case 'node':
foreach($vars['node']->taxonomy as $key => $keycontent) {
if ($keycontent->vid != 1) {
unset($vars['taxonomy']['taxonomy_term_'. $key]);
|
September 21, 2007
6:17PM EDT
by Joon Park
View more (302 lines)
1 2 3 4 5 |
/**
* Implementation of hook_widget().
*/
function optionwidgets_widget($op, &$node, $field, &$items) {
switch ($op) {
|
September 10, 2007
9:56AM EDT
by Joon Park
View more (30 lines)
1 2 3 4 5 |
<?php // from aggregator_menu() $items['aggregator/sources/%aggregator_feed'] = array( |
September 06, 2007
12:41PM EDT
by Joon Park
View more (25 lines)
1 2 3 4 5 |
/**
* Implementation of hook_theme()
*/
function search_theme() {
return array(
|
September 05, 2007
10:42PM EDT
by Joon Park
View more (13 lines)
1 2 3 4 5 |
function _phptemplate_variables($vars, $hook) {
static $node_types = aray();
if ($hook == 'node') {
$node_types[] = $vars['node']->type;
|
September 05, 2007
10:37PM EDT
by Joon Park
View more (45 lines)
1 2 3 4 5 |
<?php /** * Holds data so it can be passed around to various functions. * * Supplying the $type, $key and $bits (keyed array) will store it. Calling it |
August 27, 2007
9:04PM EDT
by Joon Park
1 2 |
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JO IN node n ON n.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.statu' at line 1 query: CREATE TEMPORARY TABLE temp_search_sids Engine=HEAP SELECT i.type, i.sid, SUM(i.score * t.count) AS relevance, COUNT(*) AS matches FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JO IN node n ON n.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (i.word = 'node') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/search/search.module on line 882. user warning: Table 'drupalhead.temp_search_sids' doesn't exist query: SELECT MAX(relevance) FROM temp_search_sids in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/search/search.module on line 885. |
August 23, 2007
11:38PM EDT
by Joon Park
View more (367 lines)
1 2 3 4 5 |
first run without patch: /////////////////////// [root@vps ~]# ab -c1 -n500 http://127.0.0.1/drupalhead/node_load_test This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 |
August 13, 2007
11:41PM EDT
by Joon Park
View more (243 lines)
1 2 3 4 5 |
notice: Undefined index: link in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/color/color.module on line 388. notice: Undefined index: top in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/color/color.module on line 393. notice: Undefined index: bottom in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/color/color.module on line 393. notice: Undefined index: top in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/color/color.module on line 393. notice: Undefined index: bottom in /Users/joon/Sites/projects/DRUPAL-HEAD/modules/color/color.module on line 393. |
August 13, 2007
5:36PM EDT
by Joon Park
View more (8 lines)
1 2 3 4 5 |
// It would be too much of a performance hit to let every module have
// a generic preprocess function; themes and theme engines can do that.
if ($type != 'module' && function_exists($prefix .'_preprocess')) {
$info['preprocess functions'][] = $prefix .'_preprocess';
}
|
August 12, 2007
11:14PM EDT
by Joon Park
View more (14 lines)
1 2 3 4 5 |
/** * Overriden only to add stylesheets before drupal_get_css gets called * from phptemplate_page. This minimises preprocessed style sheets. * * Javascripts and status messages should also be set here when needed. |
August 12, 2007
6:15PM EDT
by Joon Park
View more (18 lines)
1 2 3 4 5 |
--- untitled
+++ (clipboard)
@@ -12,12 +12,11 @@
// have one extension chopped off, but there might be more than one,
// such as with .tpl.php
|
Pastie