Control of meta description - categories

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #41 (permalink)  
Old 01-25-2008, 03:38 AM
Divisive Cotton's Avatar
Pligg Donor
 
Join Date: Sep 2007
Posts: 197
Cheers for this Blaze... I'm going to implement it this weekend...
Reply With Quote
  #42 (permalink)  
Old 01-27-2008, 04:21 PM
Divisive Cotton's Avatar
Pligg Donor
 
Join Date: Sep 2007
Posts: 197
Quote:
Originally Posted by blaze View Post
Yes, of course it's possible. Please understand though, this fix can actually be applied to any template file such as the header, footer, pligg, etc. It really all depends on where you want it to appear and how your template is constructed. There are so many templates out there now, and they're all made so differently, that by applying this fix, you might completely mess up your template layout.

SO BE WARNED -- DO NOT APPLY THIS FIX IF YOU DO NOT UNDERSTAND YOUR TEMPLATE!

If you want to include it, then here's the fix for that. This fix uses the yget template as an example.

Open pligg.tpl file and find:

Code:
<div id="contentbox" {if $pagename eq "editor"}style="width:100%"{/if}>
	{checkActionsTpl location="tpl_pligg_above_center"}
	{include file=$tpl_center.".tpl"}
	{checkActionsTpl location="tpl_pligg_below_center"}
</div><!-- contentbox end -->
Replace with:

Code:
<div id="contentbox" {if $pagename eq "editor"}style="width:100%"{/if}>
	<div style="padding: 10px; line-height: 1.2em">
        {if $pagename eq "published"}
        {if $category eq "Category 1"}
        My Custom Published category 1 page description goes here.
        {elseif $category eq "Category 2"}
        My Custom Published category 2 page description goes here.
        {if $category eq "Category 3"}
        My Custom Published category 3 page description goes here.
        {elseif $category eq "Category 4"}
        My Custom Published category 4 page description goes here.
        {else}
        My Default Custom Published page description goes here.
        {/if}
        {elseif $pagename eq "upcoming"}
        {if $category eq "Category 1"}
        My Custom Upcoming category 1 page description goes here.
        {elseif $category eq "Category 2"}
        My Custom Upcoming category 2 page description goes here.
        {if $category eq "Category 3"}
        My Custom Upcoming category 3 page description goes here.
        {elseif $category eq "Category 4"}
        My Custom Upcoming category 4 page description goes here.
        {else}
        Your Default Welcome page description.
        {/if}
        {/if}
	</div>
	{checkActionsTpl location="tpl_pligg_above_center"}
	{include file=$tpl_center.".tpl"}
	{checkActionsTpl location="tpl_pligg_below_center"}	
</div><!-- contentbox end -->
Hold on Blaze, what's missing on the lines I bolded? Brackets? I'm not really a PHP coder, but this little bit of script isn't going to work as it is.

Last edited by Divisive Cotton; 01-28-2008 at 01:44 AM.
Reply With Quote
  #43 (permalink)  
Old 01-27-2008, 07:08 PM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Sorry, there were some {if} statements that needed to be changed to {elseif} statements. Here is the correct code (shown in red):

Code:
<div id="contentbox" {if $pagename eq "editor"}style="width:100%"{/if}>
	<div style="padding: 10px; line-height: 1.2em">
        {if $pagename eq "published"}
        {if $category eq "Category 1"}
        My Custom Published category 1 page description goes here.
        {elseif $category eq "Category 2"}
        My Custom Published category 2 page description goes here.
        {elseif $category eq "Category 3"}
        My Custom Published category 3 page description goes here.
        {elseif $category eq "Category 4"}
        My Custom Published category 4 page description goes here.
        {else}
        My Default Custom Published page description goes here.
        {/if}
        {elseif $pagename eq "upcoming"}
        {if $category eq "Category 1"}
        My Custom Upcoming category 1 page description goes here.
        {elseif $category eq "Category 2"}
        My Custom Upcoming category 2 page description goes here.
        {elseif $category eq "Category 3"}
        My Custom Upcoming category 3 page description goes here.
        {elseif $category eq "Category 4"}
        My Custom Upcoming category 4 page description goes here.
        {else}
        Your Default Welcome page description.
        {/if}
        {/if}
	</div>
	{checkActionsTpl location="tpl_pligg_above_center"}
	{include file=$tpl_center.".tpl"}
	{checkActionsTpl location="tpl_pligg_below_center"}	
</div><!-- contentbox end -->
Reply With Quote
  #44 (permalink)  
Old 01-27-2008, 11:45 PM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
Would this affect current links or only future links? Will the current links still be accessible?

I mean pligg is already amazing for SEO 40% of my traffic is already Google if I could increase this I'm all for that!

Please let me know
Reply With Quote
  #45 (permalink)  
Old 01-28-2008, 06:03 AM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by bbrian017 View Post
Would this affect current links or only future links? Will the current links still be accessible?

I mean pligg is already amazing for SEO 40% of my traffic is already Google if I could increase this I'm all for that!

