I created a first dev version of what would be an image CCK field that works with image browser (no forks required). I'm attaching the module as it is right now (sorry for the spanish; I'll translate it if there's interest). Altough the module works, it's still in a 'proof of concept' stage.
Basically it stores the id of the selected image node. In the node view, the image itself would appear as a clickable thumbnail (lightbox2 supported).
This could be an alternative to the "CCK Image browser integration" project (as IB supports quick uploads, imagefield would stop being necessary in simple cases).
I would like to know if the IB creator(s) would be able to give me support in order to make a project out of this. As the CCK field is so involved with the development of the IB module itself, I would ask for support and some simple patches applied (for adding features to the CCK field). Help from the people interested would be really appreciated.
Dany Alejandro
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | IB Image Reference + ImageBrowser V.1 (latest) | 35.89 KB | danyalejandro |
| #26 | IB Image Reference (latest) | 9.31 KB | danyalejandro |
| #20 | IB CCK Image Reference (latest) | 9.21 KB | danyalejandro |
| #8 | image_ref (newest version) | 8.77 KB | danyalejandro |
| #6 | new_modules.zip | 35.83 KB | danyalejandro |
Comments
Comment #1
danyalejandro commentedModule is attached.
Comment #2
jdelaune commentedVery cool indeed! Thanks so much for your work on this.
My suggestions to make this perfect:
- Get it to respect the image preset you have chosen, and display that by default in the node.
- Integrate display options for the CCK. One of them could be to link to the original image (for Lightbox integration etc.), while default would just be to display the inserted image. Maybe we could write in imagecache presets to override the preset chosen if desired in some cases.
Things to fix:
- Incorrect image path references (screenshot included).
Thanks again for your work, it's fantastic. Unfortunately I don't have a lot of time but if you need help I will try and pitch in where I can. When we have the above sorted I will be happy to add it into the main image browser project as a sub module.
Cheers mate
Comment #3
danyalejandro commentedThanks for your reply Starnox. I'm glad this work is appreciated.
I made some changes and I think I already fixed the incorrect path you write about (I'm not sure because the screenshot won't appear for me). I'll work in your suggestions and post a new "prototype" of the widget. I'll also make a few improvements I've tought of.
The widget still needs a lot of work before it can be published tough. But if I have your support this small project will have a future.
I'll post results soon, and after that I'll ask you about some stuff... mostly about modifying IB's behaviour using GET parameters.
DanyAlejandro
Comment #4
danyalejandro commentedHi! I've been working in your suggestions and already done a couple of them.
I'm working with the data the SelectFile(url, width, height, alt, link, link_target, styles) function (imagebrowser.js) returns to the opener window, but it seems like the returned data is incomplete. Want me to work on it? I can send you over a modified version that returns the whole data I need for the widget (I'll just touch the insert button click event and the place where the SelectFile is called)...
(btw I don't know how to make patches... lol)
Comment #5
jdelaune commentedYeah sure send it through.
Comment #6
danyalejandro commentedI'm sending you the modified IB module (no big change) and the new version of my CCK field. Check imagebrowser/changelog.txt for info on changes in your module.
My field still needs multiple widgets per form support, views support and a couple of fixes. Testing too...
I'll tty in skype.
Comment #7
jdelaune commentedcool I hope to be online tonight. Cheers
Comment #8
danyalejandro commentedFixed a couple of things... field is looking good now.
For testing (modified IB required):
1. Delete the cck image reference fields you could have created in the past
2. Replace the image_ref folder with the new one
3. "Clear cached data"
Up and ready to go (still working on views support & multiple fields).
As you can see, my field can "force" the image size preset and link. This is because there are many applications where you don't want the user to control these things (or it could mess up the layout); just choose the image and let the system do it's stuff.
I was wondering if you could make the IB window recieve some parameters in the URL to control the "Image preset", "Link" and "Alignement" selectors' visibility (just a PHP controlled "display: none" should be enough). The security doesn't matter; the CCK field would force the desired behaviour anyway.
What do you think?
Comment #9
jdelaune commentedCool just tested it quickly and uploaded it to http://demo.coredesigns.co.uk
1. I couldn't see anything modified in the imagebrowser module you uploaded a few posts back, which files did you modify?
Why would you want to send some parameters back? So they can modify settings they have already selected?
It works fine when you insert standard image presets, but if I try and insert an imagecache preset then it returns an empty url (might be because I don't have the modified IB module files).
Very cool though. Cheers
Comment #10
drscales commentedThese two modules are great together in concept, happy to assist with any further work. Having trouble getting these to insert into the node edit (the filepath for the loding gif doesn't work for me). The imagebrowser itself works and displays the images, but this is not passsed into the preview for the filefield - also I'm getting a validator asking that the entry is numeric. Can I ask how your directories are set up?
Comment #11
drscales commentedAh - got it - be sure to read #8 http://drupal.org/node/507242#comment-1782398 fully! - still happy to help with any tasks - let me know
Comment #12
jdelaune commentedI haven't had any time to spend on IB for a while now, but I've set aside tomorrow to work on it.
danyalejandro I'm not sure what timezone you are in but if you are online would be good to go through a few things and get a dev version released to the public.
Comment #13
danyalejandro commentedmmmm it's like... when it's morning here in Colombia, it's afternoon there in England. it's 1:40pm here so it's 7:40pm there...
Starnox (#9): No, I mean, in the IB window, when we choose an image, another dialog appears with 3 selectors:
"Image Preset", "Link (Optional)" and "Alignment (Optional)". What I would like to do is, call the IB with an url like (example):
index.php?q=imagebrowser/view/browser&app=image_ref&imagepreset=none&link=none
And that would make IB turn "invisible" the "Image Preset" and "Link" selectors in the dialog where the would normally appear. That's what I mean when I say "Control the 3 selectors' visibility with GET parameters".
Oh, and the changelog is in imagebrowser/changelog.txt (inside your module folder).
I'm still working on the imagecache bug; I'll post results ASAP. I'll also check #10 (Thanks DRScales).
The image reference field still needs:
1. LOTS of testing (I created it 2 weeks ago)
2. Theming support (How will it look like when I try to use it in a custom tpl node theme? is actually friendly at all?)
3. The module's code still needs a review from an experienced CCK module developer (I based my module on the "number" CCK module; there are some code pieces I have no clue what they are used for... maybe garbage?)
4. Views support.
5. Multiple image reference fields per page support.
6. Test against hacking atempts.
So, my side needs a coder to work with these stuff, or a beta tester to make sure everything works on different machines / browsers. I don't know about Starnox's side...
Comment #14
jdelaune commenteddanyalejandro sure I'll look into adding support for that.
Is image reference a module you have specific written for image browser or do you have plans to use it further afield (i.e. for use on any site which has the Image module installed?).
Reason being I'm thinking of dropping the dependance of the Image module in IB since it doesn't really make sense any more. Images will be uploaded into the Drupal file table like normal, and then ImageCache will be used to power the display of images.
Will allow me to cut out a lot of the Image bloat. It shouldn't mean too much will need to change in your module and I will help port it over. Just thought I would let you know.
Comment #15
jdelaune commenteddanyalejandro sure I'll look into adding support for that.
Is image reference a module you have specific written for image browser or do you have plans to use it further afield (i.e. for use on any site which has the Image module installed?).
Reason being I'm thinking of dropping the dependance of the Image module in IB since it doesn't really make sense any more. Images will be uploaded into the Drupal file table like normal, and then ImageCache will be used to power the display of images.
Will allow me to cut out a lot of the Image bloat. It shouldn't mean too much will need to change in your module and I will help port it over. Just thought I would let you know.
Comment #16
jdelaune commentedHopefully this will help with integration with IB2: http://drupal.org/node/523714
Comment #17
danyalejandro commentedSorry for disapearing...
I see... I'll take a look into it. I'm building this for a website where EVERY inserted image, inside or outside a textarea, needs to be a node.
I'll check out what you're talking about...
Comment #18
Jackinloadup commentedsubscribe
Comment #19
guillaumeduveauSub !
Comment #20
danyalejandro commentedSorry for dissapearing for 2 months... I was on "forced vacations".
I'm attaching the latest image reference module update. Features:
* Lightbox2 semi-configurable support (now clicking on images can show videos, or URLs, etc).
* ImageCache support
* Works with latest Image Browser (version 1)
And all the bugfixes required. Right now, the module works alright if only 1 CCK Image Reference field is present at the same time (multiple fields support coming on it's way).
=========
Starnox, my current situation is this: My development team is building a new webpage for my university, drupal based. The webpage is huge and complex. The requirement from the contents department is that EVERY image in the website (the ones inside FCKEditor included) must be a node, with associated Author, Tags, and Copyrights. There are thousands of images, and they all should be re-usable, and of course, the "Filter" function that Image Browser 1 has is a must.
In this case, your module (version 1) is the only solution existent (I think). That, or building the "Image" content type with CCK fields myself (but then, users wouldn't be able to search for pictures with their tags without leaving the form, wich is the main reason why I'm using your module).
I will think about working in the ver.2 port when I'm done with this project (deadline :( ). I just hope you don't drop the ver.1, cause my project is relying on it :P
Have you tought about joining ver.1 and ver.2? just externally including shared code would work I think...
Comment #21
danyalejandro commentedComment #22
locomo commentedThis is what I'm hearing:
+1 a desire to drop dependency on the image module (#15) to allow imagecache to do the heavy lifting
+1 a reasonable need for image meta data (author, tags, copyright #20)
I'm interested/need in both of these - but can it be done without image as node.. can the image in the file table be joined with a new "meta data" table?
Comment #23
jakob_dunning commentedHi,
thanks for this great module. I have been looking for a clean way to insert image nodes without having to use inline images like in 'image assist'.
Everything seems to work fine, I have some issues though.
I'm using the latest IB Reference module, Drupal 6, latest Imagebrowser module and Firefox 3 on Apache and PHP 5.
1. The quick upload button works - it would be really cool if you could choose an image gallery(taxonomy term) to upload it to. I use these for filtering so the uploaded image doesn't really appear after the upload.
2. When I use 'unlimited' fields, the second field will show a 'remove button' as well as soon as I upload an image only in the first field. Haven't tested with fixed amount of images like 2 or so.
3. Is there a way I can change the image browser view layout? I would like my exposed filters to be there right away under the 'quick upload' like in the image assist browser(or any other view with exposed filters). I don't like having to open a new window for that. I agree that it makes sense once you have a lot of filters but I use only one or two.
4. If I use an exposed filter and open the 'filters window' and select a filter - the second time I open the window, the filter has moved to the bottom of the page and out of view.
Any help is appreciated but also thanks for a great job. Jakob
Comment #24
jakob_dunning commentedSorry, just to be more precise: I'm using Image Browser 6.x-1.0-rc1.
Comment #25
jakob_dunning commentedI'm sorry - looking a little deeper into it, I discovered I should have posted this to people working with the image browser not here.
Comment #26
danyalejandro commentedjakob_dunning: lol. No problem.
Here's the latest IB image reference module. Changes:
* Cleaned the appearance
* Allows for help text
* Module looks a lot better
Comment #27
danyalejandro commentedI noticed the new Image Browser version 1 rc1 doesn't have the changes I made to make it work, so I'm Uploading it as well.
Latest version:
* Fixed a few bugs
* Requires the included image browser module, wich has been modified to support this module (and works the same as the original)
Installation procedure:
1. In your modules folder, delete the "imagebrowser" and "image_ref" folders (if any).
2. Copy and paste the 2 folders extracted from the .rar in this attachment, as you would with any new module.
3. Clear cache. Enjoy.
Starnox, is there any possibility that my changes will be included in the next IBv1 dev relase? Just replacing the old version with the new one will do... Besides, it makes a better use of the "window.opener.SetUrl( url, width, height, alt );" function, as it actually sends the right parameters...
Comment #28
jdelaune commentedSure thing danyalejandro. Probably best if we release 'Image Ref' as a separate module. Do you know how to maintain a module? Or do you just want me to compile it into ImageBrowser?
Comment #29
jdelaune commentedAdditions have been made to ImageBrowser like requested. We just need to decide where to put this module now.
Comment #30
danyalejandro commentedThanks Starnox.
I don't really know how to maintain a module... What's your opinion on this? Should this be a separate module or part of yours?
Comment #31
rsvelko commentedguys - you actually need to do less than you have done here. Just check out http://drupal.org/project/filefield_sources and look into its files/dirs - there is a sources/ dir in there - currently with imce-related files....
So the right way to go is to add little code there for imagebrowser support... right...
I know I am proposing that you forget all your code above... but what if I am right and mine is the best sollution.
Comment #32
rsvelko commentedguys - actually for most use cases - the idea of this one - http://drupal.org/project/nodereference_explorer
is better ...
most of the sites need to be able to JUST reference an existing asset (image node or an image field image) from within a node body or a field...
Comment #33
scroogie commentedSee http://drupal.org/node/439212 for an integration in filefield_sources. Starnox needs to modify IB a bit for it to be sensible.
Comment #35
kvvnn commented* Image Browser Reference module is incompatible with Simple Menu *
Comment #36
kvvnn commentedWhen I click "Insert" , I get
in imagebrowser.js . Any advice?
Comment #37
peter törnstrand commentedkevin riggen ... please open a new issues for your questions.
Comment #38
kvvnn commentedblixxxa : are you sure? This seems to be the right place to contain issues with the Image_ref module.
Comment #39
kvvnn commentedI've been using the DEV version of Image Browser. It seems the function SelectFile has been removed from it, and that Image Browser Reference uses this function.
I seem to have fixed #36 by adding the following to the very top of imagebrowser.js
This does not seem to affect CKEditor support that the DEV version implements.
Comment #40
kvvnn commentedBlixxxa, Starnox, danyalejendro :
Do you guys have a stance on what to do with this module? It seems if you took a little deeper look at it, and provided some information on the project page of Image Browser regarding this, a whole new level of functionality could be achieved.
While I'm using it I'll document anything that comes up and try to add some support.
Cheers,
Comment #41
peter törnstrand commentedI'm sorry, I though your question abount nothing happening on clicking insert was refering to Image Browser.
Comment #42
jdelaune commentedkevin it's great that people are modding image browser in these ways but nothing is final yet. Heck Image Browser v1 is still in beta. When some firm foundations are made with IBv2 and we have a firm API in place then we will advertise all the great plugins that come out of that.
The last thing I want to do is advertise something when it's not stable or something we change in v2 functionality since it's still in dev breaks any plugins made.
Comment #43
bibo commented+ subscribe.
I've tried to follow quite a few cases to find the best module to add a kind of "imagefield browser with views as wysiwyg plugin". Currently I'm using insert, filefield_source + image_resize_filter, which all work really neat together. But to get the imagefield browsing functionality for existing images, I had to code a module of my own 6 months ago (I called it wysiwyg_imagebank). However it's just too custom built/hacky for general use, and imagebrowser seems to be much more flexible (and better looking).
Comparing to some others:
* nodereference_explorer was, at least 6months ago, too buggy to use. Using filefield_source is better than cck nodereference imo.
* imagefield_assist still has no views support.
* So many other modules that seem to almost work. But they usually don't have views or imagefield support, or are just generally unusable.
Imagebrowser seems to have it all - if the latest version can be patched to work with imagefield.
So, I'm wondering if the current imagebrowser 6.x-2.x-dev -version works, or is going to work, with imagefield? Shouldn't it be doable just by overriding the view and theming the output?
Comment #44
bibo commentedTo answer my own question: seems to work really nicely with imagefield! Why isn't imagefield compatibility advertised on the module page?
It makes the module like... really good :). The last thing I'm wondering about is how this works with image_resize_filter?
Comment #45
kvvnn commentedbibo,
In what ways does it work with imagefield? Can you use Image Browser to select a previously uploaded image for an image field? How do you do that?
Thanks :D
Comment #46
bibo commentedWell, any images in the "files" table seemed to be available there by default (in the imagebrowser popup, activated via the wysiwyg plugin). Image and imagefield seem to both use that table (filefield and I guess upload-modules' files would be there also).
Depending on the permissions, it might be filtered to only images uploaded by the current user. The view can be configured and themed to show whatever.. in theory at least. I tried to set some exposed filters, but that didn't work. I had to move to other issues, need to test more when I have time. I've only tested the 2.x-dev release.
Please note: there is a patch for image_resize_filter (#825894: Changes needed to work with ImageBrowser (v1) module) that makes the images added by this module work with image_resize_filter, but the current version only works with imagebrowser 1.x. I'm planning to modify it to work with 2.x-dev when I have some time :)
Comment #47
echoz commented+1 anyone have this or #439212: Integration with Image Browser working?
Comment #48
webdrips commented+1