forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: paulpalmer1983 on March 23, 2005, 12:59:48 pm

Title: applying theme to custom page
Post by: paulpalmer1983 on March 23, 2005, 12:59:48 pm
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.
Title: Re: applying theme to custom page
Post by: Nibbler on March 23, 2005, 01:17:52 pm
If you are within the coppermine directory you can use this template:

Code: [Select]
<?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()).
Title: Re: applying theme to custom page
Post by: paulpalmer1983 on March 23, 2005, 01:56:23 pm
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?
Title: Re: applying theme to custom page
Post by: Nibbler on March 23, 2005, 02:33:16 pm
It is possible, but you'd need to hardcode full paths all over the place and it's quite awkward.
Title: Re: applying theme to custom page
Post by: paulpalmer1983 on March 23, 2005, 02:48:04 pm
Think i'll move the file then. Thanks for the help.