Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Alt tag from labels.txt

  • Maria Minopoli
  • Maria Minopoli's Avatar Topic Author
  • Offline
  • New Member
More
15 years 10 months ago - 15 years 10 months ago #21015 by Maria Minopoli
Alt tag from labels.txt was created by Maria Minopoli
In order to do a SEO I have the alt tag for each thumb reading the label in the labels.txt file in this way:

if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
   $clickopen=$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])];
}else{
   // show file name
   $clickopen=$images[$a];
}

before the use of the variable $clickopen ... <img alt="'.$clickopen.' (line 345)

do you have a different way? (maybe more simple)

Thanks alessandro

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #21016 by agitatator
Replied by agitatator on topic Re: Alt tag from labels.txt
Can you describe your method in more detail. In what file you make changes? Only one line or more? Thank you for useful post.!

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #21017 by agitatator
Replied by agitatator on topic Re: Alt tag from labels.txt
Actually what we need is to have the same text in Alt tag and in Caption. So in Caption you insert text by using labels.txt . The question is how to make Alt tag the same as caption?

Please Log in or Create an account to join the conversation.

  • Maria Minopoli
  • Maria Minopoli's Avatar Topic Author
  • Offline
  • New Member
More
15 years 10 months ago #21018 by Maria Minopoli
Replied by Maria Minopoli on topic Re: Alt tag from labels.txt
Hi
the file to modify is: jwsigpro.php

I just add this code:

if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
$clickopen=$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])];
}else{

$clickopen=$images[$a];
}

before the use of the variable $clickopen ... <img alt="'.$clickopen.' (line 665)

in this way you set a different value to variabile  $clickopen.
without this modify the value of $clickopen is 'Click to open image!'

bye alessandro

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #21019 by jethrodesign
Replied by jethrodesign on topic Re: Alt tag from labels.txt
This looks promising. Do you have an example yet that folks can see?

So all Alt tags for images will now have the descriptions you set for each specific image in the labels.txt file for each folder, correct?

- What would happen if there were either - a) no description for a particular image in the labels.txt file; or b) no labels.txt file at all for a particular gallery?

- And, if you didn't want to create individual descriptions for a certain gallery, would there be a quick & easy way to set a global description for an entire gallery?

Thanks again for the creative solution. Hopefully it can get incorporated into the regular release.

Please Log in or Create an account to join the conversation.

  • Maria Minopoli
  • Maria Minopoli's Avatar Topic Author
  • Offline
  • New Member
More
15 years 10 months ago #21020 by Maria Minopoli
Replied by Maria Minopoli on topic Re: Alt tag from labels.txt
Yes

the example is in www.castelcicala.com/it/comfortable-suite
the labels.txt for the first group of images is:

alogo.jpg|donna taddea
bagno-con-jacuzzi.jpg|cosy bathroom with jacuzzi
bagno.jpg|bathroom with Jacuzzi and shower
...

and it works in all the situations:

So all Alt tags for images will now have the descriptions you set for each specific image in the labels.txt file for each folder, correct?

YES

- What would happen if there were either - a) no description for a particular image in the labels.txt file;


in this cas we have alt=""

or b) no labels.txt file at all for a particular gallery?


In this case the alt tag is the file name, it depends from the else case in the code of the modify

- And, if you didn't want to create individual descriptions for a certain gallery, would there be a quick & easy way to set a global description for an entire gallery?


yes it is simple... in this way $clickopen=$itemtitle;


Bye...very nice plugin

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum