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: Blank page _wanted_  (Read 3653 times)

0 Members and 1 Guest are viewing this topic.

johndankey

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Blank page _wanted_
« on: September 27, 2006, 06:23:24 am »

Hi,

I want to know how to create "blank" pages with just the menus, header & footer so I can create custom pages with the same look and feel.  See the attachment.  I realize I could just do it in HTML, using the source from, say, the index page, but then if I change something in the theme I would have to change all those pages.  I tried to just take, say, login.php & remove the code that has to do with whatever that specific page does.  I came up with (copyright message removed to save space in this message:
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pagefooter();
ob_end_flush();
?>
but that just gave me a white page with the "Powered by..." footer.

Thanks,

JD
« Last Edit: September 27, 2006, 04:31:37 pm by Sami »
Logged
Thank god for Coppermine!

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Blank page _wanted_
« Reply #1 on: September 27, 2006, 06:38:40 am »

You need to add pageheader() function after require('include/init.inc.php');
use this code instead of yours


Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader();
pagefooter();
ob_end_flush();
?>

- You can add a string to pageheader function something like pageheader('my title') to display it on title bar
- All other content should comes after pageheader() and before pagefooter()
- Your page should be on gallery root , you can't use this method to create pages outside the gallery
Logged
‍I don't answer to PM with support question
Please post your issue to related board

johndankey

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank page _wanted_
« Reply #2 on: September 27, 2006, 04:28:53 pm »

Thanks, Sami!  I completely spaced over that pageheader line.

By the way, as an old-time coder (FORTRAN, COBOL, RPG-III) I really appreciate all the work you guys have put into this.  And to make it free!  This is a beautiful bunch of code.  It's so much better than trying to limp along with what I've been able to cobble together on my own.

Thanks again!

JD
Logged
Thank god for Coppermine!

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Blank page _wanted_
« Reply #3 on: September 27, 2006, 04:31:20 pm »

You're wellcome :)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

schalicto

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • I like tuesdays and coffee
    • A place for all my damn pictures
Re: Blank page _wanted_
« Reply #4 on: December 14, 2006, 05:50:00 pm »

I need to ask a question about this blank page business.

I used your code and created the blank page and it works great, except for 2 things.

http://www.floor42online.com/about.php

Problem number 1 is that it seems to display a header that I get when I log in as an admin, you can't do anything with the links, but they shouldn't be there.

Problem number 2 is that the page doesn't show up on the header.  Here is the exact code that I used....

Quote
<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('about');
?>
<table width="100%"><tr><td>blah blah blah html</td></tr></table>
<?php
pagefooter();
ob_end_flush();
?>

Any help would be appreciated.... I'm not a programmer, I'm just a total noob that feels the need to try and learn this stuff.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Blank page _wanted_
« Reply #5 on: December 15, 2006, 08:41:36 am »

Don't double-post. You started an identical thread here already: http://forum.coppermine-gallery.net/index.php?topic=39305.0
Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.