Please let me know
Yes, it affects the current pages -- therefore, Google will update the pages to the newer information supplied. It should give you a boost -- worked for me. I use them on the header, footer and sidebars. Hell, I use them all over the place! (Ha!) That is the one thing I like about smarty templates -- the ability to write {if} statements is awesome -- although it does a take a lot of work, but it can be great!
Reply With Quote
  #46 (permalink)  
Old 03-23-2008, 05:41 PM
New Pligger
 
Join Date: Feb 2008
Posts: 21
Quote:
Originally Posted by blaze View Post
Note: This fix is for v 9.82 AND v 9.9.0

Ok, well here is a TEMPORARY SOLUTION that I worked on. It took me a while to figure out how to tweak this just right, but it does work. It ain't pretty to look at and it also takes a lot of work if you have lots of categories... but here goes:

...
Thank you for this hack, it worked for me but I have some issues with accentuated characters like "éàçà".
For example when I use it for the catégorie "Création de site" I have the default meta description, but when I use it for "Creation de site" everything works like charm.
Can someone tell me how to fix this please ?

Thanks in advance
Reply With Quote
  #47 (permalink)  
Old 03-23-2008, 06:03 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Cool hack, thank you!
Reply With Quote
  #48 (permalink)  
Old 04-07-2008, 03:47 AM
Casual Pligger
 
Join Date: Jul 2007
Posts: 34
hi blaze
I did what you said but it shows title like good keywords different good keywords and i changed good to my site

how ever i was looking to make as the content title
I need like this Idol Gives Back - American Idol Helps Others on April 9th

how can i do ?
Reply With Quote
  #49 (permalink)  
Old 04-07-2008, 05:02 AM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by sb225 View Post
hi blaze
I did what you said but it shows title like good keywords different good keywords and i changed good to my site

how ever i was looking to make as the content title
I need like this Idol Gives Back - American Idol Helps Others on April 9th

how can i do ?
You can try this in your meta.tpl file for the keywords:

<meta name="keywords" content="{$posttitle|substr:3}" />

This should work, but I haven't tested it, so don't hold me to it. Try it out, and if it works, then report back here in case someone else wants to do it this way as well.
Reply With Quote
  #50 (permalink)  
Old 04-13-2008, 01:32 AM
Casual Pligger
Pligg Version: 9.9.5
Pligg Template: custom yget
 
Join Date: Jun 2007
Location: Colorado
Posts: 65
I'm curious..kind of a 2 fold post here

I have followed this thread from the beginning back in Dec and as stated back then I have a large site with A LOT of categories and sub-categories and to implement this change would only effect about 75 pages. But alas the issue of duplicate content and Google is very real.

I just checked on the site using site:mysite.com and I'm a little setback. As I stated early in this thread I have over 4000 pages that had been indexed by Google. Now that Google's omissions include what they consider to be duplicate content the indexed number of pages is running at 4700 pages BUT if you follow results page links at the bottom Google is only showing 300 pages indexed.

Question: Would this dup content cause such a drop in indexed pages?

Lensroll Networking / Popular Lenses
Lensroll Networking / Popular Lenses / Shopping
Lensroll Networking / Popular Lenses / Crafts
etc,
etc.

Granted, the mod would address this as these are category pages but what I'm concerned with is "Lensroll Networking". Does the hack strip the site name reference or is the meta title just added to the end?

Second side of this post..

Meta example

Code:
{if $meta_description neq ""}
	<meta name="description" content="{$meta_description}" />
{else}
	<meta name="description" content="Social networking for Squidoo lens masters to share relevant content. Build links, increase traffic, make money for yourself." />
{/if}

{if $meta_keywords neq ""}
	<meta name="keywords" content="{$meta_keywords}" />
{else}
	<meta name="keywords" content="" />
{/if}


{if $indexit eq "1" OR $pagename eq "story"}
    <meta name="robots" content="index,follow" />
{else}
    <meta name="robots" content="noindex,follow" />
{/if}
	<meta name="Language" content="{#PLIGG_Visual_Meta_Language#}" />
I draw your attention to the robots calls to index,follow and noindex,follow story depending if it's been published or is still in cued. The post by sb225 is referencing my site. The story page is showing the title of the post without the Lensroll/Networking in front of it which is what I expect.

Maybe a booboo.

A small snippet of my robots.txt

Code:
Disallow: /story/
Disallow: /story/title/
Could this be the reason I have seen a drop in what Google says is really indexed and not the duplicate categories titles? Should we allow the crawler to see story/title?

Sidenote: Analytics data reflects around 10,000 visitors a month, 79% coming from the se's using 3500 keywords. The data doesn't really reflect the supposed 300 'truly indexed' pages vs. the actual 4700.

It may be time indeed to apply this mod but wanted to get a little feedback before we go ahead with a fairly large change. Sorry if this may not be the right thread for the doubled whammy question.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Story Meta Description ffarhann Questions and Comments 3 01-26-2010 02:58 PM
Meta Description Problems HelloKitty Questions and Comments 1 11-24-2009 03:04 AM
Meta Tagging Categories Properly? Andromedan Questions and Comments 1 04-04-2008 03:46 PM
Setting default meta description Biomech Questions and Comments 9 10-03-2007 01:08 PM
Dynamic meta description tag generation fix creep Questions and Comments 2 03-17-2007 10:32 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development