Posibble to make another index.php page? Posibble to make another index.php page?
 

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

Posibble to make another index.php page?

Started by gelaskimgel, September 20, 2006, 10:22:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gelaskimgel

Hey everybody... I would like to make my homepage start with another index page when you are going to fx: www.mysite.com. Then I want to have a welcome text... But in the menu I have created a link which is called: Pictures, and when I'm clicking at that, then I will have that the pictures of the forum is showing up... How can i make files that include the forum, but does'nt include the forum in that way, so the users can se it... Cause the problem is that, when I'm login in from a new file called: welcome.php, then It want work, it goes to www.mysite.com/$REFEREE . Hope you understand what I mean.... Else I can explain it....

Sorry my language...

Many thanks...

eruss

Quote from: gelaskimgel on September 20, 2006, 10:22:29 AM
Hey everybody... I would like to make my homepage start with another index page when you are going to fx: www.mysite.com. Then I want to have a welcome text... But in the menu I have created a link which is called: Pictures, and when I'm clicking at that, then I will have that the pictures of the forum is showing up... How can i make files that include the forum, but does'nt include the forum in that way, so the users can se it... Cause the problem is that, when I'm login in from a new file called: welcome.php, then It want work, it goes to www.mysite.com/$REFEREE . Hope you understand what I mean.... Else I can explain it....

Sorry my language...

Many thanks...

Are you saying you want images from the gallery to display on your main web page?  Maybe cpmFetch is your answer:  http://forum.coppermine-gallery.net/index.php?board=87.0

gelaskimgel

no eruss, that what I wont to do... I want to have a site structure like this:

Main page
Pictures - (when you click on picture, then it shows the Gallery)
Contact
stuff

and so on...

But the problem is that when I'm trying to make a main page file it does'nt work..


I can tell you that I have created a main_page.php file, which I have uploaded to the main directory, and I have included the things that also is on the template.html file, except the {GALLERY}. But the problem comes when I'm trying to logging by using the link in main_page.php. When I'm clicking login, and continue then it goes to www.mysite.com/$REFERER . But when I'm logging in på the real gallery index page, then it goes to the right place, when I'm clicking login->continue... Do you understand me now? If not, then tell mee.. I will then show you an example more...

Many thanks

dmo

I think what he is trying to do (and I have been trying to figure out as well) is to have a front homepage before you hit the gallery.  The problem with this is that the browser skips index.htm and goes right to index.php.  Renaming index.php to something else, and linking to that from the splash page (index.htm) fixes one problem, but creates more since there are lots of other scripts in coppermine that refer back to index.php.  (The problems with renaming index.php has been discussed on these boards, and is not a good idea)

Another site I came across suggested making the intro page index.html instead of .htm.  I tried that and it worked for me.

There was another solution on that page as well, that I didn't try, but probably could also help:

-----------------------------------
Put a .htaccess file in your web root directory, if there isn't one yet.

Then add the line:

DirectoryIndex index.html index.htm index.php

or change it accordingly.
That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex.

In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php.

Here is the documentation on the Apache website
http://httpd.apache.org/docs/mod/mod_dir.html
Hope that helped!

Joachim Müller

What you are refering to is being called a "splash page" - a page that shows up once for end users when they visit the gallery. Your instructions to do this by .htaccess methods is correct. I just wanted to add this note for clarification: when using the .htaccess method, you don't have to rename coppermine's index.php file to anything else. Your splash page could be named "index.htm" as suggested above, but then it can't contain PHP, so I suggest naming it "start.php" or "splash.php".

Gizmo

IMHO, putting your splash page in the Coppermine directory may cause trouble in the future when upgrading. You'll need to have a backup (as you should anyway) and then reinstall your splash page afer the upgrades. I think the best way would be to place your splash page in the root directory of your domain or in another directory outside your Coppermine install. Then just link to the index.php for your gallery. If you want to have to photos displayed on this page then install cpmFetch as suggested which will give you lots of options and you'll be able to create a great splash page without all the issues of future upgrades to Coppermine. This suggestion isn't just for Coppermine but any other applications that you use on your site since tight integration only causes issues down the road.
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Joachim Müller

I can't see issues when upgrading: having a file inside the coppermine folder that doesn't exist in the coppermine package (e.g. a file named "splash.php") won't cause upgrading issues unless a future version of coppermine contains a file of that name, but then you always have your local backup (the one you're suppossed to make before upgrading). If you follow the upgrade instructions to a T there's nothing wrong with having the custom splash page reside within the coppermine root folder imo.