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.
brilliant module, followed that whole thread earlier (http://drupal.org/node/59151)
any idea if this is going to make it to drupal 6? i'm happy to test for you as soon as it's there...just drop me a note via contact
Comment | File | Size | Author |
---|---|---|---|
#69 | 225816.patch | 7.53 KB | Bevan |
#62 | 225816.patch | 7.58 KB | Bevan |
#61 | imagecache_profiles.tar_.gz | 3.29 KB | eikes |
#36 | Picture 1.png | 28.66 KB | akahn |
#16 | imagecache_profiles.patch | 7.02 KB | marcingy |
Comments
Comment #1
v1nce CreditAttribution: v1nce commentedYes. I will port to D6 and add new functionality when time permits. Currently, I don't have time to commit to this module yet.
Comment #2
flickerfly CreditAttribution: flickerfly commentedI'll also be interested in testing out the D6 version.
Comment #3
mariusooms CreditAttribution: mariusooms commentedI have almost ported it and it's very close to working. I need help porting these two original functions:
I believe other than these everything will work. The validation and flushing is just not working correctly.
This is what I made of the functions, maybe someone can see what I missed or did wrong:
Any help is appreciated.
Comment #4
mariusooms CreditAttribution: mariusooms commentedAttached is the complete ported code I have so far. I'm new at this so if I do something wrong, don't hesitate to correct me.
Regards,
Marius
Comment #5
mariusooms CreditAttribution: mariusooms commentedWell...I have tried and failed...I thought I was close, but it looks like I will have to wait until someone with more knowledge than me can port this over as I am just stuck. Hopefully the maintainer will find some time to do a proper port.
Regards,
Marius
Comment #6
wuf31 CreditAttribution: wuf31 commentedWell.. building on Marius work, this is a d6 version that is working, at least for me.
Still, a word of warning, it needs much more detailed review, i only make marius' code work, at least from the user side. Don't have time yet to delve in further, yet it could be a base ground work.
Review please..
Thanks,
Jhon
Comment #7
mariusooms CreditAttribution: mariusooms commentedTerima Kasi Jhon! I knew I was close, just this line huh: 'html' => TRUE
I wish coder could pick that stuff up. I realize I should submit a patch, but I don't know how to create those yet. Indeed, this is just a hard code port of the version 5 branch, using coder. Use at your own risk ;)
Regards,
Marius
PS-Jhon. Istri saya orang indonesia!
Comment #8
wuf31 CreditAttribution: wuf31 commentedSama2 marius, nice work here :)
Yep, just change one line and you're ready to go.
To create patches, you can take a look at http://drupal.org/patch/create.
Regards,
Jhon
PS-Marius. Glad you like Indonesian's women :P
Comment #9
Thoor CreditAttribution: Thoor commentedHi there ...
Thanks for the module. I am using it at D 6.4 and its working fine together with ImageCache. But I am having a small problem.
The default Picture for users without a uploaded image is not shown. Any ideas for me?
Comment #10
mariusooms CreditAttribution: mariusooms commentedWhat path for the default image do you have specified in the admin user settings?
You could check the source code and see if the image path is malformed. I had that happen and I just needed to adjust the path.
Regards,
Marius
Comment #11
mariusooms CreditAttribution: mariusooms commentedCurrently what is not working with this version yet is the flushing of the original uploaded image. Also the code provided here, should only be used for testing purposes or if you are desperate to get imagecache profiles working right away. Definitely not for production site and I think the maintainer will create a far superior port for Drupal 6.
Regards,
Marius
Comment #12
Thoor CreditAttribution: Thoor commentedHi Marius,
Thanx! You where right! Just a matter of the path to the deafault image! Its working :-)
Comment #13
Chippe CreditAttribution: Chippe commentedGreat work Marius!
Hopefully it won't take too long until somebody finds a solution to the flush function.
Manual flush in the imagecache menu deletes the pictures but it gives me this error: [function.rmdir]: Permission denied
..imagecache.module on line 695
I don't know if it's just on my site or if the imagecache_profile flushing problem has anything to do with this.
Comment #14
mariusooms CreditAttribution: mariusooms commentedOkay...so I tried a manual flush, but now profile images don't want to show at all! I didn't receive the Permission denied error.
Comment #15
Chippe CreditAttribution: Chippe commentedThis was not after flushing but at one time imagecache didn't create pictures until I disabled clean-urls. After that I could have it enabled again.
Btw. I think my problem is related to xampp.
Comment #16
marcingy CreditAttribution: marcingy commentedPatch rolled against current release version which seems to fix the cache issue as the appropriate functions are now being called.
Comment #17
japanitrat CreditAttribution: japanitrat commentedsubscribe
Comment #18
Chippe CreditAttribution: Chippe commentedFirst time I patch but I downloaded patch.exe and placed it in the imagecache_profiles folder.
In command prompt: patch -p0 < imagecache_profiles_0.patch
It gives me this error:
missing header for unified diff at line 39 of patch
can't find file to patch at input line 39
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
| +57,7 @@
|
| if (isset($picture)) {
| if (!empty($account->uid) && user_access('access user profiles')) {
|- $picture = l($picture, "user/$account->uid", array('title' => t('View
user profile.')), NULL, NULL, FALSE, TRUE);
|+ $picture = l($picture, "user/$account->uid", array('title' => t('View
user profile.'), 'html' => TRUE));
| }
|
| return '
';
--------------------------
Edit: I manually replaced some lines and now it works perfect for me.
Thank you Marcingy
Comment #19
mariusooms CreditAttribution: mariusooms commentedPatch worked great for me (patched on Mac with terminal) and indeed fixed the imagecache_profiles flush...thanks marcingy, much appreciate your help with this and creating a proper patch!
Regards,
Marius
Comment #20
chinafka CreditAttribution: chinafka commentedCould someone post the patched version? I've been messing around with this for a few hours trying to get eclipse and the synchronization working to patch it and it's just not doing it for me. Are there any easier ways to apply a patch to a file? From the relative stance that I don't know much on how to do this.
Comment #21
mariusooms CreditAttribution: mariusooms commentedMake sure you patch against 5.x-1.4, both the module and info file.
For windows you could try using Cygwin instead
http://drupal.org/node/32875
Comment #22
andypost#6 Works fine for me!
Comment #23
chinafka CreditAttribution: chinafka commentedSeems like it's working for everyone else so I'll give cygwin a try, thanks.
Comment #24
zanforlin CreditAttribution: zanforlin commentedThis path works for everyone? It has the default image and the flush thing ok?
Thank's
Leo
Comment #25
zanforlin CreditAttribution: zanforlin commentedOh, one more thing... how can i download the full version? Could someone post the patched version? (2x)
Comment #26
mariusooms CreditAttribution: mariusooms commentedI think it is generally a bad idea to post patched modules, since the maintainer needs to remain in control of which versions are offered. There is a certain process involved. However the maintainer does seem very busy.
I think the patch is good enough to be committed into a dp 6 branch. I'm changing this patch status since, a few here have already had good results with the latest patch. Hopefully that will speed up things.
Regards,
Marius
Comment #27
zanforlin CreditAttribution: zanforlin commentedMarius, thank you for your reply. Can you put here the candidate of drupal 6 imagecache profiles? I need to use this module and can help with some tests.
Before find this post here, I made a version of imagecache profile (based on the lullabots tutorial), but the default piture only work with a bad code of mine (put '') and the imagecache flush doesn´t work at all.
So, please, can you put the entire module here?
Thanks a lot.
Leo
Comment #28
mariusooms CreditAttribution: mariusooms commentedYou can just apply the latest attached patch to the latest downloadable dev. Patching is not that hard to learn and should be good practice when helping with testing and venturing in the unkowns of unofficial module code.
This link should get you going: http://drupal.org/patch/apply
Regards,
Marius
PS. It is just not good practice to attach module in the issue queue, I'm sorry I can't help you there.
Comment #29
marcingy CreditAttribution: marcingy commentedstatus changed to correct status
Comment #30
zanforlin CreditAttribution: zanforlin commentedIt really works fine. I adjust the path to files/picture.PNG and now it works...
Comment #31
Junro CreditAttribution: Junro commentedHello,
Anybody could create the module for D6 with the patch? Is it hard to create?
It will be usefull for everybody who are not familiar with patches...
Subscribe! lol
Comment #32
etaroza CreditAttribution: etaroza commentedOne more thing, the patch does not take into account a simple usecase: I want to show a block with user pictures (let's say random users) on a user page. This will cause the large images to be shown inside the block, whereas I'd expect the default ones. This is due to the line in the patched version
I was trying to figure out which test to add into this if clause, but in vain. phptemplate_user_picture has only one useful variable $account, which should have the distinguisher between the profile picture and all other pictures on the page, but I could not determine one.
Since my block is generated by views and it is of Node type I could get things working in my case with by changing the above code into:
Still it's just a partial solution. Any ideas?
Comment #33
marcingy CreditAttribution: marcingy commentedThis issue is not about adding new features it is about updating the code as is to D6. Please raise a seperate issue for this new feature.
Comment #34
andypostabout #32 - take a look at http://api.drupal.org/api/function/menu_get_object/6
Comment #35
v1nce CreditAttribution: v1nce commentedI won't be releasing a 6 version of this module until ImageCache gets a stable 6.x version committed.
Comment #36
akahn CreditAttribution: akahn commentedJust another verification that this patch works on Drupal 6.
One question, though, is Views integration. In a View, shouldn't the various ImageCache presets for a user's picture be available in the User: Picture field? Attached you'll see how I can set the label for the field, but not much else.
In there any way to control what image preset is used when presenting the user picture in a Views 2 view?
Comment #37
v1nce CreditAttribution: v1nce commentedViews integration is not available yet. See - http://drupal.org/node/217278.
Comment #38
drewish CreditAttribution: drewish commentedjust wanted to drop a note and say that imagecache on d6 is pretty stable at this point and any bug reports or feedback you've got as a result of updating this would be appreciated.
Comment #39
akahn CreditAttribution: akahn commentedHey V1nce, have you had a chance to try out this patch?
Comment #40
v1nce CreditAttribution: v1nce commentedNot yet. :(
Comment #41
olav CreditAttribution: olav commentedsubscribe
Comment #42
unxposed CreditAttribution: unxposed commentedHow can we get the default image profiles working on here?
Thanks
Comment #43
unxposed CreditAttribution: unxposed commentedI'm using #6 by the way... tried for hours and hours to get the patch working, but with no luck (and yes I read all the info on patching)!
Comment #44
akahn CreditAttribution: akahn commentedunxposed: What version of this module were you applying the patch to? You have to patch the same version/release of the module as the patch was originally created for. It may help to post the errors you encountered.
Comment #45
unxposed CreditAttribution: unxposed commentedI followed these http://drupal.org/node/32875 instructions and I tired patching against 5.13, 5.14 and the version in post #6.
patch -p0 < imagecache_profiles_0.patch
but I got bash: patch: command not found
The version in #6 actually appears to be working straight up so I'm going with this. If I spend any more time trying to get the patch working (or have to install cygwin another time) I'm going to throw myself out the window (admittedly it is only a basement flat!).
The problem now is I have no defualt avatars, which I assume I need change the code in the .module file
It's currently:
Comment #46
zilla CreditAttribution: zilla commentedany chance this could be rolled up with patch and released as a 6.x dev version on the project page? seems like it's coming along well independent of views integration...
Comment #47
akahn CreditAttribution: akahn commentedunxposed, it's not clear whether the patch is working or not for you. If you don't have patch installed, you aren't going to be able to apply the patch unless you do it by hand. But then again it sounds like the patch is working for you?
Comment #48
eikes CreditAttribution: eikes commentedpatch from #16 seems alright to me!
Comment #49
unxposed CreditAttribution: unxposed commentedNo I couldn't get the patch working, so I'm just using the ported module from #6. Which is working, the only problem is now as I said above, no default avatars!
Comment #50
unxposed CreditAttribution: unxposed commentedStill can;t work out what to add in to get default avatars working again!
Comment #51
pfaocleWith Imagecache for 6.x now in beta, makes sense to reopen this issue.
Comment #52
momper CreditAttribution: momper commentedsubscribe
Comment #53
unxposed CreditAttribution: unxposed commentedOkay I'm going to try and get the patch in #16 working in the hope that this will have support for default avatars, seeing as I've had no luck in getting the default avatars working in the ported version from #6. Could someone tell me which version I should apply this to 5.13 or the current version 5.14?
Thanks
Comment #54
unxposed CreditAttribution: unxposed commentedThis is killing me, all I'm after is a version of imagecache profiles that works on 6, and supports my default avatars. : (
Comment #55
mariusooms CreditAttribution: mariusooms commentedFrom comment #10:
The provided patch (#16) does indeed support default avatars. Patch it against 5.x-1.4.
Regards,
Marius
Comment #56
unxposed CreditAttribution: unxposed commentedThanks for the reply. Sounds like what I need! However I'm having absolutely NO luck with patching the files. Big ask, bu would anybody be kind enough to email me the patched version of 5.14 if they have it handy. Thanks!
Comment #57
japanitrat CreditAttribution: japanitrat commentedi wonder when a patched version will find its way to the releases (at least a dev-release)
Comment #58
heather CreditAttribution: heather commentedCan anyone following this thread confirm if the port from 5 to 6 in #6 post is good-to-go?
http://drupal.org/node/225816#comment-927081
I'd like to know if anyone else is using this on a live site?
Comment #59
marcingy CreditAttribution: marcingy commentedYes we are using on this site
http://www.jackbe.com/enterprise-mashup
The patch in #16 is a result of that implementation
Comment #60
andypostIs this module maintained?
@v1nce Please make a 6-dev
Comment #61
eikes CreditAttribution: eikes commentedYes, please do, you an use the attached Version, which I'm using... works fine
Comment #62
Bevan CreditAttribution: Bevan commentedThe patch in #16 works for me, except for some minor changes to the *.info file. I rolled the attached patch from DRUPAL-5. The patch does'nt apply to HEAD. What's in HEAD? I think this is basically RTBC.
Comment #63
Junro CreditAttribution: Junro commented+1 need dev. version!
Thanks
Comment #64
babbage CreditAttribution: babbage commentedI agree, time for a dev version for sure.
Comment #65
heather CreditAttribution: heather commentedah, some progress- thanks guys,
so... does this mean that *for testing* i should use the compressed file in #61, in lieu of an official dev version? or does a patch need to be applied after?
Comment #66
Bevan CreditAttribution: Bevan commentedHeather, download 5-dev, and apply my patch in #62. See http://drupal.org/patch/apply for hlep on how to apply patches. If this is too much, you could download the tarball in #61 which is almost the same and will probably work fine.
Comment #67
mortenson CreditAttribution: mortenson commentedsubscribing
Comment #68
jerdavisHere is the code needed (along with a views 2 api call in the module file) to get views 2 support working. Create an includes folder within the imagecache_profiles module folder, then create and place these 2 files.
imagecache_profiles.views.inc
imagecache_profiles_handler_field_user_picture.inc
Then add this in imagecache_profiles.module
Comment #69
Bevan CreditAttribution: Bevan commentedOops. I introduced an unnecessary dependency on profile module in my previous roll of this patch. This fixes that issue.
Comment #70
Bevan CreditAttribution: Bevan commentedjerdavis, what does this do that imagecache_profiles deosn't already do?
Comment #71
jerdavisBevan,
This provides the imagecache formatters for the user picture within views as mentioned in #37 and http://drupal.org/node/217278. I'd originally posted that I had written the code in issue 217278 but seeing as how there is not a d6 branch in cvs yet I decided to post the code here in case people wanted to incorporate it and test it further in the interim.
While imagecache profiles covers many use cases on it's own, it is still somewhat limiting. In cases where you want to select more varied preset sizes for different applications (usually the result of a view) this little bit of extra code covers those bases.
That said, it is pretty stand alone code, so if there's a feeling that this should be a separate module that could work alongside or instead of imagecache profiles then I'd be happy to branch it off.
Jer Davis
Comment #72
Bevan CreditAttribution: Bevan commentedJer,
I see. I haven't had a use case to need more display options with views yet, but it probably makes sense to be part of this module. I suggest you attach the files in a separate issue node though, so that it can be reviewed and committed separately.
This module also looks like it needs a new maintainer if anyone is interested...
Comment #73
v1nce CreditAttribution: v1nce commentedI'm gonna get a 6.x branch out soon.
Comment #74
v1nce CreditAttribution: v1nce commentedI've released a 6.x branch. Anybody that may be using pathces or versions from this thread would be advised to update their module to the official release.
None of the patches or versions were utilized from this thread.
Comment #75
japanitrat CreditAttribution: japanitrat commentedthanks for the branch v1nce!
though the views 2 support wouldve been nice. maybe next release
Comment #76
japanitrat CreditAttribution: japanitrat commented*rewind* hmm, doesnt seem to work that branch.
Comment #77
andypostThanks a lot for commit!
Here views 2 integration issue #349331: Views 2 Support in 6.x + optimizations
Comment #78
Bevan CreditAttribution: Bevan commentedIf you are migrating from this patch to DRUPAL-6--1 (aka 6.x-1.0) then you'll need to re-select settings on admin/user/settings, since this patch stores IC id numbers, while 6.x-1.0 stores IC machine names. This results in markup like
<img src="http://example.com/files/imagecache/3/user-pictures/picture-6.jpg" />
instead of<img src="http://example.com/files/imagecache/thumbnail/user-pictures/picture-6.jpg" />
(simplified for demonstration).Note 3 instead of thumbnail in the URL, where 3 is IC's id for the thumbnail IC preset.
After re-selecting the IC presets on admin/user/settings this problem is resolved and the correct image source is used.
Comment #80
asiby CreditAttribution: asiby commented... isn't it way simpler to just to the following? ...
print theme('imagecache', ‘my_preset’, $my_variable, $alt, $title, $attributes);
Comment #81
asiby CreditAttribution: asiby commentedSorry. This form is not user friendly. I had accidentally changed the title of the issue. I am setting it back.
Comment #82
asiby CreditAttribution: asiby commentedI don't mean to be a show stopper but isn't it way simpler to just to the following? ...
Comment #83
Bevan CreditAttribution: Bevan commentedThis issue is closed. You should probably open a new issue if you want your question to get noticed. Make sure you are clear about what that code snippet would replace.