Thursday, May 7, 2009

Drupal: How to upload/ change admin/user gravatar icon

  1. First you must prepare your new gravatar icon.
    (48x48 pixel and the maximum size is 30 kB)

  2. Go to Home> Administer> User Management > Users

  3. Find user that you want to edit. Click Edit.

  4. Delete current picture & Upload new picture.

  5. Save changes.

  6. Refresh the page and see the changes.

Drupal 6.x: Where To Edit Title Text Size/Style In Posting Pages

In my case, I use FreeBSD Server... so here the way to go

  1. Log into freeBSD server/ web server.(use root password)

  2. Go to :
    # cd /usr/local/www/apache22/data/sites/all/
    themes/theme_name
    # ee style.css

  3. Search h2 in the style.css file
    • Click ctrl +y
      Search for: h2
    • Edit font size or other style
    • Press esc + enter 2X - Save setting

  4. Refresh page in browser & see the changes.

Wednesday, May 6, 2009

phpCAS



What is phpCAS?
phpCAS is a library which allows clients written in PHP to
authenticate to a CAS (Central Authentication Service) server.

* Package name    : libcas-php (not sure, needs policy)
Upstream Author : Pascal Aubry
* URL : http://www.ja-sig.org/wiki/display/CASC/phpCAS
* License : BSD
Programming Lang: PHP
Description : CAS client library for PHP

User documentation

Related link:
Applications CASified with phpCAS
Developing phpCAS
phpCAS acknowledgements
phpCAS bug reports
phpCAS ChangeLog
phpCAS examples
phpCAS i18n
phpCAS installation guide
phpCAS Issues
phpCAS logout
phpCAS mailing lists
phpCAS requirements
phpCAS source documentation
phpCAS troubleshooting

Drupal 6.x: How to hide submitted by and date in posting page/story

  1. Make sure the sites folder are in writable mode.(In my case I use FreeBSD server).
    If not, firstly I must edit chmod permission to 775 at least.. or 777 for a while.
    (**Make sure after finish, change back to normal mode:755)

  2. Go to admin page Home > Administer > Site building> Themes

  3. Click on Configure or Global Setting

  4. Go to this section:

    Display post information on
    Enable or disable the submitted by Username on date text when displaying posts of the following type.
  5. Uncheck page box or any box which you done want the submitted by and date to be displayed.

  6. Save Configuration.

  7. Refresh the page and see the submitted by and date are not displayed anymore.

  8. **Make sure after finish, change back the sites folder to normal mode:755

  9. All done.


Tuesday, May 5, 2009

Drupal: Installing a Custom Drupal Theme

You can:
1. Download a free custom theme from Drupal.org
2. Buy a custom theme on the internet from a site such as Template Monster
3. Hire a designer to create one for you
4. Design your own

Step 1: Download the Custom Theme

For this example we are going to pick a free theme from Drupal.org. Once you are on Drupal.org, click Themes – located in the top right column.


Drupal Theme Link

If you installed under the 6.x version, so click on 6.x to filter out other versions.

Theme 6x

You have checked out all the themes, navigated to the demo pages, and found a theme to download – click “Download” making sure that you've clicked the corresponding version.


Download Zen

Step 2: Uploading Files to the Server

1. Open root path in www(webserver)
2. Go to theme folder.... root path/sites/all/themes/

Drupal: Manually Installing Drupal

Step 1: Setting up your Database

Log into the cPanel (control panel) of your hosting account. Once you are logged in you will want to find the MySQL link.

The one for Bluehost looks like this:

mysql

Next, you will be prompted to give your database a name - for this example I picked "testsite".

create database

Now, you must create a user and password for the database - for this example I picked "test" as my username.

new user

After you are done adding a new user, you will have to assign the new user to the database that you just created. In Bluehost the assignment box is just below the "Add User" box.

(The only reason you are seeing "xseeddes_" is because that is the root name associated with my hosting account. You will have something different, it all depends on your host.)

assign user

The last step in setting up the database is assigning user privileges.
1. Make sure that you have the correct user and database.
2. Click the check all box - Drupal will need access to the database.
3. Click "Make Changes".

manage user privileges

Step 2: Download Drupal

Go to Drupal.org and click the Download tab.

Drupal

On the next page, click Drupal Project. Then click the download link for the corresponding version of Drupal you wish to download. (At the time of this writing Drupal 6.9 is the most current. Just make sure you do NOT download any version highlighted in red - that would be bad.)

download version

Step 3: Uploading Drupal to Your Site

The next phase of installing Drupal is moving it from your computer to your website's server. The first thing you will need to do is log back into your control panel and open your file manager.

Inside of the File Manager you need to do the following:
1. Click on your Public_html folder.
2. Ensure that you have clicked on the correct folder by viewing that path as shown below.
3. Click Upload.

public html folder

