This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#accordion .content').hide(); | |
$('#accordion .title').unbind(); | |
$('#accordion .title').click(function() { | |
$('#accordion .content').slideUp(); | |
if($(this).hasClass('active')) { | |
$(this).removeClass('active'); | |
return; | |
} | |
$(this).addClass('active'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>Arguments</h2> | |
<strong> | |
<?php | |
$view = views_get_current_view(); | |
print ucwords(str_replace('-', ' ',$view->args[0])); | |
print ucwords(str_replace('-', ' ',$view->args[1])); | |
print ucwords(str_replace('-', ' ',$view->args[2])); | |
//Add more lines and change the $view->args element for more arguments. | |
?> | |
</strong> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form['form_id_display'] = array( | |
'#markup' => '<div style="border:1px solid #333; padding: 5px;">' . $form_id . '</div>', | |
'#value' => '<div style="border:1px solid #333; padding: 5px;">' . $form_id . '</div>', | |
'#weight' => -999, | |
'#access' => user_access('administer nodes'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('log_errors', 1); | |
ini_set('error_log', dirname(__FILE__) . '/error_log_' . date('Ymd') . '.log'); | |
error_reporting(-1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$values = array(1, 2, 3, 4, 5); | |
$placeholders = db_placeholders($values); | |
$result = db_query("SELECT t.s FROM {table} t WHERE t.field IN ($placeholders)", $values); | |
$items = array(); | |
while ($row = db_fetch_object($result)) { | |
$items[] = $row->s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$view_args = array(3); | |
$view_display_id = 'default'; | |
$view = views_get_view('view_id'); | |
print $view->execute_display($view_display_id, $view_args), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo 'Hello'; | |
echo '... more junk'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import time | |
import tempfile | |
import subprocess | |
import optparse | |
import re | |
import shutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB_HOST='server_name' | |
DB_USER='user' | |
DB_PWD='pwd' | |
DB_NAME='database_name' | |
DB_TABLE_PREFIX='pref_' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("table tr:odd").addClass("odd"); | |
$("table tr:even").addClass("even"); | |
$("table tr:first-child").addClass("first"); | |
$("table tr:last-child").addClass("last"); | |
$("table td:odd").addClass("odd"); | |
$("table td:even").addClass("even"); | |
$("table td:first-child").addClass("first"); | |
$("table td:last-child").addClass("last"); |
OlderNewer