[Solved]: Insert website-header into gallery [Solved]: Insert website-header into gallery
 

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

[Solved]: Insert website-header into gallery

Started by hama, May 16, 2004, 10:35:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hama

I installed your Gallery and it's running now on my website. The only problem is to include the header of my website into the gallery.

Maybe someone has energy and time to help me a little bit.

My website --> http://os.dorfschule.ch/

Gallery --> http://www.dorfschule.ch/copper/index.php

This is a part of theme.php (gallery). By function pageheader I have to build in something but how.




function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;

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(),
);

echo template_eval($template_header, $template_vars);
}




This is the header of my website:




<div id="siteHead">
<div id="siteLogo">
<h1><a href="http://os.dorfschule.ch/index">Oberstufe Engelberg</a></h1>
</div>
<div id="siteNav">
<a href="http://os.dorfschule.ch/index"><span>Home</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/"><span>Forum</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gallery/category.php"><span>Gallery</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/quizzermania/index.php" ><span>Quiz</span></a><span class="hidden"> | </span>
<a href="http://www.google.ch" target="_blank"><span>Google</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/links"><span>Links</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/board.php?id=13"><span>News</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/chat/index.php" target="_blank"><span>Chat</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gaestebuch/gaestebuch.php"><span>Gästebuch</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/feedback"><span>Feedback</span></a>
</div>
</div>




And then I have to do something in template.html, a new field {CUSTOM_HEADER} but how?

template.html (gallery):



<!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/default/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.5 2004/03/21 20:06:23 gaugau Exp $
-->
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#CCCCCC">
<tr>
<td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php"><img src="themes/default/images/site_logo.png" alt="" border="0" /><br /></a></td>
<td width="100%" align="center">
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3><br />
{MAIN_MENU}
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{LANGUAGE_SELECT_FLAGS}</td>
<td>{LANGUAGE_SELECT_LIST}</td>
<td>{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>




Thanks for your help!


Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

Joachim Müller

I'm not sure what your question actually is; I guess you just want to insert your navigation to each coppermine page. Since it is plain html you want to add, just edit template.html and put the chunk of html code into it and you're done, 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/default/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.5 2004/03/21 20:06:23 gaugau Exp $
-->
</head>
<body>
<div id="siteHead">
<div id="siteLogo">
<h1><a href="http://os.dorfschule.ch/index">Oberstufe Engelberg</a></h1>
</div>
<div id="siteNav">
<a href="http://os.dorfschule.ch/index"><span>Home</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/"><span>Forum</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gallery/category.php"><span>Gallery</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/quizzermania/index.php" ><span>Quiz</span></a><span class="hidden"> | </span>
<a href="http://www.google.ch" target="_blank"><span>Google</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/links"><span>Links</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/board.php?id=13"><span>News</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/chat/index.php" target="_blank"><span>Chat</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gaestebuch/gaestebuch.php"><span>Gästebuch</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/feedback"><span>Feedback</span></a>
</div>
</div>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#CCCCCC">
<tr>
<td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php"><img src="themes/default/images/site_logo.png" alt="" border="0" /><br /></a></td>
<td width="100%" align="center">
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3><br />
{MAIN_MENU}
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{LANGUAGE_SELECT_FLAGS}</td>
<td>{LANGUAGE_SELECT_LIST}</td>
<td>{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>


GauGau

P.S. You seem to be installing cpg1.3.0 (which is still in beta state and doesn't come with support yet) - this is only recommended for experienced users...

hama


Quote- this is only recommended for experienced users...

I know I don't belong to that group but anyway thank you a lot for the answer.

Do you know that you are programming a very great gallery-script?

At the moment another gallery is running on my website. By chance I found your script and I knew immediately that I have to change.

Have a good time
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

hama


The title and the menu are built in now in the way you explained but I miss the graphics in the header. In which folder do I have to copy them and how want they to be linked?

http://dorfschule.ch/copper/index.php

http://os.dorfschule.ch/

::)
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

Joachim Müller

come on, this is basic html stuff. Keep the graphics where they currently are, just add the html, 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}
   <style type="text/css">
   @import url(http://os.dorfschule.ch/site.php?template=css_default&type=text/css);

     body {
       color:black;
     }
     body,table,input {
       font-family:arial,sans-serif;
       font-size:12px;
     }
     .imgLink {
       border:1px solid black;
     }
     .titrePage,.titreMenu,.menu,.info {
       color:black;
     }
     .titreMenu,.menu,.info {
       margin-bottom:5px;
       white-space:nowrap;
     }
     .menu,.titrePage,.info {
       margin-left:2px;
       margin-right:2px;
     }
     .menuInfoCat {
       font-family:sans-serif;
       font-size:11px;
     }
     .totalImages {
       text-align:center;
       margin-top:5px;
       font-family:sans-serif;
       font-size:11px;
     }
     .titreMenu {
       font-weight:600;
       text-align:center;
     }
     .info {
       text-align:right;
     }
     .titrePage {
       white-space:nowrap;
       font-weight:500;
       font-size:18px;
       text-align:center;
     }
     .comments,.infoCat,.navigationBar {
       margin-top:10px;
       margin-bottom:10px;
     }
     .comments {
       text-align:justify;
       font-style:italic;
     }
     .navigationBar {
       text-align:center;
     }
     .infoCat {
       text-align:left;
     }
     .thumbnail {
       font-size:11px;
       text-align:center;
     }
     .copyright {
       font-size:11px;
       text-align:center;
       font-family:sans-serif;
       letter-spacing:0.3mm;
     }
     .commentImage {
       font-weight:bold;
       text-align:center;
       font-size:17px;
     }
     .bouton {
       background:#EEEEEE;
     }
     input {
       border-width:1;
       border-color:#000000;
       background:#ffffff;
       color: #000000;
     }
     body {
       background-image:url(./template/myTemplate/theme/background.gif);
     }
     table {
       border-collapse:collapse;
     }
     table.thumbnail {
       border-collapse:separate;
     }
     td {
       font-family:sans-serif;
       padding:0;
     }
     .errors {
       text-align:left;
       margin-top:5px;
       margin-bottom:5px;
       background-color:red;
       font-weight:bold;
       border:1px solid black;
       color:white;
     }
     div.information {
       text-align:center;
       border:2px solid black;
       margin:10px;padding:5px;
     }
    #siteNav {
       font-family: verdana, arial, helvetica, sans-serif;
       font-weight: normal;
       height: 16px;
       margin: 0px 10px 0px 10px;
       font-size: 13px;

     }
   </style>
<link rel="stylesheet" href="themes/default/style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<div id="siteHead">
<div id="siteLogo">
<h1><a href="http://os.dorfschule.ch/index">Oberstufe Engelberg</a></h1>
</div>
<div id="siteNav">
<a href="http://os.dorfschule.ch/index"><span>Home</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/"><span>Forum</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gallery/category.php"><span>Gallery</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/quizzermania/index.php" ><span>Quiz</span></a><span class="hidden"> | </span>
<a href="http://www.google.ch" target="_blank"><span>Google</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/links"><span>Links</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/phpmyforum/board.php?id=13"><span>News</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/chat/index.php" target="_blank"><span>Chat</span></a><span class="hidden"> | </span>
<a href="http://www.dorfschule.ch/gaestebuch/gaestebuch.php"><span>Gästebuch</span></a><span class="hidden"> | </span>
<a href="http://os.dorfschule.ch/feedback"><span>Feedback</span></a>
</div>
</div>
<table width="100%" height="100%" border="0" cellpadding="20" cellspacing="20" bgcolor="#CCCCCC">
<tr>
<td valign="top" bordercolor="#666666" bgcolor="#FFFFFF" style="border: 1px solid;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php"><img src="themes/default/images/site_logo.png" alt="" border="0" /><br /></a></td>
<td width="100%" align="center">
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3><br />
{MAIN_MENU}
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{LANGUAGE_SELECT_FLAGS}</td>
<td>{LANGUAGE_SELECT_LIST}</td>
<td>{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>

Let me repeat: this is basic html/css and not related to coppermine at all.

GauGau

hama


I know  :-[

Please keep patience with a poor swiss teacher. He just tries to make a good website for the kids.

Thanks a lot, the header is running now (except the Coppermine links :Album List:, :Login: and so on. These links should be centered. I know the command [ALIGN=center]...[/ALIGN] but where to put in, that's the question.

Have a good time
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

Joachim Müller

edit themes/yourtheme/style.css and find.topmenu {
       line-height : 130%;
       font-size: 100%;
}
Change it to.topmenu {
       line-height : 130%;
       font-size: 100%;
       text-align : center;
}
Again, no php at all, but simple CSS.
Please understand that I have already been very patient with you; I won't answer any more questions that deal with plain html/CSS/JavaScript.
Also, you're supposed to ask only one question per thread (you mustn't "hijack" threads, not even the ones you started). This way, live gets easier for supporters and (most important) it gets easier for other users who may be browsing the board for answers by subject.

GauGau

hama

Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!