Hi,
I think it might be useful to post an issue that is related between this module and One Page Profile (although not sure which of those two causes the problem!). If someone enables One Page Profile and Birthdays module , there is no option anymore of "Hide age and birth year" checkbox. I thought it might be useful to post this here and in case someone uses both to realize what is causing this problem. One Page Profile is very useful for simple profiles and it's pity to get this inconsistency between those two.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | birthdays_onepageprofile.patch | 881 bytes | mr.andrey |
Comments
Comment #1
charos commentedComment #2
davidbessler commentedAgreed. I have the same problem.
Comment #3
mr.andrey commentedIn birthdays.module, find this:
... and replace with this:
Andrey.
Comment #4
Niklas Fiekas commentedLooks good. Can you create a patch with this change? I'd happily commit it.
Comment #5
mr.andrey commentedActually, this should be the line, just to be more considerate:
And sure, here's the patch against the latest dev.
Comment #6
Niklas Fiekas commentedThank you, @mr.andrey. Committed and pushed to 6.x-1.x: http://drupalcode.org/project/birthdays.git/commitdiff/9a91c60.
Comment #7
mr.andrey commentedI just found another bug, that's related to this, since it's in the same line.
If field visibility is set to Hidden, the "Hide age and birth year" checkbox still shows up for non-admin users.
We basically need a visibility and permission check in each of the conditional parameters.
So instead of this:
We'll need to use this:
The visibility values here are:
1 - private
2 - public, unlisted
3 - public, listed
4 - hidden, admin/theme only
Andrey.
Comment #8
Niklas Fiekas commentedIs ->visibility coming from the One page profile module?
Comment #9
mr.andrey commentedNo, it's coming from the default profile module. The visibility is basically the four options that each profile field has to determine how the field shows up.
Comment #10
mr.andrey commentedAlso, the "Hide age and birth year" checkbox doesn't seem to remember the values for users, or rather it stores them, but upon visiting the profile again, gets unchecked.
I checked the $account object, and "birthdays_user_hide_year" isn't set at all, even though "birthdays_starsign" is.
Here's a fix:
After this:
... add this:
This too, I believe is unrelated to the one page profile module. Perhaps the hide year/age functionality was added later to the module and this was overlooked.
Andrey.