Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Custom, custom header  (Read 5002 times)

0 Members and 1 Guest are viewing this topic.

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Custom, custom header
« on: October 03, 2005, 02:47:58 am »

So I've been reading the FAQ's and posts on the board, but I havent found what I am looking to do.

I need to place a custom header into my coppermine gallery so that coppermine appears the same as the rest of my website.
The only problem is, the custom header is more than just the top part.

On my site, the include I add to the top of my pages displays 1.) the header, and 2.) the navbar on the left.
On the right is the actual content of my page.
Finally on the bottom of my page I add the include for the footer.

While following the FAQ and posts on the board, I've managed to get the include working, but it simply displays on the top of the gallery.
I would need it to display on the top, and left, and have the gallery take over where it left off. Then conclude it with the footer.

The following is the code I use for the header include:
Code: [Select]
<?
session_start();
header("Cache-control: private");

include ($shost."includes/dbInfo.php");
$database = "users";

if(!array_key_exists('username', $_SESSION))  {
$access = 1;
}
else {
$username = $_SESSION['username'];
$query = "SELECT * FROM $database WHERE username = '$username'";
$result = mysql_query($query);
$access = mysql_result($result, 0, "access");
}

if($access < $security) {
?> <META HTTP-EQUIV="Refresh" CONTENT="2;URL=<? echo $ihost; ?>pleaselogin.php"> <?
exit();
}

?>

<html>
<head>
<title>Special Task Force USA - <? echo $title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="stfusa.css">
</head>

<body background="<? echo $ihost; ?>images/bg.gif" text="#333333" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="770" border="0" cellpadding="0" cellspacing="0" class="bodyborder">
  <tr>
    <td colspan="2" valign="baseline"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="148">
      <param name="movie" value="flash/header.swf">
      <param name="quality" value="high">
      <embed src="flash/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="148"></embed>
    </object></td>
  </tr>
  <tr>
    <td width="25%" valign="top" bgcolor="#32195B"><div align="center">
      <?php include($shost."/includes/categories.php"?>
    </div></td>
    <td width="75%" valign="top">
<!-- The following Table is for ALL content of the website. -->

Notice
Code: [Select]
<?php include($shost."/includes/categories.php"?>
That's the navbar on the left.
Finally notice how it ends by opening <TD>...
This is for the content on the site - Footer starts with </TD>.
I hope someone will be able to help me get this working.
« Last Edit: October 05, 2005, 01:06:41 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom, custom header
« Reply #1 on: October 03, 2005, 08:03:36 am »

you can not add this - the html header is being controlled by coppermine, you can not mess with it this way. You'll have to add the stuff
Code: [Select]
session_start();
header("Cache-control: private");

include ($shost."includes/dbInfo.php");
$database = "users";

if(!array_key_exists('username', $_SESSION))  {
$access = 1;
}
else {
$username = $_SESSION['username'];
$query = "SELECT * FROM $database WHERE username = '$username'";
$result = mysql_query($query);
$access = mysql_result($result, 0, "access");
}
directly into the place where coppermine does header handling. I wonder though why you don't use the supplied bridging mechanisms coppermine offers.

If you do as suggested, you can apply all the html stuff to template.html, which leaves only the custom include that can be inserted as suggested in the FAQ by adding a custom placeholder to template.html and editing the header section in theme.php, replacing the placeholder with actual dynamic content.
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: Custom, custom header
« Reply #2 on: October 03, 2005, 06:16:07 pm »

Thank you for your reply. So, step by step - what should I do?

1.) Use Bridge?
2.) Apply HTML to template.html
3.) Add Include to theme.php

I probably see something wrong.
What do you think is the best way to go about this?

P.S. After a few tries I got the FAQ include to work (only not the way I needed it to).
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Custom, custom header
« Reply #3 on: October 03, 2005, 07:02:58 pm »

you can apply all the html stuff to template.html, which leaves only the custom include that can be inserted as suggested in the FAQ by adding a custom placeholder to template.html and editing the header section in theme.php, replacing the placeholder with actual dynamic content.

and what's the problem with the include?

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: Custom, custom header
« Reply #4 on: October 03, 2005, 10:22:59 pm »

The include appears at the top of the page, and the gallery below it (like a normal include).

I need the gallery to start where the include stops.
The include (header) ends opening table data: <TD>
Then the gallery begins, and the footer begins ending the table data: </TD>



Code: [Select]
<table width="770" border="0" cellpadding="0" cellspacing="0" class="bodyborder">
  <tr>
    <td width="25%" valign="top" bgcolor="#32195B"><div align="center">
      <?php include($shost."/includes/categories.php"?>
    </div></td>
    <td width="75%" valign="top">
***GALLERY CODE SHOULD APPEAR HERE***

Notice how my header ends with an open TR, and an open TD.
This is because the include "categories" appears in the left column, and the content of the page (gallery) appears in the right column.

Then when I place my footer:
Code: [Select]
</td>
  </tr>
  <tr>
    <td rowspan="2" bgcolor="#32195B">&nbsp;</td>
    <td bgcolor="#FFFFFF"><div align="left"><img src="/images/rotate.gif" hspace="2" vspace="2" /></div></td>
  </tr>
  <tr>
    <td bgcolor="#32195B"><div align="right"><font color="#ffffff" size="1" face="Verdana, Arial, Helvetica, sans-serif">(c)
      Copyright 2005 | <a href="/privacy.php" class="whitelink">Privacy
    Policy</a> | <a href="/misc/contact.php" class="whitelink">Contact </a><a href="/misc/contact.php"><img src="/images/bell.gif" alt="STF Contact Information" name="bell" width="50" height="40" border="0"></a></font></div></td>
  </tr>
</table>
it should close the page correctly.

When I followed the FAQ, it placed the entire header at the top and below it, the gallery (instead of within it).
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: Custom, custom header
« Reply #5 on: October 04, 2005, 05:05:46 am »

Would a link to my site make it easier to understand?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom, custom header
« Reply #6 on: October 04, 2005, 07:54:18 am »

yes, post a link. We need to take a look at your template.html. Also rename your theme.php to theme.php.txt and attach it to your posting.
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: Custom, custom header
« Reply #7 on: October 04, 2005, 10:26:31 pm »

i thought i'd be adventorous on this one.

so i tried to figure things out myself.
(thanks: http://forum.coppermine-gallery.net/index.php?topic=9863.0)

I might have furthur questions in the future, dunno.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.