Once again, check the path to ensure that you are uploading to "Public_html" folder. Click the browse button to find the Drupal file located on your computer and upload.

upload

Now, it is time to extract the files from the zipped (compressed) Drupal file.
1. Check the Drupal file.
2. Click Extract.

extract files

Once the compressed file is unzipped, it will still be in a folder called Drupal-6.9. You will need to take all the contents out of that folder. To do so, open the Drupal folder.

Inside of the Drupal folder you will see several folders and files. Check all files and folders and click "Move Files"

Ensure that you are moving them into the Public_html folder.

move files

*NOTE: After moving the files and folders, make sure that you have successfully moved the .htaccess file as shown below.

files

Step 4: Configuring the settings.php file

Inside of the File Manager open the Public_html tree and navigate to the Default folder as shown below. Click to open the Default folder.

default folder

Inside of the Default folder there is a "default.settings.php" file. You will need to make a copy of that file and rename it settings.php - as shown below.

settings file

The next step in your journey - which is almost over by the way - is to open the "settings.php" file with your code editor. In Bluehost, you can open the file in code editor by right clicking on the file. (Each host is different but either way you need to be able to edit the code.)

Once inside the file, scroll down to line 92. Edit line 92 to reflect your database username, password, and databasename.
*NOTE: Leave the "@localhost" - Do NOT erase.

change info

In the beginning of this example, I set my database username to: xseeddes_test
I set my database name to: xseeddes_testsite
And lets say my password is 1234

A proper code edit of line 92 would look like the example below.

good

Now, save your changes to the settings.php file and get ready for the final step!

Step 5: Logging into your new Drupal Website

If you were successful in the first four steps, the picture below is what you should see in your web browser.

installed successfully

We are reading English right now, so I'm guessing that is what you are going to pick. But maybe not :)

After choosing your language you should see all green checks. If by chance you get a red box don't freak out - you missed one of the steps above. Most likely, you didn't give the web server enough permission to write or the settings.php file was not configured properly.

But a good install looks like the screenshot below. If you received all green checks, give yourself a big hug. Now, you can fill in your site information.

good install

Almost done, next up is your website username and password - this will be the top administrators name and password.

site username

Last but not least is the Time and Date setting - this should already be set to your local time. If your server is set up for Clean URL's you can enable them now. If not, it can be set up at a later time.

clean urls

Drum roll please.

welcome to drupal

Congrats! And Welcome to Drupal! If you made it this far you have just successfully finished your first Drupal installation.

Thanks again agoodi!


Drupal: Configuring Your Drupal Theme

Changing Basic Theme Settings:

Let's go to the Theme Configuration page.

1. Click Administer
2. Click Site Building
3. Click on Themes

select themes

By default, the Garland theme is enabled and set to default in Drupal. For this example we are going to leave it set at Garland.

Enabling more than one theme allows users (if you have multiple site members) to select there own theme settings.

NOTE: If you are going to be using a custom theme or want control of how your content is displayed, it is best to leave one theme enabled and set to default.

The picture below is what you should have selected for this example. Next, click on the "configure" link.

configure theme

Changing Colors:

The first thing we are going to do is change the base color.

Ensure that base is selected as shown below.

select base color

The base color is your website's background color. The numbers and letters you see next to the # sign are all apart of the hexadecimal numeral system. It is what browsers use to interpret the color output.

Enter #000000 into the base color field (those are zeros not O's by the way.) and then click save configuration.

The picture below highlights the change in the background color. Although, the hexadecimal code #000000 is black, Drupal does not output the color black because of CSS styling. The color is set to fade from top to bottom. We will get more into custom theme design later.

background color

Next, you should play with the color wheel on the right. The outer wheel will allow you to select a color range, while the block in the middle will let you pick your saturation and value.

Experiment with it as I did in the example below. Remember, your site is off-line.

changed theme

Display Settings:

Next, we are going to cover display settings. On the bottom of the current page, there are two sections, let's edit the "Toggle Display" and "Logo image settings" sections.

Uncheck Logo, Site Name, Mission Statement, and Shortcut Icon, as shown below. Click save configuration.

unchecked items

In the picture below, notice how the Drupal logo and the site name have disappeared. We have unchecked mission statement for processing reasons only, since we have no mission statement to post, there is no need to process it.

before and after

We also unchecked an item called, "Shortcut Icon". The shortcut icon refers to what is commonly called a favicon or the really tiny logo you see next to a website name in the address bar or on the window tab.

favicon before and after

If you have your own custom logo or favicon you can also upload it on this page as well. To upload your logo or favicon, use the browse button to search for the file on your computer, then click save configuration. Drupal will automatically define a path for your logo and check "logo" in toggle display.

printed logo

Now that you know what all this theme stuff does, enable some different themes and play around with the settings.

Thanks agoodi.