[Elgg 1.8-1.12 & 2.X: Celebrations] v1.8.1

Release Notes

Changelog:

  • check if arrays of foreach loops are populated prior loop execution to prevent php warnings added to error log.
  • Hello, I think this will be good but when I'm testing it out the profile registration fields don't turn up. I can see "celebrations" in the meny and I also can install the two widgets in my profile.

    When trying to save the settings I get no "settings saved" message.

    Best regards

    Arne Johansson

  • Sorry about the missing "setting saved" message. I guess I should have added a success message when plugin settings are correctly saved.

    I think the settings get saved correctly though. Can you see the celebration plugin profile fields when you edit your profile? There should be the profile fields available (at the bottom of the profile fields) that you enabled in the celebrations plugin settings.

    As regarding these profile fields to appear on the registration page: you need to properly configure the profile manager plugin for the celebration plugin profile fields to appear on registration. On the "Edit Profile fields" tab of the profile manager plugin settings page you see a list of profile fields and some red/green dots behind them. The red/green dots are some specific settings and you can switch their states by click on them. The first two settings are:

    • Show on registration form
    • Mandatory

    You need to activate at least the first setting for the corresponding field to appear on the registration page. If you also activate the second the new user must input something to this field or the registration is denied.

  • Great plugin.  Is there any way we could title the celebration though?  For instance, I'm working on a recovery website.  So I'd like to title one of them "Sobriety date."  But it's not working.  Instead it shows up like this "today_celebrations:sobrietydate"

    Again I really appreciate this plugin.  Let me know if I'm doing something wrong or if there is a way to do what I'm seeking to do that I am overlooking.  Thanks for your hard work.

  • i think what you are looking for is in the language file, example

    // Today celebrations widget
    'today_celebrations:title' => "Today's anniversary celebrations",
    'today_celebrations:today' => "Today is",
    'today_celebrations:description' => "Birthdays, weddings, ...",
    'today_celebrations:birthdate' => "Birthday",

    simply change one or add

    'today_celebrations:sobrietydate' -> '"The day I started to get my life together", 

     

    great idea for a site btw, send me a link when you get it done, i'll be a member....425 days now also.

  • bad advice about changing one, dont do that, if you change one that is in use, it will show up like the one you stated.  add the new line, flush your caches and you should be good

     

  • @Sean: I'm not sure how you tried to add the new profile field that showed up as "today_celebrations:sobrietydate" on the site. I suspect you might have tried it using the Profile Manager plugin profile administration options, either by renaming one of the profile fields created by the Celebrations plugin or by adding a new profile field and naming it "today_celebrations:sobrietydate". But it won't work this way. The reason why "today_celebrations:sobrietydate" showed up on your site is that the corresponding entry in (any) language file is missing and therefore the language string itself is displayed.

    But even if you would add all necessary language strings including the text to be displayed on the site for example to the language file of the celebrations plugin it still would not work (so, costakisc's advice of adding a new profile field does not work unfortunately). The Celebrations plugin can not handle new profile fields simply by adding the language strings necessary to its language file. If you want to add a new profile field (new type of celebration), you would need to modify the code of the Celebrations plugin accordingly - with changes necessary in several files. Via the Profile Manager you can't do this at all. The Celebrations plugin can only be used in parallel to the Profile Manager plugin (and you can change the order of the Celebrations plugin profile fields and use the registration page options offered by the Profile Manager plugin).

    Still, you could get it working to have a "Sobriety Date" profile field on your site. The easy way would be to replace for example the "Day of death" or "Wedding day" celebration field by "Sobriety day". You would then need to only change the corresponding wording in the language file of the celebrations plugin, e.g.

    'profile:celebrations_weddingdate' => "Wedding day",

    would be changed to

    'profile:celebrations_weddingdate' => "Sobriety day",

    You would only change the text right of =>, i.e. only what it displayed on your site. You would need to change all language strings that correspond to "Wedding day" accordingly. Of course, you wouldn't be able to use both the old celebration profile field (e.g. wedding day) and your new "Sobriety day" at the same time then. At least for a new website it should not be a problem with already entered data though.

    If you intent to follow this possibility I would suggest to replace "Wedding day" by "Sobriety day". "Special anniversary" does not fit as it does not allow for adding a year to the input data and "Day of death" is handled a bit different than the other fields as you won't get the option to send a PM to the member on his/her anniversary day.

    If you want to add a new profile field / celebration field for "Sobriety day" instead of replacing any of the existing celebration fields, you would need to go through all files and modify then accordingly. This should not be too difficult but only a bit time-consuming. In this case I would suggest to take the birthday celebration field as an example. The birthday field is more or less handled identical than the "Wedding day" field but has one additional option: showing the age instead of the date of celebration. In case of "Sobriety day" you could also include this option of the birthday fields but with a little modifications show "days since sobriety" instead of the sobriety day date.

Stats

  • Category: Events
  • License: GNU General Public License (GPL) version 2
  • Updated: 2019-2-24
  • Downloads: 5284
  • Recommendations: 15

Other Projects

View iionly's plugins