Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-15-2005 17:17:47

paulc
Member
From: Bristol, England
Registered: 12-15-2005
Posts: 18
Website

Alt Image Tags For Title Images

I am having great success with this Forum I have always found the answers to my problems while developing my cart.  smile This is the first time I have had to ask!

I have searched and searched without success but I need to carry out the following:

To improve my SEO i would like to add alt image tags to the only remaining images on my site that do not already have them. The Page title images (online store, contact us etc)

I have the ATS SEO mod installed, but this does not cover the title images.

I think this will be in the script somewhere but need a pointer please. Also I have some custom user pages which use the title images, and will be adding more is there an easy way to do this so i dont have to code them each time.

Thanks


Paul C
- iPod, PS2, Xbox, Gamecube, PC, Mobile Accessories

Offline

 

#2 12-15-2005 20:14:35

Ed_H
Member
From: Smashachusetts
Registered: 09-12-2003
Posts: 397
Website

Re: Alt Image Tags For Title Images

  is a little long, but the answer is there....

Offline

 

#3 12-15-2005 21:42:28

paulc
Member
From: Bristol, England
Registered: 12-15-2005
Posts: 18
Website

Re: Alt Image Tags For Title Images

Thanks for replying so quickly.

Unless I am missing something the thread you quoted only contains info on how to do the product images and the category images. I have these done already.

What I want to do is add the alt image tags to the title image that appears at the top of each page on the site (if it is selected to do so).

On  you can see the image "welcome to my online store" on the splash page and "online store" on the store page (products) these images are used throughout the site on all the pages including my custom user pages.

So how do I or where do I attach the alt image tags to these images???


Paul C
- iPod, PS2, Xbox, Gamecube, PC, Mobile Accessories

Offline

 

#4 12-23-2005 16:01:13

paulc
Member
From: Bristol, England
Registered: 12-15-2005
Posts: 18
Website

Re: Alt Image Tags For Title Images

I have now edited the code in the ste_title_img file from this

Code:

<IMG SRC="(CGIVAR)images_path(/CGIVAR)/title/(CGIVAR)page_titleimg(/CGIVAR)" WIDTH="(CGIVAR)site_title_image_width(/CGIVAR)" HEIGHT="(CGIVAR)site_title_image_height(/CGIVAR)" BORDER="0"><BR>

To this

Code:

<IMG SRC="(CGIVAR)images_path(/CGIVAR)/title/(CGIVAR)page_titleimg(/CGIVAR)" alt="(CGIVAR)page_titleimg(/CGIVAR)" WIDTH="(CGIVAR)site_title_image_width(/CGIVAR)" HEIGHT="(CGIVAR)site_title_image_height(/CGIVAR)" BORDER="0"><BR>

This is only a quick fix so that he images have title image name (title_store.gif) as an alt image tag.

Now the next step would be to change the title image names to what I want the alt tag to be i.e. "online_store.gif or contact_us.gif" etc. this would work fine but I do not want the ".gif" on the end if I can help it!!

I have tried a very crude test to remove the ".gif" from the title image names, then insert the ".gif" in the code as below.

Code:

<IMG SRC="(CGIVAR)images_path(/CGIVAR)/title/(CGIVAR)page_titleimg(/CGIVAR).gif" alt="(CGIVAR)page_titleimg(/CGIVAR)" WIDTH="(CGIVAR)site_title_image_width(/CGIVAR)" HEIGHT="(CGIVAR)site_title_image_height(/CGIVAR)" BORDER="0"><BR>

sad but this does not work. The image wont display at all, I think there must be a check for correct format of image name or something.

I cannot believe that with all the hype around SEO and the golden rule of having a well made site with alt image tags that nobody has ever done this, it must be possible. Somehow???


Paul C
- iPod, PS2, Xbox, Gamecube, PC, Mobile Accessories

Offline

 

#5 12-29-2005 09:26:46

mikeyt
Member
Registered: 09-02-2004
Posts: 17

Re: Alt Image Tags For Title Images

I've only recently got the SEO module so I don't know it inside out yet, however it looks like the variables (i.e. page_titleimg) are all set in the ste_exec.pl file. There are a couple of ways of doing this - you could either add an extra column in the relevant databases and assign an alt tag name to each page but that might be overkill in your case. If you are happy to use the same name for the image name and alt tag (i.e. contact_us.gif and 'contact us') then try the following. Just remember to back up your ste_exec file in case it goes wrong - I haven't tested it!!

In ste_exec search for page_titleimg, my first occurence is at this point:

