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: Integration in website ...  (Read 4174 times)

0 Members and 1 Guest are viewing this topic.

The Platinum

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Integration in website ...
« on: August 27, 2004, 11:25:44 pm »

Hello,
first a great thanks for your great work !!!

I read the description how to insert the gallery in a common webdesign. But I have some problems with it - you can see it here:
http://marcusk.freeserverhost.net/cpg123/

The gallery isn´t in the website but under the design.
The theme.php:
Code: [Select]
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

  if(empty($custom_header)){
      include('/home/www/marcusk.freeserverhost.net/cpg123/themes/water_drop/header.php');
      $custom_header = ob_get_contents();
      ob_clean();
   }
// Create Custom Footer

  if(empty($custom_footer)){
include('/home/www/marcusk.freeserverhost.net/cpg123/themes/water_drop/footer.html');
$custom_footer = ob_get_contents();
ob_clean();
   }

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
        '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{MAIN_MENU}' => theme_main_menu(),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
  '{CUSTOM_FOOTER}' => $custom_footer,
        );

    echo template_eval($template_header, $template_vars);
}

The template.html.:
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
{CUSTOM_HEADER}
{CUSTOM_FOOTER}
<link rel="stylesheet" href="themes/water_drop/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.4 2004/07/24 15:04:23 gaugau Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid #ccd7e0; background-color: #fff;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td width="100%" align="center">
          <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}<br />
                                        {LANGUAGE_SELECT_FLAGS}<br>{LANGUAGE_SELECT_LIST}&nbsp;
                                        {THEME_SELECT_LIST}
                                </td>
                        </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
</td>
                        </tr>
                </table>

        </td>
</tr>
</table>
</body>
</html>

Hope that the codes are helpful!!!
Thanks !!

The Platinum
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Integration in website ...
« Reply #1 on: August 28, 2004, 05:16:55 am »

what exactly do you want changed? The only issue I can see is improper insertion of the custom tags, concerning the position of the tags {CUSTOM_HEADER} and {CUSTOM_FOOTER} in your template. Usually the output should go into the <body> tag.

Joachim
Logged

The Platinum

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Integration in website ...
« Reply #2 on: August 28, 2004, 02:31:13 pm »

Sorry that´s what I want ! I changed the template.html to:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
{CUSTOM_HEADER}
<link rel="stylesheet" href="themes/water_drop/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.4 2004/07/24 15:04:23 gaugau Exp $
-->
</head>
<body>
<table width="90%" height="100%" border="0" cellpadding="20" cellspacing="20">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid #ccd7e0; background-color: #fff;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td width="100%" align="center">
          <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}<br />
                                        {LANGUAGE_SELECT_FLAGS}<br>{LANGUAGE_SELECT_LIST}&nbsp;
                                        {THEME_SELECT_LIST}
                                </td>
                        </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
</td>
                        </tr>
                </table>

        </td>
</tr>
</table>
{CUSTOM_FOOTER}
</body>
</html>


But now it´s inserted and the footer isn´t to see. What´s my mistake ?

And then I have a other question. It´s possible to use 2 css files because I already use one for the website design and the css of the gallery is "overwritten" in this case.

The Platinum
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Integration in website ...
« Reply #3 on: August 28, 2004, 02:55:24 pm »

you can't add the custom footer function to "function pageheader" in theme.php (that's why it's labelled "pageheader"), you will of course have to add it to the pagefooter function.
Your template file should look like this:
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/water_drop/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.4 2004/07/24 15:04:23 gaugau Exp $
-->
</head>
<body>
{CUSTOM_HEADER}
<table width="90%" height="100%" border="0" cellpadding="20" cellspacing="20">
<tr>
        <td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid #ccd7e0; background-color: #fff;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                                <td width="100%" align="center">
          <h1>{GAL_NAME}</h1>
                                        <h3>{GAL_DESCRIPTION}</h3><br />
                                        {MAIN_MENU}<br />
                                        {LANGUAGE_SELECT_FLAGS}<br>{LANGUAGE_SELECT_LIST}&nbsp;
                                        {THEME_SELECT_LIST}
                                </td>
                        </tr>
                </table>
                <img src="images/spacer.gif" width="1" height="15" /><br />
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
</td>
                        </tr>
                </table>

        </td>
</tr>
</table>
{CUSTOM_FOOTER}
</body>
</html>
note the position of the {CUSTOM_HEADER} tag.

Joachim
Logged

The Platinum

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Integration in website ...
« Reply #4 on: August 29, 2004, 02:06:09 pm »

Thanks for your answer !

I changed the template.html and the design is now shown like the .css file it´s configured. But the Footer isn´t displayed!

Here you can see it : http://marcusk.freeserverhost.net/cpg123/

The Platinum
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Integration in website ...
« Reply #5 on: August 29, 2004, 02:49:59 pm »

like I said: modify the pagefooter funtion as well. Post your modifiation here if you're unsure.

Joachim
Logged

The Platinum

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Integration in website ...
« Reply #6 on: August 29, 2004, 05:38:41 pm »

Soryy first I don´t know what you mean:
This is pagefooter funktion in my theme.php:

Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
    global $template_footer;

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

    echo $template_footer;
}


Until this time I changed nothing ! I think that´s what you mean !!

The Platinum
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Integration in website ...
« Reply #7 on: August 29, 2004, 10:06:20 pm »

Try this (not tested)
Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
    global $template_footer;

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

// Create Custom Footer

  if(empty($custom_footer)){
include('/home/www/marcusk.freeserverhost.net/cpg123/themes/water_drop/footer.html');
  }


    echo $template_footer;
}


Joachim
Logged

The Platinum

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Integration in website ...
« Reply #8 on: August 30, 2004, 12:04:07 am »

 :D Thanks...
but now the footer is inserted and the Custom-Footer with Powered by ... is under the oiginal footer of the website. Also the right collum isn´t closed and she is ending on the header of the gallery !

Do you have other tip´s !?

Besides this ... thanks for your fast support !!!!

The Platinum
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.