HomeUnityBlogs
 
 
mrpowless

SEO Titles look too long for you site emails?

Many site titles are long(see below) and have more description in them for getting up there on google. If you don't do it, then start!

Well these titles get ugly in emails and heres a lil trick to shorten it.

heres an example of a really long site title, which i great for engine

$site['title']             = 'This is my site - It has all kinds of great toys for my keywords';

open inc/header.inc.php

after:

$site['title']             = 'This is my site - It has all kinds of great toys for my keywords';

insert:

$site['tinytitle']               = "Short Text";

Change "Short Text" to something shorter,

open inc/utils.inc.php:

replace:

$sMailHeader        = "From: =?UTF-8?B?" . base64_encode( $site['title'] ) . "?= <{$site['email_notify']}>";

with:

$sMailHeader        = "From: =?UTF-8?B?" . base64_encode( $site['tinytitle'] ) . "?= <{$site['email_notify']}>";

inc/admin.inc.php has 2 of them also

around 1100:

$notifyMessage = str_replace("<SiteName>", $site['title'], $notifyMessage);

and 1127:

$inboxSubject = str_replace("<SiteName>", $site['title'], $inboxSubject);

notice all we did was replace title with tinytitle?

I hope this helps a few.

comments?

bad
11
good
 
 

Comments

sammie
sammie 107 days agocomment permalink
 
cool MrP as always
 
bad
2
good
 
View 1 replies to this comment
 
clubbeyourself
clubbeyourself(positive) 107 days agocomment permalink
 
Very cool MrP, will be implementing that for sure!
 
bad
2
good
 
 
Synergy
Synergy(positive) 106 days agocomment permalink
 
Thanks! The long title shows in classifieds and groups... so you have to be careful not to make it too long.
 
bad
2
good
 
 
melia
melia(positive) 106 days agocomment permalink
 
MrP is one of these guys that make me want to stick with Dolphin a little longer.
 
bad
2
good
 
View 1 replies to this comment
 
gameutopia
gameutopia(positive) 105 days agocomment permalink
 
This is definately a good thought and concept. I'm not here to complain. Unless I mis-understood this somehow...only problem I have is that it does affect other areas of the site. If I use

$site['title'] ='something very long and very descriptive and all that stuff';
$site['tinytitle'] = "Mysite.com";

What happens is some email related body, subject, admin panel login, admin panel top area by boonex dolphin logo and such is extremely long. If I made it really long than the display is very garbled in many places.

I did edit additional fields in utils.inc.php to compensate for most of it, but I am still missing some. The admin login page, and some of the emails. I haven't looked into the site email admin area yet, but perhaps some of these could be changed or altered a bit to shorten them up and use your tinytitle thought.

What happens for me is in the message body which I did manage to correct but not check them all is something like:

Hello from mysite.com

The ....of something very long and very descriptive and all that stuff

Is glad to inform you that....

Or something like that.

Definately worth the seo though, and I will edit it a bit in my spare time.

gameutopia
 
bad
1
good
 
View 1 replies to this comment
 
gameutopia
gameutopia(positive) 101 days agocomment permalink
 
Unless I am missing something I only edited the one line:
open inc/utils.inc.php:

replace:

$sMailHeader = "From: =?UTF-8?B?" . base64_encode( $site['title'] ) . "?= <{$site['email_notify']}>";

with:

$sMailHeader = "From: =?UTF-8?B?" . base64_encode( $site['tinytitle'] ) . "?= <{$site['email_notify']}>";

And all admin areas, email, etc do the long thing. Which is the seo long title. This is good, but other parts of this site are not so good with the long emails. Don't know why this is, I certainly can deal with the links and titles, but the email part is not so nice to deal with. I'll continue to work on it.

gameutopia
 
bad
0
good
 
 
coppullcaveman
coppullcaveman 51 days agocomment permalink
 
I only want to change my site title following a typo, been looking over two hours, finally given up. looks like i will have to go back to osdate sadly. Im too old to be trying to learn all this
 
bad
0
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
mrpowless Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.806142091751