User login

How to

Information on how to do something... anything.

Ask Agaric: Getting started with Drupal

A lot of people want to know how to get started with learning Drupal...

I have a quick question for you. I have started to play with Drupal as CMS, with plug-ins and themes etc. . . Is there a good resource out there to learn the ropes? Nothing too involved, something like Drupal for Dummies (or for Smart People).

Ask Agaric: Views of comments in Drupal 5

how do I make a view that displays only recent comments made on a certain content type?

This is basic views functionality.

Simply filter by node: type to restrict the view to specific content types.

The trick is you have to choose list (or table and possibly other views made possible by the Views Bonus Pack). Then you can select which fields to show: comment subject and time and body and anything else comment related.

how do I make a view that displays only recent comments made on a certain content type?

This is basic views functionality.

Simply filter by node: type to restrict the view to specific content types.

Grep multiple files but exclude .svn (subversion) directories

The --exclude flag described below does not work.

This does:

grep -nHR 'needle' . | grep -v svn
from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/902005657831

grep exclude .svn

Setting $GREP_OPTIONS in ~/.bashrc like this did the trick
export GREP_OPTIONS="--exclude="\*/.svn/\*"

The --exclude flag described below does not work.

This does:

grep -nHR 'needle' . | grep -v svn
from http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/902005657831

grep exclude .svn

<

blockquote>
Setting $GREP_OPTIONS in ~/.bashrc like this did the trick
export GREP_OPTIONS="--exclude="*/.svn/*"

MySQL database and user creation from the command line

On Agaric's test server, i need to log into MySQL as root to do these grant commands.

/usr/local/mysql/bin/mysql -uroot -p

On Debian, simply

mysql -uroot -p

worked. You have to put in your root password, of course. (And the lack of a space between -u and root is not a typo.)

In here, you can:

SHOW DATABASES;

CREATE DATABASE example_database;

GRANT ALL ON example_database.*
TO example_user@localhost IDENTIFIED BY 'p4ssw0rd';

Permanent redirect on home web address only, leaving archive

Hey all, contrary to Agaric's usual pain-before-gain approach, here is the answer we eventually found up top:

RedirectMatch ^/$ http://example.com/e/www/

RedirectMatch, not RedirectRule, to go to a new site, is the little-known secret.

So that's why none of this worked:

Hey all, contrary to Agaric's usual pain-before-gain approach, here is the answer we eventually found up top:

RedirectMatch ^/$ http://example.com/e/www/

RedirectMatch, not RedirectRule, to go to a new site, is the little-known secret.

So that's why none of this worked:

<

blockquote>

RewriteRule ^/ http://coanews.freespeech.org/ [R=permanent,L]

RewriteCond %

Transfering files directly between two servers: setting up ssh keys

Search words: upload ssh

Two servers with ssh keys instead of password logins won't let you copy a file directly between servers until you set this up.

(These instructions may be incomplete.)

On the new server:

cp /home/dan/.ssh/id_rsa.pub /home/dan/

If there is no file like that or .pub, make it first: ssh-keygen -t dsa

From your computer:

Search words: upload ssh Two servers with ssh keys instead of password logins won't let you copy a file directly between servers until you set this up. (These instructions may be incomplete.) On the new server: cp /home/dan/.ssh/id_rsa.pub /home/dan/

www .htaccess rewrite and Drupal multisite

keywords:
forward all to one url

RewriteCond %{HTTP_HOST} ^www\.tom\.com$ [NC]
RewriteRule ^(.*)$ http://tom.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.jerry\.com$ [NC]
RewriteRule ^(.*)$ http://jerry.com/$1 [L,R=301]

from http://exodusdev.com/multi-site-compatible-apache-rewrite-rules

Question: can the above be automated or universalized?

keywords:
forward all to one url

RewriteCond %{HTTP_HOST} ^www\.tom\.com$ [NC]
RewriteRule ^(.*)$ http://tom.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.jerry\.com$ [NC]
RewriteRule ^(.*)$ http://jerry.com/$1 [L,R=301]

from http://exodusdev.com/multi-site-compatible-apache-rewrite-rules

Question: can the above be automated or universalized?

Backing up, restoring, making test databases with MySQL command line

increase phpmyadmin upload size limit
forget it.

mysql from command line

mysqldump -u internetbar_live -p

--ignore-table=name

worked- (few misstarts, didn't like having a password included, placement of db name)

mysqldump -u internetbar_live -p --ignore-table=internetbar_live.ibcdru_watchdog internetbar_live > internetbar_backup.sql

One line. One goddamn line. And you can get the password you need from settings.php

increase phpmyadmin upload size limit forget it. mysql from command line mysqldump -u internetbar_live -p --ignore-table=name worked- (few misstarts, didn't like having a password included, placement of db name) mysqldump -u internetbar_live -p --ignore-table=internetbar_live.ibcdru_watchdog internetbar_live > internetbar_backup.sql

Create New Site Procedure

UPDATE: Completely superseded by http://data.agaric.com/agaric-move-site-from-test-production-first-time-steps

NOTE: This information is specific to the Agaric's server set-up.

To create a new project newproject with site example.com

Create database by going to phpMyAdmin Privileges and Add a new User.

Ask Agaric: Starting out theming in Drupal

Totally deprecated, we now generally recommend starting with http://drupal.org/project/zen

Finding out how to theme in Drupal is not as self-explanatory as one might hope. One experienced designer e-mailed us:

So I've been looking around the Drupal site. Just to be sure of the type of coding that I am doing, tell me if I'm on the right track:

The site needs to be coded in HTML using 'div' tags instead of 'table' and CSS.

Totally deprecated, we now generally recommend starting with http://drupal.org/project/zen

Finding out how to theme in Drupal is not as self-explanatory as one might hope. One experienced designer e-mailed us:

<

blockquote>So I've been looking around the Drupal site. Just to be sure of the type of coding that I am doing, tell me if I'm on the right track:

Syndicate content