Content tagged as Drupal

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 Bookmark CCK here

Second: the "bookmark" button

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

Natouren New Theme

New theme for the under-development http://natouren.eu!

Debugging Drupal

This page gives a brief overview of some of the tools you can use to make Drupal development and debugging easier.

It covers the Devel contrib module, the Drupal for Firebug contrib module and Firefox extension, the FirePHP library, and the combination of NetBeans and Xdebug.

Project: LDAP Contact Manager for Drupal

LDAP Contact Manager is a Drupal module to perform searches and manage entries on a LDAP directory.

Code and documentations are coming.

Views 2 API Manual

LDAP on groups.drupal.org

Group on groups.drupal.org dedicated to ldap-related development and modules

PowerAdmin for drupal - now on Drupal.org

PowerDNS

I'm proud to announce that the Drupal administration module for PowerDNS I was writing is now available on Drupal.org at the address http://drupal.org/project/poweradmin.

Drupal Italia

Il riferimento italiano per Drupal

Drupal

Drupal.org is the official website of Drupal, an open source content management platform.

Drupal: PowerAdmin module

PowerAdmin is a Drupal module that provides API and a GUI to administer the configuration of a PowerDNS Name Server, with MySQL/PostgreSQL backend.

drupal-module-from-svn.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
 
# (c)2009 Samuele ~redShadow~ Santi <redshadowAThackzineDOTorg>
# Under GPL v3
# Please visit: http://www.hackzine.org
 
# Download from: http://svn.hackzine.org/misc/scripts/drupal/drupal-module-from-svn.sh
 
# samu 2009-12-30
 
MODNAME="$1"
SVNREPO="$2"
 
if [ "$MODNAME" == ""  ] || [  "$SVNREPO" == "" ]; then
  echo "Usage: $0 <modname> <svnrepo>"
  exit 1
fi
 
CDATE="$( date +%s )"
ORIGPWD="$( pwd )"
 
TEMPDIR="/tmp/.drupal-module-${MODNAME}-${CDATE}"
mkdir -p "$TEMPDIR"
cd "$TEMPDIR"
echo "Exporting $SVNREPO -> $MODNAME"
svn export "$SVNREPO" "./$MODNAME"

drupal-crons.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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 [ !

Drupal Twitter API

Twitter Logo

I`m successfully trying this Drupal module to publish post titles / links on Twitter. It`s similar to the module I planned to write a while a go, but never did it.

You can find the module here: http://drupal.org/project/twitter

I also found a problem while installing the module on PostgreSQL, since some data types used in the schema are not supported (at least, on postgres 8.3..3). I wrote a patch for that, you can find the bug reporting here: http://drupal.org/node/631972 and the patch file in the attachment.

Randomizzare le associazioni tassonomia/nodi su drupal..

Druplicon

Non so perché, ma ultimamente il modulo devel generate mi sta dando alcuni problemi.. in particolare, non riesce a creare associazioni decenti nodi generati/termini tassonomia.
Ma il tutto si può facilmente risolvere con un paio di query a livello database...

1
2
3
4
5
6
7
TRUNCATE TABLE term_node;
INSERT INTO term_node (
  SELECT n.nid, n.vid, t.tid
  FROM `node` n
  CROSS JOIN `term_data` t
  ORDER BY rand() LIMIT 1000
)

Tagcloud con views

Druplicon

Segnalo questo post di mavimo in cui spiega come creare una "Tag Cloud" (vedi verso fondo pagina) in Drupal usando il modulo views e views_cloud.

Allego anche il codice delle due views utilizzate.

aBook: an address book for drupal

Druplicon

Altro modulo che sto sviluppando per Drupal!
Un'agenda indirizzi, ovviamente con campi multipli e definibili, un po' stile cck per intenderci..

Per il form, ho usato i subform, come descritto in un post precendente, mentre la struttura del database è organizzata su quattro tabelle:

  • abook_contacts associazione interna nid/id contatto
  • abook_fields definizione dei campi usati nella rubrica
  • abook_types definizione dei tipi di campo usati
  • abook_values i valori veri e propri dei campi

ManPages browser per Drupal

Druplicon

..ecco qua un nuovo modulo per Drupal! :)
E' un semplicissimo browser per le pagine del manuale UNIX ('man'), cosa che trovo molto comoda, soprattutto per funzioni di ricerca ecc.. ecc..

Al momento, i sorgenti sono disponibili via SVN su http://svn.hackzine.org/drupalmodules/modules/manpages/ (in particolare si veda il branch 6.x-0.x):

svn co http://svn.hackzine.org/drupalmodules/modules/manpages/branches/6.x-0.x/ manpages

Drupal SubForms

Druplicon

In questo post vediamo come creare dei form con campi multipli, aggiungibili dinamicamente. Per esempio, ho creato un semplice tipo di nodo, che definisce un contatto di rubrica telefonica, con nome, cognome e vari campi con occorrenze multiple.

Il form

Come prima cosa, contiamo il numero di campi da disegnare. (Il numero di campi definiti collegati al nodo, e non meno di due):

jQuery Tooltips for Drupal

Yeah! ci siamo, finalmente ho concluso una versione utilizzabile del modulo jtooltips per Drupal.

Le nuove caratteristiche sono

  • Possibilità di configurare le opzioni del tooltip da pannello
  • Possibilità di scegliere vari temi da utilizzare per la visualizzazione
  • Possibilità di definire stili personalizzati
  • Possibilità di scegliere su quali pagine visualizzare il tooltip

Non ho ancora caricato su drupal.org, aspetto che mi diano accesso a CVS.

Drupal database backup

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
 
"""
 
    MySQL Database Backupper
    Copyright (C) 2008  Samuele ~redShadow~ Santi - http://hackzine.org
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Drupal module creation script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
 
#
# Script to create Drupal Modules
# by Samuele ~redShadow~ Santi
# http://hackzine.org
#
 
if [ "$1" != "" ]; then
  modname="$1"
else
  echo "Usage: $0 <modulename> [<core>]";
  exit 0
fi
 
 
if [ "$2" != "" ]; then
  dcore="$2"
else
  dcore="6.x"
fi
 
 
gpl="
 /*
  * $modname - A Drupal $dcore module
  * Copyright (C) `date +%Y`  ${USER}@${HOSTNAME}
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of th

Who Am I?

~redShadow~ A.K.A. Samuele Santi is an Italian Open Source developer, currently working as a freelance developer, mainly in the web applications sector. Favourite programming languages: PHP and, of course, Python!

database (3) debian (1) cocktails (1) aoe (1) dmcrypt (1) audio (1) 3d (3) blogroll (7) Drupal Forms (1) alcool (1) camera mia (1) C++ (2) blender (3) e-mail (2) development (11) backup (3) curl (1) aircrack (1) cryptography (1) awstats (3) como lake rovers (1) circuits (1) code (3) algorythms (1) citroen (1) doku (1) cartoons (1) Drupal (21) cars (1) bash (11) apt (1) caos (1) apache (1) documentation (2) archive (1) debug (1) arduino (1) contact manager (1) address book (2) 2v (1)