Advanced search  

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

Pages: [1]   Go Down

Author Topic: applying theme to custom page  (Read 3114 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.024 seconds with 19 queries.