How to Use Drupal

All the content is listed on and can be edited from this page: http://nursemind.com/admin/content/node

To edit the menu in the R side of the home page (Brain Museum, etc.): http://www.nursemind.com/admin/build/menu-customize/secondary-links

A way to find out where content is coming from is to use firebug to inspect an element. That is, for more detail: in Firefox, inspect the element with Firebug and see the hierarchy that surrounds this menu. Then look for what it is wrapped in. Outer layers will have classes and an id.

Edit secondary menus at: http://nursemind.com/admin/build/menu

Glatz writes:

With your Drupal 6 theme, there are a couple of stock menus. Primary links is the main nave. Secondary links are another set of links - by use of some support modules, it is possible to tie these in to the primary menu so they come up as sublinks for primary items. But that's not what you're doing; this is just being used as another menu.

Menus in Drupal show up on the block menu, so you can assign them to regions, control access, etc.

Looking at the source, you can get an idea of the general structure by looking for some key elements. Different theme have different ways of labeling them, and some have more inner layers than others, or refer to the regions with slightly different names. You can find the region names in the theme's info file.

In our case, #sidebar-left is the left sidebar area. It contains sidebar-left-inner, where padding can be applied (you don't want to do it on the outer wrapper, used for establishing container width). Under that, you'll see the #secondary div, which corresponds to the secondary links menu.

If you look in the theme info (scaccarium.info), you'll see

regions[left] = Left sidebar

On http://www.nursemind.com/admin/build/block, you'll see blocks that corresponds to the regions in the info file.

regions[content_top] = Content top
regions[content_bottom] = Content bottom
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[footer] = Footer

The theme you're using is pretty basic; I'm using more sophisticated ones that have more identifiers and classes, that makes figuring this out a little easier. The main thing is that with firebug you can see a general breakdown of major divisions, and the regions within them. Between firebug, the blocks page, and the theme info file, you can get an idea of how things are organized.

You'll like the theming in Drupal 7 better more powerful and easier to understand.

But that's just part of the battle, finding out where the links reside. Creating menus with basic links is pretty easy. You can edit a menu, or you can add a menu path to a node definition or a view and have them show up. The trickier part is if you want a custom link in the menu, especially if it is formatted with an icon. This takes a bit of custom theming in most cases.

I think you said you wanted a link to appear in that menu to download the file, including an icon. You can put the link in simply by going to the link editor: http://www.nursemind.com/admin/build/menu-customize/secondary-links

and adding a new link, with title and URL. You can then drag it to change the order. Getting an icon to display can probably be done with just css.

 


Charlie: Drupal is quite easy to use. If you go to drupal.org and click on "Documentation" you get a list of docs. The ones to look at are down near the bottom under "Tutorials": the "Drupal Cookbook" and "Tutorials" are both pretty good.

To change the user manual: Log in as dan and go to the "User Manual" tab. You will be in the "View" mode. Click on "Edit" and you are off to the races. The only part you need to change is the "Body" section. Just edit the HTML. When you are done editing, scroll down and click on "Save". Don't forget that part, it doesn't warn you if you don't.

If you want to add a new top-level menu page: click on "Administer", the "Create Content", then "Page" and you will get to a screen like the one you saw when you were editing the user manual. In this case open up the "Menu Settings" and put in a name for the menu item.

 

To create a Book:

pulldown menu: create content, add book
node/add/book

under book outline, you should see a selection from the book dropdown to create a new book

The two keys to customizing Drupal are CCK and Views, well worth investing a little time in.
There's a great book called "Drupal's Building Blocks" by the author of Views and Panels, Earl Miles (merlinofchaos).

Layouts are determined by:
sites/all/modules/custom/nurses/nurses.module (by Glatz)
sites/all/themes/scaccarium

You should read up on jquery, it's a kind of abstract wrapper for javascript, makes it real easy to work with the DOM.

great book:
http://www.amazon.com/Drupal-JavaScript-jQuery-Matt-Butcher/dp/1847196160

Glatz put some notes about site management here:
http://nursemind.com/content/publishers-handbook 


To edit the home page:
http://nursemind.com/admin/settings/front
(Home » Dashboard » Site configuration) 


To create a Book:
create content, add book
node/add/book

under book outline, you should see a selection from the book dropdown to
create a new book


The two cornerstones of customizing Drupal is CCK and Views, well worth investing a
little time in. There's a great book called "Drupal's Building Blocks" by the author
of Views and Panels, Earl Miles (merlinofchaos).

Layouts are determined by:
sites/all/modules/custom/nurses/nurses.module (by Glatz)
sites/all/themes/scaccarium

a way to find out where content is coming from is to use firebug to inspect an
element, then look for what it is wrapped in, outer layers will have classes and an id

you should read up on jquery, it's a kind of abstract wrapper for javascript,
makes it real easy to work with the DOM

great book:
http://www.amazon.com/Drupal-JavaScript-jQuery-Matt-Butcher/dp/1847196160

I'd also suggest moving to git as a repository, rather than the Subversion we
are currently using. A little easier to deal with, and much faster.
Ever use git? It's good to know, working in the Drupal world.

If you work locally, would it be on Windows? It is a real pain to set up,
because you have to fake Unix. The easiest system is a Mac, I'm doing more
and more work there. It's the best combo - a secure Unix system with a
fantastic GUI around it. I'm surprised at how many developers use it
(probably 90% of the key folks on the Drupal project).

