Adding prettyPhoto to serendipity_event_lightbox

Creating and modifying plugins.
Post Reply
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Adding prettyPhoto to serendipity_event_lightbox

Post by Mangek »

On the prettyPhoto page the copyright information reads:
prettyPhoto is totally free to use, it is licensed under Creative Commons Attribution 2.5. So you can use it in all you projects even commercial ones. Please note that if you plan to make money using prettyPhoto, donations are more than welcome.
Does this mean that it could be included in the lightbox plugin and have it uploaded to spartacus? :) Imo it has a much nicer look than the the other lightbox scripts. ;)

I have it running on my site at the moment (using serendipity_event_lightbox) but I'm unsure if I have either the latest version of the lightbox plugin or prettyPhoto. :D If it can be included and uploaded to spartacus I'll go over the files and make sure they're the latest version.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by yellowled »

Mangek wrote:Does this mean that it could be included in the lightbox plugin and have it uploaded to spartacus? :) Imo it has a much nicer look than the the other lightbox scripts. ;)
The license does allow it, yes. And since you seem to be using it combined with the current lightbox plugin, it doesn't seem to have any issues with it, which isn't always the case with jQuery lightboxes.

YL
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by Mangek »

Cool, then I'll make sure the files are in order. :)

(I broke the script somehow just now, so it strips the entire entry from showing, leaving only the title... I don't know what I'm doing, I'm not a coder. :D )

Edit: Not sure what went wrong, but it's working again now. I swear I'm getting a bald patch because of troubles like these. :D (On the other hand, solving these types of problems, not really knowing what I'm doing, is a huge ego-boost. :mrgreen: )

So, the files, should I post the entire plugin or just the files I've modified? And should I edit the ChangeLog and/or lang_en file? (The lang file could need some rewording, if anything).
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by Mangek »

The zips are slightly too large for uploading to the forum, so here's direct downloads to my server instead:

Full plugin (with all previous files + the new ones)
http://www.dirgefornovember.com/serendi ... ghtbox.zip.

Lite (Only new and/or altered folders and files)
http://www.dirgefornovember.com/serendi ... x_lite.zip.

Please note, I haven't made any changes to the ChangeLog or the lang_en files. Documentation (and versioning) isn't my strong side. (But then again, nor is coding, so..)

:)

Edit: I removed some unneeded files from the zips, such as example photos. Significantly smaller now. ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by garvinhicking »

Hi!

Great, I'll happily add it. Can you tell me why it embeds both jquery 1.3.2 AND 1.4.4? I don't think that would be good?!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by Mangek »

Honestly, I have no idea. Those files were both included and I simply added them in. I can't say I'm experiencing any problems though. :)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by yellowled »

garvinhicking wrote:Can you tell me why it embeds both jquery 1.3.2 AND 1.4.4? I don't think that would be good?!
No. Some jQuery plugins provide more than one version of the jQuery library, but they never use more than one copy. I guess it's provided for backwards compatibility or something. Might as well just be sloppy release packacking. :wink:

The plugin should use the newer version, although I have to add that it's not the most recent jQuery version. That would be 1.5.1.

YL
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by Mangek »

I added the latest version of jquery. Is there a smarty code to see if another plugin is loaded? I had the idea of omitting the jquery file when the jquery plugin is running.

Actually, I have run into a snag and could use some help from someone who knows what's going on (as I don't :D).

It seems like you need the jquery plugin installed for prettyPhoto to work, even though it outputs the same js-file, version 1.5.1, though from another url. Changing the url to the same url the jquery plugin outputs does not work.

Removing the line that calls for jquery-1.5.1.min.js from serendipity_event_lightbox.php with jquery plugin running works fine though and I'm now running the plugin alongside the jquery plugin.

Any suggestions on this? Or just make it "requires jquery plugin to run proper"? :P
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by konus »

I would like to point to my new thread.

Maybe some admin could merge this threads since now it looks related to me?
narrenfrei
Regular
Posts: 29
Joined: Mon Jul 05, 2010 6:28 pm
Location: Langschlag (Austria)
Contact:

Re: Adding prettyPhoto to serendipity_event_lightbox

Post by narrenfrei »

As konus told already, we've also discussed some problems with serendipity_event_lightbox in another thread: http://board.s9y.org/viewtopic.php?p=10424302#p10424302

One Question:
Wouldn't it be better, if every s9y-plugin that needs jQuery would use serendipity_event_jquery instead of embed it on his own?
narrenfrei.at
"Die große Stärke der Narren ist es dass sie keine Angst haben, Dummheiten zu sagen." (Jean Cocteau)

Blog-Engine: Serendipity 1.6.2 (PHP 5.2.12-nmm4 @ all-inkl.com)
Post Reply