Firefox PHP

Module: Birthdays

Posted by Steve H 
All files from this thread

File Name File Size   Posted by Date  
birthdays-1.0.4.tar.gz 7 KB open | download Steve H 03/13/2009 Read message
birthdays-1.0.4.zip 10.3 KB open | download Steve H 03/13/2009 Read message
dutch_informal.php 1.5 KB open | download Jan-Willem Stekelenburg 02/12/2008 Read message
turkish.php 1.5 KB open | download scabboy 04/02/2008 Read message
birthdays-1.0.5.zip 11.3 KB open | download Joe Curia 11/11/2008 Read message
Module: Birthdays
February 07, 2008 06:48PM
This module shows a list of active users that have upcoming birthdays.

* Admins can select:
- number of days into the future to check for birthdays (1-365)
- forum pages to display birthdays on
- caching of user data
- hiding page when no birthdays to show

* Users can:
- input their birthdays in the Control Center
- choose to hide or show their age (hidden by default)

Created by Jorgen Hansen, Sunbringer (update), Steve Healy (update)
(this was the ShowTodaysBirthdays mod, updated, renamed and repackaged by me)

Language files needed: If you want to help out here, then please create your language file of choice with the strings from english.php and upload the new file in this thread. (german.php could use proofreading too)

Changelog:
----------

2008-02-08 v1.0.4

    - Modified language file: simplified and easier to translate
      (now uses variable #'s in strings)

    - Modified api user search to improve performance

2008-02-08 v1.0.3

    - Using proper phorum cache directory as defined in admin

2008-02-08 v1.0.2

    - Cache is now reset when a user updates their profile

    - Added more documentation to the code

    - Changed user separator so it displays one user per line
      (it was looking too messy as a comma separated list)

    - Only checking active users now (using new api)

2008-02-07 v1.0.1

    - Fixed more PHP warnings for undefined fields

2008-02-07 v1.0.0

    - Added admin option to select number of days to check

    - Added Maurice Makaay's custom profile installer

    - Added user option to hide age
      (requires new profile- if you have a bunch of birthdays 
       stored in the old profile you'll need to write a script
       to move them, or re-enter them)

    - Fixed assorted PHP warnings

    - Completed the templates for english and german
      (some strings were missing, and my german may need help)

    - Cleaned up the documentation (and added this file)

    - Applied reported fixes (thanks to DarkElf109)

    - Renamed module from ShowTodaysBirthdays to birthdays
      (shorter, no caps, and more appropriate)

    - (updated by Steve Healy)

2007-12-21 v0.7.05

    - english.php by DarkElf109

2007-12-15 v0.7.05

    - Update by Sunbringer

2006-11-28 v0.7.05

    - future birthday hack by babba 2000

2006-10-06 v0.7.05

    - Last update by author Juergen Hansen

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)




Edited 8 time(s). Last edit at 02/11/2008 06:48PM by stevehealy.
Attachments:
open | download - birthdays-1.0.4.tar.gz (7 KB)
open | download - birthdays-1.0.4.zip (10.3 KB)
Re: Module: Birthdays
February 07, 2008 07:45PM
Missed a spot, as usual. ;) New version uploaded.

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Re: Module: Birthdays
February 08, 2008 04:05AM
ok thanks Steve.

There is still something quite wrong with this mod though. I think it's something to do with a conflict with the 'Tidy Output' mod. Try running it when the 'Tidy Output' mod is on. Phorum won't work at all. You get "Internet Explorer cannot display the webpage".

If you turn off 'Tidy Output' you get "Fatal error: Allowed memory size of 26214400 bytes exhausted (tried to allocate 8208 bytes) in /home/tabby2/domains/allalongthewatchtower.dk/public_html/phorum/include/db/mysql.php on line 3183" at the bottom of the footer.
Re: Module: Birthdays
February 08, 2008 12:06PM
I am running the "Tidy Output" mod, as well as a dozen other mods. I tried turning them all off except Birthdays and testing again with no change in behavior. I have tested it with both Firefox and IE, and have no such problems.

It sounds like you have a memory problem. It could be that this mod uses an unusual amount of overhead for a Phorum module. Maybe someone more experienced than I can comment on that.

(In my inexpert opinion, it looks like your server is overtaxed by other things - you were only trying to allocate 8208, and it says 26214400 exhausted)

Which version of Phorum are you using? What other mods are active? Is this on your own server or a public/shared server?

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)




Edited 1 time(s). Last edit at 02/08/2008 12:10PM by stevehealy.
Re: Module: Birthdays
February 08, 2008 02:23PM
New version uploaded.

It's possible that this version (using the new phorum_api) will solve your problem. No guarantees.

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Re: Module: Birthdays
February 08, 2008 05:18PM
ok i found that the problem is in my header somewhere...I have some javascript and other stuff in there, I will need to look at it.

I still gert this error on my page without the header:

Warning: fopen(/home/..../public_html/phorum/cache/mod_birthdays.dat) [function.fopen]: failed to open stream: Adgang nægtet in /home/.../public_html/phorum/mods/birthdays/birthdays.php on line 271

Warning: fwrite(): supplied argument is not a valid stream resource in /home/.../public_html/phorum/mods/birthdays/birthdays.php on line 272

Warning: fclose(): supplied argument is not a valid stream resource in /home/.../phorum/mods/birthdays/birthdays.php on line 273
Re: Module: Birthdays
February 08, 2008 07:01PM
Those errors all have to do with caching. Disable the caching on the settings page for now and see if it works.

You probably need write access on your cache directory. Are you using caching for the rest of your phorum?

It is trying to use the default cache directory. If you're using a different one that could be the problem.

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Re: Module: Birthdays
February 08, 2008 07:04PM
The active cache directory is always available in $PHORUM['cache']. If you use that variable in your code, then it should automatically follow the changed cache.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Birthdays
February 08, 2008 07:08PM
I just noticed I had a problem with my suggested profile.tpl code. I uploaded the fixed README, but here it is...

I didn't see a hook to avoid adding this. Did I miss anything?

Template customization:
-----------------------

If you want to show birthdays on the profile page, insert this code 
in the template /<your templatefolder>/profile.tpl:

            {IF PROFILE->mod_birthdays->birthday}
                <dt>{LANG->mod_birthdays->ProfileCapture}:&nbsp;</dt>
                <dd><? echo strftime($PHORUM["DATA"]["LANG"]["mod_birthdays"]["long_date"],$PHORUM["DATA"]["PROFILE"]["mod_birthdays"]["birthday"]); ?>
                {IF PROFILE->mod_birthdays->age}
                    <? echo strftime(" %Y",$PHORUM["DATA"]["PROFILE"]["birthday"]); ?>
                {/IF}
                </dd>
            {/IF}

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Re: Module: Birthdays
February 08, 2008 07:20PM
Quote
mmakaay
The active cache directory is always available in $PHORUM['cache']. If you use that variable in your code, then it should automatically follow the changed cache.

Aha! Cool. New version loaded. :)

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Sorry, only registered users may post in this forum.

Click here to login