Integration in website ... Integration in website ...
 

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]

Main Menu

Integration in website ...

Started by The Platinum, August 27, 2004, 11:25:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

The Platinum

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:
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.:
<!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

Joachim Müller

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

The Platinum

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

<!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

Joachim Müller

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:<!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

The Platinum

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

Joachim Müller

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

Joachim

The Platinum

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

// 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

Joachim Müller

Try this (not tested)// 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

The Platinum

 :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