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:<?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
You need to add pageheader() function after require('include/init.inc.php');
use this code instead of yours
<?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
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
You're wellcome :)
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.
Don't double-post. You started an identical thread here already: http://forum.coppermine-gallery.net/index.php?topic=39305.0
Locking.