Page 2 of 3

Re: including prettyPhoto to serendipity_event_lightbox

Posted: Mon Apr 11, 2011 9:22 am
by garvinhicking
Hi!

Putting js before </body> is more of a recommendation. To patch up the plugin like this might IMHO not be necessary, we could simply add it here:

Code: Select all

// prettyPhoto code
elseif ($type == 'prettyPhoto') {
  echo '<script type="text/javascript">var prettyphoto_path = "' . $pluginDir . '/prettyphoto";</script>' . "\n";
  echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery-1.4.4.min.js"></script>' . "\n";
  echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery.prettyPhoto.js"></script>' . "\n";
  echo '<link rel="stylesheet" type="text/css" href="' . $pluginDir.  '/prettyphoto/css/prettyPhoto.css" />' . "\n";
  echo '<script type="text/javascript" charset="utf-8">$(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto();});</script>' . "\n";
Since currentlyl ightbox runs without an external jquery plugin, ideally it should be solved by simply adding a "if (class_exists('serendipity_event_jquery')" check, so that if jquery plugin is loaded, the lightboxplugin does not emit its own jquery.

Now you mentioned files were missing frmo the lightbox-prettyphoto thing. Which ones exactly? Then we can put all of this in a new version of the plugin.

Regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Mon Apr 11, 2011 11:20 am
by narrenfrei
Hi Garvin,
your code suggestion is the same (except some customizations), as I have now running on my blog. For me it looks OK. The if-check for jQuery is a great and simple idea! I have set some escapes and build in the if-check:

Code: Select all

// prettyPhoto code
   elseif ($type == 'prettyPhoto') {
   echo '<script type="text/javascript">var prettyphoto_path = "' . $pluginDir . '/prettyphoto";</script>' . "\n";
      if (class_exists('serendipity_event_jquery')) {}
      else {echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery-1.4.4.min.js"></script>' . "\n";}
   echo '<script type="text/javascript" src="' . $pluginDir . '/prettyphoto/js/jquery.prettyPhoto.js"></script>' . "\n";
   echo '<link rel="stylesheet" type="text/css" href="' . $pluginDir.  '/prettyphoto/css/prettyPhoto.css" />' . "\n";
   echo '<script type="text/javascript" charset="utf-8">$(document).ready(function(){ $("a[rel^=\'prettyPhoto\']").prettyPhoto();});</script>' . "\n";
   }
I've tested the code on my blog.

I would suggest, to unzip the whole prettyPhoto download (http://www.no-margin-for-errors.com/dem ... ed_3.1.zip) into the "prettyphoto" folder from the plugin. So all customizations and themes would be reachable and it would be easy to update pretty photo if necessary. Maybe it would be better to delete the example-files? I've made a version without the example-files: http://dl.dropbox.com/u/746957/prettyPhoto.zip

Re: Probleme mit Lightbox-Plugin

Posted: Mon Apr 11, 2011 2:10 pm
by garvinhicking
Hi!

Great! I just committed the suggested changes!

Regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Mon Apr 11, 2011 4:19 pm
by narrenfrei
I've copied the updated version from SourceForge over the installed version in my blog. As I can see, everything works fine.
How often gets netmirror.org updated? Because the folder "prettyPhoto" is still missing there.

Re: Probleme mit Lightbox-Plugin

Posted: Tue Apr 12, 2011 11:09 am
by garvinhicking
Hi!

Sadly the ZIP file that was uploaded here contained 770 permissions, so the files that were put to netmirror had no read privileges. I now adjusted those... :)

Regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Tue Apr 12, 2011 3:34 pm
by Mangek
garvinhicking wrote:Sadly the ZIP file that was uploaded here contained 770 permissions, so the files that were put to netmirror had no read privileges. I now adjusted those... :)
Seems like I'm nothing but trouble, eh. :lol:

Glad you guys are sorting the quirks out though. :)

Re: Probleme mit Lightbox-Plugin

Posted: Wed Apr 13, 2011 10:37 am
by garvinhicking
Hi Mangek!

No, no! quite the contrary - your effort was great, without it we wouldn't have this option now. :-)

