User login

Benjamin Melançon

Show authors of all revisions on an article of content

Searched Words: drupal show authors of all node revisions multiple contributing users

Related how to for Drupal 5:
Adding 'Last edited by name some time ago' information
http://11heavens.com/adding-last-edited-by-name-some-time-ago-info-to-node

How to call the path to theme from within the theme (and why)

We had a site that occasionally generated page not found errors for ie6_fixes.css. Occasionally, we realized, because this file was only sought by browsers following the hide-from-everything-except Internet Explorer 6 code. The file was then not being found because the name of the whole theme had changed, and the existing template had hard-coded in not just the location but also the name of the theme.

Changed in page.tpl.php (and all variations such as page-front.tpl.php and page-node-4.tpl.php:
@import "/sites/default/themes/jonas_theme/ie6_fixes.css";

ProxyCommand error

This week's lesson in internet connectivity is a variation of the classic debugging best practice blame yourself first.

Attempting to ssh into server dev.example.org set up in .ssh/config as "example" with

ssh example</a> resulted in:

<output>
/usr/bin/netcat: No such file or directory
ssh_exchange_identification: Connection closed by remote host
</output>

This error was not caused by the far-off server i was trying to reach, but by our intermediary server being used to do the proxy.

Putting a local project maintained in git on a server as a central repository

Note: The agaric git repository is not public, but this approach will work on your own server.

Stefan explained: copy your folders to your home dir on the server, cd to /srv/git and then run git clone --bare folder folder.git

cd ~
scp -r customhome ben@grassrootsconnection.org:~/customhome

On the server:

ben@server:/srv/git/agaric$ git clone --bare ~/customhome customhome.git

Initialized empty Git repository in /srv/git/agaric/customhome.git/

And don't forget!

See your git commit history with files modified

Git log shows you all your commit messages and the revision hash, but often git log would be more useful showing files changed. (You should still try to write commit messages as if the reader will have no context except, at best, the project itself.)

git log --name-only -5

Include another file in your Vim configuration file

To store your Vim settings in a different file (Agaric does this so that we can put all our "custom home" configuration type files easily in version control together) use the source command.

In .vimrc to include other file:

source /path/to/file/morvimconfig

In ben-agaric's case, the entire .vimrc file is only:

source /home/ben/customhome/.vimrc-agaric

What Agaric stands for in two sentences plus asterisk (brainstorm)

Agaric... what the dictionary has to say:

agaric
Noun
any fungus with gills on the underside of the cap, such as a mushroom [Greek agarikon]
ag·a·ric (gr-k, -grk)
n.
1. Any of various mushrooms of the genera Agaricus, Fomes, or related genera, having large umbrellalike caps with numerous gills beneath.
2. The dried fruiting body of certain fungal species in the genus Fomes, formerly used in medicine, especially to inhibit the production of sweat.

Helper script for deploying Drupal sites in Agaric's system

To get an agaric project repository, without the helper script, it's simply: git clone git.agariclabs.org:/srv/git/whoswho.git

And get the current version of the script at https://gitorious.org/agaric-scripts

File: 
File: 

Validate, or better immediately redirect, duplicate CCK Link field submissions

When posting a link, use case being Add Web Link on data.agaric.com, the site should check if the suggested URL is a duplicate.

This is especially useful for new modules and Drupal Planet posts that we are all likely to notice at the name time.

Kathleen will be adding a check for duplicates to the validate function, but I'm interested in ways to check for duplicate CCK field links before letting the form proceed. Not sure how to catch it really early. AJAX could check continuously for changes in the URL.

Syndicate content