Create Webform in Drupal

# project page
http://drupal.org/project/webform
 
# download
# old # http://ftp.drupal.org/files/projects/webform-6.x-2.8.tar.gz
http://ftp.drupal.org/files/projects/webform-6.x-2.9.tar.gz
extract
copy webform to /sites/all/modules
 
# enable module
Administer > Modules
/admin/build/modules
check: Webform
 
# (optional, disable display post information)
Site building > Themes > Configure
/admin/build/themes/settings
checkout: Webform
 
 
# Site configuration > Languages
# admin/settings/language
 
# Translate interface
# /admin/build/translate/search
 
 
# String contains: 

Hitachi Feature Tool over PXE

#!/bin/bash
 
URL=http://www.hitachigst.com/hdd/support/downloads/ftool_215_install.IMG
 
# download dft image
wget ${URL} -O /var/lib/tftpboot/hitachi_ftool.img
 
# create config for pxe boot
cat <<EOF> /var/lib/tftpboot/pxelinux.cfg/hitachi_ftool.cfg
LABEL linux
   MENU LABEL Hitachi Feature Tool
   kernel memdisk
   append initrd=hitachi_ftool.img
EOF
 
# add config to default config
echo "MENU INCLUDE pxelinux.cfg/hitachi_ftool.cfg" >> /var/lib/tftpboot/pxelinux.cfg/default
 
 
# LINKS
# http://www.hitachigst.com/hdd/support/download.htm

Hitachi Drive Fitness Test over PXE

#!/bin/bash
 
URL=http://www.hitachigst.com/hdd/support/downloads/dft32_v414_b00_install.IMG
 
# download dft image
wget ${URL} -O /var/lib/tftpboot/hitachi_dtf.img
 
# create config for pxe boot
cat <<EOF> /var/lib/tftpboot/pxelinux.cfg/hitachi_dtf.cfg
LABEL linux
   MENU LABEL Hitachi Drive Fitness Test
   kernel memdisk
   append initrd=hitachi_dtf.img
EOF
 
# add config to default config
echo "MENU INCLUDE pxelinux.cfg/hitachi_dtf.cfg" >> /var/lib/tftpboot/pxelinux.cfg/default
 
 
# LINKS
# http://www.hitachigst.com/hdd/support/download.htm

extractEbook.sh

#!/bin/bash
 
# install
# apt-get install pdftk
 
FILE=$1
PAGES=$2
OUT=$3
 
COVER=/media/lagerliste/vorlagen/ebook/cover.pdf
 
# check if file already exists
if [ -f ${OUT} ]; then
	echo "${OUT} already exists"
	exit 0
fi
 
# get pages
pdftk A=${COVER} B="${FILE}" cat A1 B${PAGES} output /tmp/pdftk.out.pdf
 
# reduce image resolution
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile="${OUT}" -f /tmp/pdftk.out.pdf
 
# view
if [ -n ${DISPLAY} ]; then
	evince "${OUT}"
fi
 
 
# USAGE
# ./mkEbook.sh s02_s201.pdf 1-3  ../ebook/l83_1.1_antike.pdf

Cascading Style Sheets

# transparent image on mouse over (IE too!)
<style type="text/css">
<!--
.content a:hover img {
	filter:alpha(opacity=75); 
	opacity: 0.75;
}
-->
</style>
 
# LINKS
http://www.mandarindesign.com/opacity.html
 
 
 
#content p {
font-family:Palatino,Georgia,'Times New Roman',serif;
font-size:16px;
line-height:1.5em;
margin:0;
padding:0 0 10px;
}

Compile error on Intrepid

/home/pako/xserver-xorg-video-ati-6.6.3# fakeroot ./debian/rules binary
 
mkdir stampdir
>stampdir/stampdir
if [ ! -e stampdir/patches ]; then \
		mkdir stampdir/patches; \
		ln -s stampdir/patches .pc; \
		echo 2 >stampdir/patches/.version; \
	fi; \
	if [ ! -e stampdir/log ]; then \
		mkdir stampdir/log; \
	fi; \
	if [ ! -e patches ]; then \
		ln -s debian/patches patches; \
	fi; \
	>stampdir/prepare
if ! [ `which quilt` ]; then \
		echo "Couldn't find quilt.

Install Drupal SMTP authentication support module

# install SMTP Authentication Support
http://drupal.org/project/smtp
 
download
http://ftp.drupal.org/files/projects/smtp-6.x-1.0-beta4.tar.gz
extract
copy smtp /var/www/sites/all/modules
 
# install PHPMailer
#http://phpmailer.worxware.com/
#http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6/
 
download phpMailer v2.3 (NOT 5.x)
http://downloads.sourceforge.net/phpmailer/phpMailer_v2.3.tar.gz
extract
rename phpMailer_v2.3 to phpmailer (LOWERCASE!)
copy phpMailer/ /sites/all/modules/smtp/
 
 
# Configure
# Enable the SMTP Authentication Support module 
Admi

convertToUtf.php

<?php
function convertToUtf($string) {
	$string = str_replace("ü", "ü", $string);
	$string = str_replace("Ãœ", "Ü", $string);
	$string = str_replace("ö", "ö", $string);
	$string = str_replace("Ö", "Ö", $string);
	$string = str_replace("ä", "ä", $string);
	$string = str_replace("Ä", "Ä", $string);
	$string = str_replace("ß", "ß", $string);
 
	return $string;
}
?>

Add embeded Flash video to your homepage

# download and extract Flowplayer
#wget http://flowplayer.org/releases/flowplayer/flowplayer-3.0.0.zip -P /tmp
wget http://flowplayer.org/releases/flowplayer/flowplayer-3.1.0.zip -P /tmp
unzip /tmp/flowplayer*.zip -d /tmp
 
# install
mkdir -p /var/www/video/player/
cp /tmp/flowplayer/*.swf /var/www/video/player/
cp /tmp/flowplayer/example/flowplayer-3.0.0.min.js /var/www/video/player/
 
# copy your videos to /var/www/video/
 
# add source to page
<script src="/video/player/flowplayer-3.0.3.min.js"></script>
<a href="/video/VIDEO.flv" style="display:block;width:640px;height:360px" id

install Java database (JDBC) driver for MySQL

sudo apt-get install libmysql-java
 
# old, manuall installation
# wget http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz -P /tmp
# tar xzf /tmp/mysql-connector-java-5.1.6.tar.gz -C /tmp
# cp /tmp/mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar /opt/gwt-linux/
 
# LINKS
http://packages.ubuntu.com/feisty/libs/libmysql-java
Syndicate content