Best regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Wed Apr 13, 2011 10:43 am
by konus
Since I started this thread, I would like to give some feedback:

1. First of all - THANK YOU all for your help, it is a fantastic teamwork here!

2. PrettyPhoto looks really good, I think I will switch.

3. I found the reason, for the following problem
konus wrote:... but found out, that I can't change the script. I normally use Lighbox plus and wanted to test the new script prettyPhoto. All other scripts (beside lightbox plus) did not work. ...

The problem was: I have the plugin serendipity_event_entryproperties installed and caching enabled. Switching the Lighbox script changes the entries in the header, but not the automatically inserted rel='lightbox[lightbox_group_entry_681]' to rel='prettyPhoto[681]' in the image links in the body.

I wonder, if it would be possible to use the same rel= name in all scripts? This way, a change of the script would not conflict with caching.

Question: I remember that serendipity_event_entryproperties should always be the last plugin. Would it be helpful to put serendipity_event_lightbox after this? If yes, would it make sense?

Re: Probleme mit Lightbox-Plugin

Posted: Wed Apr 13, 2011 2:20 pm
by narrenfrei
konus wrote:I wonder, if it would be possible to use the same rel= name in all scripts? This way, a change of the script would not conflict with caching.
I think, that would mean that we would have to adapt the Javascripts. So a later update of this scripts would be not so easy, as it is now.

For your question about the ranking of the plugins, I can't say anything, because I don't know.

Re: Probleme mit Lightbox-Plugin

Posted: Thu Apr 14, 2011 8:35 am
by narrenfrei
There is a new version of PrettyPhoto out. http://www.no-margin-for-errors.com/blo ... aring-win/

There are two new features (deep links and social sharing) an some bug-fixes.

@Garvin:
How should we handle with such updates? Shall we always inform you to update it? Or is there another way, so that you don't have to do so much?

Franz

Re: Probleme mit Lightbox-Plugin

Posted: Mon Apr 18, 2011 9:36 am
by garvinhicking
Hi!

Thanks for the notice! That is the best way to go, I think. It's not so much work for me (5 minutes) :)

Regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Wed Apr 27, 2011 9:33 am
by narrenfrei
Hi, I think with the old problem with the permissions of the prettyphoto folder. At netmirror.org the folder isn't visible and during the update via Spartacus I get the following message for all files of PrettyPhoto "Der Mirror-Speicherort antwortet mit Fehler 403."
garvinhicking wrote:Sadly the ZIP file that was uploaded here contained 770 permissions, so the files that were put to netmirror had no read privileges. I now adjusted those... :)
Franz

Re: Probleme mit Lightbox-Plugin

Posted: Wed Apr 27, 2011 4:09 pm
by garvinhicking
Hi!

That's true, I'm sorry. Fixed :)

Regards,
Garvin

Re: Probleme mit Lightbox-Plugin

Posted: Fri May 06, 2011 8:03 am
by narrenfrei
In my case all scripts are working fine. Could you give as a link to your blog?

Edit: Look's like someone has deleted the post on which I had answered.

How to delete the cache of serendipity_event_entryproperties

Posted: Thu Jun 28, 2012 5:32 pm
by konus
Long time ago, but the problem is the same, so sorry for digging up an old thread of mine :-)

In a blog of a friend, I changed the lightbox script (serendipity_event_lightbox) from 'lightbox_plus' to 'pretty_photo'. After the change, all articles had no working lightbox. I found out, that it is because of the use of caching in serendipity_event_entryproperties. Unfortunately disabling caching does not solve the problem, because in the table entryproperties are still the entries for ep_cache_% and they are still in use ?!?

In earlier discussions I found the hint to hit the "Cache all entries" menu option, but I do not have such a button in my admin panel. Is this link still available in Serendipity 1.6.2?

Image

So is there an easy way to delete the cache or render it invalid? Or do I really have to do it with SQL?

Some thoughts:
  1. I read that after an installation of a new plugin, the plugin can render the cache invalid by themself. I think, it would be a good idea to enable the lightbox plugin to do the same after changing a lighbox-script?
  2. May be it would be a good idea too to delete the ep_cache_% entries if caching is swichted to be disabled?