No, i use only my new field!
Is it possible that the downloads are counted again?
What have I done:
I put in (db_field_definitions.php)
$additional_image_fields['image_direktlink'] = array($lang['image_direktlink'], "text", 1);
I put in (lang/LNG/main.php)
$lang['image_direktlink'] = "Direktlink";
Then in my phpmyadmin put this:
ALTER TABLE `4images_images` ADD `image_direktlink` VARCHAR( 255 ) NOT NULL;
in includes/functions.php find:
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
Replace it with:
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;
and below
$additional_field_array[$key."_nourl"] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;
In details.html i have add
<a href="{image_direktlink_nourl}"><img src="{template_url}/images/download.gif" width="98" height="28" /></a>
This work perfektly....
But the download counter does not work!
I have found this in includes/function.php
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
Im replace with
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."{image_direktlink_nourl}".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
dont work
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."image_direktlink_nourl".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
dont work
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."".image_direktlink_nourl."".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
Please help!