Welcome Guest, Not a member yet? Register   Sign In
Need help with SimpleViewer and CI.
#1

[eluser]drabina[/eluser]
My first post since I started to work with CI about a week ago. So far I had no problems but this one bugs me.

I want to use SimpleViewer for my photo gallery page. I have created view that has the SimpleViewer object embedded in it. Gallery with photos is in the folder of the root directory. Here is the structure:

/galleries/1/images/
/galleries/1/thumbs/
/galleries/1/gallery.xml
/galleries/1/swfobject.js
/galleries/1/viewer.swf

/app/views/simpleviewer.php

The content of the simpleviewer.php is:
Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="100%" height="100%" align="middle">                        
<param name="movie" value="http://www.mydomainname.com/galleries/&lt;?= $gallery_id ?&gt;/viewer.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="BGCOLOR" value="#181818" />
&lt;embed
    src="http://www.mydaomainname.com/galleries/&lt;?= $gallery_id ?&gt;/viewer.swf"
    width="100%"
    height="100%"
    align="middle"
    quality="high"
    scale="noscale"
    bgcolor="#181818"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
/&gt;
&lt;/object&gt;

Unfortunately, when I load the gallery I get error "gallery not found".

Any help would be appreciated. Thanks.
#2

[eluser]TheFuzzy0ne[/eluser]
Can you confirm that $gallery_id is being output into the source correctly?
#3

[eluser]drabina[/eluser]
Yes, the $gallery_id has the correct value. Confirmed that thru simple echo command.

I think it has something to do with paths.
#4

[eluser]TheFuzzy0ne[/eluser]
I think you may be right, but I've no idea exactly what the problem is as I don't tend to work with embedded objects. Sorry... Sad
#5

[eluser]Unknown[/eluser]
From my experience the paths of the files you are inputing into Simpleviewer MUST be relative to the view file it's embedded in (eg. ../../../galleries/). It cannot be an absolute (eg.http://....) path. This is confusing because it's pretty much the exact opposite of the 'normal' way of doing things in CI
#6

[eluser]drabina[/eluser]
I was unable to get the gallery working with relative paths. Finally I have used an IFRAME and now the SimpleViewer page with embedded object is in the same folder as other gallery files. It is working now.

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB