sakkoulas Posted July 2, 2013 Share Posted July 2, 2013 hi can anyone help me with a module that i want to build. the total idea is to use some external image manager program add load images inside my page without upload them inside my page. so my page will be lite and if my images database become to big ι can move it in a new server and everything will work fine. is that possible? i think inside page to have a field maybe url FIeld with a button, and on click will popup iframe of (ajaxplorer or maybe some other programme) that is it inside my root. so i can see files and images of ajaxplorer. the second step is when i select a file inside (ajaxplorer or maybe some other programme) i will get the url inside my urlField. i have look many modules but i can't find how they create the button inside the page. thanks. Link to comment Share on other sites More sharing options...
ryan Posted July 3, 2013 Share Posted July 3, 2013 Have you tried out Soma's ImagesManager? This might be a good solution for you, or a starting point to extend. Link to comment Share on other sites More sharing options...
sakkoulas Posted July 5, 2013 Author Share Posted July 5, 2013 ok i think i did it, i have only one problem my button appears in all InputTextFields,is there a way to show my button in the InputeTextField that i want? i use the addHookAfter('InputFieldText::render'). thanks Link to comment Share on other sites More sharing options...
Soma Posted July 5, 2013 Share Posted July 5, 2013 Yeah you check for its name or type and only add the button if its a field yo want to. Link to comment Share on other sites More sharing options...
sakkoulas Posted July 5, 2013 Author Share Posted July 5, 2013 hi soma can you redirect me to a module so i can read an example? Link to comment Share on other sites More sharing options...
Soma Posted July 5, 2013 Share Posted July 5, 2013 It's the same as here, just that it's a inputfield and not a page http://processwire.com/api/hooks/#what_object Link to comment Share on other sites More sharing options...
sakkoulas Posted July 6, 2013 Author Share Posted July 6, 2013 ok thanks soma Link to comment Share on other sites More sharing options...
sakkoulas Posted July 6, 2013 Author Share Posted July 6, 2013 i have just one question (maybe i'm lying ) is it possible to add attribute to an Input Field Text; that i create inside a modulethe attr that i want to add is "onclick", "openKCFinder(this);"i have try but i get an error <Method Field::attr does not exist or is not callable in this context> thanks Link to comment Share on other sites More sharing options...
Soma Posted July 6, 2013 Share Posted July 6, 2013 You hook after render. So the inputfield is already rendered. You would need to add also a hook before render to modify it. Link to comment Share on other sites More sharing options...
sakkoulas Posted July 7, 2013 Author Share Posted July 7, 2013 thanks soma. until now i have made a module that generate a inputfieldtext inside my page (1), (Yeeeeaaa), on click (3) shows a kcfinder window (2) and i can (re)select, upload or delete files inside my root. my problem is that i want that field to be a repeater field so i can select more than one files. i have try to insert repeater field but then i cant add attributes (onlick do somethin) inside fields. Any help will be greatly appreciated thanks for another time Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now