vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Profile Enhancements - Birthday Thread and PM generator (https://vborg.vbsupport.ru/showthread.php?t=263701)

AusPhotography 05-15-2011 10:00 PM

Birthday Thread and PM generator
 
1 Attachment(s)
<a href="http://www.AusPhotography.net.au" target="_blank">www.AusPhotography.net.au</a> Birthday Thread and PM generator

This product provides a simple way to create both an automatic Birthday greeting thread and forum member birthday PM.

Features:

1. Configurable greeting text with name, age (optional), and birthday
2. Excludable usergroups (eg. banned etc)
3. Creates a thread in selectable forum and sends a PM from selected user (admin or other)
4. Runs as a vBulletin scheduled task (vB cron job)
5. Honours forum members birthday profile settings
6. Only sends birthdays for members with recent forum activity (configurable)
7. Adjusts for forum members time-zone so the greeting will be on their birthday

Uses:

1. Creates a Database table to track birthday processed
2. One additional file vBulletin scheduled task (vB cron job)
3. Product installation file

Installation:

1. Copy ap_birthday.php to the forum ./includes/cron directory
2. Install the product file
3. Configure it via AdminCP/Settings/Options
4. Disable the vBulletin birthday emailer in AdminCP / Scheduled tasks
Done!

Enjoy! It will probably work on vB3.6+ as well.

Update 2013-04-12: Working with 4.2.0
Update 1.1.2 if zero active post use 'lastactivity' instead (bugfix)

Kym

AusPhotography 05-16-2011 01:36 AM

1 Attachment(s)
AdminCP Screen shot... (1.0.6)

Attachment 130435

RobbieZ 05-16-2011 06:14 AM

Excellent, Hope this one posts correctly.. ;)

AusPhotography 05-16-2011 06:26 AM

Quote:

Originally Posted by RobbieZ (Post 2196240)
Excellent, Hope this one posts correctly.. ;)

Our server is in Texas *(shared hosting so it has a TX timezone CDT), most of our members are in Australia (AEST etc).
That's a 15 hour time difference. This is close to the worst case.
The members get their birthday PM and Thread on the day of their birthday in their time zone (per what's in their profile). :up:

Kym

Rckcrwlr 05-16-2011 09:32 AM

Will install today...Looking forward to one that actually works.

Thanks

Krusty1231 05-16-2011 09:37 AM

Installed. Thanks.

CharlieDelta 05-16-2011 02:03 PM

Excellent!

MrEyes 05-16-2011 05:55 PM

If there are multiple members with a birthday on the same day will the mod create a single thread for all birthdays or multiple threads (one for each member)?

One of my larger forum can have 10+ birthdays in a single day, so it would be better if all these were on one thread.

Mellow 05-16-2011 07:18 PM

I was getting errors in the cron job until I changed this, comma to period:
$forumlist .= ', ',$forum['forumid'];
to this:
$forumlist .= ', '.$forum['forumid'];

AusPhotography 05-16-2011 10:53 PM

Quote:

Originally Posted by Mellow (Post 2196452)
I was getting errors in the cron job until I changed this, comma to period:
$forumlist .= ', ',$forum['forumid'];
to this:
$forumlist .= ', '.$forum['forumid'];

Ooops, last minute change - thanks and fixed ;)

AusPhotography 05-16-2011 10:54 PM

Quote:

Originally Posted by MrEyes (Post 2196426)
If there are multiple members with a birthday on the same day will the mod create a single thread for all birthdays or multiple threads (one for each member)?

One of my larger forum can have 10+ birthdays in a single day, so it would be better if all these were on one thread.

It creates a thread per member, our feeling is that it keeps it a bit personal.

RobbieZ 05-17-2011 12:48 AM

Who is the thread starter for the birthday threads?

AusPhotography 05-17-2011 01:44 AM

Quote:

Originally Posted by RobbieZ (Post 2196567)
Who is the thread starter for the birthday threads?

You nominate a userid in AdminCP settings. By default its 1 - admin.
We have it set to the site owner (Rick)

Kym

Boofo 05-17-2011 02:03 AM

Quote:

Originally Posted by Mellow (Post 2196452)
I was getting errors in the cron job until I changed this, comma to period:
$forumlist .= ', ',$forum['forumid'];
to this:
$forumlist .= ', '.$forum['forumid'];

Tsk, Tsk, Kym. ;)

