4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: k1lljoy on November 11, 2009, 12:07:21 AM
-
Hi! :)
Is it possible to put the name of the caregory the image was uploaded to - into the ALT filed of that image, together with the name of that image?
Just adding {cat_name} beside the existing {image_name} in media templates (templates/media/jpg.html) doesn't make anything - the category name doesn't appear in the ALT-field :oops:
Help please :roll:
-
{cat_name} should work...
-
I have followed on my site the first 2 points of this tip: http://www.4homepages.de/forum/index.php?topic=25442.msg139561#msg139561
Just replace "{image_description}" with "{cat_name}" and change the "jpg.html" as you want.
-
Hagen-Roderich - thanx, that worked for my thumbs all right, bt still problems with the images themselves :(
V@no - I also thought it should work, but... :|
Well, in my /templates/default/media/jpg.html
I put the following:
<img src="{media_src}" border="1" alt="{cat_name} - {image_name}"{width_height} />
But I get just " - image name" Alt now.
But I`ve noticed, that if I change the sequense of code snippets here:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $image_row['cat_name'], $mode, $show_link, $detailed_view),
(in includes/functions.php)
lke that:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['cat_name'], $image_row['image_name'], $mode, $show_link, $detailed_view),
then I get just category name in my ALT :D
for example: "category name - " , that is without the name of the image already...
Is it possible to have both of them ? :roll:
ADDED: solved! :)
Just needed to add "cat_name" => $cat_name,
to the: $site_template->register_vars(array(
list :o
-
Полностью разделяю Ваше мнение. В этом что-то есть и мне нравится Ваша идея. Предлагаю вынести на общее обсуждение.