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

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 3 Guests are viewing this topic.

twicklund

Hi...Great Mod..Thanks so much for developing.

Is there a way to pass the images (XML) to the SWF without using the xmlPath variable?

I would like to not call the flow.php file.  I am doing the processing (collection of the images) in the same page I have the swf loaded in and cannot pass the list to the flow.php.  I thought that appending the xml to the end of the xmkPath variable would accomplish this, but it is not.

ie, FlashVars='xmlPath=http...//.../flow.php?xml='.$xml

The xml does not get appended to the query string for some reason.  So i was hoping to just through a formatted script into the FlashVars variable.  Is his possible?  or is there another approach?

I also know you can not give me the .fla file as you don't have permissions, but is there someone I could contact to get permission? I would like to make a popup semi transparent window containing certain attributes about the image in the middle block.

Thanks a million!

=twicklund

rphMedia

If you look at the output of flow.php, you'll see the structure you would need for your images:
<?xml version="1.0" encoding="iso-8859-1" ?>
- <content>
- <image>
- <path>
- <![CDATA[ http://muvipix.com/cpg/albums/userpics/10015/thumb_thumb_LensFlareMeteors.jpg
  ]]>
  </path>
- <description>
- <![CDATA[
  ]]>
  </description>
- <data>
- <![CDATA[ http://muvipix.com/cpg/displayimage.php?pos=-901
  ]]>
  </data>
  </image>
...
</content>


Then, simply replace the path to the flow.php file with your xml file:

FlashVars='xmlPath=http://yoursite.com/created_xml.xml

Unless I'm not understanding what you actually want.

hama


Some time ago I asked how to include or exclude specific categories. I can't find these examples anymore.

Please, can you give me one example how to include two categories and one example how to exclude two categories.

I think I have to change something in this line of flow_link.php:


$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 20");


Thanks a lot and have a nice weekend  :)

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

hama

Quote from: hama on September 12, 2008, 02:06:40 PM
Some time ago I asked how to include or exclude specific categories. I can't find these examples anymore.

Please, can you give me one example how to include two categories and one example how to exclude two categories.

I think I have to change something in this line of flow_link.php:


$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 20");


Thanks a lot and have a nice weekend  :)



Please, can somebody give me a hint.  :)


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

hama


Another question to rphMedia:

Can you please construct a flow_link.swf which fits in 500x200, respecting private albums and has the possibility to exclude or include specific albums (as I asked in the posting above)?

I tested with no link (looks good with the size, the pics are not pressed together, but have no link): http://orst.ch/index3.php

Now it looks like that (there is a problem with the size and the pics are too pressed together and I need help with that): http://orst.ch/index33.php

Thanks in advance.

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

rphMedia

Sorry Hama, forgot about this one.

The SQL for Categories: I don't really know SQL that well. Maybe Nibbler can hook us up with that? :)

And yes, I can make you a re-sized version, give me a few days.

hama


@rphMedia:
Sounds good! No stress, I can wait.  ;)

@Nibbler:
rphMedia recommends you as SQL-professional (and I know that this is true!  :) ). So can you help us please with that:

I need one example how to include two categories and one example how to exclude two categories.

I think I have to change something in this line of flow_link.php:


$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 20");


Thanks a lot!

hama

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

rphMedia

#127
Try the attached, Hama. The current code respects private albums.

Edit: fixed attachment.

Nibbler


$result = mysql_query("SELECT p.* FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE category IN (1, 2) AND filename LIKE '%.jpg' ORDER BY pid DESC LIMIT 20");


To exclude categories use "NOT IN" instead of "IN".

Also, try to use Coppermine's cpg_db_query() instead of mysql_query().

hama


Quote from: Nibbler on September 21, 2008, 07:44:53 PM

Also, try to use Coppermine's cpg_db_query() instead of mysql_query().


Thanks a lot for your help! By the way: Why is cpg_db_query() the better choice?
Can I change that for myself or has rphMedia to change more stuff in the main php file for that?

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

hama


Quote from: rphMedia on September 21, 2008, 07:33:38 PM
Try the attached, Hama. The current code respects private albums.

It looks like that at the moment: http://orst.ch/index33.php

In my view there is too much space at the top and too less space at the bottom. The main picture is behind a "gray wall". And the pictures are too much pressed together (please see this example where the pictures are not pressed together, I like it [but has no links]: http://orst.ch/index3.php).

Maybe something is wrong in my php code (see below the php file and the piece in the index):




<?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 = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE 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;
?>





<div align="center">
<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", "200", "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>
</div>



Thanks for your help and have a nice day!  :)

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

rphMedia

Quote from: hamaBy the way: Why is cpg_db_query() the better choice?
Can I change that for myself or has rphMedia to change more stuff in the main php file for that?

You can change that yourself.

I fixed the attachment in the above post, sorry about that.

hama


Quote from: rphMedia on September 22, 2008, 10:34:29 AM

I fixed the attachment in the above post, sorry about that.


You fixed it but you loaded an flvPlayer.  :o





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

rphMedia


hama


Thanks for your work! Is it possible to change it a bit?

That's the actual situation with your new .flv: http://orst.ch/index33.php.

--> My pics are 133 x 100 (I think in your flash file the definition is bigger?).

--> In my opinion the pics are too close together. I like this little bit vertical white between the pictures ...

--> My wish is to have it similar to the example in http://orst.ch/index3.php but linked to intermediate.

Sorry for that and no hurry. Have a lot of coffees!!!  ;)

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

rphMedia

Hama, that's not the new file. Be sure you replace your flow33.swf with the new file. The pictures are not that close together in the new file.

Edit: Wait, scratch that, I didn't clear MY cache. I'll adjust the image sizes for you (133x100).

rphMedia


hama


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

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

rphMedia


hama


http://orst.ch/index3.php

This example shows the ideal height of the mirror pictures ... and the desired size of the horizontal padding.

Sorry for my permanent and not always perfect translated wishes!  ::)

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