forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: The Platinum on August 27, 2004, 11:25:44 pm

Title: Integration in website ...
Post by: The Platinum 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
Title: Re: Integration in website ...
Post by: Joachim Müller 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
Title: Re: Integration in website ...
Post by: The Platinum 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
Title: Re: Integration in website ...
Post by: Joachim Müller 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
Title: Re: Integration in website ...
Post by: The Platinum 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
Title: Re: Integration in website ...
Post by: Joachim Müller 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
Title: Re: Integration in website ...
Post by: The Platinum 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
Title: Re: Integration in website ...
Post by: Joachim Müller 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
Title: Re: Integration in website ...
Post by: The Platinum 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