I use the command line mostly, but there are some GUI products that are nice.
I use Tower on the Mac, and they have a good list of git resources:
http://www.git-tower.com/learn.html

Here's one for Windows:
http://www.syntevo.com/smartgit/index.html

but you need to understand git concepts and know how to use the command line,
then they make more sense.

It's real simple to get and save repos, though; I'll send you instructions when we move it.


Move to git 4/25/11

First, I saved current work in current-20110425.tar.

cd ~
tar -cvf current-20110425.tar art backups db-backup* docs GetItDone* ngid orig_public_html public_html

removed unneeded dirs:
rm -rf art backups index.html ngid old orig_public_html public_html src

New source repository:
git@r3nfro.sourcerepo.com:r3nfro/ngid.git

Trac:
https://r3nfro-trac.sourcerepo.com/r3nfro_ngid

user=nurses
pwd=N7uu#3rt

I cloned the repo to ~/ngid
I created these symlinks:
ln -s ~/ngid/public_html ~/www
ln -s ~/ngid/public_html ~/public_html

You can clone it on your local computer. You will need to send me your
RSA public key so it recognizes you. here's more info:

https://support.hostingplayground.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=59&nav=0,19

The following directories are created:
art site artwork
design site design
docs technical documentation
public_html the web site
sql database backups at milestones

I changed the permissions of all directories in the public_html tree to 755;
site5 doesn't like group writable permissions. Similarly, all .php files are now 644.

Now for the update!

I'm using drush for this, and do it on my local. I don't recommend running
drush on the server; it's a good idea to test thing locally, especially a
long-overdue update.

The local URL is
http://local.nursemind.com

I created an alias in my ~/.drush/aliases.drushrc.php file:

$aliases['nur'] = array (
'root' => 'g:\\nurses\\public_html',
'uri' => 'local.nursemind.com'
);

Now I can get to my local nursemind directory with the alias @nur

The first thing is to run cron on my local, so I have the most current list of module versions. I clicked on the drupal icon at the left ot the top admin menu, and selected "run cron."

But we don't want to just tell drush to update everything, because we need to be sure there are no conflicts. So I'm looking at the available updates page on the site, logged in as admin.

First thing is to update core; we do that by downloading the latest version of drupal and copying it to the site, then running database update (from that little drupal icon on the admin menu).

I open the tarball, and copy everything except .htaccess and robots.txt, because we may have made changes to them (and they haven't been updated in a long time).

So far so good. I don't like the admin theme, so let's use drush to download and enable the rootcandy theme:

drush @nur dl rootcandy
drush @nur en rootcandy

Now I go to admin/settings/admin and select rootcandy as admin theme. Ah, much
more readable!

These are more serious updates, let's do them first (they are in red.
drush @nur dl cck views transliteration pathauto messaging views_bulk_operations

We'll check for database updates with drush:
drush @nur updb

Here are a few more security updates:
drush @nur dl emfield lightbox2
drush @nur updb

You usually download everything at once and run the database update just once, but since there are so many, I'm breaking them into groups.

Uhoh, I got an error with the update, something about a missing directory. I'm going to run it from the web page, this is probably a Windows issue. That's why I'm moving to Mac.

Here are some more modules:
drush @nur dl addtoany adminrole admin_menu backup_migrate book_access
cck_formatters ctools
drush @nur updb

Nuts, updb keeps failing; back to the web page for these.

more modules:
drush @nur dl ckeditor computed_field content_complete context
context_reaction_theme date seo_friend

drush @nur dl filefield faq front google_analytics hovertip imageapi imce

drush @nur dl login_destination logintoboggan menu_per_role module_filter
node_clone path_access

drush @nur dl path_redirect realname realname_userreference r4032login
search_block rules search404 token wysiwyg scaccarium

I ran the database update one more time, no errors. Some warnings at the top are ok, but there should be no serious errors.

I hit a couple of pages, all seems well. So I'm going to do a database dump, copy it to the sql directory, and a git commit.

I'm getting this error:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'clone_access' was given in G:\nurses\public_html\sites\all\modules\admin_hover\admin_hover.module on line 616.

It's a known issue with the clone_module and admin_hover. I'm going to create a new folder called sites/all/modules/custom; this is a convention for placing modules that have been hacked. I'm copying a patched version of admin_hoer here that will fix it, and get rid of the one in sites/all/modules (so it won't bet used). I'm also going to move the custom module I created, nurses" to the custom directory.

I'm removing the special menu items module, which we don't use and is a troublemaker.

Uh oh; the theme is wrong. I updated scaccarium, but you had modified the original, so I just reverted back to it. And thhemes should fo in sites/all/themes.

I look for themes that support subtheming; that way, you make a subtheme that inherits from the parent. You can make your own css, images, etc., that will take preference. But if the parent theme is updated, yours is left alone, and generally works fine. I use Fusion (a 960 grid theme) and Zen (very flexible).

I made a database dump, restored it to the www server, and grabbed the updated code. I flushed all the caches, and the www site seems ok.

 


Charlie writes:

The whole drupal concept is that all the website editing is done directly on the server. That is the strength of drupal which is aimed at communities that work together to create the content. All the content in drupal is in the database, nothing of import is in textual form on the server directories. The only way to change to database is through the drupal interfaces, while you are connected to the web site. Backup is done by backing up the database.

The reason I didn't like drupal when I tried it was that you could only change the site on the site. I like to have the site maintained locally and use git (or before that rsync) to send it up when I had a version I liked.