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: plain page  (Read 5269 times)

0 Members and 1 Guest are viewing this topic.

nanothree

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • RockThoseLocks
plain page
« on: November 26, 2004, 06:32:20 pm »

how can i get a page that has nothing on it except for the navoiagtion bars and menus at the top, the background and the footer? l
Logged

Nibbler

  • Guest
Re: plain page
« Reply #1 on: November 26, 2004, 06:53:17 pm »

Code: [Select]
<?php
define
('IN_COPPERMINE'TRUE);
require(
'include/init.inc.php');
pageheader('Enter your page title here');
?>

Content here
<?php
pagefooter
();
?>
Logged

michael singer

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 42
  • random image from: www.a-visual-notebook.at
    • a visual notebook
Re: plain page
« Reply #2 on: December 01, 2004, 07:22:51 pm »

hmm... where to put this code...?
create a single php file?
can this be integrated in theme.php? wouldn't it need a function there to be called?
Logged

skeezmo

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: plain page
« Reply #3 on: December 04, 2004, 10:42:59 pm »

Code: [Select]
<?php
pagefooter
();
?>

Where does this actually lead to.  Like is there a php file for it or something...
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: plain page
« Reply #4 on: December 04, 2004, 10:48:40 pm »

It is a function that generates the code for the page footer.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: plain page
« Reply #5 on: December 05, 2004, 12:38:06 pm »

the starter of this thread asked for a file with only the coppermine navigation to be displayed, that's what the code Nibbler posted does.
@skeezmo and michael singer: what do you want to accomplish? Probably something different. I recommend not asking what code snippets are good for what purpose, but to explain what you actually want to accomplish and ask for code snippets. ;D
In both cases: if you really want to start learning php, go to http://www.php.net, find a good tutorial on the internet, buy a book on php those three options will help. Asking what a function does won't help you if you even don't know what a function is... ;)

Joachim
Logged

michael singer

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 42
  • random image from: www.a-visual-notebook.at
    • a visual notebook
Re: plain page
« Reply #6 on: December 05, 2004, 03:42:54 pm »

what i want to accomplish, is the following:
the "about" and "links" pages of my website are currently simple html, because i didn't know it better. now i'd like to integrate them in coppermine more properly. the snippet that nibbler posted seems to be perfect for this purpose. i just don't know where to put this function and how to call it.

you're absolutely right, joachim, it's not your job to teach php here. i think it's getting time for me to learn some php myself.
sorry for stupid questions. you and all the other mods of this board and helped me such a lot, answering all my questions so patiently, i just want to let you know, that i'm very thankful for this.

michael
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: plain page
« Reply #7 on: December 05, 2004, 04:06:30 pm »

Well, to use the code nibbler posted, simply put the html code from your 'about' page (not the header, just the content you want shown), in where it says 'Content here'.
Then name the file 'about.php' and upload it to your gallery folder.  Now just browse to it, and it should show, with all the coppermine headers, menus and footers.

You would then want to add a link in your menu in theme.php.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

michael singer

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 42
  • random image from: www.a-visual-notebook.at
    • a visual notebook
Re: plain page
« Reply #8 on: December 05, 2004, 07:23:45 pm »

thank you, casper, this is exactly what i wanted to know!
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: plain page
« Reply #9 on: December 05, 2004, 07:36:23 pm »

I did some work on a theme interpreter, this one specifically for the theme hardwood that accomplishes the same tasks.

The idea could be adapted to any theme.

See this post:

http://forum.coppermine-gallery.net/index.php?topic=11650.msg52795#msg52795

I know of at least one other site besides mine that is using it succesfully.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.