marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Can <[TITLE]> be shorter, PLEASE?!!

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Can <[TITLE]> be shorter, PLEASE?!! »
Welcome, Guest. Please Login or Register.
12/18/17 at 06:55:21
Home Help Search Login Register
   marty.net message board
   About cpshop
   Feature Requests
   Can <[TITLE]> be shorter, PLEASE?!!
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Can <[TITLE]> be shorter, PLEASE?!!  (Read 831 times)
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Can <[TITLE]> be shorter, PLEASE?!!
« on: 11/11/11 at 18:25:05 »
Reply with quote Modify message

In the rules of SEO, cpshop displays titles of pages waaaay too long.  Could we have the <[TITLE]> tag simply just conditionally have the product name or section name?  

I am getting pages with characters over 65 characters in the title because cpshop wants to include the breadcrumb in its titles.  This is so important to me, please.
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Can <[TITLE]> be shorter, PLEASE?!!
« Reply #1 on: 11/11/11 at 20:11:10 »
Reply with quote Modify message

You can use <[productname]> on your Product page template in place of title. Otherwise I hacked the script and took out the breadcrumb part from the title and added some of my own tags for just this purpose. But yeah, you have a valid point.
Logged
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Can <[TITLE]> be shorter, PLEASE?!!
« Reply #2 on: 11/11/11 at 21:51:16 »
Reply with quote Modify message

Ooo gimme gimme gimme!  hook me up!  I figured out making my own product template as u said but I need help with that other part.
« Last Edit: 11/11/11 at 21:52:33 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Can <[TITLE]> be shorter, PLEASE?!!
« Reply #3 on: 11/14/11 at 19:34:25 »
Reply with quote Modify message

How are you with scripting PERL, Myke?
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Can <[TITLE]> be shorter, PLEASE?!!
« Reply #4 on: 11/14/11 at 19:42:33 »
Reply with quote Modify message

I am a wicked MS Foxpro 2.6 programmer but have been too stubborn to learn any other languages over the years....

am not familiar with PERL but I can figure my way around code if given an example.  I been waiting for BrattyTees to reply to me as soon as possible so I can shorten my titles.  I kinda sorta think I know how they did it...but I'm not willing to rename and have 500 cpshop.cgi files that contain custom title code as a variable.  I'd much rather figure out how to STR, SUBSTR or LEN command (foxpro commands) and shorten the values of <[TITLE]>, or strip it down by removing the breadcrumb variable it grabs from CP.

Why can't we have a <[SECTION]> tag that is just simply the name of the section?  I'd LOVE to have that instead.  Where is that value and how is CPSHOP getting it? (minus breadcrumbs of course)

Thanks to anyone that can help me on this one....I am sure I'm not the only one who complains about the title tag being too long.  It's affecting SEO rankings for us all.

« Last Edit: 11/14/11 at 19:44:13 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Can <[TITLE]> be shorter, PLEASE?!!
« Reply #5 on: 11/17/11 at 00:19:17 »
Reply with quote Modify message

Fixed.

Change your cpshop.cgi file to look like this: (or similar anyway) to remove parenthesis, commas, periods and invalid characters not allowed in titles of web pages for SEO


Code:
$hacked = 1;

if ($hacked) {
&gettemplate;

     # look for Funny Shirts - KaptainMyke and strip out of page title
   $pagetitle =~ s/- Funny Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - Popular Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - New Shirts - Gifts - KaptainMyke//g;
   $pagetitle =~ s/- Movie Shirts - KaptainMyke/Movie Shirts/g;
   $pagetitle =~ s/- TV Shirts - KaptainMyke/TV Shirts/g;
   $pagetitle =~ s/- TV Shirts - Apparel - Super Hero Shirts - Gifts - KaptainMyke/ Superhero Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/Funny Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[content\]>/$content/;
      # mfs - get rid of parentheses for some dark fabrics on the entire page
   $html =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
   $html =~ s/Stackable Mug Set \(4 mugs\)/4 Stackable Mugs/g;
   $html =~ s/\(12oz\)/12 Ounce/g;
   $html =~ s/0.6L/Half Liter/g;
   $html =~ s/1.0L/1 Liter/g;
   $html =~ s/Sticker \(Rectangle\)/Rectangle Sticker/g;
   $html =~ s/Sticker \(Oval\)/Oval Sticker/g;
   $html =~ s/Sticker \(Bumper\)/Bumper Sticker/g;
   $html =~ s/Women's/Womens/g;
   $html =~ s/Men's/Mens/g;
   $html =~ s/Kid's/Kids/g;
   $html =~ s/Children's/Childrens/g;
   $html =~ s/Jr. Raglan/Jr Raglan/g;
   $html =~ s/Jr. Ringer/Jr Ringer/g;
   $html =~ s/Jr. Spaghetti/Jr Spaghetti/g;
   $html =~ s/Womens Plus Size V-Neck T-Shirt/Plus Size V-Neck Shirt/g;
   $html =~ s/Womens Plus Size Scoop Neck T-Shirt/Plus Size Scoop Neck Shirt/g;
   unless (@ARGV) {
       print "Content-Type: text/html\n\n";

   }
   print $html;
   exit;

     
} else {
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;
   exit;
}

1;
« Last Edit: 11/17/11 at 00:20:18 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.