As requested, I'm making a new issue regarding the upload dependency. My purpose for asking in the other issue was so that I won't have to use the upload module any longer. It's no longer necessary but there is still a dependency, it would be great if that could be removed.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | spacer.gif | 43 bytes | doublejosh |
Comments
Comment #1
Richard Blackborder commentedThe upload module *is* still required though. I didn't just forget to remove the dependency.
The image library part of the module uses it and will not function without it.
Comment #2
ManyNancy commentedBut what about for people who don't want to use upload? I thought you said you were supporting that...
Comment #3
Richard Blackborder commentedYou don't have to actually use upload, but you do have to enable it.
Comment #4
ManyNancy commentedIs it possible to make use of the image library optional? Because I really really don't like the upload module.
Thanks a lot.
Comment #5
Richard Blackborder commentedUse of the image library is optional.
The only thing that is not optional here is that you have to enable the upload module on the modules page. That's it. You don't have to actually use the upload module at all.
Comment #6
ManyNancy commentedThe upload module is being deprecated and won't be in D7.
In d6 enabling adds bloat, and horrible forms to the UI, confusing administrators... especially since it's not actually being used.
Please reconsider removing the dependency again. Thanks for making a great module.
Comment #7
Richard Blackborder commentedIt is being used to upload badges. It provides a feature other users want.
Points about D7 modules are only relevant to D7 modules.
Comment #8
ManyNancy commentedI don't see how removing the dependency would remove the feature? The feature would still be there?
The point about D7 is that the community has decided that the upload module shouldn't be used any more.
Comment #9
henrijs.seso commentedI agree with ManyNancy. Can't image upload be completely optional and text only badges be used? In form of
<span class="user_badge badge_name">Badge title</span>. This way more advanced users could keep their drupal installation clean and still use all features of this module by defining css styles for those badge spans.Just wrap everything in function user_badges_images_form in if (module_exists('upload')) and else return something like 'Image upload disabled. Please enable Upload module.' No need for dependency.
will install, test and provide a patch.
UPDATE. Installed and tested module, indeed this dependency is not good. Thy can't there be text badges?
Comment #10
nancydruIt might be possible.
Comment #11
nancydruI need someone (or more is better) to go into user_badges.admin.inc and find
function user_badges_edit_form_validate. Just a few lines down, you will seeEither comment out the form_set_error or delete those three lines altogether. Then test your text badges. They work for me.
Let me know so I can commit a more complete fix (or an option).
Comment #12
ManyNancy commentedNot using this anymore, I'm creating badges as nodes, hopefully entities in D7.
Comment #13
nancydruThis was inadvertently committed and now backed out. A more complete solution is needed with a setting and checking at the upload points.
Comment #14
Rob_Feature commentedI'm running into this as well...I have a client who wants to be able to use text instead of images as user badges. I'm envisioning the core module doing text, then a second module called "user_badge_images" or something supplying the image portion.
Sure, I realize that requires more work, but it would be ideal.
Comment #15
nancydru@Rob_Feature: try the change above, please. I don't think an add-on for images is ideal: there are only a handful of people out of 1,700 users asking for this; so I believe most users would prefer images. But I do agree that text badges is a good idea.
Comment #16
henrijs.seso commentedD7 port will be perfect time to move to text only + add optional image badges (actually, since badges could be fieldable entities where users could add image field themselves (they could build organic group on each badge for that matter) and image attach is killed as I understand, no separate image badges module would be necessary :) Life will be better with D7
Comment #17
nancydruI'm still looking for decent field documentation. I'm also waiting for someone to try my code above. I would prefer to have most D6 issues fixed and in the wild for a few weeks before starting 7.x.
Comment #18
nancydruI'm also waiting for someone to try my code above. If the issue languishes for another two weeks, I will consider it no longer desirable.
Comment #19
Rob_Feature commentedNancyDru: I was going to give it a shot then I realized that I was overthinking it...I could simply use a CCK text field on my profile instead of userbadges. It would work for my current needs (which don't integrate with userpoints, etc).
Comment #20
doublejosh commented+1 I'd like to see text based user badges as well.
*EDITED
Reasons I see:
Suggested output:
If the title of the badge was shown along with the badge image this could go either way with just CSS help.
Would suggest this HTML...
Then to remove text by default module CSS could include...
Solutions enabled:
span.badge { display:inline; }Workable?
Comment #21
nancydruSee #11 and let me know how it works for you.
Comment #22
doublejosh commentedWhops, left out the title in the HTML sample above! Edited.
@NancyDru, since that code is just the validation for images within badges, you still need text output with a wrapper.
I'm suggesting getting text in there as well and perhaps even using a spacer graphic. Seems the quickest route to our goal.
Looking for how to create a theme function now.
Comment #23
doublejosh commentedLooks like it's theme_user_badge() surprise surprise! *edited
Bummer is that's it's 34 lines to override when all that's needed to do it transform the two outputs...
return l($image, $href, array('html' => TRUE)); //1045...into...AND
return $image; //1034...into...Comment #24
doublejosh commentedAnd a spacer gif so other don't have to generate it.
Comment #25
henrijs.seso commentedspacer.gif? that sounds very wrong. Where it is used exactly?
Comment #26
doublejosh commentedSince this module requires an image be uploaded (as it's the whole badge) these were my suggestions for a workaround to get whatever you need with just a theme function.
The right way would be for the module to allow three modes...
This seems like it would require an optional upload field and an checkbox.
Comment #27
mermemladeK commentedI am also interested in text badges BUT for 7.x-2.x. Any news on this?
NancyDrew, if you need people testing you can count on me, although I don't have coding skills (PHP).
Comment #28
mermemladeK commentedOops, restoring the version User Badges for which this issue was open.