applying theme to custom page applying theme to custom page
 

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

applying theme to custom page

Started by paulpalmer1983, March 23, 2005, 12:59:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paulpalmer1983

Hi,

I'm currently creating a custom index page with announcments, login box etc. Because this page is to be created from scratch, I would like it to still have the same basic theme as the rest of the site, how if possible, would I apply the theme to my own page. Any help or code sniippets would be greatly appreciated. Thanks.

Nibbler

If you are within the coppermine directory you can use this template:

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Your title');
?>


Your html content here

<?php
pagefooter
();
?>


That will setup the theme, and you can use coppermine's authentication to get info about the user if you need to, and you can use coppermine's already established database connection (by calling db_query()).

paulpalmer1983

Thanks for the help, i was trying to work out what i'd need to add in but couldn't quite get there. Just one more question, is it possible to do this, if the page is outside of the coppermine directory?

Nibbler

It is possible, but you'd need to hardcode full paths all over the place and it's quite awkward.

paulpalmer1983

Think i'll move the file then. Thanks for the help.