Support

  1. Footsteps
  2. Presales Question
  3. Friday, October 09 2015, 12:22 AM
Hi this plugin looks great so far.

A particular feature my client wants is to have a module list profiles that have upcoming birthdays - say in the next 5 days.

I'm guessing. The date field could be used to capture the DOB. But do you offer or know of a model that would display the list. If not would, you consider taking on this as a bespoke project?
admin Accepted Answer
Admin
we not have tested this SQL where parameter but but it should work

This SQL will not work because DOB is not in the present year.

try with something like this:
DATE_ADD(dob_geburtstag_field, INTERVAL YEAR(CURDATE())-YEAR(dob_geburtstag_field) + IF(DAYOFYEAR(CURDATE()) > DAYOFYEAR(dob_geburtstag_field),1,0) YEAR) BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 5 DAY)
References
  1. http://stackoverflow.com/questions/18747853/mysql-select-upcoming-birthdays
  1. more than a month ago
  2. Presales Question
  3. # 1
admin Accepted Answer
Admin
Hi,
Yes you can use date field to set Date of Birth, our date field type have 3 type of views on profile (date,age,years ago). For example on this site we use Age display type, so in edit/profile registration you can set DOB and in profile view you will see the age value.

To create a module to show upcoming birthdays you can use the parameter Custom SQL Where (in free version you not have a module but you can see this parameter in Users List menu item).

In SQL custom parameter you can set a filter to choose users with value of DOB field between today and 5 future days, you can use syntax like this (this is a SQL syntax):
dob_alias_field > CURDATE() AND dob_alias_field <  ( CURDATE() + INTERVAL 5 DAY )

we not have tested this SQL where parameter but but it should work :p
  1. more than a month ago
  2. Presales Question
  3. # 2
Branddds Accepted Answer
Pro
Hi,

I've tried to use the above code but it doesn't work.

What have i done:

1. Add new Easy Profile list Module.
2. Added the SQL Syntax:
dob_geburtstag_field > CURDATE() AND dob_geburtstag_field <  ( CURDATE() + INTERVAL 5 DAY )

3. "geburtstag" is my field name
4. Nothing happens.

Wenn I save the module without Syntax, all birthdays show up. But the "Order Type" ascending or decending is working either.

See screen for more info.
  1. more than a month ago
  2. Presales Question
  3. # 3
Branddds Accepted Answer
Pro
Thanks!

dob_geburtstag_field doesn't exists. I thought "dob" and "field" is something easyprofile is putting to the field. The exact name is just "geburtstag".

This code works:

DATE_ADD(geburtstag, INTERVAL YEAR(CURDATE())-YEAR(geburtstag) + IF(DAYOFYEAR(CURDATE()) > DAYOFYEAR(geburtstag),1,0) YEAR) BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 5 DAY)


One other question: Wenn no birthday is found within the next 5 day's, the module disappears, leaving a blank spot in the design. Is there a sollution for this?
  1. more than a month ago
  2. Presales Question
  3. # 4
admin Accepted Answer
Admin
Hi, each module always enable the position in template, so for example if you have this module in some column then the column is always available.

if you have only a blank space, maybe you can manage this with CSS but this depends of your template.

CSS Example (protostar template)
.moduletable:empty{ display:none; }
  1. more than a month ago
  2. Presales Question
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.