Recent Articles

Creating a new block region in your Drupal theme
26Oct

Okay, so you have a Drupal-based website.  You notice that the theme you are using has block regions all over the page for you to place content into (head, sidebar 1, sidebar 2, main content, footer 1, footer 2, footer 3, etc.).  However, you want to add a custom block to your pages.  Here’s what to do.

Go into your Drupal’s theme folder and look for a file that ends in .info.  It will look something like this…

regions[featured] = Featured regions[content] = Content regions[sidebar_first] = Sidebar first regions[sidebar_second] = Sidebar second

Add your region by naming it something inside the brackets and after the = sign.  Like this, for example…

regions[my_sidebar] = My Sidebar

Then look for a file nearby called page.tpl.php.  You will then need to have the new block region print out to the page by placing the following somewhere on the page.

<?php if ($page['my_sidebar']): ?>
    <div id="my_sidebar">
        <?php print render($page['my_sidebar']); ?>
    </div>
<?php endif; ?>

After a little trial and error, you can have it appear where you like.  Then you simply place things in the block using the Drupal interface.

Installing your first Drupal 7 website
07Sep

Just follow the instructions below.  If you have problems, go to drupal.org and you should be able to either look it up yourself or get help from an expert.

Step 1
	• Set up a hosting account online using a company such as GoDaddy
	• Download Drupal 7 here
	• Extract the compressed file to your desktop
	• Using an FTP program like Filezilla or Cyberduck, log into your online server (ask your host provider for details) and then drag and drop all the Drupal folders/files into the web root folder on your server

Step 2
	• Go to your hosing provider's control panel and create a new database (name it anything you like, for instance, drupaldb)
	• Create a user (username and password) in the database and grant the user full rights on the database (again, if you have problems, ask your host provider for details)
	     ⁃ here is an online article on creating a database using the phpMyAdmin program that is prevalent in modern host providers)

Step 3
	• In a browser, type in the name of your website that you set up with GoDaddy in step 1 above (for instance, www.whatever.com).  The Drupal installer will automatically launch and start with: "Select an installation profile." Save and continue
	• Choose "Standard." Save and continue
	• Choose English or learn how to install Drupal in other languages. Save and continue
	• Choose the type of database you created (e.g. MySQL or SQLite). Enter the name of the database you created, the username, and password. Save and continue
	• On the site information page, you can set the site name and email from which the site will send out mail. You also set the username, email, and password of the first administrator account. Save and continue

Step 4
	• Start configuring your site
	• If you are not automatically logged in, you will need to enter the username and password you first setup when you created the database

Adding a link on the body of your WordPress page that will take the user to the rss feed
05Sep

In my last post I showed how to add the links to your WordPress rss feed that will show up in the address bar of the browser.  But sometimes you may want to include a link directly on the page <body> that takes the user to the rss feed so that they can subscribe to it.  Here is the code.

<a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><div id="rss">&nbsp;</div></a>

 

 

Page 1 of 22612345...1020304050...Last »