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
# go to the folder where the link should be from | |
cd /Applications/MAMP/htdocs/ | |
# make the link, -s means symbolic | |
# format is ln -s [source] [target] | |
# using the period mean "use the same name" | |
ln -s /Users/[USERNAME]/Documents/GitHub/CRASHSpace/drupal_crashspace_dev/drupal_crashspace_dev . | |
# then see it listed a reference | |
ls -l |
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
#for crashspace drupal project. | |
#drupal_crashspace_dev is the name of the directory where the web files are. | |
# Ignore MacOS Folder Attributes files | |
.DS_Store | |
# Ignore configuration files that may contain sensitive information. | |
#drupal_crashspace_dev/sites/*/settings*.php | |
# Ignore paths that contain user-generated content. |
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
#go to the folder | |
cd /Applications/MAMP/bin | |
#get drush off on the internet (mac has curl not wget, make sure it is the latest drush) | |
curl -O http://ftp.drupal.org/files/projects/drush-7.x-4.5.tar.gz | |
#decompress | |
tar -zxvf drush-7.x-4.5.tar.gz | |
#delete tar ball | |
rm drush-7.x-4.5.tar.gz | |
#user executable | |
chmod u+x drush/drush |
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
---- Before Chapter 4 | |
drush dl admin_menu | |
drush dl advanced_help | |
drush dl backup_migrate | |
drush dl calendar | |
drush dl captcha | |
drush dl ctools | |
drush dl date | |
drush dl devel |
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
#because my copy of drupal 7.9 is in the Downloads folder | |
cd $HOME/Downloads | |
#if you haven't gotten it already | |
#curl -O http://ftp.drupal.org/files/projects/drupal-7.9.tar.gz | |
#untar to the right place | |
tar -C $HOME/Documents/GitHub/CRASHSpace/SandboxDrupalSite/ -xjvf drupal-7.9.tar.gz | |
#go to that place |
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
//bust the objects down to arrays | |
function objectToArray($result) | |
{ | |
$array = array(); | |
foreach ($result as $key=>$value) { | |
if (is_object($value)) { | |
$array[$key]=objectToArray($value); | |
} | |
elseif (is_array($value)) { | |
$array[$key]=objectToArray($value); |
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
//These are in the Functions.php file | |
//gist-1364599 | |
function objectToArray($result) | |
{ | |
$array = array(); | |
foreach ($result as $key=>$value) { | |
if (is_object($value)) { | |
$array[$key]=objectToArray($value); | |
} |
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
#access { | |
position: absolute; | |
top: 180px; | |
} | |
#branding img { | |
position: relative; | |
margin-top: 50px; | |
} |
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
#access { | |
position: absolute; | |
top: 180px; | |
} | |
#branding img { | |
position: relative; | |
margin-top: 50px; | |
} |
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 | |
// Check if this is a post or page, if it has a thumbnail, and if it's a big one | |
if ( is_singular() && | |
has_post_thumbnail( $post->ID ) && | |
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) && | |
$image[1] >= HEADER_IMAGE_WIDTH ) : | |
// Houston, we have a new header image! | |
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); | |
//--- Added to have blog category page headings | |
elseif( is_category() ) : |
OlderNewer