Latest Information for social Voting CMS systems
First off let’s begin by covering the URL structure of pligg. Most of Pligg’s Rewritten URL 2 system works fine if a little messy here we will show you how to clean this up to something Google will prefer.
Pligg Google Friendly URL Rewrite
A default Pligg story URL once rewritten looks like the example below.
http://www.designfloat.com/General/Joshua_Glenn_Taking_Things_Seriously/
What stands out is the use of _ Underscores within the URL, Google prefers the use of a hyphen/dash - as a separator and for more information on this read the Blog post by Matt Cutt’s who works for Google. This excerpt below taken from Matt’s blog post should indicate exactly why a hyphen/dash is a better separator.
Quote: Matt Cutts
With underscores, Google’s programmer roots are showing. Lots of computer programming languages have stuff like _MAXINT, which may be different than MAXINT. So if you have a url like word1_word2, Google will only return that page if the user searches for word1_word2 (which almost never happens). If you have a url like word1-word2, that page can be returned for the searches word1, word2, and even “word1 word2″.
So how do we fix this? luckily Adam over at Pligg Template has provided some code to clean up the Pligg URL system to be more Search Engine Friendly. We will use some of that code to achieve a nice clean URL system like below.
http://www.designfloat.com/general/joshua-glenn-taking-things-seriously/
Open libs/utils.php and FIND
$output = utf8_substr($input, 0, 240);
REPLACE WITH
$output = utf8_strtolower($input, 0, 240);
libs/utils.php and FIND
$output = str_replace("\"", "", $output);
REPLACE WITH
$output = str_replace(" - ", "-", $output);
$output = str_replace("_", "-", $output);
$output = str_replace("---", "-", $output);
$output = str_replace("\"", "", $output);
$output = str_replace("--", "-", $output);
Now you have lovely clean and Google friendly URL’s note for categories you must manually create categories in lowercase from the Admin section of pligg or your htaccess won’t work. Also this change should not be applied to an existing site unless you know how to 310 redirect content that is currently indexed under the old url system or you have a very small site with very little indexed story content.
SEO Friendly Page Titles Hack
Next up we have Pliggs page titles, this is a really simple little hack that anyone can do I around 2 minutes and it should work on any version of pligg although i have only tested it with v9.8.2.
What this hack does is more commonly know or referred to as reversing page titles or optimal page titles. Here are some examples of this below.
Original Pligg Story Title
Design Float - Joshua Glenn: Taking Things Seriously
SEO’d Pligg Story Title
Joshua Glenn: Taking Things Seriously / Design Float
Original Pligg Search and Tag Title
Design Float / Search Results For: design
SEO’d Pligg Search and Tag Title
Design Search Results / Design Float
Original Pligg Search and Tag Title
Design Float / Tage Cloud
SEO’d Pligg Static Page Title
Tag Cloud / Design Float
As you can see the most important keywords are now located farthest to the left in the page title. Below are the instructions to achieve this….
Open template/yourtemplate/pligg.tpl and FIND
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>
REPLACE WITH
{if $pagename eq “story” || $pagename eq “topusers” || $pagename eq “cloud” || $pagename eq “tools”}
<title>{$posttitle|substr:3} / {#PLIGG_Visual_Name#}</title>
{elseif $pagename eq “search”}
<title>{$posttitle|substr:3} search results / {#PLIGG_Visual_Name#}</title>
{else}
<title>{$pretitle}{#PLIGG_Visual_Name#}{$posttitle }</title>
{/if}
Open template/yourtemplate/search_centre.tpl and FIND
{if isset($templatelite.get.search)}
<h2>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes}</h2>
{/if}
{if isset($templatelite.get.q)}
<h2>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.q|sanitize:2|stripslashes}</h2>
{/if}
REPLACE WITH
{if isset($templatelite.get.search)}
<h2>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes} search results</h2>
{/if}
{if isset($templatelite.get.q)}
<h2>{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.q|sanitize:2|stripslashes} search results</h2>
{/if}
The last step is to go to your Admin Panel / Modify Language and filter for “Search results for” remove both these pieces of text by editing and deleting the text then clicking save. You should be left with a completely blank text field.
Completed and your pligg site now has wonderful SEO Optimized Page Titles.
Pligg Duplicate Content
Pligg story pages have a few URL’s that can be indexed by the search engines this can amount to duplicate content in their eyes, The easiest way to fix this is by a robots.txt file that is uploaded to your plug root directory.
http://www.designfloat.com/Programming/Elemental_Conditional_Content_with_CakePHP/
http://www.designfloat.com/story/title/Elemental_Conditional_Content_with_CakePHP/
Both the URLs above point to the same page a can be indexed by search engines which mean’s duplicate content, the fix is below…
1. Create a new blank text file and name it robots.txt.
2. Copy the text below and paste it into you robots.txt file.
# All robots will spider the domain
User-agent: *
Disallow: /templates/
Disallow: /3rdparty/
Disallow: /libs/
Disallow: /modules/
Disallow: /plugins/
Disallow: /internal/
Disallow: /backup/
Disallow: /thickbox/
Disallow: /api/
Disallow: /evb/
Disallow: /avatars/
Disallow: /admin_index.php
Disallow: /admin
Disallow: /story.php
Disallow: /login.php
Disallow: /user.php
Disallow: /js/
Disallow: /img/
Disallow: /story/
Disallow: /story/title/
3. Upload the newly created robots.txt file to you pligg rott directory overwriting the existing file if asked.
Done no more duplicate content.
Pligg XML Sitemaps Module v9.8.2 Only Works With URL Method 2 Enabled In Pligg
PatchLog.com had previously released a sitemaps module for an older version of pligg v9,7 I think, this module stopped working after the release of v9.8 of pligg. We have played around with the files and have it working in v9.8.2 of pligg instructions and download below…..
Download: XML Sitemaps for pligg v9.8.2
1. Download the module above.
2. Unzip and upload the folder xml_sitemaps to you pligg /modules folder.
3. Go to Admin / Modules Management and activate the Plligg Sitemaps Module.
4. open you .htaccess file in you pligg install’s root directory and add the code below to the very bottom.
RewriteRule ^sitemapindex.xml module.php?module=xml_sitemaps_show_sitemap [L]
RewriteRule ^sitemap-([a-zA-Z0-9]+).xml module.php?module=xml_sitemaps_show_sitemap&i=$1 [L]
Done
Go to http://yoursite.com/sitemapindex.xml to check that it is working.
Now submit your sitemaps to Google
I know this has been a long article and if you have stuck with it you will now have a nicely SEO’d pligg site that should achieve better results in Google and other search engines. Any questions or help required please leave a comment and if you found this helpful give it a Digg below. Hopefully we might see future updates of pligg contain some of these changes.
Popularity: 46%
If you enjoyed this post, make sure you subscribe to our RSS feed!
Latest Information, modules, templates, themes, skins, hacks and mods for social Voting CMS systems Pligg, drigg
Andrew
December 12th, 2007 at 12:09 am
Wow, great article. Just performed most of these on Design Float!
LincolnHawks
December 12th, 2007 at 12:10 am
Good to hear Andrew
love design float your new template looks really cool man, i did notice one little bug though
when your on the design float upcoming section the sidebar categories take you to the published sections, taking you out of upcoming.
Keep up the good work and hopefully your new server will make the sites speed increase a little like you posted.
Blaze
December 24th, 2007 at 6:30 pm
You may want to add this to your .htaccess file as well:
First go to the admin section and click on Configure Pligg > Location Installed. Change the value of your installation directory from http://ww.yoursite.com to http://yoursite.com.
Now attend to your .htaccess file and comment out the following:
## Remove these two lines if you have a sub-domain like http://ashdigg.pligg.com or http://localhost
## Keep if your site it like http://www.pligg.com
## RewriteCond %{HTTP_HOST} !^www\.
## RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
##### Re-directing End #####
and underneath it add this:
## Remove www., always.
RewriteCond %{HTTP_HOST} ^www\.yoursite\.com [NC]
RewriteRule ^(.*)$ http://yoursite.com/$1 [L,R=301]
## Rewrites the index.php page to point to the domain default folder
RewriteCond %{THE_REQUEST} (index\.php) [NC]
RewriteRule ^(.*)index\.php$ http://yoursite.com/$1 [L,R=301]
The important of this is that google spiders BOTH of your “www” content and non-www content, because technically speaking, your www is just a subdomain of your main domain name. So it’s better not to use the www in your url and further save yourself from duplicate content.
The second addition is to make sure your index.php just points to your public html folder — thereby removing any duplicate content issues as comparing http://yoursite.com to http://yoursite.com/index.php — which are identical. This should really keep you safe.
anil
December 24th, 2007 at 6:58 pm
Hello guys,
Have a site am using 2nd method url in pligg and the prob is
http://www.jeqq.com/category/news_technology_Apple
its should be like ths
http://www.jeqq.com/category/news/technology/Apple
or
like digg
http://www.digg.com/apple
But some of the devs told me its not possbile…will that effect my google rankings…
complexity
January 6th, 2008 at 5:22 am
Thanks. I applied a few of the ideas.
forexnews
January 9th, 2008 at 10:28 pm
followed the example with the robots.txt .. but after a couple of weeks google index-ed only about 30 pages out of over 300
Ronny
February 4th, 2008 at 5:28 pm
nice tips … great
MovvBuzz
March 6th, 2008 at 3:00 am
Thanks I clicked a few ads out of appreciation.
MovvBuzz
March 6th, 2008 at 7:20 pm
Works great thanks!!
John
April 7th, 2008 at 5:58 pm
The “Friendly URL Rewrite” edits killed the site. Admin and public pages are all blank. I don’t think this works for 9.9.0
2mk
May 6th, 2008 at 8:53 am
Great tips. I use this tips for my web site.