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.
1. Yes
2/3. No user galleries added yet
4. Menu bar for gallery link
5. Images currently don't open
OK I made a little test now.

http://www.ikf-forum.eu/ezgallery.php?ac...images&u=1

1. Why the whole window in the gallery is not used (see attachment 1)
2. You said there are no users gallery, I read MyImeages (I think thats a kind of usersgallery). I prefare to have those results in the profile of the users (as link or thumbnail).
3. I see the images open in the same window. How to open as a pop-up?
labrocca thanks for all the information that is very helpful will make the changes. The templates will probably be last since I am not sure how to split them up really and coming up with a good way to pass data back and forth.
Look at showteam.php for a good example.

You'll want to do a $templatelist variable with templates.

You'll want to use the add_breadcrumb function for navigation.

Then do the eval statements.

eval("\$gallery .= \"".$templates->get("gallery_template_x")."\";");


Then on bottom of the ezgallery.php you'll do the output page.

output_page($gallery);

Of course you'll need to put all the templates in the database for the installation/activation in plugin file.

And be sure to do globals so that variables in the templates carry over and work.

But this will allow better control and more standard to MyBB. Also consider adding two hooks just before the output and one probably after the breadcrumb function. So others can make changes.

Again if you need help I'm here. I like this plugin a lot and want to use it immediately.
Quick update got some of the changes added templates will take a little bit of time

1.0.3
!Replaced all $db->write_query with $db->query - labrocca
!Fixed the hardcoded admin path to use the config value - labrocca
!Now includes doctype - labrocca
!Missing closing quote on the myimages page broke layout
+Plugin hooks added gallery_admin_subactions, gallery_add_picture_completed ,gallery_edit_picture_completed,gallery_delete_picture_completed,gallery_view_picture_start,gallery_view_picture_finish,gallery_comment_add_completed
+Added breadcrumbs on category list,view picture, myimages page
If you want. Seriously I'll take the time to do this as a templated version but only if you'll release it as next version. I'd like to make sure the work I spend on this would get shared. If you want to do it yourself for the experience that's a good idea too. It's not as bad as you think. A few hours and it can be done. I might be able to do it in 2 hours myself if it's required of me.

Like I said I want to use this right away and it's a great base to work with. All the gallery functions are basically there along with a functional admincp (good job). So now it just needs standardizing.
Hmm I sort of like to use templates but really worried if it is going to add another complex layer. Such as what happens when I update the plugin and make a change in the template? Also seems like all the data needs to be escaped in order to be inserted. Spent some time looking at it I have a lot of conditionals around certain blocks of html. I could see having a header/footer use the template and maybe some forms but seems like it will require a quite a bit number of templates and editing to get done.

Also I plan to use this as a base for my other plugins that free and paid.
(2010-06-29, 10:08 PM)fabo92 Wrote: [ -> ]Aaron won't be happy for this Big Grin You've done it before him! Anyway thanks for this plugin, then if Aaron will release his gallery, I'll compare them and choose one.

Saves me doing it Smile! Nice one can concentrate on my other investments now. Cheers Smile
This is why you should do it now before a lot of people use this. It's no biggie if people have to uninstall this and start over since it's brand new.

It will add a complex layer for you but simplicity for users and admins. They'll be able to edit templates easier and make their own customizations without editing (and screwing up) source code.

Quote:Such as what happens when I update the plugin and make a change in the template?

Same as updating any template. You'll need to do what all authors do and use the proper intall/uninstall/activate/deactivate functions. A bit messy at times but needed.

Quote:Also seems like all the data needs to be escaped in order to be inserted.

Correct but easy to do. Use a txt editor and search/replace " with \". A few trial and errors will get you good.

Quote:Spent some time looking at it I have a lot of conditionals around certain blocks of html.

Very easy to do though. Example is you have this:
  	echo '<br />' . $lang->gallery_form_maxheight .  $gallerySettings['gallery_max_height'] . $lang->gallery_form_pixels;
Should be for a template this:
  	<br />{$lang->gallery_form_maxheight}{$gallerySettings['gallery_max_height']}{ $lang->gallery_form_pixels}
Or
	echo '
	   <tr class="trow2">
		<td align="right"><b>' . $lang->gallery_form_additionaloptions . '</b>&nbsp;</td>
		<td><input type="checkbox" name="allowcomments" checked="checked" /><b>' . $lang->gallery_form_allowcomments .'</b></td>
	  </tr>';
Should be
		   <tr class="trow2">
		<td align="right"><b>{$lang->gallery_form_additionaloptions}</b>&nbsp;</td>
		<td><input type="checkbox" name="allowcomments" checked="checked" /><b>{$lang->gallery_form_allowcomments}</b></td>
	  </tr>';
I suggest adding the new version to the original post Wink