Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Added views 2 support
Optimizations:
1) db_query for presets replaced by ImageCache API call imagecache_presets() which are cachable
2) Images for views rendered same way as default imagecache_profiles_preprocess_user_picture
3) variables store preset ID against preset Name - less storage place and flexibility in renaming presets
Another idea to skip default theme('image'... because template_preprocess_user_picture already produce valid $variables['picture'] so no need to render it again
views.zip should be unzipped into imagecache_profiles folder
Comment | File | Size | Author |
---|---|---|---|
#71 | 349331_imagecache_profiles.patch | 8.92 KB | christefano |
#67 | imagecache_profiles.module.txt | 7.24 KB | Kane |
#52 | imagecache_profiles.zip | 12.4 KB | lelizondo |
#22 | views_support.patch | 8.32 KB | bcn |
#21 | icp_views2_d6.patch | 4 KB | andypost |
Comments
Comment #1
Bevan CreditAttribution: Bevan commentedsubscribing
Comment #2
bensemmel CreditAttribution: bensemmel commentedPatch and views integration are working fine for me. Thank you very much
Regards,
Ben
Comment #3
japanitrat CreditAttribution: japanitrat commentedw0rks on the 6.x-1.0 release (version here says 6.x-1.x-dev, didnt test that one)
Comment #4
fred0 CreditAttribution: fred0 commentedI can also attest that this works well on the 1.0 version (didn't try dev). Thanks!
Comment #5
gallamine CreditAttribution: gallamine commentedHow exactly does this allow integration with Views2? For instance, does it allow me to pull the various profile images for a given user, or just the default one? Sorry for my daftness. I installed the patch/code and I can't discern the changes.
Comment #6
gallamine CreditAttribution: gallamine commentedActually, after more poking, the patch/code has borked some things. Now, the "User: Picture" field in Views no longer pulls the "default" picture, but instead pulls the full-sized original picture. Any thoughts on how to reverse this (aside from simply replacing the module)?
Comment #7
Flying Drupalist CreditAttribution: Flying Drupalist commentedHi this would be a great feature.
Comment #8
flickerfly CreditAttribution: flickerfly commentedI'm not sure so I'm asking...
Does "Views 2 Support" include the idea that I could select the imagecache preset to display the user profile picture with in that view? ImageCache and Views alone do that, but I don't seem to have the option when dealing with a profile picture. If not, I'll just make a new feature request out of this, but am trying to avoid duplication.
Thanks!
Comment #9
Flying Drupalist CreditAttribution: Flying Drupalist commentedHi, what is the status of this? Can this be committed?
Comment #10
sedat44 CreditAttribution: sedat44 commentedsubscribing
Comment #11
andypostWhen choosing User:Picture imagecache preset should be chosen
Suppose it's ready for commit,
only one thing - how to make default selection of imagecache preset?
If there's someone to write AI for selection - it's not ready :)
Comment #12
Roulion CreditAttribution: Roulion commentedsubscribing too
Comment #13
frankcarey CreditAttribution: frankcarey commentedThe patch above changes the way the variables are stored, namely it stores the preset id, not the preset name. This is probably best , just in case the preset names are changed (the preset id will remain the same). If you have this module installed and presets are set, then install the patch above, two problems occur:
1) Settings are blank in /admin/user/settings
2) Profile images shown as original size throughout site.
3) Since the variables are wrong, views that have user: picture will display the original image (unless you actually set it in the view)
What I have here is an .install file.
To install:
1) make sure you install the patch above first
2) put this file in the imagecache_profiles/ directory
3) change the name to imagecache_profiles.install
4) run update.php.
If you haven't overwritten your old settings, the update will convert them to thier respective preset id, and everything should work fine. I think with this file the whole package is ready for a commit.
Also included is an uninstall function, so if you uninstall it later it will remove any variable set by imagecache_profiles.
Comment #14
frankcarey CreditAttribution: frankcarey commentedBig thanks to andypost for doing the views integration, much appreciated! Lets get this thing committed :)
Here is a new version of views/imagecache_profiles.views.inc (patch can be made if the original patch is committed), that selects the site wide default preset as the default preset in views. Also, the blank line is replaced by 'let imagecache_profiles decide', which should pass off the decision to the imagecache_profiles preset decision workflow (are we on a user page, viewing a comment, etc).
Though one could argue to make ('let icp decide') should be the default, since it will do some checking about what image to use, the site wide default may be better to use for views since imagecache_profiles can get a little confused. For Example, the user_relationships panel that comes with APK will show the user_page preset, and not the site_default preset if 'let ipc decide' is chosen. ICP gets confused because the block resides on a panel at user/%, so it thinks the (i'm guessing larger) user picture should be shown, even though the user is really a 'friend' of the current user. Considering that views are lists, always using the site default probably makes more sense.
BTW I think ' let imagecache_profiles decide' is fairly short and certainly more descriptive than the blank line, perhaps the wording could be improved (or maybe we should add a better help text to the form?)
Comment #15
frankcarey CreditAttribution: frankcarey commentedOne more note: for the longest after I installed the patch, i didn't see any preset options in the view's admin/edit page, which got very frustrating, but caused me to look much closer at the module and add these patches, so I guess it turned out for the best. I see some others in this post having the same issue. I'm not sure exactly what fixed it, but for any others having that issue, try flushing all your caches, maybe that did it.
Comment #16
andypost@TextPlease What are patch #14 about? this file is the same included in views.ZIP
.Install File is realy good idea to migrate new variables format
So maybe some review this patches (main in issue and #13)
Comment #17
frankcarey CreditAttribution: frankcarey commentedhuh, I'll have to resend it. It's not mission critical though... patch can be applied later
Comment #18
andypost.install file is required because it contains update for variables which stores preset ID aginst preset Name as I describe in issue
So final patch:
1) patch + views.zip in issue
2) .install file from #13 - which migrate variables and Add uninstall to module
Comment #19
Flying Drupalist CreditAttribution: Flying Drupalist commentedforgot the attachment?
Comment #20
andypostLittle bit code-style and formatting for .install file
(.txt should be removed)
Comment #21
andyposttracking cvs HEAD + default avatar selection in views
imagecache_profiles.install.txt should be renamed to imagecache_profiles.install
views.zip extracts inside imagecache_profiles folder
Comment #22
bcn CreditAttribution: bcn commentedHere's everything from #21 in one patch...
Views works great!
Thanks!
Let's hope this can get committed soon ;)
Comment #23
mariusooms CreditAttribution: mariusooms commentedJust patched with patch from #22, patch patched flawless. I completely uninstalled the module installed the new version, ran clear cache, update.php, cron you name it, but no new handler is shown for user: picture in views. I'm using the latest dev from views, which seem to have many new enhancements. Could this be the issue?
Anyone else having problems like this?
Regards,
Marius
Comment #24
lelizondo CreditAttribution: lelizondo commentedIt works, here's what I did:
1. Disabled imagecache_profiles
2. Extracted views.zip into imagecache_profiles
3. Replaced .install into imagecache_profiles with the .install from #20
4. Applied patch #22
The patch asked me if I wanted to create the views files and the .install file. I said no since I did it manually in steps 2 and 3.
Enabled the module.
Now I have views support for User Picture. So cool!
Thumbs up! I'd like to see this committed soon.
Comment #25
dtarc CreditAttribution: dtarc commentedI was having a problem getting this working. I misunderstood and put the views dir with the handler in a subdirectory of the views module, it should just be in the imagecache_profiles module folder (as mentioned).
It seems to be working well. I hope this could be committed and rolled out in a new version, even just a dev snapshot.
Comment #26
xqbzzr CreditAttribution: xqbzzr commentedHm.. sounds good to me, but as a total noob i ran into a "View is protected" warning, while following the list in #24. So i quickly deinstalled everything and changed back to original files. Can you please give advise wether i should take the plunge with this or just wait for the next release (if anyone is planned at all)?
How exactly do i "apply" the patch?
Thank you for help!
Comment #27
lelizondo CreditAttribution: lelizondo commentedFollow instructions in #24.. If you don't know how to apply the patch go to http://drupal.org/patch/apply
Comment #28
mariusooms CreditAttribution: mariusooms commentedPatch #22 is actually fine...but it does not create a views folder, so make sure to stick the views files in the views folder if you just use the patch.
Regards,
Marius
Comment #29
andypostmaybe someone test this patch and set it to RTBC
suppose, enough people already agree with this way so we need attention of maintaner
Comment #30
mariusooms CreditAttribution: mariusooms commentedI tested it today after realizing my earlier error. It works as described. As tested by at least three people in this issue. Maybe re-roll the patch of #22 to create the views folder during patching.
Regards,
Marius
Comment #31
jhedstromThis patch works great. The patch in #22 creates the views folder on Linux, so it may be OS dependant, but I'm not sure.
Comment #32
frankcarey CreditAttribution: frankcarey commented@ jhedstrom : I don't think patch files are os dependent, though the "patch" command is probably only available from the command line in linux. Other os gui versions of the patch program should be able to work fine.
Comment #33
jhedstrom@frankcarey
I didn't mean to imply that the patches themselves were OS dependant, but only that the implementation of the 'patch' command may vary since some people were reporting that the patch didn't properly create the views directory.
Comment #34
JohnFilipstadThis is great! Looking forward to a 6.x-1.1 release.
Comment #35
Taz CreditAttribution: Taz commentedThis patch is great, exactly what I needed. Any chance of a dev release for 1.1?
Comment #36
chrisroditis CreditAttribution: chrisroditis commentedGreat patch! Thanks!
Comment #37
sammys CreditAttribution: sammys commentedWorks wonderfully! Thanks!
Comment #38
lelizondo CreditAttribution: lelizondo commentedwill this be ported? At least 6 people said this patch it's working so this it's already 'reviewed & tested by the community'.
Comment #39
v1nce CreditAttribution: v1nce commentedYes it will, once I get some time to carve out for patch reviews and updates on this module.
Comment #40
dnewkerk CreditAttribution: dnewkerk commentedTested out the patch as well... works perfect. The new Views options make this a must-have module for me from now on. Thanks andypost and everyone, looking forward to the release :)
Comment #41
jcmarco CreditAttribution: jcmarco commentedThis patch works great,
Once applied this patch you need to create a views directory and move imagecache_profiles.views.inc and imagecache_profiles_handler_field_user_picture.inc
on it. I found that problem with Windows and Linux servers.
Not using default Imagecache API function in the original module was doing that it didn't work with default imagecache presets.
The additional Views integration feature is a must and it is a enough reason to release at least a new imagecache_profiles version.
Thanks for that work.
Comment #42
webanalya CreditAttribution: webanalya commentedHi,
I followed the lelizondob's instructions (#24) (except that I applied the patch manually) and everything works! great!
thanks you very much !
Comment #43
ayalon CreditAttribution: ayalon commentedI tested the patch and its working. I'm using it on a live site.
Comment #44
entr3p CreditAttribution: entr3p commentedThis patch works great! I'm using this patch on a live site as well and it works flawlessly.
+100
Comment #45
najibx CreditAttribution: najibx commentedpatches should be committed soon?
Comment #46
entr3p CreditAttribution: entr3p commentedHopefully. It seems this module hasn't been updated in a while, even though it's fairly popular.
Comment #47
lelizondo CreditAttribution: lelizondo commentedaccording to #39, the maintainer of this module it's busy right now.. maybe someone could offer to be co-maintainer and upload some tested patches..
Comment #48
andypostI already ask for co-maintainship but rejected
Comment #49
entr3p CreditAttribution: entr3p commentedHmm. I REALLY think this module needs a co-maintainer if the main maintainer doesn't have too much time for the module.
Comment #50
dtarc CreditAttribution: dtarc commentedThis is an important module and the views integration is great. Please commit the patch!
Comment #51
pribeh CreditAttribution: pribeh commentedThis works superbly! Thanks so much for this. I was wondering if anyone here would be able to help me with my issue (here: http://drupal.org/node/491446). Perhaps the same methodology could be applied to other picture fields such as the one I raise in my issue thread. Any help would be uber appreciated!
Comment #52
lelizondo CreditAttribution: lelizondo commentedSeems like there's not much activity here and that this patch won't be commited soon (hope I'm wrong). Anyway, here it is a .zip version with the module already patched and working so new users won't have to patch it anymore.
Comment #53
entr3p CreditAttribution: entr3p commentedGood job lelizondob! Hopefully this helps others out.
Comment #54
patchak CreditAttribution: patchak commentedInstalled the module in #52, works perfectly, it's definately RTBC IMO
+1
Comment #55
jrabeemer CreditAttribution: jrabeemer commented+1 commit patch
andypost, I'm sure you can get commit access from v1nce if you take on the other patches in the queue not just this one.
v1nce clearly doesn't have the time to work on the module. :-(
Comment #56
andypost@v1nce it you have no time, maybe you make me a co-maintainer? I start 2.0 branch and module get new blood
Comment #57
pribeh CreditAttribution: pribeh commentedUber plus, Double plus recommendation here!
Comment #58
mairav CreditAttribution: mairav commentedSuscribing. I hope a new version can be release with this patch.
I replaced my imagecache_profiles folder with the one comitted in #52, run update.php and everything is working. Thanks "lelizondob" for the zip folder! and everybody for your help.
Comment #59
lelizondo CreditAttribution: lelizondo commented@mairav: please don't give me credit.. I didn't do the patch, I just created a zip..
Comment #60
mattiasj CreditAttribution: mattiasj commentedThis is perfect, I will try it asap and of course hoping it will be commited in a new version for our multi site install to use.
Comment #61
mairav CreditAttribution: mairav commented@lelizondob I just wanted to thanks you for the zip, cause that made my life easier. I don't know if I could have done this without that zip. In that message I thanked to those who made the patch too!
Thanks again to everyone. :D
Comment #62
mrfelton CreditAttribution: mrfelton commentedlets get this committed soon! subs
Comment #63
TC44 CreditAttribution: TC44 commentedThis is brilliant, thanks for the patch!
Comment #64
urbanbricks CreditAttribution: urbanbricks commentedThaaaaank you for this zip. It is MOST helpful to have Imagecache Profiles module enable the preset dropdown on Views. It would be super helpful if the maintainer would commit this patch! :)
Comment #65
Bevan CreditAttribution: Bevan commentedComment #66
Kane CreditAttribution: Kane commentedI'm not really that into php, but i think this patch causes error with image creation with latest ImageCache module.
Looks like it has something to do with
imagecache_profiles.install file, cause after i've updated it all images stopped to process and in html they have wrong path.
During update i've got his line:
# user_picture_imagecache_profiles updated from preset1_name to 2
# user_picture_imagecache_comments updated from preset2_name to 1
and path to files changed accordingly from
imagecache/preset1_name/image/image.jpg
to
imagecache/1/image/image.jpg
for other preset respectivly.
UPDATE:
It seems that in path to image used id of imagecache preset.
Comment #67
Kane CreditAttribution: Kane commentedComment #68
Kane CreditAttribution: Kane commentedForget that i wrothe about succesfull patching.
Flushed cache and nothing works again.
If anyone have latest version of modules can you confirm that this patch doesn't work anymore.
Comment #69
Kane CreditAttribution: Kane commentedOk, forgot all that crap which i wrote erlier, problem was in rewritten function about which i forgot after update.
Comment #70
lelizondo CreditAttribution: lelizondo commentedthe last commit to this module was on December 19 so I don't really know what you mean with 'this patch doesn't work anymore'.
Maybe you found a new bug, but more than 10 users in this post said this was working. Try not to use the patch but the .zip in #52.
If you found a new bug, I don't really know what to tell you, this module seems to be 'almost' abandoned.
Comment #71
christefano CreditAttribution: christefano commentedThe last patch had Windows line endings. Please review this one.
Folks, let's get a good patch together before there's talk of mutiny.
Comment #72
Manuel Garcia CreditAttribution: Manuel Garcia commentedpatch looks to have worked fine here, though i kinda had to hack at a bit, since i didnt have the views directory.
I'm not changing the status to reviewed and tested by community til someone tests it properly.
++
Comment #73
crea CreditAttribution: crea commented@andypost I think you should really request transferring of maintainership through Drupal.org team. Abandoned projects should eventually get new maintainers disregarding original author denial and I think there's procedure for that on Drupal.org.
Comment #74
christefano CreditAttribution: christefano commentedIndeed: Dealing with abandoned projects
Please open a new issue for questions about maintainership.
Comment #75
andypostI know about Abandoned projects but right now i have no time to do it. Just wait a week or two but maybe v1nce will back this time.
The issue was already filed so I open it again #426634: Is this module still maintained?
Comment #76
andypostCommitted to HEAD
Enabled 6-dev release so waiting for tarball to rebuild
Comment #77
Manuel Garcia CreditAttribution: Manuel Garcia commentedwohooo! wtg andypost!
And thanks to v1nce for allowing you cvs access =)
let's wait for the tarball, test it, and hopefuly get a new stable release with this change in soon !
Comment #78
pribeh CreditAttribution: pribeh commentedyah!
Comment #79
lelizondo CreditAttribution: lelizondo commentedgood news! thanks everybody
Comment #80
andypostcommited to 6-dev
now tarball should be right
Comment #81
entr3p CreditAttribution: entr3p commentedWow great! Finally lol
Comment #83
Sinan Erdem CreditAttribution: Sinan Erdem commentedSorry to reopen this issue...
I downloaded and setup the latest version of this module. Now, in Views, adding a User:picture field, I don't see the imagecache preset dropdown.
Using Drupal 6.20. Already run update.php and cleared caches...
Comment #84
andypost@etcetera9 please open new issue and provide more info. Do you tried to clear views cache?