forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: johndankey on September 27, 2006, 06:23:24 am

Title: Blank page _wanted_
Post by: johndankey 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
Title: Re: Blank page _wanted_
Post by: Sami 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
Title: Re: Blank page _wanted_
Post by: johndankey 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
Title: Re: Blank page _wanted_
Post by: Sami on September 27, 2006, 04:31:20 pm
You're wellcome :)
Title: Re: Blank page _wanted_
Post by: schalicto 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 (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.
Title: Re: Blank page _wanted_
Post by: Joachim Müller 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.