fbgallery include a nice photo gallery into your website.
Also, it can be used as a showroom or as a base for a little shop.
fbgallery description and facilities ¶
Structure ¶
The fbgallery is structured in albums and collections (of albums).
Album ¶
Is a page which includes thumbnails of gallery or when it is used in shop mode, will display pictures and information for a specific product.
Collection ¶
In administration mode, a collection will display a cover for every album which exists, and will permit you to select which albums will be displayed to visitors in that collection.
The covers of albums may be sorted to be display in any order you like. Clicking on a cover of an album, will redirect the visitor to album's page.
Title and description ¶
Every album and every collection may have a title and a description. Those can be used as page heading.
Multilingual ¶
The fbgallery is multilingual. You can use how many languages you like.
Album's and collection's title, description and information about every picture, support translation.
Administration ¶
Administration is separate for two levels: editors and admins. Editors are logged users and have limited rights, while administrators are a powerful category of logged users.
Available languages: English, Romanian.
Editor Panel ¶
Editor panel is a draggable panel, which you can place it anywhere you like. It is contextual for album and collection and according with settings made by administrators.
Control Panel ¶
Control Panel is accessible only for administrators. It is structured in 5 categories:
Gallery - structured in 6 subcategories:
Appearance,
Shop,
Image resize,
Structure,
Options,
Languages
Album
Collection
FancyBox
Uploader
Default values can be loaded for:
every category,
all categories in block
individual for every setting.
Every setting from Control Panel has its own help as a tooltip.
Pagination ¶
The albums support the pagination. The number of pictures displayed in every page is selected in Control Panel. Pagination is not applicable when it is used shop mode.
If isn't used pagination, you can set how many pictures will be displayed in a row.
Uploader ¶
Multiple files uploader, based on plupload plug-in.
The uploader is multilingual.
Unique file name can be generated to avoid overwriting existing photos in the album.
Uploader can set maximum file size dimension to be uploaded and can be set the maximum number of pictures to be uploaded in every album. Uploader limitation: In safari for windows pictures will be loaded only file by file. Not working with IE previous to version 9. Not tested in apple safari.
Picture information ¶
Picture's title permit to use a wide range of characters, including arabic characters.
Alternatively, picture's title can be displayed as an informational box under the picture.
Use title when you need to display a very short information or use informational box when you need to display a long information, as Description, Price, Link and so on.
Informational box may be as big as you wish, and have support for plain text or html.
Wysiwyg support - cleditor ¶
For every field which accept html, a wysiwyg editor is available with a single click.
Predefined information ¶
Now it is possible to set predefined information for title or informational box for uploaded pictures.
Available options to be used as predefined: filename, page metatitle or predefined content.
Image removal ¶
Multiple images can be selected to be deleted in block.
You can clear the gallery with just a click (plus confirmation).
Resizable thumbnails ¶
The size of thumbnail can be set from Control Panel.
Thumbnail aspect ¶
Can be set as square, landscape or portrait, from Control Panel.
Tooltips ¶
The nice tooltip replace the ugly bubble displayed when mouse is over thumbnail. Can be used or not, selecting from Control Panel.
Themes ¶
Supports interchangeable css themes.
Shop ¶
Option to use album page as page for item of shop, with a bigger image as cover and a set of mini-thumbnails under the cover. Near thess pictures, you have a place to describe product from your shop page.
The shop mode will permit you to predefine some values to avoid repetition.
Files structure ¶
Extension files structure has been changed, for a better future development.
Plugins ¶
Included the plupload as uploader.
Included the newest version of fancybox (unfortunately last the free).
Included cleditor as wysiwyg editor.
Extension is XHTML valid; ¶
Tested in Linux and windows.
Tested browsers: Firefox, Chrome, Opera, Safari, IE
The administration mode work with: Firefox, Chrome, Opera, Safari, IE9
Use Yii version: 1.1.8
How to...? ¶
Install fbgallery: ¶
Extract the archive in your protected/extensions folder (or in any other place in your application).
In the root of your website create one folder named "galleries" and make it writable. This is default option, but you can use any folder. For this, you need to set its path relative to approot in Control Panel->Gallery->Structure->Container folder for galleries.
Import in the database the file fbgallery.sql from sql folder and set in config/main.php to use "tablePrefix"=>'tbl_'. If you use another tablePrefix, change the name of tables, using your own prefix.
Use fbgallery: ¶
Just include in your page next code:
$this->widget('application.extensions.fbgallery.fbgallery');
If you install the extension in another place, not in extensions folder, only adjust the above code.
Suggestions: ¶
When you start to use fbgallery, decide what type of thumbnail will be used: landscape, square or portrait.
All uploaded pictures will be resized to best fit in thumbnail. If you later will change aspect of the thumbnail, this will affect how images are displayed.
Customize fbgallery if is needed: ¶
To customize how fbgallery will treat users level, change the function personalisedMode() from /libs/general/FBAccess.php
To customize how the extension will get the page's metatitle, adjust the function getPageTitle() from fbgallery.php to meet to your need.
If you will include fbgallery into a cms, which automatic generate pages with own ID, you will customize the function getUrlRouteStructure() from fbgallery.php, to be according with your url structure.
Change the name and the information about an album or a collection? ¶
Click on its title. An text editor will appear. Change the value and click on Save button.
Switch to shop mode? ¶
In Control panel->Gallery->Shop click on the "Set standard shop" button.
Troubles? ¶
Check your ini.php file to not use E_STRICT error reporting.
Before comment here to ask help, please contact and ask me, using demo site.
???
I don't think USAGE is very enlightening on how to use this extension.How do you upload the pictures?
Uploading pictures
@drumaddict
When you are logged as user or as admin, you have an uploader form in page with your gallery. There you can upload pictures, which are automate resized(one set for thumbnails, another bigger for display).
Problem with DIRECTORY_SEPARATOR
Thanks,I did'nt notice you have to be logged in as admin to have the configuration forms dispayed.There is a problem with DIRECTORY_SEPARATOR in Windows,though.It should'nt be used for URLs but only for file system paths.You use it in FBGallery class file ,so I had to do a replace DIRECTORY_SEPARATOR with '/'.Strange enough,the constant will output '\',although my code hint says that DIRECTORY_SEPARATOR is '/'.It will break all links to pictures.
See comment on this subject by Qiang Xue himself:
http://www.yiiframework.com/forum/index.php?/topic/248-wrong-behavior-of-directory-separator-under-windows/
Beautiful extension,thanks!
Arranging pictures?
PS. I am trying to change the thumbnail arrangement (order),the cross appears but they will not move...
No dragging
@drumaddict
If you can't sort your pictures, I suppose you use first release of this extension. Please use the last updated version which resolve this bug and have changed DIRECTORY_SEPARATOR to '/' in URL's.
I developed and tested this ext. in linux only. I appreciate if somebody will test in Windows and report any problems.
Deleting Pictures???
Ok,I updated to latest download,dragging works now.One last thing:How does the admin end user deletes a picture from the gallery??There should be a red X button somewhere....
deleting picture
@drumaddict
To delete a picture, move your cursor over a picture(when you are admin or user). A red cross appear and you can click on it. A confirmation message appear. If you confirme, that picture will be removed instantly from page(and from server too).
Red cross does not show up!
Weird,when I move my cursor over the pics the cursor just turns into a hand,no red cross.When I move cursor over title the drag cross appears.I am logged in as admin.
Everything else works fine.This is frustrating,I will appreciate any help.
contact
@drumaddict
Please use contact from demo site: http://www.binary-technology.ro/fbgallery/ to contact me. I will help you.
FIXED!
Sorry for posting so many comments,this is probably the last one.Fixed it,just forgot to clean up the assets folder when I updated to FBGallery_updated,so it was using the old fbgallery.js which was not the same as the updated one.Everything works OK now,thanks for this beautiful gallery.
Installation problem...
Hi,
I installed FBGallery. And tried to access it from a page for the first time.
I am getting "Trying to get property of non-object " error.
} 190 191 192 /** 193 * Load model for our gallery. 194 * Sets @var $this->gmodel. 195 * Sets order of pictures 196 * Sets @var $this->imgsOrder. 197 */ 198 public function loadGallery() 199 { 200 $this->gmodel = Gallery::model()->find(array('condition'=>"pid='$this->pid'")); 201 $this->imgsOrder = unserialize($this->gmodel->imgsOrder); 202 } 203 204 205 /** 206 * Load configurations. 207 * Sets @var $this->fancyBoxConfig. 208 * Sets @var $this->galleryConfig. 209 */ 210 public function loadConfigurations() 211 { 212 $fancyBoxConfig = GalleryConfig::model()->find(array('condition'=>"type='fancybox'"))->config; 213 $this->fancyBoxConfig = unserialize($fancyBoxConfig);
Could you please help me to resolve this issue?
Displaying gallery...
Hi,
If I use the following code. Is FBGallery going to display images related/uploaded in the page or all images?
for pages with id, use next statement $this->widget('application.extensions.FBGallery.FBGallery');
@tarakarama
@tarakarama
Your first question.
I suppose you must use $this->widget('application.extensions.FBGallery.FBGallery', array('pid'=>'1'));
because look like you don't have set an id for your page.
Your second question.
FBGallery will create a gallery only from images uploaded by it. Will not be applied to all images from your page.
@matricks
Thank you for reply.
Even thought I use the following code. I am still getting the same error. I logged in as admin only. I am not using gallery for static pages. I am using FBGallery for crud generate pages.
Here are the steps I followed:
1) Extract FBGallery to protected/extensions folder
2)SQL tables created
3)created a folder in the same level as protected folder.
Please suggest me where exactly I am missing?
$this->widget('application.extensions.FBGallery.FBGallery', array('pid'=>'1'));
@tarakarama
At second step, did you created tables or imported from /sql/fbgallery.sql? You must import it, because there is default configuration for extension.
Have you set in config/main.php to use "tablePrefix"=>'tbl_'? Or if you use another prefix, change the name of tables, using your own prefix.
If your generated pages have id, then you must use $this->widget('application.extensions.FBGallery.FBGallery'); in the view where do you wish to have a gallery or need maybe you need some adaptation for your application.
If your problem is only when you are admin or editor, check the line 154
if(!Yii::app()->user->isGuest && Yii::app()->user->name ==='admin')
from FBGallery.php and modify to reflect the name of admin, or change the way to identify if user is admin based on your application.
At step 3 did you set permissions of folder to be writable?
Installation problem
Hi,
I imported tables and prefix is already set to 'tbl_'. And folder created beside protected folder. Still getting the same error. Its failing at below code.
Please help me with this. Thank you in advance
201 $this->imgsOrder = unserialize($this->gmodel->imgsOrder); 202 }
error message
I get the following error messsage:
Undefined index: id
...\protected\extensions\FBGallery\FBGallery.php(184)
184 $pid = $_GET["id"];
Any suggestion what could be casing this? It worked well at the beginning but now I get this error.
How to change access rules?
Hi,
Installed application successfully and working very well. Awesome application.
I would like to change access rules. Particularly, I don't want editors to delete images. How can i achieve it? Could you please suggest me?
Thank you in advance
No special characters allowed in title?
I like this extension, except for the fact that it doesn't seem to allow, for instance, apostrophes, slashes or French characters as picture titles.
Can't delete pictures
Hallo !!
I downloaded fbgallery, and installation went without problems. I was able to configure gallery for every new user. But problem is, user can't delete uploaded pictures. After picter was deleted, after refreshing picture is back :)
Another thing I haven't figure out yet, I can't get configuration console opened. I mean when I log in as admin, I still have only one link to upload picture, but admin links are not visible. I'm using rights.
Thank for any feedback
Regards
@lukBB
@lukBB
In FBGallery.php line 154, adjust code to work for your configuration:
154 if(!Yii::app()->user->isGuest && Yii::app()->user->name ==='admin')
$this->userType = 'admin';
Trying to get property of non-object
Has anybody ever figured out how go solve the "Trying to get property of non-object" error message? I get it as well although I was following the instructions word for word and pid is set to 1.
thanks
Id Error
Undefined index: id
FBGallery.php(184).
My local machine is windows and running on Wamp and after installing this module I have the above error. Please help.
This is Great!!!
This extension is awesome!!! Took no more than 2 minutes to get it working. It could have took me days to achieve what this extensions does. Big Up!!!
picture won't pop out once upgraded to 1.1.7
need help to fix this, thx
ERROR
i have an error on this line:
$this->imgsOrder = unserialize($this->gmodel->imgsOrder);
the error msg is:
Trying to get property of non-object
how can i pass this error?
Trying to get property of non-object Error
@ostovar
Go into your database 'galleries' table and just drop in a row and set pid = 1.
When you call your FBGallery widget use the pid you used in the table row.
next error
I went into my database 'galleries' table and I just drop in a row and set pid = 1.
and "Trying to get property of non-object" error solved
but now I get this...
Non-static method Uploader::loadUploaderConfiguration()
Any soluttion? Thx
Solution - Trying to get property of non-object
Solution - Trying to get property of non-object: The previous solution to add a record into database doesn't help if you're adding galleries dynamicaly.
In FBGallery.php change the line 201 - if the method unserialize doesn't have data to unserialize it throws error:
if (isset($this->gmodel->imgsOrder)) {$this->imgsOrder = unserialize($this->gmodel->imgsOrder);}
Speed up
Hello, Matricks.
Thanks for your great work!
I modified run() function for speed up of AJAX and upload requests, because render takes a lot of time on my tiny server. I think, you can include this in the next release.
public function run() { if(isset($_SERVER["CONTENT_TYPE"]) && strstr($_SERVER["CONTENT_TYPE"], 'multipart/form-data')) //upload { if($this->levelAccess) return Uploader::uploadFiles(); } elseif(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') //ajax { //process post requests if exists if($this->levelAccess === 2) { operations::processPosts(); if(isset($_POST['function'])) return operations::switchToFunction(); } } else { //publish files $this->publishAssets(); //render page $this->renderPage(); } }
Regards, Anatoly
Multiple Album into collection
I have installed fbgallery in my application without no errors. But i can not create multiple album into collection. I can create only album or only collection without albums.
Why?
Yii version: 1.1.10
@messema
You must create some albums. In every collection you will have all albums. If you need to include some albums in your collection, only need to check it.
An example
@matricks
View this page for an example: http://www.messinaemanuele.com/demo/index.php
Login
User: admin
Pass: admin
I can create an album (not same albums) and i can not place it inside a collection.
What's wrong?
Thank you very much.
@messema
Please insert fbgallery extension into About page too. There you will create an album. Remove your album from home page and create instead a collection. In that collection, you will find all your albums. In this case you will find just that you will create in About page. If you will add some more pages and create albums, you will find all in your collection. Then you can choose which albums will have a cover in your collection.
Not usable
This extension looks at the first impression very nice, but the author mixed static and instanciated concepts of classes so much, that this is beyond repair.. I guess in older PHP versions the errors generated by this could be suppressed but I wasn't able to get it running :/
LIKE!
This is exactly what I was looking for and works out of the box with little configuration. Thanks!
Cant create multiple albums????
Hello,
I used this extension in my application. but when i create an album this show for remove icon. How can i create multiple albums??
How to configure RBAC(Role Based Access Control) with this extension?
Thankx in Advanced.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.