Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

js birthday modules error

8 years 8 months ago
Licenses:
JomSocial Active Socialize Expired

work bad show not exatly date. example im set 19.11-1975 on profile but the modules show 23 why? the modules add 2 days + possible fix? im attached

Attachments:
8 years 8 months ago
Licenses:

Hi,

please check it, I put the fix at:
/modules/mod_community_birthdays/helper.php line 45
from

$query = "SELECT user_id, DATE_FORMAT(value,'%d-%m') as php_date,DATE_FORMAT(value,'%W, %M %e') as formatted_date, TIMESTAMPDIFF(YEAR,value,CURDATE()) AS age, DATE_FORMAT(value,'%m%d') as value FROM ".$db->quoteName('#__community_fields_values')." WHERE "
    .$db->quoteName('field_id')."=".$db->quote($fieldId);
to
$query = "SELECT user_id, DATE_FORMAT(value,'%W, %M %e') as php_date,DATE_FORMAT(value,'%W, %M %e') as formatted_date, TIMESTAMPDIFF(YEAR,value,CURDATE()) AS age, DATE_FORMAT(value,'%m%d') as value FROM ".$db->quoteName('#__community_fields_values')." WHERE "
    .$db->quoteName('field_id')."=".$db->quote($fieldId);

Regards

8 years 8 months ago
Licenses:
JomSocial Active Socialize Expired

tnx work good

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW