Adding multibox to lightbox plugin?

Creating and modifying plugins.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Adding multibox to lightbox plugin?

Post by lordcoffee »

Hi, me again!

Can someone who is confirm with the lightbox plugin add the option of using the multibox script
I think it looks much better and recognizes much more media content like flash, flv, quicktime, wmv ... .

Thanks in advance,
lordcoffee
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding multibox to lightbox plugin?

Post by garvinhicking »

Hi!

Phew, yet another? Don't we already have a boast of those like thickbox, greybox, fatthickultraplusbox and stuff?

I'd really like to consolidate that instead of inflate it :)

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/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Yes, of course, it's growing a bit to fast ;-) but I thought it would be nice to have a googd looking, working and multimedia script inside of that plugin. Graybox and some of the others don't seem to work. But it's not that important. Maybe I insert this one with the Headnugget plugin.

Thanks, Lordcoffee
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

I've been spending a few hours with multibox tonight... Managed to make it work manually, wanted to check that before touching the plugin. A few problems:

* the path to the player is set in the multibox javascript, has to be adjusted (not really a problem, as plugins always are in the same directory anyway, right?)
* multibox depends on the class to hook. but s9y images already have a set class. you can hook it onto that class though... disadvantage: videos/sounds would have to share that class
* it would be great if there was a way to grab the short & long description of an image from the db and use it as the image description in multibox. that is not really urgent though atm
* it requires a javascript to create the multibox (I've added that to the entry for now)

Here is the link to the example: http://familie.lobenstein.info/archives ... ird-8.html

What I'm trying to achieve: I would like to just have a given media manager directory and create a image/video entry from that with any interaction. That would be a great help for a quick entry post with just a few pictures/videos...

*edit* just noticed another disadvantage: You can't scale images. You can scale movies, but images seem to be displayed at full size always (which is bad for low res/small window visitors).
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Maybe a look at the shadowbox could be interesting or maybe helpfull. I like the design of multibox but today I've found "shadowbox" and it can scale images dynamicly and you have also the option to set images as full sized preview and if it it is larger than the browser you can drag it inside the shadowbox window. Link
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

... more *boxes FTW! ;-)
# 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/
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

garvinhicking wrote:... more *boxes FTW! ;-)
Trying to read between the lines: You don't like them, right? ;)

I'm currently toying around with shadowbox. At least it can be controlled by rel attributes. The image/gallery part is pretty simple, still working on the video thing...

*edit* Shadowbox demo done: http://familie.lobenstein.info/archives ... och-8.html

It's much easier to implement compared to multibox. It has only one description while multibox has a long and short one. I'll probably stick with shadowbox though. Trying to create a plugin now that will take a media library directory and turns it into a shadowbox'ed entry (the shadowbox part will come from the lightbox plugin though).
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

I've added shadowbox to my local plugin and also added a gallery option, that will link all shadowboxed images into a slideshow. Needs more testing though...

Is there a way to know the current entry id in the hook function of an event plugin?
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
Is there a way to know the current entry id in the hook function of an event plugin?
That depends on the hook you're using!

Generally, try $serendipity['GET']['id'], that should be filled with the current entry id usually.

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/
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

Ok, here we go:

http://tmp.loben.net/serendipity_event_lightbox.zip

I've added shadowbox itself. Plus three new options (shadowbox only):

1) link images to gallery - allows you to have all images of the entry in one gallery with next/previous links to navigate
2) apply to video links - videos can be displayed in a box as well, they will also be added to the gallery if above setting is true
3) change settings for shadowbox in the plugin settings (-> override defaults for paths/colors/player/whatever).

One problem though: If I apply it to video links as well, then the plugin has problems with the comment sidebar nugget, a regexp error occurs. I've slept through those lessons, anyone who wants to take a look at it?

Garvin: I know, more boxes ;) But I think this is very versatile and adds new options. What do you think?
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Hi and thanks!

I'm getting an error message when saving entries and the same on frontpage:

Code: Select all

Warning: uniqid() expects at least 1 parameter, 0 given in /var/www/blablablubb/html/weblog/plugins/serendipity_event_lightbox/serendipity_event_lightbox.php on line 164
and the image is just opening inside browser. no boxes ;-)
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

Very strange... I've added the missing parameter (not sure why my local php5 install accepted it...). Let's first see if the error is gone, then we'll see about the boxes ;-)

http://tmp.loben.net/serendipity_event_lightbox.zip
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

At last, someone who can work with the boxes. I've wanted to add that gallery option for a while. At the very least the plugin shouldn't upset the gallery links I've already inserted in my images.

Any chance you can extend the gallery option to the other *boxes? After you finish lordcoffee's issue, of course.
Judebert
---
Website | Wishlist | PayPal
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

The error is gone but no box is showing. I had a look a the source code of my page and it says:

Code: Select all

<link rel="stylesheet" type="text/css" href="/weblog/plugins/serendipity_event_lightboxshadowbox/src/css/shadowbox.css" />
<script type="text/javascript" src="/weblog/plugins/serendipity_event_lightboxshadowbox/src/js/lib/yui-utilities.js"></script>
<script type="text/javascript" src="/weblog/plugins/serendipity_event_lightboxshadowbox/src/js/adapter/shadowbox-yui.js"></script>
<script type="text/javascript" src="/weblog/plugins/serendipity_event_lightboxshadowbox/src/js/shadowbox.js"></script>
I think it has tob be "serendipity_event_lightbox/shadowbox"

I've changed it and now it works fine. Thanks a lot!

EDIT: Hmmm, videos are not showing. The box opens but it only shows a blank frame.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

O.K. figured it out:

I have changed shadowbox.js on line 78 to:

Code: Select all

        loadingImage:       'plugins/serendipity_event_lightbox/shadowbox/images/loading.gif',
and on line 101 to:

Code: Select all

        flvPlayer:          'plugins/serendipity_event_lightbox/shadowbox/flvplayer.swf',
It was only the missing paths. ;-) Now the Player works fine and the loading image is also shown.
Post Reply