How do I add pages in the same site? How do I add pages in the same site?
 

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]

Main Menu

How do I add pages in the same site?

Started by Johanna, November 20, 2003, 11:09:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Johanna

I am trying to figure out where the {ADMIN_MENU} and {GALLERY} are defined, in which file. I want to add files to be shown in the same template. Pages with information about the site, a guestbook and so on. Where? (and maybe.. HOW?)

Oasis

These are in the theme.php file of the same folder..
I would recommend you to use the anycontent block if you just wanted to add something to the page layout.

Edit anycontent.php
and add "anycontent" to "The content of the main page " in config.
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

Johanna

OK, I could use anycontent.php, but if I want to add several pages to be displayed in the same template - could I give these different files names (like {ADMIN_MENU} has this particular name) and just add these file's names in the template? I couldn't be that simple?

And where in the file config.php to I add anycontent.php, and to I do that with an <? include....?> ?

(sorry for all the questions, very thankfulfor help!)

Oasis

In the config, you will find a setting for "The content of the main page "
add "anycontent" to the appropriate place you want it to appear.

For more blocks, in index.php after
case 'lastalb':
if ($cat == 0) {
display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false, "NO");
}


add
case 'blockname':
if ($cat == 0) {
include(blockname.php');
}
flush();
break;

changing "blockname" to whatever you want..

if you want it to appear on above all albums, and not just the front page
change "$cat == 0" to "isset($cat)"
you will have to add "blockname" to the "content on the main page" settings
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

Johanna

Nowhere in my file config.php I find a setting for "Content of main page". But I don't think we are talkning of the same thing. I want to be able to add a page that has no album content, just my own text, but I want to put it in the same template on the same site as the photo gallery. I want to build out the site with more content than just the albums. Somhow I think I have to create a file called for instance {INFO} and define this page's content in the theme.php-file in the template folder. Is that correct?

Thank you for all help.

Oasis

Have you searched the board for information about the anycontent block? Read the FAQ and the stickies!

By config I mean the coppermine configuration and settings which you can change by logging into an admin account... not config.php
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

Johanna

I get the following message when I in my config page put anycontent in the The content of the main page:
QuoteFatal error: Cannot redeclare getmicrotime() (previously declared in /customers/oppenbok.com/oppenbok.com/httpd.www/photo/include/init.inc.php:38) in /customers/oppenbok.com/oppenbok.com/httpd.www/photo/include/init.inc.php on line 36
The page itself works when I load it separately, but not to put in the index-page. Do you know why?

Thank you for all help, I figured out how I should add more pages in the samt template. Now it rests this particular problem..

Joachim Müller

well, coppermine already uses the function name "getmicrotime()", so you can't use it another time. Just comment it out in the script you added, or rename it. This is not related to coppermine at all, but a very common php error. You should definitely understand some php before you play around with anycontent.php and do more than<?php print 'Hello world'?>in it.

GauGau

Johanna

I am very thankful for all help, and I thought the support forum was just to get support, not lessons about my knowledge of php.

Joachim Müller

Sorry, I didn't mean to offend you, but remember that I'm only human and that I (as all people involved in this project) work in their spare time - this is no commercial hotline where you have to be nice to customers... :wink: , so if I sometimes come across questions that are *hm* "questionable" in my opinion I often type a very short and pointed answer (which was the case with your question). I don't want to scare newbies away, but you have to understand that it's very time-consuming (and giving support can be a very frustrating experience, trust me on that :wink: ).

Be aware that anything you add in anycontent.php will not be the same as a standalone php script, but it will be included into an existing script. If you receive any php error messages, the place to look is php.net, in your case it would have returend http://www.google.com/search?q=Fatal+error%3A+Cannot+redeclare++site%3Awww.php.net

GauGau

Johanna

Thank you for all help.