Link sharer on Drupal

I just wanted something like the "share on facebook" button, but to post links on my (this) blog. I thought I would have to write a module to do that but.. no, Drupal itself allows us to do that directly :)

First, the CCK "Bookmark" Content

First of all, I created a CCK content named "bookmark". Here is the exported CCK code.

Download CCK bookmark here

Second: the "bookmark" button

Yep, I copied this from the facebook "SHARE IT" button.. :)

First, we need to enable the Prepopulate Drupal module, that allows us to prefill the forms by URL. Then, create some ...

Drupal crons run script

This is the script I use to run cronjobs on all the sites in a given Drupal installation:

#!/bin/bash

#
# Drupal sites cronjob runner. Useful to be put into crontab.
# samu 2009-12-06
#

## --- Configuration ---
CONF_SITES="/usr/local/etc/drupal-sites" # sites list
CONF_LOGDIR="/var/log/drupal-cron" # logs dir
## --- End Config ---

# load sites list, stripping lines that are empty or starting by #
SITES="$(cat "$CONF_SITES" |grep -ve "^$\|^[^A-Za-z0-9]*#")"

# create log directory if not exists
if [ ! -e "$CONF_LOGDIR" ] ; then
  echo " * Creating log directory: $CONF_LOGDIR"
  mkdir -p "$CONF_LOGDIR"
fi

# prepare logfile name
LOGFILE="$CONF_LOGDIR/drupal-cron_$( date "+%Y-%m-%d" ).log"

# Run all cronjobs
echo "--- Drupal ...

Page 1 / 1