Making new frontpage. Making new frontpage.
 

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

Main Menu

Making new frontpage.

Started by mortenva, September 08, 2005, 05:53:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mortenva

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

artistsinhawaii

Quote from: mortenva on September 08, 2005, 05:53:46 PM

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
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

"" 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
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

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

mortenva

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

Joachim Müller

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: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.

mortenva

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

artistsinhawaii

Quote from: GauGau 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 ;)

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
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.