Image Scroller - based on iTunes - Page 4 Image Scroller - based on iTunes - Page 4
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Image Scroller - based on iTunes

Started by rphMedia, May 25, 2007, 03:28:54 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rphMedia

Quote from: freeedy on August 14, 2007, 06:20:24 AM
Hi guys, I cant make to work. And I dont know whats going on.
I have my gallery in www.lacuadra-st.ej.am/gallery (thats were i put the php file)
And I want to show this swf in my main site, in the index so I place the htm, the swf, and the js in www.lacuadra-st.ej.am.

The things that I changed were:
in the htm I put the path to the php (http://www.lacuadra-st.ej.am/gallery/flow.php)
and in the htm I try different things to see which one works (http://www.lacuadra-st.ej.am/gallery  and  http://www.lacuadra-st.ej.am), no oneworked. The weirdest things was that when I put http://www.lacuadra-st.ej.am/ and put the swf, htm and js in the gallery directory, it worked there.

I want it to work in http://www.lacuadra-st.ej.am/flow.htm, but it just donet, the swf appears and works but the images dont appear, the boxes are empty

You may have the "WWW" problem. Try removing the www in your xmlPath in flow.htm. When Flash sees that you use the www in some places and others you don't, it assumes it's a different domain and fails security-wise.

Hint: When I click your link to the root of your site, the www disappears.

freeedy

Ok, I already took out the www but it didnt work either, I also allow in the gallery the view of unlogged users, but it didnt work either.

So maybe the prob is in the urls of my site.
I found that it works if I put it in the gallery directory, but I want it to show in the root directory of my site (where the index.php of my site is).

Lets see, in the htm I have to put the complete url where the php is:
http://lacuadra-st.ej.am/gallery/flow.php
Thats right?

Now, in the flow.php I have to put the url were the htm is:
http://lacuadra-st.ej.am
Thats right?

Please correct me if i am wrong

rphMedia

Yeah, I was just looking at this.

Your flow.php file is outputting relative paths to the images. They should be absolute. Post your current flow.php file, something isn't right.

freeedy

Thank you, I really appreciate your help. So far I found out that if I took out the www, the flash wont appear. Also I have tried changing the 'http://www.lacuadra-st.ej.am' into 'http://www.lacuadra-st.ej.am/gallery'; and 'http://www.lacuadra-st.ej.am/gallery/albums';. No one makes the trick. Please help!!

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$path=$CONFIG['http://www.lacuadra-st.ej.am'];
$xml '<?xml version="1.0" encoding="UTF-8"?>
<content>';
if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 20"); //You can change the '20'
if (!$result) {
die('<p>Error performing query: ' . mysql_error() . '</p>');
}
while ($row = mysql_fetch_array($result))
{
$type = max($row['pwidth'], $row['pheight']) > $CONFIG['picture_width'] ? 'thumb' : 'thumb';
$xml .= "<image><path><![CDATA[" . $path . get_pic_url($row, $type) . "]]></path></image>";
}
$xml .= '</content>';
echo $xml;
?>

rphMedia

Your site URL should be the Coppermine Photo GALLERY site URL, not your root. There's a variable that should be used that was so kindly referred to me that you should use as well. It's in the original flow.php file. You may have thought to use a URL, but it is a variable -

Change:
$path=$CONFIG['http://www.lacuadra-st.ej.am'];

To:
$path=$CONFIG['site_url'];

And you should be all set.

I realize you used the gallery URL, but I don't think you put a slash at the end.

freeedy

So actually in the original php I dont have to change anything? I just uploaded as it is into the gallery directory???

The only thing that I actually have to change to the original files if the code of yout sample (htm) so it directs me to the php??

freeedy

AT LAST!!!!! IT WORKS!!!! THANK YOU VERY MUCH for your help, I really appreciate all the time that you spend answering my comments.

freeedy

New problem arises!!!!!

Everything was working perfectly, but as any human I wanted more. I decided that my thumbs were too small, so I decided to change the swf, I put the one with no scale. Everything work right, but I realize that the problem wasnt the restriction of the swf, it was actually the size of my thumbs in my gallery, so I decided to resize all mi thumbs. I updated all my thumbs from awidth of 100 to a140, just a little bigger. And when I return to check everything was mess up.

The photos didnt show anymore!!!!! Instead big red squares appear!!!!

I dont know whats wrong, what can I do???

rphMedia

Looks fine to me on the 'Incio' page.

You should post back if you've found the solution.

freeedy

Its really weird, it get solve by its own. Probably it was just a cookies problem, since I didnt do nothing to solve it.

Anyway, thank you a lot for all your help.

This scroller its really great!!!!

Carlos5039

Is there a way to select a particular album to get the pictures from?

rphMedia

Quote from: Carlos5039 on August 17, 2007, 01:40:37 PM
Is there a way to select a particular album to get the pictures from?

On this line in 'flow.php':
$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 20"); //You can change the '20'


Change it to:
$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE aid='YOUR ALBUM ID NUMBER' AND filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 20"); //You can change the '20'

Adding the Album ID (aid).

Carlos5039

Thanks for the Code, it worked perfectly............. ;D

olti

Quote from: rphMedia on June 16, 2007, 02:15:41 PM
because of the edits required.

Can you give an exact guide what edits should be done?

Quote
Edit flow.php with yoursite information and the number of images you want extracted.

What should be edited here?


Gephri

Love the image scroller so much that I would like to use it on other sites I run - and have it pull from my current gallery.
You have previously stated:
QuoteThis will run anywhere on your site (domain), doesn't have to be in the gallery only. Flash has a security feature built in to not allow cross-domain executions. There is a fix for this if desired and your server(s) support(s) it.

Can you instruct how to config for a cross-domain setup?

rphMedia

#75
Quote from: Gephri on August 31, 2007, 12:31:20 AMCan you instruct how to config for a cross-domain setup?

Create a file with a text editor with the following XML format:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="YOURSITE.com" />
<allow-access-from domain="www.YOURSITE.com" />
<allow-access-from domain="ANOTHERSITE.us" />
</cross-domain-policy>


Save it as 'crossdomain.xml'

Put that in the root of the site that you would like to allow access. And of course, change the domains in the file with yours. Then, simply point to the flow.php from the other site.

Gephri

It seems simple enough - but I can't seem to get it to work cross-domain.
I changed the following to be my web sites (with http://www.) in front of each,
<allow-access-from domain="YOURSITE.com" />
<allow-access-from domain="ANOTHERSITE.us" />


and uploaded the files where you said.  Are you sure this is all that is needed?

rphMedia

Where did I say to add the 'http://www' ? This is why it doesn't work for you. Your server(s) [host] must support it as well.

Gephri


rphMedia