Topic: Index file locations (edited)

Jack,

I reran the test again and found an error on my part.   I think my confusion is which index.php file to move.   I accepted the defaults when creating the gallery (/svmanager/g1).  When I reran your instructions I moved index.php out from /test/svmanager/g1 NOT from /test/svmanager folder.  When I followed step 5 exactly, it worked.  BUT I'm not sure that's the page I want to show.

Here's what I need now that the test is working.  I am trying to display a gallery embedded in a .php page so the index file from g1 is displayed.  Should I move  /test/svmanager/g1/index.php (works with the new gallery created for test)  OR  /test/svmanager/index.php

Also,  would my pathToManager$='svmanager/g1'  ???

Hope the latest discovery helps.

Re: Index file locations (edited)

I'm still not sure that I'm understanding what it is that you are trying to achieve. Let's try to dispel the confusion between the two index files.

1. There is a file svmanager/index.php which puts up an index to all your galleries. Each gallery has a thumbnail and a title link. The heading for the page is Galleries and there is an Admin sign-in link in the top right hand corner. Let's call this the overall galleries index. Usually it's easier to link to this page from the site navigation rather than move it. However some people like to move it into the root of the web site so it comes-up first when visitors arrive at the site.

2. Each gallery has it's own individual gallery index.php file. This is just an html wrapper for the Flash file that presents the gallery. Each index file is normally inside the corresponding gallery folder. For instance svmanager/g1/index.php. There should be no need to move this file. It is linked automatically from the overall galleries index. You can also link to it from your web site navigation menu.

So, sorry if I'm slow to understand but let's go back to square one and please have another go at explaining exactly what you are trying to achieve.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

Square one...good place to start.   Thanks for clarifying the two index pages!

My site has one gallery and I'm not planning on adding another soon so let's keep it simple.  I have a page called gallery.php that includes a header and footer.  The body of gallery.php contains the SimpleViewer embedded code as per instructions for embedding in html.  I want to call the individual gallery index.php from my gallery.php page not the overall galleries index. 

Does this make sense from your product design perspective or is SV designed to always show the overall gallery index page?  How would I embed the single gallery index.php and skip the overall gallery index (for the time being)?

Thanks, Steve

Re: Index file locations (edited)

Right, I think I'm getting it. Let's look at it from a site visitor perspective. When the user types www.yoursite.com into her browser, what would you like her to see? Would you like the gallery to come up right there and then or a home page with a link to the gallery?

If you want the former option – that is the gallery itself is the home page, then I think a redirect may be the answer. But let's be clear what the aim is before I ramble off in that direction.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

When the user enters the site there is a general home page.  From the home page there is a link to the gallery.  When the gallery link is clicked a second page is loaded that takes the user directly into the gallery, NOT to a gallery index page.  I have no need now for a gallery index page since  I have only one gallery.

I'm thinking this is merely an issue with a path setting, somewhere.  This is my last big technical hurdle so I need to wrap it up soon.

Thanks!

Re: Index file locations (edited)

So you would have a link in your home page that looked something like this:

<a href="svmanager/g1/index.php">View the gallery</a>

Or am I still missing the point?

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

The link from the home page is to the gallery page.  The gallery is embedded in the page, not a direct link.  The embedded code is from the SV documentation.

gallery.php page

<?php include_once&#40;"header.php"&#41;; //load header ?>

            <tr>
                <td height="578" align="center" colspan="4"><font face="Arial, Helvetica,           sans-serif" size="1"><br>
                <div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. 
                        <a href="http&#58;//www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>    &nbsp;&nbsp;
                          <script type="text/javascript">
                                    var fo = new SWFObject&#40;"viewer.swf", "viewer", "840", "578", "8", "#FFFFFF"&#41;;
                                    fo.write&#40;"flashcontent"&#41;;    
                        </script></td>
            </tr>

<?php include_once&#40;"footer.php"&#41;; //load footer ?>

Re: Index file locations (edited)

Jack,  If you are still confused please let me know.  A picture is worth a thousand words.  Here's my website:  http://lorigallo.com/default.php

Click on the gallery link to see my gallery page.  You can view source to see the code if you are still not clear.

Let's get this resolved this week please, it's been many posts and I need a resolution.

Thanks!

Re: Index file locations (edited)

Love the frog.

There are at least two ways of doing this. I think you are doing it the hard way. You are moving the gallery index page out of the gallery folder, so the links in the index file are breaking (but all your navigation and rollover links are working just fine).

I'd do it the other way, I'd leave the gallery index inside the gallery folder and move your navigation code into it. Of course, this way you'll need to fix all the links in your navigation code but it should be easier to fix your own links than to fix links created by svManager.

