Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Gallery and SEO - ALT for images  (Read 18521 times)

0 Members and 1 Guest are viewing this topic.

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Gallery and SEO - ALT for images
« on: March 06, 2006, 10:38:29 am »

How to add automatically each image title to be in <IMAGE ALT=TITLE> attribute?
« Last Edit: March 07, 2006, 08:41:51 am by GauGau »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Gallery and SEO - ALT for images
« Reply #1 on: March 06, 2006, 11:27:53 am »

from themes/sample/theme.php copy to the theme.php your using the function theme_html_picture()

find tin that function
Code: [Select]
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";and replace with
Code: [Select]
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']} {$CURRENT_PIC_DATA['title']}\" /><br />";

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #2 on: March 06, 2006, 11:11:23 pm »

thank you very much for very fast reply!!!    but I modified output code to:
Code: [Select]
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\" {$CURRENT_PIC_DATA['title']} \n {$CURRENT_PIC_DATA['caption']}\" /><br />";
and another question:
how to do the same on each thumbnails?....
Logged

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #3 on: March 06, 2006, 11:19:51 pm »

Hmmm, I'm sitting and testing...

sorry, but this works only on photos that have full size  (intermediate photos)
how to make it on all photos including thumbnails?

--
gallery version 1.44
Logged

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #4 on: March 06, 2006, 11:36:02 pm »

SOLVED

Code: [Select]
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\" {$CURRENT_PIC_DATA['title']} \n {$CURRENT_PIC_DATA['caption']}\" />";
            $pic_html .= "</a>\n";
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\" {$CURRENT_PIC_DATA['title']} \n {$CURRENT_PIC_DATA['caption']}\">\n";

this code works for both - intermediate photos + photos without intermediate sizes

But still thinking
HOW to make it on each thumbnails?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Gallery and SEO - ALT for images
« Reply #5 on: March 07, 2006, 09:40:55 am »

there's no save solution for that. You'll have to modify a core file include/functions.inc.php

find function display_thumbnails and modify $thumb_list[$i]['image'] to your likings

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #6 on: March 07, 2006, 02:48:32 pm »

i am not php programmer,
can you help me in this?....
Logged

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #7 on: March 07, 2006, 11:39:16 pm »

SOLVED

Code: [Select]
$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['caption']}\" >";
Thanks, STRAMM for support!
Logged

pea32ant

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • my town photogallery
Re: Gallery and SEO - ALT for images
« Reply #8 on: March 14, 2006, 10:48:18 am »

On first page, there are no ALT tags for thumbnails on albums.... (filename)

Can you help me in this?...

example: http://www.kotlin.ru/gallery/
« Last Edit: March 15, 2006, 08:54:13 am by pea32ant »
Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Gallery and SEO - ALT for images
« Reply #9 on: October 03, 2006, 07:09:41 pm »

Sorry for what may seem like a stupid question...

I'm using Hardwired (1.4.9)

I have gone to themes/sample/theme.php and found "function theme_html_picture()"

I see all the code. In looking at the themes/hardwired/theme.php file:

1) Where would one put the "function theme_html_picture()" code?
2) Why is this function not in the Hardwired theme.php file?

I'm trying to understand the programming logic so I don't ask stupid questions again.

I did make the other tweak in this thread to the thumbnails and that worked great.

@pea32ant Did you make your change in the two spots in include/functions.inc.php that call the thumbs?

I'd love to add alt tags to the cat thumbs too. Still poking around the code trying to find that.

Thanks!
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Gallery and SEO - ALT for images
« Reply #10 on: October 03, 2006, 09:40:36 pm »

gallery use a global theme file (theme.inc.php) , all functions are define on that file, by adding that function (with the same name) to your theme , you will overwrite to global setting
you can add function before ?> ( php end ) tag
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Gallery and SEO - ALT for images
« Reply #11 on: October 03, 2006, 09:56:46 pm »

Thank you for the clear explanation!
Logged

RedPage

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Doping
    • Ýñêèçû òàòóèðîâîê.
Re: Gallery and SEO - ALT for images
« Reply #12 on: December 28, 2007, 11:37:47 am »

from themes/sample/theme.php copy to the theme.php your using the function theme_html_picture()

find tin that function
Code: [Select]
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";and replace with
Code: [Select]
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']} {$CURRENT_PIC_DATA['title']}\" /><br />";

Help

[Edit GauGau] Replaced hotlinked image with attachment [/Edit]
How to add description, precisely, there where is written to red?
« Last Edit: December 28, 2007, 11:42:17 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery and SEO - ALT for images
« Reply #13 on: December 28, 2007, 11:42:45 am »

How is your question related to the topic discussed in this thread?
Logged

RedPage

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Doping
    • Ýñêèçû òàòóèðîâîê.
Re: Gallery and SEO - ALT for images
« Reply #14 on: December 28, 2007, 12:02:15 pm »

How is your question related to the topic discussed in this thread?

as this do? help please
Logged

RedPage

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Doping
    • Ýñêèçû òàòóèðîâîê.
Re: Gallery and SEO - ALT for images
« Reply #15 on: December 28, 2007, 12:04:58 pm »

as this do? help please

Alt="?????" - rubric as on my picture
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery and SEO - ALT for images
« Reply #16 on: December 28, 2007, 01:18:06 pm »

I don't understand your question in the first place. Instead of hijacking this thread, start a new thread and explain (using more words) what your actual question is or what you want to accomplish. Posting a link to your gallery in that new thread might help as well.
Logged

TigerClaw

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Gallery and SEO - ALT for images
« Reply #17 on: January 28, 2008, 02:31:01 am »

Sorry to bump this old thread but the ALT mod is still necessary?
It seems to be already in place in last version.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.