Main Menu

Link text code

Started by philiporchard, July 26, 2011, 10:23:54 AM

Previous topic - Next topic

philiporchard

When a business adds themselves to one of our directories, we ask them to link back to us. However, in the past this has been a graphic and not a text link.

Here is our revised code:

<p>Listed in the<a href='http://www.cardiff.co.uk/plumbers/'; title='Cardiff Plumbers'>Cardiff Plumbers</a>section of the<a href='http://www.cardiff.co.uk' title='Cardiff'>Cardiff</a> Directory</p>

Should we try and have it so it appears more styled?

Would this be effective

Any thoughts would be appreciated.

Rooftop

I prefer to leave it simple and let people style it. Either that or give a choice of versions.

One thing that is working well for us is to effectively "spin" the link - to mix up the target, anchor and surrounding text a bit.

keano

I wouldn't even suggest link text to folks linking back - it would look too unnatural to have incoming links that all have the same anchor text.

Probably best to just leave it simple and allow the people linking back to you to use their own anchor, etc.

ukgimp

An example of one I use

<?php

//Mail the person to say it has been added
//Create Random Anchor Text
srand((float) microtime() * 10000000);
$input = array("$site_subject Directory", "$site_subject Finder", "$site_name $site_subject Directory", "$site_name", "$site_subject Locator from $site_name");
$rand_keys = array_rand($input, 2);
$anchor = $input[$rand_keys[0]];


$sql = mysql_query("SELECT users.username, categories.name, pages.url, pages.title, pages.id, pages.category FROM pages, categories, users WHERE pages.id = $insert_id AND pages.category = categories.id AND users.user_id = $user_id");

$title = mysql_result($sql,$i,"title");
$category = mysql_result($sql,$i,"category");
$id = mysql_result($sql,$i,"id");
$url = mysql_result($sql,$i,"url");
$name = mysql_result($sql,$i,"name");
$username = mysql_result($sql,$i,"username");


$message = "Congratulations, your site \n
\"
$title\"

has been listed in
$site_name_breadcrumbs\n
You can find it in the following category:\n
$name
http://www.
$site_url/$category/

The actual listing can be seen here

http://www.
$site_url/$detail_page_name/$id/


You dont have to but you can link back to us but we would appreciate it.
By linking directly to your listing you will improve the number of free referals we will send you
You can link to us by cutting and pasting the following code into your webpage.\n

<!--Start of Cut and Paste-->
<p><a href=\"http://www.
$site_url/$detail_page_name/$id/\">$title</a> is listed in $site_name</p>
<!--End of Cut and paste-->

or you can link to our home page

<!--Start of Cut and Paste-->
<p><a href=\"http://www.
$site_url/\">$anchor</a></p>
<!--End of Cut and paste-->

Remember linking to us will help you!

Thanks
$site_url Team
"
;

$from = "$site_name Listing <$no_reply_email>";
$subject ="$site_name Listing";
$headers = 'From:' . $from . "\r\n" .
  'Reply-To: webmaster@' . $from . "\r\n" .
  'X-Mailer: PHP/' . phpversion();

mail($username, $subject, $message, $headers);
mail("$username", $subject, $message, "From: $no_reply_email");


//#######

?>

philiporchard

At the moment, businesses are adding small banners to their websites, which they seem happy to add. See the bottom of this web page:

http://www.beyondbeautybedford.co.uk/

We need to provide some kind of copy/code to give to busineses to put on their sites.
Maybe we offer a selection of three types of text links, and allow them to choose.

philiporchard

Thanks Richard - this linking thing seems to be a minefield!

I must say that when we give people the choice of a text link, or image link, they go for the image link most often...

http://www.bedford.co.uk/SuggestBusinessExpress.aspx

We definitely need to offer links that point to sub categories though, not just the home page.

Cheers, Phil