Boxplus in plugin

Phoca Gallery plugins - plugins for Phoca Gallery extension
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Boxplus in plugin

Post by cellardoor_ncx »

Hello, I'm trying to add boxplus system to plugin in articles. I managed to include boxplus.js, boxplus.lang.js, boxplus.css and boxplus.prettyphoto.css as well as rel="phocagalleryboxplus" to anchor of image but it is now successful yet.

Is there any reason you do not include boxplus in plugin code ? Any tips on this would be appreciated.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Boxplus in plugin

Post by Jan »

Hi, the boxplus was not implemented yet (because of time and because for now there is boxplus plugin for Joomla!)

Jan
If you find Phoca extensions useful, please support the project
mentebinaria
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jan 2012, 15:09
Contact:

Re: Boxplus in plugin

Post by mentebinaria »

Hi.

I know perhaps i'm a little late (just 3 months... :? ), but i also needed boxplus support, so i adapted the code from the main component and got it working. I also tweaked some of the code and did a few minor improvements, like replacing some if-else sequences with switches and stripping trailing spaces. The download link is below.

A few things you need to know before you install my hacked version:
  • This plugin depends on the boxplus plugin, so you also have to install it. I know PG has boxplus integrated, but i prefer to keep things separated. If the plugin doesn't find boxplus, it will default to "modal box".
  • The plugin gets its settings from the main Phoca Gallery component (theme, timings, effect, etc).
  • You can have as many boxes as you want, on a page. (Yay, i got that working too! :))
  • Although it's working great on my website, it hasn't been thoroughly tested. If you find a bug, just report it on the forum. (Notice that i'm not offering myself as a maintainer.)
Download link: http://mentebinaria.com/download.php?f= ... acked).zip (I won't keep this on my website forever, so download while you can.)

I only edited what i found necessary, and i didn't add any hidden code or stuff like that. I won't claim any copyright for my modifications, and the license is the same as before. Enjoy! 8)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Boxplus in plugin

Post by Jan »

Hi, the 3.1.2 version of Phoca Gallery plugin works with boxplus (with basic settings) but it is still recommended to use standard boxplus plugin (because of the features).

Anyway thank you for the guide and for the improvement

Jan
If you find Phoca extensions useful, please support the project
mentebinaria
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jan 2012, 15:09
Contact:

Re: Boxplus in plugin

Post by mentebinaria »

Hey, Jan.
I love Phoca Gallery, and i just wanted to give something back.

Only now i noticed that new version... i could have avoided a lot of work. :idea:
Still, there's something you should have a look at - if i'm correct, your plugin will have the same problem i faced at first.
I use the plugin to display a single category, and i have multiple categories on a single page, on different places. What happened was that Boxplus would mix all of the pictures on all categories on the page. To fix this, you just have to add a second class to each anchor (eg "phocagallerycboxplus gallery1"). Since you already had a suitable var for this purpose ($randName), i reused it. There's a little more involved, so i recommend you have a look at my code, just the "$tmpl['detailwindow'] == 9 || $tmpl['detailwindow'] == 10" section (in my case, i used a switch, but you'll spot it easily).

Best regards.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48676
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Boxplus in plugin

Post by Jan »

Ok, thank you for the guide, I will take a look at it.

Jan
If you find Phoca extensions useful, please support the project
Post Reply