I found a more simple, faster solution, I will write the steps in case someone will want to change its page title.
in top of header.html change the html title tag to:
<title>{page_title}</title>
Now we will need to set a default value for that template id, then in each new type of page (photo details, categories, upload page, etc) you will be able to set new page title scheme.
To set a default value for page title open page_header.php and type this at the end of file
//-----------------------------------------------------
//--- set a default page title ------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"page_title" => $config['site_name']
));
Now on all pages on site title will be your site name read from settings unless you specify different for each type of page:
To have a custom title in other page type (categories, details, upload page, etc) you need to give a value to that template variable {page_title} after it says
//--- Print Out --. For example: open categories.php and locate
//--- Print Out --, add a value for {page_title} there so it looks like this:
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"page_title" => 'Photos of '.format_text($cat_cache[$cat_id]['cat_name'], 2)
));
On my site the above will set a title like
'Photos of Porsche', 'Porsche' being the title of current category.
To have the name of the photo in page title when vieving a photo: open details.php and after it says
//--- Print Out -- add a value for {page_title} there (last line) so it looks like this:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"lang_category" => $lang['category'],
"lang_added_by" => $lang['added_by'],
"lang_description" => $lang['description'],
"lang_keywords" => $lang['keywords'],
"lang_date" => $lang['date'],
"lang_hits" => $lang['hits'],
"lang_downloads" => $lang['downloads'],
"lang_rating" => $lang['rating'],
"lang_votes" => $lang['votes'],
"lang_author" => $lang['author'],
"lang_comment" => $lang['comment'],
"lang_prev_image" => $lang['prev_image'],
"lang_next_image" => $lang['next_image'],
"lang_file_size" => $lang['file_size'],
"page_title" => $image_name
));
That will set image name as page title.
It looks simpler than the other long solution I saw but maybe someone can verify what I wrote, it works very well for my site