Hornstar 05-17-2011 09:51 AM

Is it possible to have this only post threads for members who have been active in the last x days? Because I can't imagine it working great with my 617000 members lol

AusPhotography 05-17-2011 10:23 AM

Quote:

Originally Posted by Hornstar (Post 2196721)
Is it possible to have this only post threads for members who have been active in the last x days? Because I can't imagine it working great with my 617000 members lol

It does that!

just set days at 21 or 30 and posts at 5, 10 or 50 (whatever) so only those with recent activity get a greeting

kylek 06-20-2011 05:40 PM

Thanks for this, going to give it a try.

Does the day period and post count work together or separate?

Say its set at 50 days and 5 posts, a members birthday is coming up and they have not been active since 2009 but has 20 posts. Does a thread get made because of the post amount or in this case does it not get made because of the set day time limit of 50 days?

AusPhotography 06-21-2011 05:38 AM

The day period and post count do work together.

Ie. set 2 posts in the last 10 days.
This allows you to set a basic activity level.

It also only counts posts to forums that count towards 'post count' - if that makes sense. ;)

Markos 06-21-2011 08:15 AM

will this detect all user groups i have on my forum if i only exclude user groups 8

AusPhotography 06-21-2011 08:46 AM

Quote:

Originally Posted by Markos (Post 2210769)
will this detect all user groups i have on my forum if i only exclude user groups 8

yes!

cykelmyggen 06-22-2011 07:08 PM

Will this work on 4.1.4? Had it on 3.7. and users loved it :)

kylek 06-22-2011 07:09 PM

Quote:

Originally Posted by snoopytas (Post 2210735)
The day period and post count do work together.

Ie. set 2 posts in the last 10 days.
This allows you to set a basic activity level.

It also only counts posts to forums that count towards 'post count' - if that makes sense. ;)

Thank you!

One last dumb question.

In your screenshot you have a smilie party5 and this is where we would like to link an image to show, just cant remember what to put for the code.

What coding is needed to link to an image to be displayed at the top of the post and pm?

CK 06-22-2011 09:33 PM

Installed, rated and nominated. :)

Could you explain this for me, I'm having a blonde day.

Happy Birthday Post Heading
Text for Heading post {xx} = 1st 2nd 3rd 4th etc, {username} {bdate}

Specifically "Text for Heading post" is that something I have to configure?

Also does this mod ignore people who have chosen not to display birthday? - Can see that it does from OP, thank you :)

AusPhotography 06-22-2011 10:11 PM

Quote:

Originally Posted by CK (Post 2211512)
Installed, rated and nominated. :) ...

Thanks.

The {} syntax allows you to put markers in the heading and message that are then filled out with the specific details of that members birthday.

So
Code:

Happy {xx} Birthday {username}! ({bdate})
becomes
Code:

Happy 54th Birthday ashey! (17th of June)
Eg:
http://www.ausphotography.net.au/for...7th-of-June%29
(On our site)

AusPhotography 06-22-2011 10:15 PM

Quote:

Originally Posted by cykelmyggen (Post 2211452)
Will this work on 4.1.4? Had it on 3.7. and users loved it :)

Yes. It works on our 4.1.4 test system.
I doubt any major future change to vB will affect this very much at all.

Quote:

Originally Posted by kylek (Post 2211453)
Thank you!
One last dumb question.
In your screenshot you have a smiley party5 and this is where we would like to link an image to show, just cant remember what to put for the code.
What coding is needed to link to an image to be displayed at the top of the post and pm?

Ah, party5 is a custom smiley face on our site. :eek:
Edit the text via AdminCP to put whatever you want.

CK 06-22-2011 10:20 PM

Thanks Snoopy!

sweetpotato 06-24-2011 01:25 PM

Thank you for the Mod. How can I use translated phrase on multilanguage site?

whitey92lx 06-24-2011 02:15 PM

Thanks! It was very easy to install.

************************************************** ************

Just got a few emails:

Database error in vBulletin 4.0.3:

Invalid SQL:

SELECT `forumid` FROM vbwsm_`forum`
WHERE (`forum`.`options` & 4096)
ORDER BY `forumid`;

