Change page title only for story page - Google

Register an Account
Closed Thread
 
Thread Tools Display Modes
  #11 (permalink)  
Old 05-31-2008, 09:16 PM
supermanpi's Avatar
New Pligger
 
Join Date: May 2008
Posts: 11
Quote:
Originally Posted by wwwSENSERELYcom View Post
In the file /templates/yget/pligg.tpl instead of this at about line 55 :



you replace it with :



That way, all other titles are not affected, only when you're looking at a story page. Why I use the Smarty modifier (php command) substr? Because $posttitle has " - " in front of it, so that removes it.

Imagine you want to have your title with uppercase in front of all words, then you would want to use the php function "ucwords" to add it in smarty you append it like this:


Have some fun with php functions (such as strtoupper) but don't break everything :-)

Thank you for this, it works excellent.

I have a question: For SEO purposes.. what would be best... story title only, or story title - websitename. Basically, I'm wondering if adding my website name after the title of the story will negatively affect my search rankings.
  #12 (permalink)  
Old 11-22-2008, 03:27 PM
Casual Pligger
Pligg Version: 9.9.5
 
Join Date: Nov 2008
Posts: 33
if you have latest pligg then replace
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>


with

{if $pagename eq "story"}
<title>{$posttitle|substr:3}</title>
{else}
<title>{$pretitle}{#PLIGG_Visual_Name#}{$posttit le }</title>
{/if}
  #13 (permalink)  
Old 11-23-2008, 08:29 AM
New Pligger
Pligg Version: 0.9
Pligg Template: basic
 
Join Date: Dec 2007
Posts: 2
With this version of the code inserted in pligg.tpl always, can you name the different categories and leave only the name of the site's home page.

{if $pagename eq "story" || $pagename neq "published"}
<title>{$posttitle|substr:3} | {#PLIGG_Visual_Name#}</title>
{else}
<title>{$pretitle}{#PLIGG_Visual_Name#}{$posttit le }</title>
{/if}
  #14 (permalink)  
Old 05-28-2010, 08:59 AM
aahna's Avatar
Casual Pligger
Pligg Version: 1.1.4
Pligg Template: wistie
 
Join Date: May 2010
Location: India
Posts: 64
Hey follow this one even i was having the same problem with my site SEO fix - page title
  #15 (permalink)  
Old 03-02-2011, 12:10 PM
Constant Pligger
Pligg Version: 1.1.4
Pligg Template: Social Pro
 
Join Date: Jun 2007
Location: Colorado
Posts: 192
I'm taking a chance reviving a "very" old post. I fear an admin may tongue lash me :-)

I searched b4 I asked...but search rarely returns what you want...unless you have hours to commit to the engine. Tags are the main driver it appears

Anyhoo.....I'm a long time pligg user...4 years+ and have started upgrading. My site is heavily modified from a structure point of view. Using silo mentality.

I used this hack on my pre ver 1.+ install to remove the site name from the end of the post page.

I noticed after upgrading that the site name is back.

If I may....where can I find the site <title> tag function in the current ver (1.13)

Thanks

EDIT: Admin....Shoot me.......!! The post directly above this one answers my question. Apologizes.

Last edited by web20guy; 03-02-2011 at 12:14 PM. Reason: Shoot me....
  #16 (permalink)  
Old 03-02-2011, 12:27 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Closing this thread, since an answer has been posted and it is pretty old.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Title - Instant Need plum Questions and Comments 6 11-16-2009 05:35 PM
How to change the page title bhanu210 Questions and Comments 2 04-03-2008 12:22 AM
Change Title and description in RSS page hadock Questions and Comments 2 05-14-2007 12:57 PM


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