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: Can't see HTML codes  (Read 3609 times)

0 Members and 1 Guest are viewing this topic.

wfs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
Can't see HTML codes
« on: July 02, 2006, 03:03:01 pm »

I wish to customize my index page, eg. following the FAQ advice:

How can I add some output directly before the line "Powered by Coppermine"?
Edit /themes/yourtheme/theme.php, look for echo $template_footer and add the stuff you want to output in a line before it, like print '<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>';


But I can't find the HTML codes in this page when I open it with dreamweaver.

How do I get  to see the code?  Is this the way to amend the codes of a page?

Pse advise.

thanks.
« Last Edit: July 04, 2006, 08:14:58 am by GauGau »
Logged

Nibbler

  • Guest
Re: Can't see HTML codes
« Reply #1 on: July 02, 2006, 03:16:27 pm »

Don't use dreamweaver. Use a simple editor such as notepad.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Can't see HTML codes
« Reply #2 on: July 02, 2006, 04:34:21 pm »

if you don't have "function pagefooter()" on your theme.php then copy this:
Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    $custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

    $template_vars = array(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );
    $template_footer=$template_footer.'<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>'; //Mod for custom MYlink
    echo template_eval($template_footer, $template_vars);
}
to your theme.php and change the line with "//Mod for custom MYlink" comment (I add your span ...)
« Last Edit: July 02, 2006, 04:40:21 pm by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

wfs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
Re: Can't see HTML codes
« Reply #3 on: July 03, 2006, 08:54:30 am »

I'm not familiar with PHP. I just want to make sure.
Pse check whether I've done it correctly:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.8
  $Source$
  $Revision: 3116 $
  $Author: gaugau $
  $Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// Function for writing a pagefooter
function pagefooter()
{
    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    $custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

    $template_vars = array(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );
    $template_footer=$template_footer.'<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>'; //Mod for custom MYlink
    echo template_eval($template_footer, $template_vars);
}




?>


Pse advise - and do I just save as theme.php ?

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Can't see HTML codes
« Reply #4 on: July 03, 2006, 09:01:15 am »

yes, but first you need to change the url and title of your link
Logged
‍I don't answer to PM with support question
Please post your issue to related board

wfs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
Re: Can't see HTML codes
« Reply #5 on: July 03, 2006, 09:25:21 am »

thank you so much !!  :-*
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 15 queries.