Added more page excerpts
This commit is contained in:
parent
592f054b36
commit
349673546e
|
@ -8,8 +8,11 @@ tags:
|
|||
- modules
|
||||
- patches
|
||||
---
|
||||
{% block excerpt %}
|
||||
Earlier this year, I posted a solution to [an issue](http://drupal.org/node/753898) on the Drupal.org issue queue. Originally, I just posted the code back onto the issue, but have now created a patch that can easily be applied to any Drupal 6 installation. Here is a run-through of the process of creating and applying a patch. In this case, I made changes to the `user_pass_validate()` function that's found within `modules/user/user.pages.inc`.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
To begin with, a download a fresh copy of Drupal 6.19 and created a copy of the original user.pages.inc file. Within the duplicate file, I made the same changes to the function that I did in earlier code, and saved the changes. Now, within my Terminal, I can navigate to Drupal's root directory and create the patch.
|
||||
|
||||
diff -rup modules/user/user.pages.inc modules/user/user.pages2.inc > /Users/oliver/Desktop/different_messages_for_blocked_users.patch
|
||||
|
@ -27,3 +30,4 @@ If, for some reason, I need to reverse the patch, I can run this code:
|
|||
And that's it!
|
||||
|
||||
There is also a Git patch creation workflow, which is described at <http://groups.drupal.org/node/91424>. Thanks to [Randy Fay](http://randyfay.com) for making me aware of this, and suggesting a slight change to my original patch creation command.
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,6 +6,13 @@ tags:
|
|||
- drupal-planet
|
||||
- php
|
||||
---
|
||||
{% block excerpt %}
|
||||
There are times when doing Drupal development when you need to run a custom PHP script, maybe moving data from one field to another, that doesn't warrant the time and effort to create a custom module. In this scenario, it would be quicker to write a .php script and bootstrap Drupal to gain access to functions like `node_load()` and `db_query()`.
|
||||
|
||||
To bootstrap Drupal, you would need to add some additional lines of code to the stop of your script. Here is an alternative way.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
There are times when doing Drupal development when you need to run a custom PHP script, maybe moving data from one field to another, that doesn't warrant the time and effort to create a custom module. In this scenario, it would be quicker to write a .php script and bootstrap Drupal to gain access to functions like `node_load()` and `db_query()`.
|
||||
|
||||
To bootstrap Drupal, you would need to add some additional lines of code to the stop of your script. Something like:
|
||||
|
@ -45,3 +52,4 @@ Or, if you're using [Drush aliases](http://deeson-online.co.uk/labs/drupal-drush
|
|||
$ drush @mysite.local scr foo
|
||||
|
||||
If you commonly use the same scripts for different projects, you could also store these within a separate Git repository and checkout the scripts directory using a [Git submodule](http://git-scm.com/book/en/Git-Tools-Submodules "Git Submodules").
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,6 +5,11 @@ description: Here are the basic commands that you need to adminster a virtual ma
|
|||
tags:
|
||||
- vagrant
|
||||
---
|
||||
{% block excerpt %}
|
||||
[Vagrant](http://www.vagrantup.com "About Vagrant") is a tool for managing virtual machines within [VirtualBox](https://www.virtualbox.org) from the command line. Here are some useful commands to know when using Vagrant.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
[Vagrant](http://www.vagrantup.com "About Vagrant") is a tool for managing virtual machines within [VirtualBox](https://www.virtualbox.org) from the command line. Here are some useful commands to know when using Vagrant:
|
||||
|
||||
Command | Description
|
||||
|
@ -19,3 +24,4 @@ vagrant halt (-f) | Halt the Vagrant box. Use -f to forcefully shut down the box
|
|||
vagrant destroy (-f) | Destroys a Vagrant box. Use -f to forcefully shut down the box without prompting for confirmation.
|
||||
|
||||
The full Vagrant documentation can be found at <http://docs.vagrantup.com/v2/>.
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,6 +6,13 @@ tags:
|
|||
- git
|
||||
- drupal-planet
|
||||
---
|
||||
{% block excerpt %}
|
||||
Testing a patch file is usually a two-step process. First you download the patch file from the source, and then you run a separate command to apply it.
|
||||
|
||||
You can save time and typing by running the two commands on one line:
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Testing a patch file is usually a two-step process. First you download the patch file from the source, and then you run a separate command to apply it.
|
||||
|
||||
You can save time and typing by running the two commands on one line:
|
||||
|
@ -19,3 +26,4 @@ Or, if you don't have curl installed, you can use wget:
|
|||
These commands need to be run within the root of your Git repository (i.e. where the .git directory is).
|
||||
|
||||
These snippets were taken from [Applying Patches with Git](https://drupal.org/node/1399218) on Drupal.org.
|
||||
{% endblock %}
|
||||
|
|
|
@ -7,11 +7,15 @@ tags:
|
|||
- drupal
|
||||
- drupal-planet
|
||||
- drush
|
||||
|
||||
---
|
||||
{% block excerpt %}
|
||||
If you use [Drush](https://raw.github.com/drush-ops/drush/master/README.md "About Drush"), it's likely that you've used the `drush pm-download` (or `drush dl` for short) command to start a new project. This command downloads projects from Drupal.org, but if you don't specify a project or type "drush dl drupal", the command will download the current stable version of Drupal core. Currently, this will be Drupal 7 with that being the current stable version of core at the time of writing this post.
|
||||
|
||||
But what if you don't want Drupal 7?
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I still maintain a number of Drupal 6 sites and occassionally need to download Drupal 6 core as opposed to Drupal 7. I'm also experimenting with Drupal 8 so I need to download that as well.
|
||||
|
||||
By declarding the core version of Drupal, such as "drupal-6", Drush will download that instead.
|
||||
|
@ -35,3 +39,4 @@ The same can be done for other core versions of Drupal, from Drupal 5 upwards.
|
|||
$ drush dl drupal-8
|
||||
|
||||
For a full list of the available options, type "drush help pm-download" into a Terminal window or take a look at the entry on [drush.ws](http://drush.ws/#pm-download, "The entry for pm-download on drush.ws").
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,26 +4,30 @@ nav: blog
|
|||
tags:
|
||||
- git
|
||||
---
|
||||
{% block excerpt %}
|
||||
Here are some bash aliases that I use and find helpful for quickly writing Git and Git Flow commands.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here are some bash aliases that I use and find helpful for quickly writing Git and Git Flow commands. These should be placed within your `~/.bashrc` or `~/.bash_profile` file:
|
||||
|
||||
~~~~
|
||||
alias gi="git init"
|
||||
alias gcl="git clone"
|
||||
alias gco="git checkout"
|
||||
alias gs="git status"
|
||||
alias ga="git add"
|
||||
alias gaa="git add --all"
|
||||
alias gc="git commit"
|
||||
alias gcm="git commit -m"
|
||||
alias gca="git commit -am"
|
||||
alias gm="git merge"
|
||||
alias gr="git rebase"
|
||||
alias gps="git push"
|
||||
alias gpl="git pull"
|
||||
alias gd="git diff"
|
||||
alias gl="git log"
|
||||
alias gfi="git flow init"
|
||||
alias gff="git flow feature"
|
||||
alias gfr="git flow release"
|
||||
alias gfh="git flow hotfix"
|
||||
~~~~
|
||||
alias gi="git init"
|
||||
alias gcl="git clone"
|
||||
alias gco="git checkout"
|
||||
alias gs="git status"
|
||||
alias ga="git add"
|
||||
alias gaa="git add --all"
|
||||
alias gc="git commit"
|
||||
alias gcm="git commit -m"
|
||||
alias gca="git commit -am"
|
||||
alias gm="git merge"
|
||||
alias gr="git rebase"
|
||||
alias gps="git push"
|
||||
alias gpl="git pull"
|
||||
alias gd="git diff"
|
||||
alias gl="git log"
|
||||
alias gfi="git flow init"
|
||||
alias gff="git flow feature"
|
||||
alias gfr="git flow release"
|
||||
alias gfh="git flow hotfix"
|
||||
{% endblock %}
|
||||
|
|
|
@ -8,7 +8,12 @@ tags:
|
|||
- git
|
||||
- git-flow
|
||||
---
|
||||
It's all booked, I'm going to be attending [DrupalCamp London](http://2014.drupalcamplondon.co.uk).
|
||||
{% block excerpt %}
|
||||
It's all booked, I'm going to be attending [DrupalCamp London](http://2014.drupalcamplondon.co.uk) this year, my first DrupalCamp!
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
It's all booked, I'm going to be attending [DrupalCamp London](http://2014.drupalcamplondon.co.uk) this year, my first DrupalCamp!
|
||||
|
||||
I'm going as a volunteer, so I'm going to be helping with the registrations on the Saturday morning and for another couple hours elsewhere over the weekend. I've also offered to help organise and oversee some code sprints, although I'm definitely wanting to do some sprinting of my own and attend a few sessions.
|
||||
|
||||
|
@ -17,3 +22,4 @@ I'm looking forward to meeting some new people as well as catching up with some
|
|||
If you're also coming, see you there!
|
||||
|
||||
**Update:** I've just found out that my session, [What is Git Flow?](http://2014.drupalcamplondon.co.uk/drupalcamp-london-2014/session/what-git-flow "Information about the session on the DrupalCamp website"), has been accepted and will take place on the Sunday morning. It's going to be a busy weekend!
|
||||
{% endblock %}
|
||||
|
|
Reference in a new issue