Advanced search  

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]

Pages: [1]   Go Down

Author Topic: applying theme to custom page  (Read 2523 times)

0 Members and 1 Guest are viewing this topic.

paulpalmer1983

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
applying theme to custom page
« 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.
« Last Edit: March 23, 2005, 01:57:04 pm by TranzNDance »
Logged

Nibbler

  • Guest
Re: applying theme to custom page
« Reply #1 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()).
Logged

paulpalmer1983

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: applying theme to custom page
« Reply #2 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?
Logged

Nibbler

  • Guest
Re: applying theme to custom page
« Reply #3 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.
Logged

paulpalmer1983

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: applying theme to custom page
« Reply #4 on: March 23, 2005, 02:48:04 pm »

Think i'll move the file then. Thanks for the help.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.