e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 213 forks source link

question to media manager #1239

Closed Jimmi08 closed 8 years ago

Jimmi08 commented 8 years ago

Hi, I ask here because I can put images here very easy. I have the same form for admin and frontend. It uses datepicker, imagepicker and iconpicker from e107::getForm();

In admin area it works. Datepicker works on frontend too. What I need to add to my theme to get media manager works on frontend? I mean - how open it in modal window like in admin area?

Admin: image

Frontend: image

It opens this url: image

Thanks

CaMer0n commented 8 years ago

@Jimmi08 I suggest to look at the bootstrap3 documentation on modal windows. It will help you with that.

Jimmi08 commented 8 years ago

Sorry, this was not a point. I know how modal windows work. The content of imagepicker() in admin and in frontend is different. When I take datepicker() - it adds needed files at frontend. With imagepicker() there is no header (title Media manager) and close button. So can be this function used on frontend? Thanks

CaMer0n commented 8 years ago

Admin uses the $ADMIN_MODAL template. You need to define a template for your modal as per the bootstrap documentation.

Jimmi08 commented 8 years ago

Thank you. Although you forgot to mention that the most of script doing this is in admin.jquery.js. Without it, modal doesn't work (either $ADMIN_MODAL)

I think it should work the same way as datapicker(). If it is used, imagepicker() should insert all needed script and code into page itself. But I got it to work in theme, so for me it's solved for now.

I can't make from all users admins, and just admins have access to admin area.

image

CaMer0n commented 8 years ago

Happy you got it solved. :+1: