Easy RSS feed & PicLens - Page 4 Easy RSS feed & PicLens - 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

Easy RSS feed & PicLens

Started by colinsp, February 17, 2008, 09:58:35 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

snark

Iced Coffee, here is the corrected version. Only 1 change at line 305 is different from the previous version posted by Timo. It's very different from the one you posted.

You might still have to change some variables in the script according to the values used in your gallery or to your desires (for instance on lines 33, 37, 47).

Iced Coffee

Quote from: snark on August 21, 2008, 07:33:19 AM
Iced Coffee, here is the corrected version. Only 1 change at line 305 is different from the previous version posted by Timo. It's very different from the one you posted.

You might still have to change some variables in the script according to the values used in your gallery or to your desires (for instance on lines 33, 37, 47).

Thanks snark. I have replaced my rss.php with yours on my server and found an issue I don't want: This new rss.php requests to load the normal_ file immediately (not thumbnails, then load normal_ pictures on click), therefore, it takes quite long to load all the pictures out to PicLens. After waiting for a while, only 4 or 5 pictures have been loaded. Like this:
http://img84.imageshack.us/img84/5542/clipboard10yq7.jpg

Is there any way to make it loads thumbnails first?

And on double click I do not see a filmstrip like before?

snark

Quote from: Iced Coffee on August 21, 2008, 08:33:31 AMIs there any way to make it loads thumbnails first?

Line 330 of rss.php, change:
$item .= '<media:thumbnail url="'.$normal_url.'" />';
so it becomes:
$item .= '<media:thumbnail url="'.$thumb_url.'" />';

For the moment, when you clink on an image in Piclens, it'll load the full size image.
If you want to load the normal image instead of the full size one, comment out line 335 and uncomment line 334.
So from
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';

to:
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';


Quote from: Iced Coffee on August 21, 2008, 08:33:31 AMAnd on double click I do not see a filmstrip like before?
I don't think it's due to rss.php. It works fine for me both with FF3 and IE7.  ???

Iced Coffee

#63
Quote from: snark on August 21, 2008, 09:09:14 AM
Line 330 of rss.php, change:
$item .= '<media:thumbnail url="'.$normal_url.'" />';
so it becomes:
$item .= '<media:thumbnail url="'.$thumb_url.'" />';

For the moment, when you clink on an image in Piclens, it'll load the full size image.
If you want to load the normal image instead of the full size one, comment out line 335 and uncomment line 334.
So from
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';

to:
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';

I don't think it's due to rss.php. It works fine for me both with FF3 and IE7.  ???

Thanks. It's working fine with me now. But it just commented out the line 324 and 325, not 330
Quote//$item .= '<media:thumbnail url="'.$normal_url.'" />';
  //$item .= "\n";

and commented out 328 and uncommented 329
Quote$item .= '<media:content url="'.$normal_url.'" type="" />';
   //$item .= '<media:content url="'.$full_url.'" type="" />';

http://img233.imageshack.us/img233/105/clipboard11gt3.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]

snark

Yes, line numbers might not matched, I made some changes locally in my script.

Iced Coffee

I found that file information is not loaded except for the file name. Can I load some info like number of view and comments?

Thanks.

snark

To add number of views, find line:
$title      = $picture[filename];
and change it to
$title      = $picture[filename] . ' - Views: ' . $picture[hits];

For the comments, it's more difficult. And the title can only be in 1 line, so displaying the comments is probably not a good idea, as you won't be able to display a lot of them.

Iced Coffee

#67
Thanks it works well now.

By the way, could you please help with another problem: Many of my pictures could not display when I click to the thumbnail. There is a "!" mark like this:

http://img99.imageshack.us/img99/6048/clipboard12fn9.jpg [Edit GauGau] Replaced hotlinked image with attachment. Stop hotlinking images! [/Edit]

Most of them are those pictures I posted before rss feed was installed to my gallery. You can go here and see http://giadinhhanhphuc.net/anhgiadinh/

snark

Quote from: Iced Coffee on August 21, 2008, 11:34:27 AMBy the way, could you please help with another problem: Many of my pictures could not display when I click to the thumbnail. There is a "!" mark like this:
It's because you don't have "normal" (intermediary) images in your gallery.

The RSS feed points to
...<item>
<title>hoanggiang_30th_08.JPG - Views: 6</title>
<link>http://giadinhhanhphuc.net/anhgiadinh/displayimage.php?album=63&amp;pos=2</link>
<guid>83fa5a432ae55c253d0e60dbfa716723</guid>
<media:thumbnail url="albums/29-30th/thumb_hoanggiang_30th_08.JPG" />
<media:content url="albums/29-30th/normal_hoanggiang_30th_08.JPG" type="" />
</item>
...

http://giadinhhanhphuc.net/anhgiadinh/albums/29-30th/normal_hoanggiang_30th_08.JPG does not exist.
http://giadinhhanhphuc.net/anhgiadinh/albums/29-30th/hoanggiang_30th_08.JPG does.

Make sure the full images are linked in the RSS:
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';


If you use this code below, the normal images are used but do not exist for your album:
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';


PS: Cute kids, BTW!  ;)

Iced Coffee

Thanks a lot snark. I have corrected it and it works very smoothly on my site.

By the way, could you show me how to show the descriptions and post date of my pictures also? Sorry if I am too annoying :)

And thanks for your comment of my kids. Yes, they are very lovely :)

