coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: copperminepro on February 24, 2008, 01:01:15 PM

Title: Improved page titles - thumbnails.php and displayimage.php
Post by: copperminepro on February 24, 2008, 01:01:15 PM
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
Title: Re: Improved page titles - thumbnails.php and displayimage.php
Post by: Joachim Müller on February 24, 2008, 08:37:04 PM
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?
Title: Re: Improved page titles - thumbnails.php and displayimage.php
Post by: copperminepro on February 24, 2008, 09:39:51 PM
 :o :o

fixed
Title: Re: Improved page titles - thumbnails.php and displayimage.php
Post by: Nibbler on February 24, 2008, 09:41:51 PM
Try again. :)
Title: Re: Improved page titles - thumbnails.php and displayimage.php
Post by: copperminepro on February 24, 2008, 10:04:12 PM
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