Also, since you have only one gallery, there is no need for the gallery index to be a php file. It could be an html file and still work with svManager.

Here's what I would do.

Download a copy of the free version of SimpleViewer and copy the standard index.html file out of the sample gallery into your own gallery folder (let's say it's g1). Test that it's working.

Copy one of your existing pages, say the home page, into the gallery folder, g1. Remove the frog image. Rename it to gallery.html. Fix the links inside your navigation and rollovers. Fix the gallery links in your home and contents pages so they go to the new gallery.html. Your navigation should all be working now but of course the gallery page is empty.

Copy the css and javascript from the standard SimpleViewer index.html file into your new gallery.html page.

I know it sounds like starting again but I think it would be quicker in the end.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

I'm not quite sure I understand.  When I created the g1 folder off of the web root, the links in the index file are still broken. I'm still confused about the steps you recommend to fix broken links in my code vs the SV package (standard or pro). Can you break them down into steps please.

My test didn't work.
New gallery directory off of root  /g1/index.html does not work
vs.
Not moving index.html works
/simpleviewer/index.html

If I create a new gallery folder in the web root, which files do I configure to connect my code to the gallery.  How does the index.html file find the viewer.swf?

Steve

Re: Index file locations (edited)

Maybe I'm over-explaining here. It should be fairly straightforward  – honest!

I would structure your site like this:

web root
|--default.php
|--contact.php
|--svmanager
   |--g1
      |--index.php

That is default.php, contact.php and the svmanager folder are in the root. The gallery folder g1 is inside the svmanager folder, and the g1 gallery index.php file is inside the gallery folder, which is where it is by default.

You then need to point the nav links in default.php and contact.php to svmanager/g1/index.php. And you need to edit the svmanager/g1/index.php so it looks like your other pages. Editing the svmanager/g1/index.php file is covered in this tutorial.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

Jack,

I rewired the site into the structure above and I think we can close this issue since my site is up and running!!  big_smile

I was able to take the contents from my gallery.php and retrofit them into the g1/index.php.   You've been very helpful and patient getting this integrated into my site.  I still have questions, but probably for other topics.  Getting the site functional was most important.  You may see other posts looking for fine tuning customizations.

Thanks again!
Steve

Re: Index file locations (edited)

Hey – good news  big_smile

This topic got a bit long-ish so don't be surprised if you come back to the forum and find I've used my awesome powers as a moderator to split it up a bit. I'll leave most of it in place to try to help others.

When I get a bit of spare time I might put-up some kind of example web site for people to look at. Or maybe others on the forum might offer their svManager sites as examples and be willing to offer a little explanation when needed???

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

Right, I think I'm getting it. Let's look at it from a site visitor perspective. When the user types www yoursite com into her browser, what would you like her to see? Would you like the gallery to come up right there and then or a home page with a link to the gallery?

If you want the former option – that is the gallery itself is the home page, then I think a redirect may be the answer. But let's be clear what the aim is before I ramble off in that direction.

jack

I am trying to do the former and I'm afraid I've screwed up many things in my gallery doing so. Is there a simple way to make your gallery your home page? I thought putting the index php file on the root would do it. But apparently not.

Re: Index file locations (edited)

When I was thinking about the earlier post it struck me that rather than moving index files around, the answer might be a 301 redirect. As far as I know, this is supported on the majority of servers, it's in common use around the web, it's fairly easy to implement and it's Google-friendly. So out of curiosity, I set up a test installation of svManager with a 301 redirect and it seemed to work just fine.

Here's how to do it. Suppose your site is structured like this:

www.mysite.com
|--svmanager
    |--g1
        |--index.php

First, make sure the gallery is working properly with the index.php file in it's usual place inside the g1 folder.

Then create a file inside the web root called index.php (that is http://www.mysite.com/index.php).

Put the following content inside this index.php file:

<?php
header ("HTTP/1.1 301 Moved Permanently");
header ("Status: 301 Moved Permanently");
header ("Location: http://www.mysite.com/svmanager/g1/index.php");
exit(0);
?>

It's important not to include any content outside the php tags – not even a space character or a new line or it just won't work.

That's it. If for some reason, you change your mind on the redirect then you just delete the index.php file in the web root and the redirect is removed.

For background information on 301 redirect and other ways to do it, I recommend this article by Steven Hargrove.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

Is there any advantage to doing it with an index.php file over an index.html file?

I actually did just that, but with html.

See jeffneely dot net.

Re: Index file locations (edited)

There are several ways to do a 301 direct. I think it's just a matter of convenience and what's supported on your server. Whatever works for you.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Index file locations (edited)

How do I make a new index.php file?  Im not familiar with it.