Sunday, May 22, 2011

Joomla 1.5 Search Engine Friendly URLs

The following tutorial will provide you with a basic overview to enabling the search engine friendly URLs for the latest release of Joomla 1.5

The Joomla! project team have introduced a number of improvements in Joomla 1.5 from an SEO prespective.

The following outlined below are just some of the improvements.

  • You can now enable search engine friendly URL's without using Apache Mod_Rewrite
  • You can add a suffix (.html) to the URLs
  • The Global site name, global site meta description or global site keywords are no longer automatically added to each content item
  • Content titles, meta descriptions and keywords are unique to each content item

By default without enabling the search engine friendly URLs functionality Joomla! will generate URLs like this

As you can see above the default URL for the frontpage content item includes the long url with the component name and itemid

To change this and enable the search engine friendly url's you have two options.

  • Enable the SEF url's without using apache mod_rewite (for severs which do not support apache mod_rewrite)
  • Enable SEF url's using apache mod_rewrite (for severs which do support apache mod_rewrite)

To enable the SEF functionaly for Joomla 1.5 you need to complete the following

  1. Login to the administrator area
  2. Choose the Global Configuration option
  3. You will now see the SEO settings as noted below where you can enable or disable specific SEO functionality for Joomla!

SEF Url's without apache mod_rewrite

To enable SEF Url's on a server which does not support apache mod_rewrite change the search engine friendly URLs checkbox from No to Yes so it looks like the image noted below.

Save the changes by selecting the SAVE button.

View your web site and the Urls will now look like this

As you can see the component name and itemid is now removed from the Url and replaced with the index.php/frontpage

SEF Url's using apache mod_rewrite

A majority of hosting companies include mod_rewrite support as part of the web hosting package.

Using this option is the most common approach when using SEF Urls

To enable SEF Urls with Mod_Rewrite you need to complete the following.

  1. Using an FTP client login to web hosting space and access the directory where you have installed Joomla 1.5
  2. You will now see a file called htaccess.txt
  3. Before you enable the SEF Urls you need to rename the htaccess.txt file to .htaccess
  4. When renaaming the htaccess.txt file we recommend you do this using your FTP client and also dont foget to remove the .txt and add the . (dot) before the htaccess so the final will result will be .htaccess
  5. Now you have renamed the htaccess file log into the Joomla 1.5 administrator area and choose Global configuration and from here you will see the SEO settings.
  6. In the SEO settings change the radio buttons for both the search engine friendly URLs and Use Apache mod_rewrite from No to Yes
  7. The settings will look like the screen shot noted below

8. Now select the SAVE button to save your changes. Your URLs will now look like this

As you can see the component name, itemid and index.php extension is now removed from the Url's providing you with a clean url title format which clearly reflects the content item.

Add Suffix to URLs

Joomla 1.5 also supports the option to add a suffix .html at the end of the content items.

To enable the suffix url option complete the following

  1. From the administrator select global configration and change radio button next to Add suffix to Urls from No to Yes

2. View your web site again and your Urls will look like this

As you can see from the above the .html suffix is now added to the Url

Unique Meta description and keywords

As noted above the default global meta description or keywords are no longer added to each content item. To make each content item you create include a unique meta description and keywords complete the following.

  1. From the Joomla 1.5 administrator area select the Content menu and Article menu option
  2. Now open the content item
  3. On the right hand column you will see an option called Metadata Information
  4. Expand the Metadata Information box and you will now have the option to add a unique description and keywords which reflects the content you have created.
  5. After making the changes select the Save botton.

If you do not want the Global site name, global site meta description or global site keywords to appear in each content item you need to complete the above steps for each content item you create.

If you do not do this by default Joomla! will automatically add the meta description and keywords from the global settings to each content item.

Saturday, January 8, 2011

Post on facebook wall from my website

Here is the php-curl script where you can post on facebook wall through your web site.

require_once 'facebook/facebook.php';
$aplication_id='YOUR_APPLICATION_KEY';
$facebook_api_key='YOUR_API_KEY';
$facebook_api_secret='YOUR_SECRET_KEY';

$facebook = new Facebook(array(
'appId' => $facebook_api_key,
'secret' => $facebook_api_secret,
'cookie' => true
));

//------------------Access Token---------------------------------------

$param='fbs_'.$aplication_id;
$string=substr($_COOKIE[$param], 15, strlen($_COOKIE[$param])-15); // we got the access token
$arr=explode("&",$string);
$token=$arr[0];

$_curl = curl_init();
curl_setopt($_curl, CURLOPT_URL, "https://graph.facebook.com/me/feed?access_token=".$token);
curl_setopt($_curl, CURLOPT_HEADER, false);
curl_setopt($_curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($_curl, CURLOPT_POST, true);
curl_setopt($_curl, CURLOPT_POSTFIELDS, $arr_attachment);
curl_setopt($_curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($_curl, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec ($_curl);
curl_close($_curl);

?>













Wall Post

Enter Message:
Enter Link:
Enter Title:
Enter Caption:
Enter Description:


FaceBook Graph API

At Facebook's core is the social graph; people and the connections they have to everything they care about. The Graph API presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared content, and photo tags).

Every object in the social graph has a unique ID. You can access the properties of an object by requesting https://graph.facebook.com/ID. For example, the official page for the Facebook Platform has id 19292868552, so you can fetch the object at https://graph.facebook.com/19292868552:

Alternatively, people and pages with usernames can be accessed using their username as an ID. Since "platform" is the username for the page above, https://graph.facebook.com/platform will return what you expect. All responses are JSON objects.

All objects in Facebook can be accessed in the same way:

All of the objects in the Facebook social graph are connected to each other via relationships. Bret Taylor is a fan of the Coca-Cola page, and Bret Taylor and Arjun Banker are friends. We call those relationships connections in our API. You can examine the connections between objects using the URL structure https://graph.facebook.com/ID/CONNECTION_TYPE. The connections supported for people and pages include:

We support different connection types for different objects. For example, you can get the list of all the people attending the Facebook Developer Garage at SXSW (ID #331218348435) by fetching https://graph.facebook.com/331218348435/attending?access_token=....