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: Making new frontpage.  (Read 5620 times)

0 Members and 1 Guest are viewing this topic.

mortenva

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Making new frontpage.
« on: September 08, 2005, 05:53:46 pm »

Hi All..

I'm working on my website which will become my web gallery. I've tweaked CPG the way I want it from one of the themes, added a few new pages using the recipe found here:

http://forum.coppermine-gallery.net/index.php?topic=21000.0

ie, it has the coppermine heading and stuff implemented.

So far has everything worked well, I can switch between pages from any other page, but now I need help doing a (I think) big alteration on the site:

I'd like to set the Coppermine frontpage, index.php to be the frontpage of my stock gallery, as something like mygallery.php, and use one of the pages I've created as a new index.php, so the this page will show when the url to my page is entered.

Is this doable? Has anybody done this before, and could tell me which files I need to modify?

Regards,

Morten
« Last Edit: September 09, 2005, 08:59:03 am by GauGau »
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Making new frontpage.
« Reply #1 on: September 09, 2005, 01:12:22 am »


I'd like to set the Coppermine frontpage, index.php to be the frontpage of my stock gallery, as something like mygallery.php, and use one of the pages I've created as a new index.php, so the this page will show when the url to my page is entered.

Is this doable? Has anybody done this before, and could tell me which files I need to modify?

Regards,

Morten

Morten,

Hi.  It's doable. I did it.  But, I wouldn't recommend it.  I believe it involves changing references in over 83 files in over a hundred locations.  It may also invalidate any updates and patches that make reference to index.php further adding to your headache.

What you might want to consider instead is using a form of redirection.

There are a couple of ways to do this.

1) create an .htaccess file to redirect the user to whatever page you want them to go.  This seems to be the preferred way.  Your server/host needs to be able to support .htaccess for this to work.  (search on the internet for "redirect using .htaccess" for examples)  <-- sorry, but I still haven't gotten this one sorted out the way I want it so I can't suggest anything more regarding this.

2) create a meta with Java script redirect in your theme.php file(s) if your server/host does not support .htaccess.    A good beginning would be: http://www.saila.com/usage/tips/defn.shtml?redirect.   Download their code and insert the lines in the appropriate sections of your default theme.php file.


Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Making new frontpage.
« Reply #2 on: September 09, 2005, 07:33:54 am »

"" A good beginning would be: http://www.saila.com/usage/tips/defn.shtml?redirect.   Download their code and insert the lines in the appropriate sections of your default theme.php file.""


Sorry... I meant your theme.html file.  Slip of the thumb.. you know.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Making new frontpage.
« Reply #3 on: September 09, 2005, 08:16:40 am »

actually, it's either theme.php or template.html - a file named theme.html doesn't exist ;)
Logged

mortenva

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Making new frontpage.
« Reply #4 on: September 09, 2005, 08:26:49 am »

Hi Dennis. thanks for your reply. I have one question though, will not this create a loop in my system, so that when someone visit my gallery i.e. the real index.php  ???they will be redirected back to my start page? I tried copy the saila code into my template.html (the only html-file I have) and it kept reloading my index2.php (which my start page is called for now) on and on all the time..

regards, Morten
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Making new frontpage.
« Reply #5 on: September 09, 2005, 08:35:24 am »

This whole redirection stuff using JavaScript is buggy and not recommended. Just do as Dennis suggested and modify .htacces. This doesn't require much: if the splash page that is suppossed to show when a new visitor goes to http://www.yoursite.tld/ is named welcome.php, then you have to create an .htaccess page in your web root (or modify an existing one) with this in it:
Code: [Select]
DirectoryIndex welcome.php index.phpThis way, the server will show a file named welcome.php when the user goes to a folder and display it if it exists. If it doesn't, the index.php file will be shown instead. There can be a whole range of index file names, the first one being taken into account first, then the second, then the third and so on. Details: http://www.google.com/search?q=htaccess+DirectoryIndex
This will only work if you are hosted on apache and your webhost let's you edit .htaccess. There's a similar solution for users on IIS as well.
Logged

mortenva

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Making new frontpage.
« Reply #6 on: September 09, 2005, 08:54:33 am »

I will not get religious, but My God, you guys are brilliant! This saved my day!

Thanks a lot! You can now consider this solved.

Regards, Morten
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Making new frontpage.
« Reply #7 on: September 09, 2005, 09:17:09 am »

actually, it's either theme.php or template.html - a file named theme.html doesn't exist ;)

Har!  Haste makes waste, again.  I knew it was only a matter of time before my photographic memory ran out of film.

But thanks, you clarified it so well.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.