applying theme to custom page applying theme to custom page
 

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

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.