forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pea32ant on March 06, 2006, 10:38:29 am
-
How to add automatically each image title to be in <IMAGE ALT=TITLE> attribute?
-
from themes/sample/theme.php copy to the theme.php your using the function theme_html_picture()
find tin that function
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";and replace with
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']} {$CURRENT_PIC_DATA['title']}\" /><br />";
-
thank you very much for very fast reply!!! but I modified output code to:
$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?....
-
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
-
SOLVED
$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?
-
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
-
i am not php programmer,
can you help me in this?....
-
SOLVED
$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['caption']}\" >";
Thanks, STRAMM for support!
-
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/
-
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!
-
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
-
Thank you for the clear explanation!
-
from themes/sample/theme.php copy to the theme.php your using the function theme_html_picture()
find tin that function
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";and replace with
$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?
-
How is your question related to the topic discussed in this thread?
-
How is your question related to the topic discussed in this thread?
as this do? help please
-
as this do? help please
Alt="?????" - rubric as on my picture
-
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.
-
Sorry to bump this old thread but the ALT mod is still necessary?
It seems to be already in place in last version.