Control of meta description - categories

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 01-04-2008, 07:57 PM
New Pligger
Pligg Version: 9,9
Pligg Template: Premium
 
Join Date: Jan 2008
Posts: 2
Hi,

I've seen your suggestion for changing the category meta, but i think that it's important also to add some unique text in each category. It's relly important for seo reasons and for the visitor that can have a short general description of cat...

Here SocialFood / Published News / Vino before the first news, i'd like to insert some text to descript the wine, this will make the page unique....

Is it possible?...

I think that it'll be important for a lot of people...

Thanks and sorry for my bed english
Reply With Quote
  #32 (permalink)  
Old 01-05-2008, 08:45 AM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by isidoro81 View Post
Hi,

I've seen your suggestion for changing the category meta, but i think that it's important also to add some unique text in each category. It's really important for seo reasons and for the visitor that can have a short general description of cat...

Here SocialFood / Published News / Vino before the first news, I'd like to insert some text to describe the wine, this will make the page unique....

Is it possible?...

I think that it'll be important for a lot of people...

Thanks and sorry for my bed English
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.
        {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 -->

Last edited by blaze; 01-27-2008 at 07:05 PM.
Reply With Quote
  #33 (permalink)  
Old 01-22-2008, 01:59 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: Basic
 
Join Date: Jan 2008
Posts: 6
Hello,
I have try the SEO solutions and for some reason is not working. I'm using 9.9.0 and after i did all the changes nothing is showing on the page. I got a blank page. Some ideas?
Reply With Quote
  #34 (permalink)  
Old 01-23-2008, 03:53 AM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by szilaghi View Post
Hello,
I have try the SEO solutions and for some reason is not working. I'm using 9.9.0 and after i did all the changes nothing is showing on the page. I got a blank page. Some ideas?
Yes, if you're getting a blank page then it's because one of your {if} statements is still open. You need to make sure all of your {if} statements are closed with {/if}. This is what is causing the blank page. Look through your code carefully and find the opened {if} statement and close it.
Reply With Quote
  #35 (permalink)  
Old 01-23-2008, 01:12 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: Basic
 
Join Date: Jan 2008
Posts: 6
Quote:
Originally Posted by blaze View Post
Yes, if you're getting a blank page then it's because one of your {if} statements is still open. You need to make sure all of your {if} statements are closed with {/if}. This is what is causing the blank page. Look through your code carefully and find the opened {if} statement and close it.
I think the issue is from the custom title. The description and keywords work fine. But for the custom title something is wrong.
Reply With Quote
  #36 (permalink)  
Old 01-23-2008, 03:29 PM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by szilaghi View Post
I think the issue is from the custom title. The description and keywords work fine. But for the custom title something is wrong.
I don't have a problem at all with the custom titles either. Works like a charm for me on v9.82 and v9.9. Like I said, if you're getting a blank page, then it's because one of your {if} statements isn't closed properly.
Reply With Quote
  #37 (permalink)  
Old 01-23-2008, 04:24 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: Basic
 
Join Date: Jan 2008
Posts: 6
Well the only thing that i did was to copy/paste the code provided on the page.
Reply With Quote
  #38 (permalink)  
Old 01-23-2008, 06:09 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: Basic
 
Join Date: Jan 2008
Posts: 6
Blaze i have found the error. The code posted had to {/if} tags missing. I have add them and now it works. I'm posting the fixed code.

Code:
{if $pagename eq "published"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 2 Title</title>
{/if}
{if $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}Good Keyword Phrase Here{if isset($posttitle)} | {$navbar_where.text1} | {$navbar_where.text2}{/if}</title>
{/if}
{elseif $pagename eq "upcoming"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 2 Title</title>
{/if}
{if $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}My Default Upcoming Stories Title</title>
{/if}
{elseif $pagename eq "story"}
<title>{if isset($pretitle)}{$pretitle}{/if}Different Good Keyword Phrase Here | {$navbar_where.text1}  | {$navbar_where.text2}</title>
{elseif $pagename eq "search"}
<title>{if isset($pretitle)}{$pretitle}{/if}Another Good Keyword Phrase Here | Search Results For {$templatelite.get.search|sanitize:2|stripslashes} {$from_text}</title>
{elseif $pagename eq "cloud"}
<title>{if isset($pretitle)}{$pretitle}{/if}Yet Another Good Keyword Phrase Here | Most Popular Tags</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)} | {$navbar_where.text1} {/if} | {$navbar_where.text2}</title>
{/if}
Reply With Quote
  #39 (permalink)  
Old 01-24-2008, 04:24 AM
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Sep 2007
Posts: 192
Quote:
Originally Posted by szilaghi View Post
Blaze i have found the error. The code posted had to {/if} tags missing. I have add them and now it works. I'm posting the fixed code.

Code:
{if $pagename eq "published"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 2 Title</title>
{/if}
{if $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}Good Keyword Phrase Here{if isset($posttitle)} | {$navbar_where.text1} | {$navbar_where.text2}{/if}</title>
{/if}
{elseif $pagename eq "upcoming"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 2 Title</title>
{/if}
{if $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}My Default Upcoming Stories Title</title>
{/if}
{elseif $pagename eq "story"}
<title>{if isset($pretitle)}{$pretitle}{/if}Different Good Keyword Phrase Here | {$navbar_where.text1}  | {$navbar_where.text2}</title>
{elseif $pagename eq "search"}
<title>{if isset($pretitle)}{$pretitle}{/if}Another Good Keyword Phrase Here | Search Results For {$templatelite.get.search|sanitize:2|stripslashes} {$from_text}</title>
{elseif $pagename eq "cloud"}
<title>{if isset($pretitle)}{$pretitle}{/if}Yet Another Good Keyword Phrase Here | Most Popular Tags</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)} | {$navbar_where.text1} {/if} | {$navbar_where.text2}</title>
{/if}
Sorry, I just looked at the code I put up and actually you don't need the other two {/if} statements as you have put now. The problem was I used {if} for the category 3 statement when it should have been {elseif} instead. I used it twice, which is why you needed to add two more closing {/if} statements.

I changed this code in a hurry when providing the fix for v9.9, so I didn't see that. Sorry about that.

Just as a note for all other users: The original code has now been fixed, so don't worry about it not working, as I have edited it to work fine now. There should be no problems.

Last edited by blaze; 01-24-2008 at 04:30 AM.
Reply With Quote
  #40 (permalink)  
Old 01-24-2008, 04:38 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: Basic
 
Join Date: Jan 2008
Posts: 6
Thanks! The whole system works.
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