Customizing SMF > Modifications and Packages
Birthday Post v0.12.1 Beta (Now RC2 Compatible!)
dooie:
Will this mod be upgraded for version 2.0.2? I would love to have this for my forum. It would save me missing so many birthdays.
Cheers.
Suki:
It should work on 2.0.x just fine, try to use the Emulation feature: http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn't_work_in_my_SMF_version
Shambles:
--- Quote from: MissyNL on September 10, 2009, 02:29:55 PM ---...the only thing i want to request to this mod is that the admin can set a min. post quote, so that not every member gets an birthday topic, but only the ones who are very active...
--- End quote ---
--- Quote from: JBlaze on September 12, 2009, 04:46:09 PM ---Indeed. I am actually working on that right now...
--- End quote ---
That's the only thing missing from this splendid mod. Might have a play myself later on to get the extra functionality implemented...
Shambles:
I've managed to add postcount as a criteria for birthday messaging, and it works fine.
If anyone else is interested, here are the changes I had to make:
NOTE: you must have the Birthday Post modification already installed O:)
In languages\Modifications.english.php
After
--- Code: ---$txt['bp_pbody'] = 'The meat and gravy of the post.<br /><span class="smalltext">Use <strong>{membername}</strong> to give it a "personal" touch.</span>';
--- End code ---
Add
--- Code: ---$txt['bp_min_posts'] = 'Minimum number of posts a member must have';
--- End code ---
In Sources\ManageSettings.php
After
--- Code: --- array('int', 'bp_minregdays'),
--- End code ---
Add
--- Code: --- array('int', 'bp_min_posts'),
--- End code ---
In Sources\ScheduledTasks.php
Find
--- Code: --- AND notify_announcements = {int:notify_announcements}' . (!empty($modSettings['bp_lastactive']) ? '
AND last_login > {int:last_login}' : '') . (!empty($modSettings['bp_minregdays']) ? '
AND date_registered < {int:minreg}' : '') . (empty($modSettings['bp_banned']) ? '
AND is_activated >= 1 AND is_activated <= 10' : '
AND is_activated >= 1'),
array(
'lastpost' => time() - 172800, // more than 2 days ago
'nondate' => '0001-01-01',
'notify_announcements' => 1,
'year' => 1,
'month' => $month,
'day' => $day,
'last_login' => !empty($modSettings['bp_lastactive']) ? time() - ($modSettings['bp_lastactive'] * 86400) : 0,
'minreg' => !empty($modSettings['bp_minregdays']) ? time() - ($modSettings['bp_minregdays'] * 86400) : 0,
--- End code ---
Replace with
--- Code: --- AND notify_announcements = {int:notify_announcements}' . (!empty($modSettings['bp_lastactive']) ? '
AND last_login > {int:last_login}' : '') . (!empty($modSettings['bp_min_posts']) ? '
AND posts >= {int:posts}' : '') . (!empty($modSettings['bp_minregdays']) ? '
AND date_registered < {int:minreg}' : '') . (empty($modSettings['bp_banned']) ? '
AND is_activated >= 1 AND is_activated <= 10' : '
AND is_activated >= 1'),
array(
'lastpost' => time() - 172800, // more than 2 days ago
'nondate' => '0001-01-01',
'notify_announcements' => 1,
'year' => 1,
'month' => $month,
'day' => $day,
'last_login' => !empty($modSettings['bp_lastactive']) ? time() - ($modSettings['bp_lastactive'] * 86400) : 0,
'posts' => !empty($modSettings['bp_min_posts']) ? $modSettings['bp_min_posts'] : 0,
'minreg' => !empty($modSettings['bp_minregdays']) ? time() - ($modSettings['bp_minregdays'] * 86400) : 0,
--- End code ---
Arantor:
Nice work, that was one of the options I forgot to add when I rewrote it a little after the posts quoted above.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version