Image Scroller - based on iTunes [link to Intermediate] - Page 8 Image Scroller - based on iTunes [link to Intermediate] - Page 8
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Image Scroller - based on iTunes [link to Intermediate]

Started by rphMedia, December 05, 2007, 02:17:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rphMedia

OK, I'll have to get to that later. Probably tomorrow.

rphMedia

#141
Quote from: hama on September 22, 2008, 10:42:17 PM
That looks much better!

The padding has the exact size.

Can you resize the mirrored pictures a bit that they are about half the height of the pictures above? They are too high at the moment.

Thanks in advance!

hama



Try the attached, Hama. Should be what you need.
Edit: Removed attachment.

hama

Yes, that's it. - It looks great. - Thanks!  :)

One problem I can't solve: I get always the same 20 pictures ... after deleting the cache ... after reloading the page.

That's the flow.php:


<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$path=$CONFIG['site_url'];
$xml '<?xml version="1.0" encoding="iso-8859-1"?>
<content>';
if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$result = cpg_db_query("SELECT p.* FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE category NOT IN (9) AND filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 20");
$row = mysql_fetch_array($result);
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><description><![CDATA[" . $row['title'] . "]]></description><data><![CDATA[" . $path . "displayimage.php?pos=-" . $row['pid'] . "]]></data></image>";
}
$xml .= '</content>';
echo $xml;
?>


That's a part of the index.php:


<script type="text/javascript" src="http://orst.ch/flashobject.js"></script>
<div id="flashcontent" style="width: 500; height: 200px"></div>
<script type="text/javascript">
var fo = new FlashObject("flow33.swf", "animationName", "500", "220", "8", "#FFFFFF");
fo.addVariable("xmlPath", "http://orst.ch/copper/flow33.php"); <!-- absolute path to flow.php -->
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("wmode", "transparent");
fo.write("flashcontent");
</script>


Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

#143
Change flow.php to:
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$path=$CONFIG['site_url'];
$xml = <?xml version="1.0" encoding="iso-8859-1"?>
<content>';
if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$result = cpg_db_query("SELECT p.* FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE category NOT IN (9) AND filename LIKE '%.jpg' ORDER BY RAND() LIMIT 20");
$row = mysql_fetch_array($result);
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><description><![CDATA[" . $row['title'] . "]]></description><data><![CDATA[" . $path . "displayimage.php?pos=-" . $row['pid'] . "]]></data></image>";
}
$xml .= '</content>';
echo $xml;
?>

hama


Your new flow.php gives no picture.  :'(

Then I changed "ORDER BY BY RAND" to "ORDER BY RAND". - Again no picture.

I don't know why. First I was so happy and now with the random it doesn't work. - Strange.

Thanks for your patience!

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

Try the code again. I had 2 "BY" in there.

You ask for so much, we're bound to make mistakes :)

hama


Something is wrong at the moment. I have a look tomorrow. Thanks and good Night.

Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

hama


I couldn't wait and so I tried again. Everything works now and I'm happy!  :)

Thanks a lot for your big and professional help!

hama

Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

hama


There is one issue in the newest flow_link.swf:

It doesn't respect "upright" (is that correct in English?) pictures.

133x100 gives 133x100

but

75x100 gives 133x100 (doesn't look good)

Sorry. - I hope you don't have to change a lot.

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

#149
You may not like this one. Try the attached, it doesn't scale the images.
Edit: Removed attachment.

hama


I think I didn't explain the problem good enough (your in the last post attached file has the same problem). I try it again:

In my gallery there is also a "flow" running (without link to intermediate). This one respects that the thumbs can have two sizes (133x100 or 75x100). Please see the first attached screenshot "flow-gallery-hama.jpg" (picture in the middle).

The "flow" for the front which you constructed for me in the last few days (and I'm very happy about that!!!) has everything I wish except that this version doesn't respect the 75x100 thumbs. It takes for example 20 pictures from the gallery (random works now!) and doesn't check if on of these thumbs has dimension 75x100, it just makes with every thumb 133x100.

Finally some pictures in the flow_link.swf look stretched because the don't have the right proportions. Please see the second attached screenshot "flow-link-front-hama.jpg" (the picture in the middle has originally 133x100 but now it's 75x100).

Thanks for looking into that.

hama

Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

Joachim Müller

Quote from: hama on September 24, 2008, 01:40:41 AM
It doesn't respect "upright" (is that correct in English?) pictures.
I think you're refering to portrait orientation (where the width is smaller than the height), opposed to the term "landscape orientation" (width larger than height).

hama


Yes, that's right. I wasn't able to explain that ...  :-\

I keep the two expressions "portrait" and "landscape" in mind, now.

@Joachim: Thanks, I hope it helps that rphMedia doesn't go crazy with me.  ::)



Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

Hi Hama,

That last attachment lets the orientation remain. Be careful when replacing flash files as sometimes they tend to stay in your cache until you physically remove it (by clearing).

Try replacing the flow_link with the last attached and tell me what you get (and give me a link).

I personally think it looks better when all images are the same size, but I'll let you be the judge :)

hama


Hi Ron

I downloaded again your last file, installed it and cleared the cache. That's the link:

http://orst.ch/index33.php

I personally prefer "portrait" and "landscape".

Can you change it? That would be very nice!

Greetings

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

Hama, I just checked about 5-6 of your thumbs and none of them are portrait, they are all landscape. I assure you that that last file respects orientation. I just tried my file with your PHP file and none of them are portrait??? When I try it with MY PHP file, I have several that are portrait and they work fine.

Try removing the random setting (put it back to DESC), that way we can see if the thumbnails are actually portrait or not, because it will be a fixed query.

hama


Hi Ron

I changed back to "ORDER BY pid DESC".

That's the actual flow-file:


<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$path=$CONFIG['site_url'];
$xml '<?xml version="1.0" encoding="iso-8859-1"?>
<content>';
if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$result = cpg_db_query("SELECT p.* FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE category NOT IN (9) AND filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 30");
$row = mysql_fetch_array($result);
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><description><![CDATA[" . $row['title'] . "]]></description><data><![CDATA[" . $path . "displayimage.php?pos=-" . $row['pid'] . "]]></data></image>";
}
$xml .= '</content>';
echo $xml;
?>


The following picture in the gallery has portrait orientation:

http://orst.ch/copper/displayimage.php?pos=-34314

but comes with landscape orientation in the folw of the homepage (it's Nr. 21):

http://orst.ch/index33.php

Maybe you wonder what we did at school (see the picture): First a teacher showed that it is possible to drink water upside down and second the pupils had to build bridges only with thin paper and we tested how many book the bridge was able to hold (the best bridge was close to 20 books).

;)

Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

OK, think I got it. Try the attached.

You're so picky  ;D

hama


Quote from: rphMedia on September 26, 2008, 11:46:36 AM

OK, think I got it. Try the attached.


Yes! You got it! Now it works just perfect! Yeah!  :)


Quote from: rphMedia on September 26, 2008, 11:46:36 AM

You're so picky  ;D


At this moment my girlfriend is standing behind me - smiling about me - and saying "Hey, who's this man? Why does he know you so good?".  ::)

Ron, thank you so much for your help - and again, have a good time!

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

Joachim Müller

Ron, imo you should share your amazon wishlist here or refer to a donation button by paypal or similar ;-)