Improved page titles - thumbnails.php and displayimage.php Improved page titles - thumbnails.php and displayimage.php
 

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]

Main Menu

Improved page titles - thumbnails.php and displayimage.php

Started by copperminepro, February 24, 2008, 01:01:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

copperminepro

Both pages named above have very horrible page titles. You can correct these titles to be a little more SEO friendly:

Could a mod please move this to Modifications / Searching?

For displayimage.php, we are going to change pictures titles to display better. By default, they appear as Album Name/Picture Title - Your Gallery. This will make the title: Picture Title / Album Name - Your Gallery

Find in displayimage.php
pageheader($album_name . '/' . $picture_title, $meta_keywords, false);

Replace with:
pageheader($picture_title . ' / ' . $album_name, $meta_keywords, false);


I have no idea why I have gone so long without noticing this, but on thumbnails.php the title appears as: Album Name - Your Gallery... Regardless of what page you are viewing. The code change below will change the title ONLY on pages beyond the first page.. For example, on page 10, your title would appear as Album Name - Page 10 - Your Gallery... The first page is left unaffected

Open thumbnails.php and find:
pageheader(isset($CURRENT_ALBUM_DATA) ? $CURRENT_ALBUM_DATA['title'] : $lang_meta_album_names[$album]);

Replace With:
if ($page != '1') {
pageheader(isset($CURRENT_ALBUM_DATA) ? $CURRENT_ALBUM_DATA['title'] . ' - Page ' . $page: $lang_meta_album_names[$album]);
} else {
pageheader(isset($CURRENT_ALBUM_DATA) ? $CURRENT_ALBUM_DATA['title'] : $lang_meta_album_names[$album]);
}


I tried searching and couldn't find this being discussed. I promised with previous projects that I would post all of my modifications I made a long the way but never did.. So I'm trying to make up for that with coppermine :-P

Joachim Müller

Quote from: copperminepro on February 24, 2008, 01:01:15 PM
Find in displayimage.php
pageheader($picture_title . ' / ' . $album_name, $meta_keywords, false);

Replace with:
pageheader($picture_title . ' / ' . $album_name, $meta_keywords, false);
In which aspect do those lines differ?

copperminepro

#2
 :o :o

fixed


copperminepro

fixed

:o :o :o

lol im going to start posting only in the middle of the day, not when i wake up or am going to bed