I have recently added Piclens to my site, and it works almost perfectly - Thanks to all the previous forum entries on how to install it.
The only problem is, my watermarks are not being displayed when piclens actually renders the full size image. So how do I get piclens to add the watermark onto the images? so people cant do a screen grab and receive the full size image?
It may be the same problem people were having with the 3mb photos, and need the compressed image for piclens display...
Thanks,
Andrew
Posts: 27300
Look for piclens support in G2.3
Test a nightly build to see if your issue exists.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8339
if you are using my picLensRss.php, try commenting out or removing line 409
$item = getPreferred($item);
I've discovered this to be the cause of my feed generators to leave some items out.
Also you can also poll for images of a particular size limit like:
http://www.yoursite.com/gallery2/picLensRss.php?g2_itemId=49&g2_maxImageWidth=600&g2_maxImageHeight=600
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
Thanks suprsidr, I cannot seem to find that file - I think I must be using an old php file.
Here are the files I added for the piclens to work (in the gallery2 root directory. ie. www.webaddress.com/gallery2/):
xml.php (from the first php post in this forum http://gallery.menalto.com/node/66745
photos.rss
minislideshow.swf (direct from http://www.flashyourweb.com/dokuwiki/doku.php?id=xmlmini
I then edited /themes/carbon/templates/theme.tpl and added the lines
after
Just did a search for that file, you were talking about and uploaded it, made the specified changes - but it stopped the piclens form displaying... I must be missing something! I will try again shortly, and if I have any problems will post again.
Posts: 8339
Far better instruction for my xml generators can be found here.
And the latest picLensRss.php with the ability to limit image size is here.
Full instructions can be found further into that thread remember that gallery caches your templates, so you may need to clear your template cache in gallery -> admin -> maintenance.
Of course you could always update to a nightly build and have picLens natively ;)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
OK - updated the files, and now it will not work. even after clearing the template cache... so let me get this clear.
Download minislideshow.zip
Download picLensRss.php
upload to www.myweb.com/gallery2/ (in standard install directory)
crossdomain.xml
mediaRss.php
minislideshow.swf
picLensRss.php
Change what I had in theme.tpl
to
and also edit album.tpl
... I placed this code at the end of the <div class="gbBlockTop">, and the slideshow button appears - and opens piclens, but piclens says gallery does not exist! Play buttons over the pictures are also not displaying.
Other than that - can you point me in the direction of how to make a nightly build?
Posts: 8339
Sample url? Did you edit line 28 of picLensRss.php to reflect your setup? Is the little arrow showing on the images?
crossdomain.xml, mediaRss.php, minislideshow.swf <- these are not necessary for picLens. They are for my minislideshow.
Nightlies available here.
This would be a complete update to the latest code, all normal care is needed ie. backup DB, theme mods...
Theme mods would need to be transferred over to the new theme versions as there is some specific slideshow changes to the themes.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
One last thing that could be preventing picLensRss.php from displaying... if the imageBlock flag isset ie. "Prevent this album from being displayed in the Image Block"
You can set the function getDisabledFlag(line 476) to always return false.
and make sure to comment out or remove line 409 as stated above.
sleep....
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
here is my site- public gallery.
will try that edit
Posts: 13
working now, but still has watermark free images. Have a good sleep
Posts: 8339
Now just add the size limit:
{if $theme.pageType == 'album'}
<link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?g2_itemId={$theme.item.id}&g2_maxImageWidth=600&g2_maxImageHeight=600" id="picLensGallery"/>
<script type="text/javascript" src="http://lite.piclens.com/current/piclens.js"></script>
{/if}
It will find the closest match to 600 x 600 if one exists or whatever size you want.
(I tried 600 x 600 and indeed received the watermarked images)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
suprsidr you are a champion! it works like a treat now. thankyou for all your help. I even get a nice slideshow running without piclens installed on IE and firefox. Now I can promote piclens to my visitors.
Posts: 22
suprsidr, i tried adding to this my site. However, I have wordpress and am using the wpg2 to integrate gallery with wordpress and I cant seem to get this to work. The URL for my gallery pictures within the album is similar to this
http://www.example.com/wpg2?g2_itemId=938
How can I make the php script work with wpg2. Any help is appreciated.
Posts: 8339
The embedUri and g2Uri must match the WPG2 embedUri and g2Uri.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 22
suprsidr. i have no clue what that should be. Here is what Ive set it to.
$ret = GalleryEmbed::init(array('fullInit' => true, 'embedUri' => '/wpg2', 'g2Uri' => '/wpg2/'));
Also, in theme.tpl, I have
<link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/picLensRss.php?g2_itemId={$theme.item.id}" id="picLensGallery"/>
On the album photos page (http://www.periferral.com/wpg2?g2_itemId=938) I get a photo rss feed. However it seems to be pointing to http://gallery.periferral.com/wpg2?g2_view=slideshow.SlideshowMediaRss&g2_itemId=938 which is wrong.
It should be http://www.periferral.com/wpg2?g2_view=slideshow.SlideshowMediaRss&g2_itemId=938
Well I don't know what else is wrong but I guess it can start there.
Posts: 8339
You have both feeds?
I'd use the official G2 version, mine was just a fix until G2's was ready.
But in this situation I know how to control mine
if your gallery is indeed at http://gallery.periferral.com/ that would be your g2Uri
and if WP is at http://www.periferral.com/wpg2 then there is your embedUri
If G2 thinks http://gallery.periferral.com/wpg2?g2_view=slideshow.SlideshowMediaRss&g2_itemId=938 is where the official rss is, it is correct.
I cannot confirm as these urls don't seem to exist.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 22
okay. I tried what you said. Some progress. I see picLens RSS feed as well but it leads to a page not found.
The links are working, see if you can tell me anything you can help out with. The links should be live.
Posts: 8339
Ok, I did indeed find your gallery at http://gallery.periferral.com/
so in picLensRss.php your g2Uri would be http://gallery.periferral.com/
and your embedUri would be http://www.periferral.com/wpg2
use the full urls, as well as the full url in theme.tpl
<link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="http://gallery.periferral.com//picLensRss.php?g2_itemId={$theme.item.id}" id="picLensGallery"/>
BUT you may run into a cross-domain issue with flashplayer.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 22
hey suprsidr, i made the changes you suggested.
Here is what I have
theme.tpl
<link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="http://gallery.periferral.com/picLensRss.php?g2_itemId={$theme.item.id}" id="picLensGallery"/>
picLensRss.php
$ret = GalleryEmbed::init(array('fullInit' => true, 'embedUri' => 'http://www.periferral.com/wpg2', 'g2Uri' => 'http://gallery.periferral.com/'));
Now, I when I choose picLens RSS feed from the photo site, I see a page with the album name but no photos within there. Here is the link
http://gallery.periferral.com/picLensRss.php?g2_itemId=938
Looks like something minor. Any suggestions?
Posts: 22
suprsidr.. as a workaround. Ive added this to my album.tpl and it works. This uses the built in slideshow RSS feed and piclens works great.
<link rel="alternate" type="application/rss+xml" title="Test RSS" href="http://www.periferral.com/wpg2?g2_view=slideshow.SlideshowMediaRss&g2_itemId={$theme.item.id}" id="testGallery"/>
I guess this should work for me for now. Thanks for your help. I'd still be interested to see if your solution works. Ive kept the picLensRss feed there so you can see.
Posts: 1
I have just installed gallery v2.2.4 and am having trouble determining how my default theme templates need to be altered to use the picolens slideshow. I am using matrix as the default theme. I have attached my tpl files to this post. Can someone kindly make changes to these files and reply or let me know where the changes would need to be made and I will certainly make them.
Any help is greatly appreciated.
Posts: 8339
You could upgrade to a nightly build and get picLens natively;
Latest experimental code (updated nightly):
rabinovich.org gallery2.hu jpmullan.com cau.se
The nighlies are quite stable this close to a release.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 4
@suprsidr
Thanks for the great addition to G2.
Was wondering if there was a way to get picLens to work with albums with sub albums, or to view the entire gallery?
Thanks!
-x
Posts: 8339
Are you using my picLensRss.php or the G2's upcoming release?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 4
I'm using your picLensRss.php with Gallery 2.2 provided by a virtual hosting company. I could try and upgrade to the upcoming release if it isn't supported in your picLensRss.php, but the virtual host is limited to what I can do.
Posts: 13
I would also like the same feature ~ im using picLensRss.php as above.
Posts: 8339
well, I did not expect this... using the static g2_itemId does not produce recursive album results.
The only recursive feature I have available would be the search
- http://www.yoursite.com/gallery2/picLensRss.php?mode=search%26g2_itemId=49%26mime=image/jpeg
so here I'd be searching for any image of jpeg type in an album (and sub albums recursively)with the id of 49 ...
this could be expanded, but ultimately we want to limit the results for faster page generation. ... Right?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
yeah, I'm sure what the other guy is after, but I would only need 20 or so to be displayed - preferably the 20 newest images.
Posts: 8339
@warfy dynamic albums???
http://www.flashyourweb.com/staticpages/index.php?page=mini_2.0.5#mediaRss
my most comprehensive explenation of my xml generators.
http://www.yoursite.com/gallery2/picLensRss.php?mode=dynamic%26g2_view=dynamicalbum.UpdatesAlbum
here we load the actual dynamic album module's preferences and display as per your prefs ;)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
hmmm I am not sure of the best way to explain - here is my site. Notice the slideshow button opens piclens but no images are available, but click on an album, and the sub albums are then visible and again, piclens will open but display no images. Finally go to through to the images and piclens works perfectly.
/ //wont work
/album/ //wont work
/album/date/ //works
hope that makes sense!
I am either interested in removing the slideshow button, or making it display something. I will have a read of your Flashyourweb explanation now and see if that helps me out a bit.
Posts: 8339
Simply put... this album does not contain any slideshow items, only other albums(sub albums).
this works perfectly.
It would be something along the lines of... {if ($theme.item.canContainChildren......
<- not a smarty expert....
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 4
For once, I'm not actually concerned with speed/performance. ;)
Here is an example of what I was after.
1. Visitor invokes picLens at the highest level album(s)
- Expect to see all pictures in all albums (kind of like a search on YouTube)
2. Visitor has navigated to a sub album with only one sub album and invokes picLens
- Expect to see all pictures in the current sub album and the one sub album
Posts: 4
I'm having trouble using the search feature you mentioned. The following code from picLensRSS.php doesn't seem to be doing what it should:
$mode = $_REQUEST['mode'];
...
$mode = search&g2_itemId=49&mime=image/jpeg so it never ends up in the search function.
I believe $mode should have = "search", but it doesn't.
$mime = ""
g2_itemId = ""
What do you think?
Posts: 8339
it would not be $mode = search&g2_itemId=49&mime=image/jpeg
rather
mode=search&g2_itemId=49&mime=image/jpeg
as explained here.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2