Code:

foreach $row(@dynform) {

($dynform_id,$dynform_name,$dynform_email,$dynform_titleimg,$dynform_usetitleimg,$dynform_content) = @$row;

$page_id = "$dynform_id";
$page_name = "$dynform_name";
$page_content = "$dynform_content";
$page_titleimg = "$dynform_titleimg";
$page_usetitleimg = "$dynform_usetitleimg";
$page_storestatus = "N";

$form_matched = "Y";

} ######### End of foreach statement.

Basically this perl file goes through all the different types of pages and allocates the $page variables depending on the relevant database. Underneath the $page_storestatus line add:

Code:

$page_titleimgalt = $page_titleimg;
$page_titleimgalt =~ s/.gif//g;
$page_titleimgalt =~ s/_/ /g;

First of all a new variable of $page_titleimagalt is allocated the $page_titleimg value and then a search and replace removes the .gif extension, with the second one replacing '_' with a space. You need to carry on throughout the ste_exec.pl and find all occurances of $page_titleimg and add the same code.

Finally you can then change the alt tag to (CGIVAR)page_titleimgalt(/CGIVAR) and that should work! Note that this assumes all your title images end in .gif - let me know how you get on.

Mike


Offline

 

#6 12-31-2005 09:45:20

paulc
Member
From: Bristol, England
Registered: 12-15-2005
Posts: 18
Website

Re: Alt Image Tags For Title Images

Thanks for replying Mike, I will try this and let you know how I get on!

Paul :-) 


Paul C
- iPod, PS2, Xbox, Gamecube, PC, Mobile Accessories

Offline

 

#7 04-21-2006 02:52:17

paulc
Member
From: Bristol, England
Registered: 12-15-2005
Posts: 18
Website

Re: Alt Image Tags For Title Images

This Mod works a treat! I completed it in January, sorry I forgot to let you all know how I got on.

I tweaked it slightly to include all pages as follows.

Find the following code in the ste_exec.pl file

Code:

$page_id = "$dynform_id";
$page_name = "$dynform_name";
$page_content = "$dynform_content";
$page_titleimg = "$dynform_titleimg";
$page_usetitleimg = "$dynform_usetitleimg";
$page_storestatus = "N";

add this directly underneath

Code:

##########################################################################################
########ADDED TO GENERATE PAGE TITLE IMAGE ALT TEXT FROM IMAGE NAME#######################
##########################################################################################

$page_titleimgalt = $page_titleimg;
$page_titleimgalt =~ s/.gif//g;
$page_titleimgalt =~ s/_/ /g;

##########################################################################################
########END OF GENERATE PAGE TITLE IMAGE ALT TEXT FROM IMAGE NAME#######################
##########################################################################################

Then find the following code futher down in the ste_exec.pl file

Code:

$page_id = "$ssyspage_id";
$page_name = "$ssyspage_name";
$page_content = "$ssyspage_content";
$page_titleimg = "$ssyspage_titleimg";
$page_usetitleimg = "$ssyspage_usetitleimg";
$page_storestatus = "$syspage_storestatus";

add this directly underneath

Code:

##########################################################################################
########ADDED TO GENERATE PAGE TITLE IMAGE ALT TEXT FROM IMAGE NAME#######################
##########################################################################################

$page_titleimgalt = $page_titleimg;
$page_titleimgalt =~ s/.gif//g;
$page_titleimgalt =~ s/_/ /g;

##########################################################################################
########END OF GENERATE PAGE TITLE IMAGE ALT TEXT FROM IMAGE NAME#######################
##########################################################################################

now you can rename your page title images as follows.

Original names like this:

title_splash.gif
title_contact.gif
title_privacy.gif
title_feedback.gif

shoud be renamed as:

Welcome_to_Our_Store.gif
Contact_Us.gif
Privacy_Policy.gif
Customer_Feedback.gif

Etc. Etc.

You can view how this looks if you visit my site (link below)

After tweaking all of my alt image tags for SEO I had trouble locating where to find the alt tags for the title images which this mod sorts out! I now have all of my site alt tags filled ("" for cosmetic images).

That combined with the ATS SEO Mod have greatly improved my ranking, and I now have a google pagerank of 3 after only 5 months of operation with only my first 50 products of 1400. (testing the water)
My next job is to go through and add the title tag for netscape users!!

Many thanks to MikeyT for his input on this one.


Paul C
- iPod, PS2, Xbox, Gamecube, PC, Mobile Accessories

Offline

 

Board footer