Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Changing page titles  (Read 3710 times)

0 Members and 1 Guest are viewing this topic.

pcbill

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Changing page titles
« on: May 12, 2007, 02:43:18 pm »

In the template.html the page title (for the browser) is built by the {TITLE} tag. I am looking to find where this is defined in hopes of changing the information that gets displayed.

As an example I would like to have the gallery description displayed on all pages after the gallery name. Adding it all to the gallery name in the configuration page will work but it screws up the graphics in the banner.

When an image is displayed the title & filename are displayed (ex: cat/2007_2780). I would like to keep the file name from being displayed.

Thanks,

Bill
« Last Edit: May 12, 2007, 04:38:58 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Changing page titles
« Reply #1 on: May 12, 2007, 02:47:05 pm »

Copy the pageheader() function from the sample theme into your custom theme.php and modify as you see fit. The {TITLE} tag is handled here

Code: [Select]
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
The filename is only displayed in the absence of a title, see displayimage.php

Code: [Select]
$picture_title = $CURRENT_PIC_DATA['title'] ? $CURRENT_PIC_DATA['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($CURRENT_PIC_DATA['filename'])), "_", " ");
...
pageheader($album_name . '/' . $picture_title, $meta_keywords, false);
Logged

pcbill

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Changing page titles
« Reply #2 on: May 12, 2007, 03:45:27 pm »

I am sure this is really basic :-[, I’ve added the pageheader() function to my theme and it works until I try and add the gallery description after the gallery name in the line:

Code: [Select]
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
I’ve tried it a many different ways and either get a parse error or it displays only the first letter of the gallery name then continues at the “-“ as normal.

Thanks,

Bill
Logged

Nibbler

  • Guest
Re: Changing page titles
« Reply #3 on: May 12, 2007, 04:18:04 pm »

Code: [Select]
'{TITLE}' => $CONFIG['gallery_name'] . ' ' . $CONFIG['gallery_description'] . ' - ' . strip_tags(bb_decode($section)),
Logged

pcbill

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Changing page titles
« Reply #4 on: May 12, 2007, 04:25:52 pm »

Thanks I was not putting in the second $CONFIG

Bill
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 15 queries.