• Resolved Anonymous User 12673376

    (@anonymized-12673376)


    Hi ! Very, very nice plugin indeed !
    I’m trying to use an xprofile field on buddypress but I can’t find it in the list “Draw birthday of WordPress Users from the XXX meta field of WordPress User Profile”.

    My Xprofile field is : “perso_date_naissance”

    Its ID is : field_126

    <input id=”field_126″ name=”field_126″ value=”0000-00-00″ type=”text”>

    Nevermind, I can also use the “Description” regular field for record the user’s birthday dates, but it does not seem to recognize the string :

    1974-01-26
    or
    26-01-1974
    or
    01-26-1974

    Thank you for telling me which way is valid for record the date ?
    Thank you
    jd

    https://www.ads-software.com/plugins/birthdays-widget/

Viewing 12 replies - 16 through 27 (of 27 total)
  • Jakob

    (@jakobbader)

    Nice job

    A little bug: the sorting by date isn’t working correct eg. 2015-1962-1971 or the other way around.

    Thanks

    Jakob

    Thread Starter Anonymous User 12673376

    (@anonymized-12673376)

    Hi Sudavar,
    Thanks for this last update.
    Unfortunately I think we don’t understand each other.
    The last update does display the right field XProfile chosen as well as email, ok.
    But my User admin panel does it too ! And it allows many things else as filtering, sorting, displaying Xprofiles fields and editing them from the cells !

    The function I need is to display the 10 or 20 or 50 next birthdays, or only the birthdays of today among the almost 10K users db. Each line should display email and mobile phone in order to call the user and tell him “Happy birthday !”. This is a daily acivity of employees of the company who contracted me.

    Imagine when your plugin try to display the 10K user once whithout paginating !

    In order to resolve my need : I used MiwoSQL plugin to create the following request :

    SELECT wp_bp_xprofile_data.user_id, wp_users.user_email, wp_users.display_name, wp_bp_xprofile_data.value AS date_naissance FROM wp_users,wp_bp_xprofile_data WHERE (wp_users.ID=user_id AND wp_bp_xprofile_data.field_id=126 AND (SUBSTRING(NOW(),6,2) = SUBSTRING(wp_bp_xprofile_data.value, 6,2))) ORDER BY value ASC LIMIT 10

    It displays wel all birthdays of the month but it doesn’t paginate and don’t display phone number for example…

    So I’m very disapointed, I understand your plugin is not made for what I need, I don’t know what to do.

    And I need to sleep, tomorrow I have to see my client, juste 5 hours sleeping…
    See you,
    jd

    Plugin Author Sudavar

    (@sudavar)

    @jakobbader
    You were right, it was a bit tricky but now it’s all acomplished, check the change log of Version 1.7.10:
    * Dates are handled with the WordPress date format, editable from options
    (dates in custom table are saved in the format YYYY-MM-DD)
    * Dates in User registration form, User profile, backend admin table are all
    shown and handled with WordPress date format
    * Fixed bug with sorting backend table by date
    * Added buttons to display only WordPress Users and current day’s Birthdays
    * Fixed bug with User’s Verbiage
    * Fixed bug with sorting users having birthday on the same day

    Plugin Author Sudavar

    (@sudavar)

    Hi jd,

    lets make something perfectly clear “I do not work for you”. I could if you approached me, make exactly the customazitaions you wanted for your client for a reasonable payment (I also work and the time devoted to this plugin is lost from my free time).

    Nevertheless you could accomplish what you wanted. 1)The admin backend table has enriched functionality thanks to the datatables plugin (sortable, searchable, pagination – it even keeps the last state of the table) 2)You could show the WIDGET this plugin provides (that’s it’s functionality mostly) in the admin dashboard maybe with the help of another plugin and get the result you wanted once again.

    Nevertheless again, now with version 1.7.10 you can do all those stuff from the backend table. It’s sortable with whatever dateformat your birthdays are displayed as I mention in the changelog now the date saved in metadata must match the dateformat defined in WordPress Settings. As fas as the BuddyPress is concerned if the xprofile field is date type it handles every date’s element differently and does the job pretty good – independelty of the WordPress dateformat option.

    So the one disappointed is me, because I tried to help you as much as i could (not even benn able to see the problems and trying to guess what did you mean was a good overload by itself) and all you wanted was chewed (“ready”) food…

    Last but not least, I hope you get your project done and maybe all this effort (today I spent ~7 hours) helps you do it.

    [ Signature moderated ]

    Plugin Author Sudavar

    (@sudavar)

    @spix have you given a try the new features version?

    Thread Starter Anonymous User 12673376

    (@anonymized-12673376)

    Hi Sudavar,
    Sorry for the late response, I was out for some days working on other stuff…
    Many thanks for your help and time spending on it. I’m a freelance and I know what is to work hard. Sure, you’re not working for me, I’m just trying to resolve one of my needs and questionning you for your plugin capabilities.
    Unfortunately, after updating the plugin to the 1.7.12 version, results are still the same, many seconds loading for no results !
    I’m really sorry !

    I’ve been working on an alternative solution using MiwoSQL plugin, and the following SQL Query works fine :

    SELECT wp_bp_xprofile_data.user_id, wp_users.user_email, wp_users.display_name, wp_bp_xprofile_data.value AS date_naissance FROM wp_users,wp_bp_xprofile_data WHERE (wp_users.ID=user_id AND wp_bp_xprofile_data.field_id=126 AND (SUBSTRING(NOW(),6,5) = SUBSTRING(wp_bp_xprofile_data.value, 6,5))) ORDER BY value ASC LIMIT 100

    I’m trying to add some usefull fields to that query result to make it perfect for my client.

    Many thanks for your help.
    Sincerely yours,
    jd

    Plugin Author Sudavar

    (@sudavar)

    Unfortunately I can not help you unless you give some kind of temporarily access. There must be some kind of error.
    * The datefield from BuddyPress is “drawn” correctly,
    * The other user metafield’s must be the format you set your WordPress settings page.

    Thomasraud

    (@thomasraud)

    Hello Sudavar, after update i got error
    WordPress User USERNAME (ID: XXX) has wrong birthday date metafield expected format: d/m/Y (something like 12/02/2016), but 1971/01/03 given.
    Before it worked well under meta_key what i entered on php file manuali, but now its hard to get it work again!

    Is there any Upgoming FIX for DATE issue? that DMY is kinda anoing, because Wp default is YMD, also Ultimate Member use YMD.

    Cheers
    Best regards Thomas

    Plugin Author Sudavar

    (@sudavar)

    Hello Thomas,

    on WordPress General Settings Page what is the value of Date Format, that kind of format is expected in metafields, so you can change it for now and
    The next update will have a dateformat option for the plugin it self.

    Thomasraud

    (@thomasraud)

    Thank you Sudavar for providing that super plugin in WordPress and even more Updating it! You deserv any donation.

    I manage to fix that problem to downgrade Birthday version. I dont remember what file i changed to read other metafield in YMD format. i did it allmoust 4month ago. i remember that i change birthday_date to birth_date and DMY to YMD, thats all.

    To change this date format under WP settings does not solve it.
    WP only setup reading format view. Example, you can order: DYM YDM YMD, but on DB its still writen one way: YMD. Its WP core format to write date info YMD. but you have option to read it any other way!
    Plugins should have to contain reading format translation to any format, then there is possible to avoid that error.

    Best regards, Thomas

    Plugin Author Sudavar

    (@sudavar)

    Dear Thomas,

    I specifically coded that when drawing a date from a metafield it should have the date format specified in WordPress General Settings, that’s why I suggested to you changing it there. Could you provide me temporary access to see the problem?

    Finally, I didn’t quite understand you last paragraph:
    “Plugins should have to contain reading format translation to any format, then there is possible to avoid that error.”

    Thomasraud

    (@thomasraud)

    Yes you are right, it DRAW a date format as you spetcify under WP General settings, WP General settings only change FORMAT VIEW not FORMAT READ and FORMAT WRITE.

    You want temporary access to files or wp-admin?

    There is a picture of my settings setup and BirthDay meta_field format. There you see, WP still WRITE dates YMD format, but WP VIEW is DMY, and users see it DMY, but Birthday cant read YMD on DB because its on wrong format, it have to be DMY format.
    https://imgur.com/a/gNSHe

    BTW i use 1.7.7 to avoid that BD read error.. that way its work fine!

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Can't find xprofile field for birth date’ is closed to new replies.