snark


  • Filename : $picture[filename]
  • Number of views : $picture[hits]
  • Title : $picture[title]
  • Description : $picture[caption]
  • Post time : localised_date($picture[ctime], $album_date_fmt)  ( line "global $lastup_date_fmt;" required above in the code)

Mix them in the title variable to show what you want:
$title      = $picture[filename] . ' - ' . $picture[hits] . ' views - date : ' . localised_date($picture[ctime], $album_date_fmt) ;
will show
Quoteimg001.jpg - 4 views - date : 2008/01/13

Iced Coffee


sidz

Cheers to everyone on this topic.
Bloody good work.
I've been able to get this running on my site as well (albeit with a lot of stuffing around on my part. Turned out i needed to reinstall CoolIris in the end!!)

http://gallery.sidz.id.au

If anybody knows how, setting this up as a plugin would be mighty handy!!

If you are going to install this in your coppermine gallery, make sure you follow these steps.
    1. Install the EasyRSS plugin
    2. Upload snark's latest rss.php file to your root directory.
    3. modify the codebase.php (found in the plugin folder under EasyRSS): Remove the function easyrss_header and replace it with the following:

function easyrss_header() {
    global $CONFIG,$lang_plugin_easyrss;
    require ('plugins/Easy_RSS/include/init.inc.php');

//A/ so here is the Header for PicLens
    $add_header_info = "";
//    $add_header_info = "<!-- Step 1: Add a Photos RSS feed to this webpage. //-->";
    $add_header_info .= "\n<link id=\"gallery\" rel=\"alternate\" href=\"rss.php?album=".$_GET['album']."&amp;page=".$_GET['page']."&amp;imgpos=".$_GET['pos']."\" type=\"application/rss+xml\" title=\"Image Gallery\" />";
//    $add_header_info .= "\n<!-- Step 2: Include the PiclensLite JavaScript. //-->";
    $add_header_info .= "\n<script type=\"text/javascript\" src=\"http://lite.piclens.com/current/piclens_optimized.js\">";
    $add_header_info .= "</script>\n<style type=\"text/css\"> .mbf-item {display:none;} </style>".$otherHead;
    return $add_header_info;
}


    4. Edit the rss.php file for your required settings.

  • If you do not create normal_ picture types, make sure you use .$full_url in the media:content line (around line 333).
  • comment out or put in the correct logo for your site (around line 47)
etc.


Hopefully that should be it.

cheers again everyone.



snark

Thanks for the digest, sidz!  :D
Quote from: sidz on August 28, 2008, 11:49:13 AMIf anybody knows how, setting this up as a plugin would be mighty handy!!
Actually, I was considering do it, based on the EasyRSS one but I don't have much spare time for the moment.

andiwe

Here's my Plugin-Mod to install (see attached file).

You can now select what Pictures you like to use for Cooliris Piclens at Installation.
Choose between thumbs or normals for Piclens-Thumbs and between normals or full for Piclens full detail.
Optionally you can enter a logo url.

Would love to hear from you if it works.  ;D
Any problems? Security?  :o

Feedback welcome  ;)
Andi

--- for Cooliris Piclens CPG Plugin (Easy RSS Mod) check out my Website Link ---

Guido`

@Andiwe:
Thanks for your Mod - it works fine for me (finally).
I'm just wondering whether it would be possible to add image description to picLens?,

andiwe

Quote from: Guido`@Andiwe:
Thanks for your Mod - it works fine for me (finally).
I'm just wondering whether it would be possible to add image description to picLens?,

Nice to hear  :)

This should solve it (see snark's post below). The variable is at line 313 in rss.php.
Maybe there could be problems with long descriptions since cooliris does not support multiple lines, i think.

Quote from: snark's post #70* Filename : $picture[filename]
    * Number of views : $picture[hits]
    * Title : $picture[title]
    * Description : $picture[caption]
    * Post time : localised_date($picture[ctime], $album_date_fmt)  ( line "global $lastup_date_fmt;" required above in the code)


Mix them in the title variable to show what you want:
Code:

$title      = $picture[filename] . ' - ' . $picture[hits] . ' views - date : ' . localised_date($picture[ctime], $album_date_fmt) ;

will show

img001.jpg - 4 views - date : 2008/01/13
Andi

--- for Cooliris Piclens CPG Plugin (Easy RSS Mod) check out my Website Link ---

Daryth

Quote from: andiwe on September 23, 2008, 11:59:29 AM
Here's my Plugin-Mod to install (see attached file).

You can now select what Pictures you like to use for Cooliris Piclens at Installation.
Choose between thumbs or normals for Piclens-Thumbs and between normals or full for Piclens full detail.
Optionally you can enter a logo url.

Would love to hear from you if it works.  ;D
Any problems? Security?  :o

Feedback welcome  ;)

I just started looking at this today. I have a simple coppermine gallery that has been populated  with photos and destroyed and repopulated but nobody really looks at it because its so hard and unattractive.

I figured out how to install the plugin that you posted here (I don't know anything about coppermine)...I don't see any differences on my site though??

Daryth

Quote from: Daryth on October 29, 2008, 04:27:33 PM
I just started looking at this today. I have a simple coppermine gallery that has been populated  with photos and destroyed and repopulated but nobody really looks at it because its so hard and unattractive.

I figured out how to install the plugin that you posted here (I don't know anything about coppermine)...I don't see any differences on my site though??


working now!  (picking jaw up off the floor) nice work to everyone in this thread! Nicely done.

machinedragon

@andiwe,

Thanks for the plugin works great for cooliris, but do you know why firefox doesn't display anything if you click the feed icon in the address bar?
thanks in advance machinedragon.