coppermine-gallery.com/forum

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: findingcolors on August 09, 2025, 04:30:35 AM

Title: Coming Soon (Index) Page / Hide Gallery
Post by: findingcolors on August 09, 2025, 04:30:35 AM
I am currently working on building a fansite (gallery). While I  work on the site, I would like to "hide" the gallery with a custom index page - AKA, a "Coming Soon" page.

I would also like to be able to still log in and see my gallery theme. For example, WordPress has "coming soon"/"maintenance mode" plugins where the public sees one page, but admins see the whole back end and site. Is it possible to do this?

I know there's an "offline mode", but that doesn't allow me to add a custom "coming soon" message, graphics and social links.

I know custom php pages can be made ... but I don't know if it's possible to set those as a front page. 
Title: Re: Coming Soon (Index) Page / Hide Gallery
Post by: 406man on August 09, 2025, 02:22:41 PM
Something like this could be made to work but there are a few areas to pin down.

The custom "Coming Soon" page. Do you want it to be a totally standalone page or to look like the main gallery pages with a standard title, menu and footer ?

Presumably the "coming soon" is displayed without needing the non-admin user to log in ?

In which case there is a slight problem. The Administrator has to log in before the gallery software knows they are an administrator. So you can't just display a simple "coming soon" page, otherwise the Administrator can never log in. One way to solve this is for the "coming soon" page to have a link to a login page.

Can you describe how you think it should work.
Title: Re: Coming Soon (Index) Page / Hide Gallery
Post by: ron4mac on August 10, 2025, 02:31:27 PM
Most all servers are configured to present an index.html instead of an index.php file if there is no specific request. You could put your gallery offline and also add an index.html file that displays what you would like. I think most would see the contents of that html file when visiting your site. You can login for admin work by going to <your-site>/index.php.
Title: Re: Coming Soon (Index) Page / Hide Gallery
Post by: 406man on August 10, 2025, 05:59:58 PM
I've created a simple plugin called "offline" to implement this. Just download it and install like any other plugin. There are no options.

It will normally display a very basic custom page when anyone tries to access the gallery. There is a login link so that an administrator can log in and once logged in the gallery works normally for them.

The HTML for your custom page is in the file offlinehtml.php in the plugin directory. Edit this file to suit requirements.

Plugin submissions would normally go to another part of the forum. For now I'll leave this here so that  "findingcolors" can decide if it's suitable for them. It might need updating if the functionality isn't close enough. If it turns out to be useful I'll submit it in the usual way.