MySQL Error : Table 'kevin_vbwsm.vbwsm_' doesn't exist
Error Number : 1146
Request Date : Friday, June 24th 2011 @ 11:53:06 AM
Error Date : Friday, June 24th 2011 @ 11:53:06 AM
Script : http://www.westsidemustangs.com/cron...and=1308934385
Referrer : http://www.westsidemustangs.com/sear...earchid=398297
IP Address : 70.240.73.124
Username : Unregistered
Classname : vB_Database
MySQL Version :



- I am not the original owner of my site, and some other person set the version of vbulletin up about 2 years ago. Maybe something has him listed where it should have me listed?

AusPhotography 06-25-2011 06:18 AM

Fixed! 1.0.3

AusPhotography 06-25-2011 06:22 AM

Quote:

Originally Posted by sweetpotato (Post 2212176)
Thank you for the Mod. How can I use translated phrase on multilanguage site?

The birthday greeting text is single language. I'm not planning on changing that as it suites our site the way it is.

whitey92lx 06-25-2011 04:28 PM

I installed the update and then set it up, and got this email.

Database error in vBulletin 4.0.3:

Invalid SQL:

SELECT forumid FROM vbwsm_forum
WHERE (forum.options & 4096)
ORDER BY forumid;

MySQL Error : Unknown column 'forum.options' in 'where clause'
Error Number : 1054
Request Date : Saturday, June 25th 2011 @ 12:21:01 PM
Error Date : Saturday, June 25th 2011 @ 12:21:01 PM
Script : http://www.westsidemustangs.com/cron...and=1309022460
Referrer : http://www.westsidemustangs.com/forum.php
IP Address : 99.153.185.197
Username : Unregistered
Classname : vB_Database
MySQL Version :

AusPhotography 06-25-2011 10:11 PM

Brain fart - fixed (again) :D

whitey92lx 06-26-2011 04:03 AM

I re installed, updated the settings and got this email.


************************************************** ****

Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT userid, username, usergroupid, birthday, showbirthday, posts, timezoneoffset,
DATE_FORMAT(DATE_ADD(UTC_TIMESTAMP(), INTERVAL ((timezoneoffset - 4)*60) MINUTE), '%D of %M') AS BDisplay,
(DATE_FORMAT(DATE_SUB(UTC_TIMESTAMP(), INTERVAL (timezoneoffset - 4) HOUR), '%Y') - SUBSTRING(birthday,7,4)) AS UserAge
FROM vbwsm_user
WHERE birthday LIKE DATE_FORMAT(DATE_ADD(UTC_TIMESTAMP(), INTERVAL ((timezoneoffset - 4)*60) MINUTE), '%m-%d%%')
AND showbirthday > '1'
AND usergroupid NOT IN (1,3,4,8,45,51)
AND userid NOT IN (SELECT ap_birthday.userid FROM vbwsm_ap_birthday);

MySQL Error : Unknown column 'ap_birthday.userid' in 'field list'
Error Number : 1054
Request Date : Sunday, June 26th 2011 @ 12:00:30 AM
Error Date : Sunday, June 26th 2011 @ 12:00:30 AM
Script : http://www.westsidemustangs.com/cron...and=1309064428
Referrer : http://www.westsidemustangs.com/sear...earchid=400030
IP Address : 208.54.83.141
Username : Unregistered
Classname : vB_Database
MySQL Version :

Markos 06-26-2011 08:35 AM

seams to work fine for me on 4.1.4

AusPhotography 06-26-2011 08:48 AM

Quote:

Originally Posted by Markos (Post 2212939)
seams to work fine for me on 4.1.4

Ahhhhhhhhhhh!!!! It databases with pre-fix table names - which i don't use. I only do that by eyeballing the code.


Mea culpa :(

Markos 06-26-2011 09:21 AM

do we need to update the xml file or just the ap_birthday.php file

AusPhotography 06-26-2011 09:38 AM

Just the ap_birthday.php, but the XML ups the version number so you can track it.

Boofo 06-26-2011 10:46 AM

Do this allow you to turn off the PM option while keeping the thread option open?

whitey92lx 06-26-2011 02:35 PM

Well 1.0.5 seems to be working fine now. I didn't receive any database error emails, but I also don't appear to have any birthdays today..

Thank you for all of your help!

AusPhotography 06-27-2011 01:51 AM

Quote:

Originally Posted by Boofo (Post 2212965)
Do this allow you to turn off the PM option while keeping the thread option open?

No, but 1.0.6 will :D


All times are GMT. The time now is 04:07 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01333 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete