Archive for April, 2009

Drupal: Add Log In / Log Out in Footer

Friday, April 24th, 2009

In Drupal, the default Log In and Log Out in the main ‘navigation’ menu may be less than desirable. If you use the navigation for other categories, it’s nice to keep the functions like ‘Log In’ separate for an easier user experience.

The following code will allow you to easily add dynamic log in / log out text in the footer, depending on whether you’re logged in or not. It will also greet you if you’re signed in, so it’s obvious what your log in status is. Just replace the URLs with your domain and customize whatever footer links you want.

<?php global $user;
if ($user->uid) {
print t("<strong style='color:#FFFF00;'>Hi @name!</strong> | <a href='http://www.yourdomain.com/?q=logout'>Log Out</a> | <a href='http://www.yourdomain.com/privacy.php' >Privacy Policy</a>", array('@name' => $user->name));}
else
{
print t("<a href='http://www.yourdomain/?q=user' style='color:#FFFF00;'>Log In / Register</a> | <a href='http://www.yourdomain.com/privacy.php' >Privacy Policy</a>");
}
?>

Within the admin’s ‘block’, just edit the footer and paste the above in. You can then disable the ‘Log Out’ menu item in the main ‘navigation’.

I hope this helps someone with their project.

Photos near Seaquest State Park

Sunday, April 19th, 2009

Columbia River Scenery

Sunday, April 12th, 2009

Here’s some images taken from the sunny day yesterday, April 5th, with links showing where each was taken.

Westport Slough in Washington along Highway 30

Pretty reflection off the Westport Slough, near Westport, Oregon, looking north.

–> View on Map



House in Skamokawa, Washington with views of the Columbia River

–> View on Map



Colorful Kayaks in Skamokawa, Washington

(same location)



Mossy pickup

(somewhere along Highway 30 in Washington)

Seagull in Flight

Seagull in flight – Astoria, Oregon

Astoria Bridge

Astoria, Oregon bridge

Astoria, Oregon

Pilings in Astoria

Cape Disappointment
Cape Disappointment, Washington


Cape Disappointment Lighthouse
–> View on Map

Ivy Bunker
Fort Canby State Park, Washington

Fort Canby State Park
Fort Canby State Park, Washington