Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Thu Nov 30, 2006 7:35 am   Post subject: NP_LightBox2, 1.0, Add LightBox 2 JS functionality to posts
Reply with quote

edit: now version 1.31. improves thumbnail quality, gives options to select path method for thumbnails (workaround some problem php configs), sorts images from directory alphabetically. Requires uninstall of previous versions.

edit: now version 1.2. fixes popup and image link replacement functions.
edit: now version 1.1. allows specifying of lightbox2 root url for non-standard nucleus installs.
edit: now version 1.01. minor bug fix.

Please read the wiki for full usage instructions. http://wiki.nucleuscms.org/lightbox2

I've modified Seventoes' NP_LightBox using the newer lightbox 2.0 script. I have also improved some functionality. Specifically, it adds the following:
* makes thumbnails for gif and png and wbmp images if your GD module supports it
* can make an image set
* can give a directory name as image name and all files in directory will be included in an image set

1. If you have the NP_LightBox plugin installed, you will need to uninstall it. Though this version should handle your old posts made with NP_LightBox.

2. Download the file, unzip and copy the files to your nucleus/plugins directory.

3. Install from Plugin admin page and edit any options.

4. Put <%LightBox2%> in the head of your skin (this might be in a head.inc file for your skin). This will load the javascript files and set the css necessary.

5. In your posts where you want to display the thumbnail(s) put this variable:
<%LightBox2(imagename|caption)%> for a single image, or
<%LightBox2(imagename|caption|setname)%> for an image set
where:
imagename is the name of the image to show (or directory) relative to the image URL path set in the edit options. By default this is the nucleus media directory. E.g, a file in the media/common directory would be indicated by common/filename.jpg
caption is the caption to be shown. Should be fairly short for best results.
setname is the name of the image set. Optional. All images with the same setname in a single post will be included in the set.

I'll try to get a public demo site up tomorrow.

Download here: http://revcetera.com/ftruscot/downloads/nucleus_plugins.html#lightbox2


Last edited by ftruscot on Fri Sep 26, 2008 9:05 pm; edited 6 times in total

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Fri Dec 01, 2006 8:05 pm   Post subject:
Reply with quote

First bug fix. New version now 1.01 download here: http://revcetera.com/ftruscot/downloads/nucleus_plugins.html

Allows external images to be included in an image set.

Also, now in wiki at http://wiki.nucleuscms.org/lightbox2

edit to fix link. thanks danielck


Last edited by ftruscot on Fri Sep 26, 2008 9:06 pm; edited 2 times in total

Back to top

View user's profile Send private message Visit poster's website
vinhboy
Nucleus Guru
Nucleus Guru


Joined: 14 Oct 2006
Posts: 382

Post Posted: Fri Dec 01, 2006 11:37 pm   Post subject:
Reply with quote

really good work. much appreciated.
_________________
http://www.vinhboy.com

Back to top

View user's profile Send private message
danielck
Nucleus PhD


Joined: 15 Dec 2005
Posts: 668

Post Posted: Sat Dec 02, 2006 4:36 pm   Post subject:
Reply with quote

ftruscot wrote:


Also, now in wiki at http://wiki.nucleuscms.org/plugin/lightbox2


correct link should be: http://wiki.nucleuscms.org/lightbox2 Smile

_________________

Soulworks | Blogcoli | Inspire! | Digital Reminiscence

Back to top

View user's profile Send private message Visit poster's website
danielck
Nucleus PhD


Joined: 15 Dec 2005
Posts: 668

Post Posted: Sat Dec 02, 2006 5:46 pm   Post subject:
Reply with quote

Installed the plugin. Works perfectly except for one issue:

My website is operating in the multiblog environment and the blog that I activated Lightbox is in a subdomain.

What happen is that the image loading.gif and close.gif are not loading properly due to the way images are referenced in this file: lightbox.js

Code:

var fileLoadingImage = "/nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "/nucleus/plugins/lightbox2/images/closelabel.gif";


This causes the two images to be referenced from this url instead, which is wrong:

Code:

http://design.danielck.net/nucleus/plugins/lightbox2/images/loading.gif
http://design.danielck.net/nucleus/plugins/lightbox2/images/closelabel.gif


I tried modifying the codes in the JS file like so:

Code:

var fileLoadingImage = "./nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "./nucleus/plugins/lightbox2/images/closelabel.gif";


and

Code:

var fileLoadingImage = "http://www.danielck.net/nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "http://www.danielck.net/nucleus/plugins/lightbox2/images/closelabel.gif";


Neither of the 2 methods work. Lightbox will fail to work if the 2 corrections are attemped.

Is there anyway to correct this problem?

Here is the link to the article with lightbox applied:
http://design.danielck.net/item/166

Thanks in advance! Smile

_________________

Soulworks | Blogcoli | Inspire! | Digital Reminiscence

Back to top

View user's profile Send private message Visit poster's website
danielck
Nucleus PhD


Joined: 15 Dec 2005
Posts: 668

Post Posted: Sat Dec 02, 2006 5:59 pm   Post subject: For TinyMCE2 Editor
Reply with quote

If you are using TinyMCE2 editor, you have to use Seventoes’ code to insert image
Code:

!~~imagepath|Caption~~!



The plugin tag <%%> will not work properly with the editor. The editor will delete the plugin tag <%%> and replace with comment tag <!-- --> , which will cause the image inserting to fail.

_________________

Soulworks | Blogcoli | Inspire! | Digital Reminiscence

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Sat Dec 02, 2006 6:21 pm   Post subject:
Reply with quote

danielck wrote:
Installed the plugin. Works perfectly except for one issue:

My website is operating in the multiblog environment and the blog that I activated Lightbox is in a subdomain.

What happen is that the image loading.gif and close.gif are not loading properly due to the way images are referenced in this file: lightbox.js

Code:

var fileLoadingImage = "/nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "/nucleus/plugins/lightbox2/images/closelabel.gif";


This causes the two images to be referenced from this url instead, which is wrong:

Code:

http://design.danielck.net/nucleus/plugins/lightbox2/images/loading.gif
http://design.danielck.net/nucleus/plugins/lightbox2/images/closelabel.gif


I tried modifying the codes in the JS file like so:

Code:

var fileLoadingImage = "./nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "./nucleus/plugins/lightbox2/images/closelabel.gif";


and

Code:

var fileLoadingImage = "http://www.danielck.net/nucleus/plugins/lightbox2/images/loading.gif";
var fileBottomNavCloseImage = "http://www.danielck.net/nucleus/plugins/lightbox2/images/closelabel.gif";


Neither of the 2 methods work. Lightbox will fail to work if the 2 corrections are attemped.

Is there anyway to correct this problem?

Here is the link to the article with lightbox applied:
http://design.danielck.net/item/166

Thanks in advance! :)


I would probably put a symbolic link in your design subdirectory to link to the nucleus directory in the main directory: (from your subdirectory)
Code:
$ ln -s ../nucleus nucleus
(check your man page though, I did this from memory and the args might be switched)

I've got a set up like this on a test server, I'll try to play with it over the next few days and see if there is a better solution.

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Sat Dec 02, 2006 6:26 pm   Post subject: Re: For TinyMCE2 Editor
Reply with quote

danielck wrote:
If you are using TinyMCE2 editor, you have to use Seventoes’ code to insert image
Code:

!~~imagepath|Caption~~!



The plugin tag <%%> will not work properly with the editor. The editor will delete the plugin tag <%%> and replace with comment tag <!-- --> , which will cause the image inserting to fail.

Thanks, I should add this to the wiki, as well. I knew there was a reason I kept the backward compatibility. I just didn't know why at the time. Also has a similar problem with the NP_Markup plugin, and probably with other plugins like NP_BBCode, etc...

Also, the nicetitle.js used in the default skin will prevent the captions from being loaded in the LightBox2 images. And NP_LightBox2 and NP_ThickBox conflict so can't be used in the same skin.

Back to top

View user's profile Send private message Visit poster's website
danielck
Nucleus PhD


Joined: 15 Dec 2005
Posts: 668

Post Posted: Sat Dec 02, 2006 7:06 pm   Post subject:
Reply with quote

ftruscot wrote:

I would probably put a symbolic link in your design subdirectory to link to the nucleus directory in the main directory: (from your subdirectory)
Code:
$ ln -s ../nucleus nucleus
(check your man page though, I did this from memory and the args might be switched)

I've got a set up like this on a test server, I'll try to play with it over the next few days and see if there is a better solution.


Thanks for the quick reply. I will try this after I wake up. It is 2am at my side now.

_________________

Soulworks | Blogcoli | Inspire! | Digital Reminiscence

Back to top

View user's profile Send private message Visit poster's website
vinhboy
Nucleus Guru
Nucleus Guru


Joined: 14 Oct 2006
Posts: 382

Post Posted: Sun Dec 03, 2006 7:29 am   Post subject:
Reply with quote

LightBox2.0 is kind of flaky. If you have really large images, it will display them very wierd.
There is a fix in the support forum, but that fix doesnlt allow for you to zoom. Not yet at least. Also, I think I prefer the loading style of the LightBox_Plus style more.

Anyways, your plugin is still great. But I am going to keep watch and see if LightBox2.0 gets any updates. As of right now LightBox_Plus seems more user friendly.

_________________
http://www.vinhboy.com

Back to top

View user's profile Send private message
Post new topic Reply to topic
Display posts from previous:   

Goto page 1, 2, 3 ... 16, 17, 18  Next

Page 1 of 18

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group