Active
Project:
Birthdays
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2012 at 03:21 UTC
Updated:
22 Feb 2016 at 11:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Niklas Fiekas commentedEdit your view. Advanced -> Contextual filters -> Add User: Birthdays (birthday:month) -> Provide default value: PHP Code,
return date('m', REQUEST_TIME);.Then change the pager to show all entries, not five, if you want to see all.
Admittedly this is not very straight forward and requires one bit of PHP code. So change to feature request? Further questions?
Comment #2
kgrigsby@mac.com commentedThank you. That works.
I was looking for some settings under the Filter Criteria to accomplish this.
To me it seems this would be a common use case so I will change the category to a feature request.
Comment #3
milos.kroulik commentedYes, I agree, that it would make sense to have some pre-defined value for this, just like the contextual filter for the Date module.
Comment #4
r3m commentedHi,
Where is the "PHP Code" option ? If you choose to display users in a view, you don't have this.
Comment #5
Niklas Fiekas commentedYou do. Did you follow Advanced -> Contextual filters -> Add User: Birthdays (birthday:month) -> Provide default value?
Comment #6
r3m commentedYep, but no 'PHP Code' option in the 'Type' list under.
Comment #7
MHLut commentedYou will get the PHP option when you install and enable the Views PHP module. Note that this module only has a development release, you will want to check the issue queue before you use this.
(This Views PHP issue is especially nasty: #1140896: Variable $row does not contain correct values ($data->_field_data does))
Comment #8
Niklas Fiekas commented(Note that for Contextual filters Views PHP is not required.)
Comment #9
hawkdavis commentedI know this thread is two years old but is there any way to add another filter that would filter out all days that are greater than today?
I want to display all birthdays for this month but not the ones that have already passed.
maybe something like this?
Edit your view. Advanced -> Contextual filters -> Add User: Birthdays (birthday:day) -> Provide default value: PHP Code, return date('d', >"greater than" REQUEST_TIME);.
Comment #10
priyankprajapati commentedi use the expense date which is coming from expense content type.
i have select the expense date in context filter.
and add the return date('m', REQUEST_TIME);.
Then change the pager to show all entries, not five, if you want to see all.
so its display ajax error like this " An AJAX HTTP error occurred "
so how can i sort out ???
Comment #11
bala_28 commented@hawkdavis
For dates, instead of making it in Contextual Filters, Can do this in the following way:
filter criteria >> User:Birthday
Operator => is greater than or equal to
Value Type => Select "An offset from the current time in days, such as -1 or +7. " and enter value as 0. which refers the current day.