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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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