MyBB Community Forums

Full Version: ezGallery 2.0.1 - Photogallery for MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Finalllllllllllllllllllllllllllllllllyyyyy thank you!!!!!
strange now, its working fine .... hmmm. maybe it didint load the page fully on my browser, nevermind it is fine now Smile
looks like it's working fine. I'll let you know if I find any bugs. keep improving this product. mybb needs it badly.

(2010-06-30, 12:27 AM)vbgamer45 Wrote: [ -> ]
(2010-06-30, 12:25 AM)x-Treme Wrote: [ -> ]I noticed in the acp for the gallery, there's a little note at the bottom
"ezGallery (Full) coming soon with support for all forum systems."

Just wondering what the "Full" gallery will include. Do you currently have this type of gallery running on another software?
Yes I do on SMF http://www.smfhacks.com/smf-gallery-pro.php coming to all forum systems hopefully this summer.


Shemo I think I got it try this version
Attached
Glad that version works now!
(2010-06-30, 04:09 AM)vbgamer45 Wrote: [ -> ]Glad that version works now!

after playing with it some..might I offer a few more suggestions.....

1-when creating a category, a thumbnail option would be nice..you know..something to upload and use as the thumbnail when the category is created.

2-sub albums. this way people can limit the number of main categories they have. for example. user photos/shemo, official photos/meet & greet/erin pub

etc...

3-breadcrumb. this will make it easier to navigate through the gallery.
Quote:Warning [2] mysql_fetch_row(): supplied argument is not a valid MySQL result resource - Line: 92 - File: inc/ezgallery.lib.php PHP 5.2.13 (Linux)

These will continue to be a problem for some people until the $db class is used. I pointed this out befere these errors were even reported remember.

If you want full mybb compatibility you'll have to use $db. These errors will continue.

Quote:The simple select I am not crazy about since it requires writing the queries and not as organized or as easy to test/run. I like to be able to grab the query and pop into phpmyadmin or a query browser to run/test it.

The mybb db class is very simple to use. Not sure how you develop and test but I just echo or print_r my results if I want to see output.
Fixed that issue by using $db for everything so works now fine with MySQLi now too
Thanks, @ vbgamer45
(2010-06-30, 11:58 AM)vbgamer45 Wrote: [ -> ]Fixed that issue by using $db for everything so works now fine with MySQLi now too

There ya go. Smile

Now work on using MyBB templates system and this is perfect.

EDIT: Found you're using $db->write_query for reads. You shouldn't do that. The reason is mybb is compatible with master/slave replication with mysql. The write_query is different than just query in how it deals with the master/slave. While I don't think a single mybb sites uses the master/slave yet you should still make it compatible. I believe I'll be using master/slave at HF within 6 months. Just make the write_query into query where there are joins. And use $db->simple_select for those without. Here is example what you should do.

		$dbresult = $db->write_query("
		SELECT 
			ID_CAT, title, roworder, description, image 
		FROM ".TABLE_PREFIX."gallery_cat ORDER BY roworder ASC");
		$context['gallery_cat_list'] = array();
		while($row = $db->fetch_array($dbresult))
		{
			$context['gallery_cat_list'][] = $row;
		}

Should be:

		$dbresult = $db->simple_select("gallery_cat" ,"ID_CAT, title, roworder, description, image","", array("order_by" => "roworder", "order_dir"=>"ASC"));
		$context['gallery_cat_list'] = array();
		while($row = $db->fetch_array($dbresult))
		{
			$context['gallery_cat_list'][] = $row;
		}

The format for simple select is easy.

function simple_select($table, $fields="*", $conditions="", $options=array())

The available $options are "limit", "limit_start", "order_dir" and "order_by" for the array.

BUG: You're using admin/ for links in ROOT/ezgallery.php. You should be using $config['admin_dir'] instead. Those who change their admin dirs will have a bad link.

Btw I'm testing this at SupportForums.net so you may hear about a lot of bugs from me.
More bugs:

You're not validating because you don't actually have the header correct. While I'd rather you use the actual MyBB template system at the very least you need to fix the header function.

If you're not willing to move to the mybb template system let me know and I'll do the work mysql and give you the code to release. It's a few hours to get it all done but it will be worth it. One cool thing is you can add a gallery.css for some serious visual control.

You also don't use the MyBB breadcrumb which works great for navigation.
Thank you for this plugin, till what I see now it looks better then the other gallery mods I know.
I did not test it that well but I have some questions.

1. So far I understand only admins can create categories at the moment?
2. Every user has got his own gallery (images can add in one of the created categories)?
3. Can everybody add an image in a users gallery (if yes perhaps change it to YES/NO)?
4. How to see a users gallery, perhaps a link in the profilepage (or the 9 latest addes images by thumnail)?
5. How do the images open as pop-up or in the same window. If in the same window how do I change that fast?