Jump to content
Server Maintenance This Week. ×

Custom login page for 'Database HomePage' default?


This topic is 4177 days old. Please don't post here. Open a new topic instead.

Recommended Posts

We have been trying to get a custom home page set up for our IWP solution. We had been stuck with the default Database Homepage, where it just lists the databases accessible by IWP as links. We want to show our custom login web page instead.

So in the documentation, which was rather sparse I thought on actual information, I did find this:

If there is no file named iwp_home.html in...the iwp folder (FileMaker Server Advanced),

Instant Web Publishing uses the default Database Homepage.




OK, so I tried putting the page we wanted in the location that same documentation refers to, which is:


Note If you are hosting databases with FileMaker Server Advanced, place the custom

home page in the.../Library/FileMaker Server/Web Publishing/IWP folder (Mac OS).

OK, put a copy of our login page there, renamed it "iwp_home.html" and put a 'Logout' button on our IWP page (points to a script which sets one field and then calls "Exit Application").

When I use the log out button, it MOSTLY goes to this page (there is an image on the web page that doesn't show up; shows 'broken' icon). However, when I look at the source for this page, it doesn't look anything like the actual HTML page that I put there. I was trying to find the image path info to try and fix the page. And also, if I 'reload' the web page, it takes me to the default Database Homepage mentioned.

Anyone have suggestions for how I can get this to work?

Thanks,

J

Link to comment
Share on other sites

  • 2 months later...

You can edit the actual iwp_home.html page. First shut down the db server. Then go to /Library/Filemaker Server/Web Publishing/publishing-engine/wpc/ and make a backup of FM Web Publishing in case something goes wrong. Next right click FM Web Publishing and click Show Package Contents. Then go to /contents/Resources/iwpres/. Here you will find iwp_home.html (as well as iwp_auth.html if you'd like to change that as well). Edit or replace with your file and restart the server.

You can also create custom login forms using get...


<form action="http://fmserver.example.com/fmi/iwp/cgi" method="get">

<input type="hidden" name="dbpath" value="/fmi/iwp/cgi?-db=exampledb&-startsession">

<input type="hidden" name="acct" value="account">

<input type="hidden" name="-authdb">

<label>Account</label><br />

<input type="text" name="name"><br />

<label>Password</label><br />

<input type="password" name="password"><br />

<input type="submit" name="login" value="Login">

</form>

Link to comment
Share on other sites

Use dsghs's info to get to the imp_auth.html and imp_home.html files. Make a new imp_home.html file with this content:

<script type="text/javascript">

document.write(location.protocol);

if(location.protocol == "http:"){

window.location = "http://" + window.location.hostname;

}

else

{

window.location = "https://" + window.location.hostname;

}

</script>

Make a new iwp_auth.html and change the reference css file (located just above the </head> tag:

<link href="/fmi/iwp/res/iwp_home1.css" rel="stylesheet" type="text/css">

Make a file named imp_home1.css and copy this into it:

/* copyright: © Copyright 2003-2010 FileMaker, Inc. All Rights Reserved */

.databasehomepage { color: #CCCCCC; font-style: normal; font-size: 16px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular }

.bannerWhite { color: #CCCCCC; font-size: 28px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; letter-spacing: -.5px }

.links { color: #3333CC; font-size: 16px; font-family: "Times New Roman", Arial, Helvetica, Geneva, Swiss, SunSans-Regular }

#relativeBannerBox { position: relative; left:0; top:0; width: 100%; height: 60px; visibility: hidden; display: block; overflow:hidden;}

#bannerBox { background-color: #FFFFFF; position: absolute; left:0; top:0; width: 100%; height: 30px; visibility: visible; display: block; overflow:hidden;}

#fmBox { text-align: right; position: relative; top: 20px; left: 0px; width: 100%; height: 35px; visibility: hidden; display: block }

#homeBox { text-align: right; vertical-align: bottom; position: absolute; top: 40px; left: 0px; width: 100%; height: 25px; visibility: hidden; display: block }

#iwpBottomBox { position: absolute; top: 17px; left: 17px; width: 550px; height: 40px; visibility: visible; display: block }

#iwpTopBox { position: absolute; top: 15px; left: 80px; width: 550px; height: 40px; visibility: hidden; display: block }

#linksBox { position: absolute; top: 250px; left: 15px; right: -15px; height: 100%; visibility: visible; display: block; }

A { color: #3333CC; font-size: 16px; font-family: "Times New Roman", Arial, Helvetica, Geneva, Swiss, SunSans-Regular }

.db { vertical-align:text-bottom; }

Rename your original files (and back them up) and put these new files in the folder. When you logon to your website index page, put a link to your database. Clicking that takes you to a mostly blank login page (no graphics, although you could modify that with css), and when the user logs off it will take them back to the index page.

This works with multiple websites (including https) and multiple databases.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

This topic is 4177 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.