Topic: embedding svManaged galleries in a page

Hi,

This gallery solution is really good and the svManager is one of the best things in it's kind.

I'm trying to embed my galleries into a table in my website.
It's no problem to put a flash movie of the exact size in the table, but I'm making this website for my friend an he wants to manage his galleries himself. So i tried svManager.
Is it possible for the svmanager/index.php (were all the galleries are listed) to be embedded in the space on this website were the flash is?
nvandijk com/basta/portfolio.html

Any help would be greatly appreciated.

Re: embedding svManaged galleries in a page

anyone please?

Re: embedding svManaged galleries in a page

First of all, take a backup of your existing gallery installation.

Next, read the section on Moving the automatic galleries index page in the svManager User Manual. Move the svmanager/index.php file to nvandijk com/basta/ and get it working.

Next, change the name of portfolio.html (and any links to it) to portfolio.php.

Then, look inside the index.php file in a text editor (not from 'view source' in a browser) and you'll find three pieces of embedded code between php tags <?php.../?>. The first chunk of code sets things up, the second writes-out the admin link and the third writes-out the html for the thumbnails and links to the galleries. You can see the results of all this by browsing to the index page and doing 'view source'. Copy and paste all three chunks of code into similar places inside your portfolio.php file.

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

Thanks for the reply Jack,

I finally had some time to try this and followed your tips.
As you can see my knowledge of scripting is limited because it's a mess now  lol
nvandijk com/basta/portfolio.php

It's supposed to be in the table or cell in the middle with a background picture and the size of the table should stay the same.
Also, when you open a gallery, it navigates to a new page. Is it possible to have the flash within the same cell?

I really hope you can help me with this.

Thanks in advance!

[EDIT]

I have simpleviewer pro by the way.

Re: embedding svManaged galleries in a page

Actually, you have made a lot of progress with the scripting. You seem to have a small problem with some superfluous text svmanager/svmanager.php but the main part of the script seems to be working fine. If you do a 'view source' in your browser to see the generated html,  you'll see that the script is generating the correct html for a table with class="svlinks", two columns and one row. This is embedded in one of your table cells.

Your problem now is to get the generated table in the right place for your page design and style it with css – width, alignment, font size, etc. This html/css stuff is beyond the scope of this forum but by all means come back and ask again if you have any svManager problems.

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

Thanks for all your help so far Jack,

I'm afraid that I have to give up though, because I have no idea if it's even possible to have the simpleviewer show in a exact size so that it doesn't screw qith the tables etc.

I think I have to design it with Flash, since that is more flexible.

Is it possible to have svManager show galleries in a swf file??

Thanks in advance!

Re: embedding svManaged galleries in a page

Well css/html advice is beyond the scope of this forum but I don't like to see you struggling when you are so near to a solution, so I've had a quick look at your code.

Firstly get rid of the 326x1 spacer gif – it's not needed and it's pushing your table of gallery links down the page. Then add some css in the head of the page between the <style> tags under the css that's already there. Something like this will set the size of your table of links (insert your own values for width and height)

table.svlinks &#123;
width&#58; 800px;
height&#58; 326px;
margin&#58; 0 auto;
&#125;

The margin setting is to centre it in its table cell. You can do all kinds of other stuff with css to get it looking good. Try to find somebody local to you who can help with the css.

Hope this gets you on the right track.

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

That definitely got me on the right track! Thanks so much!

Only thing now is to get the galleries open in the same page in the same table. Also, a "back" link would be really cool..

Re: embedding svManaged galleries in a page

Any ideas?

Thanks!

Re: embedding svManaged galleries in a page

I'm going to have to call a halt to this thread because we're leaving svManager behind and talking about general html/css/Flash issues.

You can change the appearance of your gallery page by editing the index.php file inside each of the galleries. There is more information on this in the SimpleViewer FAQ item 9. The example in the FAQ is a .htm file not .php but it's very similar apart from the bits of code inside the php tags – just leave them as they are.

If you want your edits to appear in new galleries as well as existing galleries then you will also need to edit the svmanager/svmaster/index.php file. This master index file is copied into each new gallery as it is created.

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

I understand.

Thanks for all your help and patience.

Re: embedding svManaged galleries in a page

This post has been extremely helpful... 
How would I go about embedding a single svmanaged Gallery into an existing page?  I understand how to do the top level index page, but not one of the actual galleries itself.  Is this possible? 

Any guidance would be appreciated...

Thanks,
Darren

Re: embedding svManaged galleries in a page

The principles of editing the index page for a single gallery are the same as for editing the overall galleries index page as in this thread.

The relevant page is index.php inside the gallery folder. Look at this page in a text editor (not with 'view source' in a browser) and you will see a regular html css page with some php code embedded within tags <?php ... ?>. If you are not familiar with PHP then don't mess with the stuff inside the tags. You can edit any of the html / css outside the tags.

You can also start with your own index page. Name it index.php, put it inside the gallery folder and copy the php tags and their contents from the standard index.php file into your own file. Put the tags in the same places as they are in the standard index.php.

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

Jack,

As there is a new version since this post, Can you perhaps help me.

I am trying to upgrade from the older version to the latest.

I have copied the code from the svmanager / Index php file to my site template

The code is working 100%

The problem I face is that the Thumbnails and all text is "Aligned to the Left" and not center.

I Have put the PHP statements in the center with no luck.

If you can have a look I would appreciate it. I know it must be somethjing stupid that I am doing wrong.

<div id="Content" style="position&#58;absolute; width&#58;740px; height&#58;680px; z-index&#58;43; left&#58; 250px; top&#58; 273px; visibility&#58; visible;">

<!-- InstanceBeginEditable name="Content" -->

<div id="wrapper" style="position&#58;absolute; width&#58;740px; height&#58;680px; background-image&#58;&#40;/client/back.jpg&#41;; ">

<h1 align="right" class="adminlink"><span class="adminlink fsx02"><a href="svmanager.php" class="fsx01">Administration</a></span></h1> 

<h1 align="center" class="adminlink">Client Area</h1>
      <div class="Content" id="Center" align="center">
        <?php
        // User options
        //  set number of columns for table or zero for divs
        $columns = 3;
        //  set relative path to svManager &#40;default is empty string&#41;
        $pathToManager = '';
        // End of user options
        error_reporting&#40;E_ALL&#41;;
        $pathToManager = &#40;$pathToManager !== ''&#41; ? rtrim&#40;$pathToManager, '\/'&#41;.DIRECTORY_SEPARATOR &#58; '';
        require $pathToManager.'includes'.DIRECTORY_SEPARATOR.'constants.php';
        require $pathToManager.'classes'.DIRECTORY_SEPARATOR.'indexpage.php';
        error_reporting&#40;&#40;DEBUG&#41; ? E_ALL &#58; E_ERROR&#41;;
        $indexPage = &new IndexPage&#40;&#41;;
        $adminLink = $pathToManager.'svmanager.php';
        ?>     
        <span class="Content" id="wrapper">
        <?php
        print $indexPage->getHtml&#40;$columns, $pathToManager&#41;;
          ?>
      </h1>
  </div></div>
<!-- InstanceEndEditable -->
</div>

www lamprechtphotography/ client/ index php

Thanks

Werner

Re: embedding svManaged galleries in a page

I couldn't find your site – did you miss a dot something from the end of the url?

jack

Jack Hardie
SimpleViewer Support Team.

Re: embedding svManaged galleries in a page

Sorry missed a few

www lamprechtphotpgraphy co za / client / index php

Thanks for all the help so far.

Werner

Re: embedding svManaged galleries in a page

If you run your page through the W3C html validator, you'll find quite a few errors. I'm not being critical and most of the errors are trivial, it's just that it makes it very hard to pin-down the particular error that is causing the problem when there are – I won't say how many  wink

So my first step would be to fix all the html errors. The problem might then be obvious. If it's not then you just have to fall back on standard fault-finding techniques – start with a copy of the page and gradually delete things until the problem goes away.

Or if you are looking for something quick and dirty and you want my best guess then I'd look closely at the "wrapper" id which is used twice, once as a div and once as a span. I'd also look at the use of position: absolute.

This one is really an html/css coding problem, not an svManager problem and it's now getting way beyond the scope of this forum...

jack

Jack Hardie
SimpleViewer Support Team.