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)

whitey92lx 06-27-2011 02:11 AM

installed! Thanks!

Boofo 06-27-2011 02:27 AM

Quote:

Originally Posted by snoopytas (Post 2213346)
No, but 1.0.6 will :D

I should hope so. :p

whitey92lx 06-27-2011 04:02 AM

aaaaannd, IT WORKS!

BadgerDog 06-28-2011 10:35 AM

I think I'm going to have to un-install this as I can't figure out why it's not working ...

Perhaps I don't understand the wording of these options?

Quote:

Days Active
Posts in this number of Days to get a Birthday Post (30)

Posts in days
Number of posts in days to get a Birthday Post (5)
I simply want any member who has been active in the last 180 days and whose post count is zero (0), to be able to receive a PM and post in the designated forum.

What should be the settings for these options above. :confused:

It won't accept a zero in the "Number of posts in days to get a Birthday Post" field and keeps defaulting back to one (1)...

Any feedback would be welcome .. :)

Regards,
Doug

AusPhotography 06-28-2011 10:53 PM

@Doug
The definition of 'active' for this plugin is posts; not just logging in.
I.e. 1 post in the last 180 days would work, but not zero.

I wrote it as a reward for people who actually interact on the forums.
On our forum we discourage lurking.

Feel free to modify the code to your needs.

BadgerDog 06-29-2011 09:56 AM

Quote:

Originally Posted by snoopytas (Post 2214300)
@Doug
The definition of 'active' for this plugin is posts; not just logging in.
I.e. 1 post in the last 180 days would work, but not zero.

I wrote it as a reward for people who actually interact on the forums.
On our forum we discourage lurking.

Feel free to modify the code to your needs.


Thanks ... :up:

Is there a line in the code (or plugin) somewhere that I could change it to permit 0 posts?

Regards,
Doug

AusPhotography 06-29-2011 10:31 PM

Quote:

Originally Posted by BadgerDog (Post 2214437)
Thanks ... :up:
Is there a line in the code (or plugin) somewhere that I could change it to permit 0 posts?

Sure... you will need to modify the 2nd SQL select statement in ap_birthday.php.

http://dev.mysql.com/doc/refman/5.1/en/select.html

AusPhotography 07-02-2011 06:14 AM

I had a query by PM regarding when the greeting is posted...

The messages get posted ~4 hours after midnight of the person receiving the greetings timezone.
The idea being they get the greeting on the morning of their birthday.
Obviously subject to the vagaries of the cron job system.
As we have members across the planet this was an important idea.

The code that makes it happen is this...
Code:

// Get all possible birthdays today in members timezone after 4:00am members timezone       
// vBulletin formats birthday as mm-dd-yyyy (yyyy = 0000 is year if supressed)       
$birthdays_db = $vbulletin->db->query_read("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 " . TABLE_PREFIX . "user
        WHERE birthday LIKE DATE_FORMAT(DATE_ADD(UTC_TIMESTAMP(), INTERVAL ((timezoneoffset - 4)*60) MINUTE), '%m-%d%%')
        AND showbirthday > '1'
        AND usergroupid NOT IN (".$vbulletin->options['APbirthday_excludeug'].")
        AND userid NOT IN (SELECT " . TABLE_PREFIX . "ap_birthday.userid FROM " . TABLE_PREFIX . "ap_birthday)
");


BadgerDog 07-17-2011 09:47 AM

Uninstalled ... for some reason, just stopped working .... switched back to Valter's mod for this purpose ...

Thanks to the developer his efforts .... :)

Regards,
Doug

AusPhotography 07-17-2011 10:23 AM

Quote:

Originally Posted by BadgerDog (Post 2221421)
Uninstalled ... for some reason, just stopped working .... switched back to Valter's mod for this purpose ...

Thanks to the developer his efforts .... :)

Regards,
Doug

:confused: It works for us and other sites.
There is no reason it should just stop working.

Check that the cron job is working.

What changed on you site?
Remember it is based on forum activity.

What settings did you have?

BadgerDog 07-17-2011 11:04 AM

1 Attachment(s)
Quote:

Originally Posted by snoopytas (Post 2221431)
:confused: It works for us and other sites.
There is no reason it should just stop working.

Check that the cron job is working.

What changed on you site?
Remember it is based on forum activity.

What settings did you have?

Hi .. :)

Not sure why ... :confused:

As an example, had a member's birthday today. He had 3 posts and joined in the last week. He has his birthday options set to display on and the cron job is running.

No thread created or PM sent ... it was the 3rd example in the last week.

Anyway, no big deal and thanks for providing something other than Valter's which seems to run fine for us, which we had been using before.

Regards,
Doug

AusPhotography 07-17-2011 08:39 PM

A non obvious reason could be how he has his birthday display setting

I.e. it honours the vB: Edit Profile / Date of Birth: / privacy setting.

Ie. showbirthday > '1' in the code.

BadgerDog 07-18-2011 09:52 AM

Quote:

Originally Posted by snoopytas (Post 2221603)
A non obvious reason could be how he has his birthday display setting

I.e. it honours the vB: Edit Profile / Date of Birth: / privacy setting.

Ie. showbirthday > '1' in the code.

His setting in his user record indicates that it was ok to show "day and month of birth" publicly.

Should that have worked?

Regards,
Doug

AusPhotography 07-19-2011 03:13 AM

Yes, that should have worked and does on our site.

Successfulsteps 07-19-2011 06:32 AM

I installed this on 4.1.4 today and can't wait for someone's birthday to see it work!!

Do you have to disable the email too though? Or is there some reason that both can't work at the same time?

AusPhotography 07-19-2011 08:19 AM

Quote:

Originally Posted by BadgerDog (Post 2221862)
His setting in his user record indicates that it was ok to show "day and month of birth" publicly.

Should that have worked?

Regards,
Doug


Yes that should work.

I just re-checked the SQL code in various scenarios - it works.
Without actually seeing the specific case I cannot determine why it appears not to work for you.

We have been using this mod for over a year ourselves - well before I productised it.

Thanks for the feedback.

AusPhotography 07-19-2011 08:23 AM

Quote:

Originally Posted by Successfulsteps (Post 2222333)
I installed this on 4.1.4 today and can't wait for someone's birthday to see it work!!

Do you have to disable the email too though? Or is there some reason that both can't work at the same time?

They can both work! Either a post or a PM or both. We use both.

Successfulsteps 07-19-2011 11:15 AM

Quote:

Originally Posted by snoopytas (Post 2222352)
They can both work! Either a post or a PM or both. We use both.

No, what I mean is that the instructions say to disable the email birthday one. I want to know if I can have the post, PM AND email; or if I have to disable to the email to insure the mod works correctly.

AusPhotography 07-19-2011 11:42 PM

The email is created by the vB standard scheduled job .
You do not have to disable it, I suggested that to avoid confusion.

This mod does not generate an email other than by side effect of the PM.

Successfulsteps 07-19-2011 11:56 PM

Quote:

Originally Posted by snoopytas (Post 2222648)
The email is created by the vB standard scheduled job .
You do not have to disable it, I suggested that to avoid confusion.

This mod does not generate an email other than by side effect of the PM.

Thanks for the clarification. I wanted to keep the email birthday just because you get some members who are not active, have not posted; and any chance to send them something is great! At the same time though, I don't want to post or send the PM to them. So, your answer is helpful so I can keep that email as well without conflicts.

wampforum 07-22-2011 08:38 AM

Quote:

Originally Posted by snoopytas (Post 2214775)
Sure... you will need to modify the 2nd SQL select statement in ap_birthday.php.

http://dev.mysql.com/doc/refman/5.1/en/select.html


Im after allowing threads created for all users regardless of posts but i am unsure what I need to change to allow this. Any chance you could give this newbie a clue?!!

AusPhotography 07-23-2011 01:02 PM

Quote:

Originally Posted by wampforum (Post 2223502)
Im after allowing threads created for all users regardless of posts but i am unsure what I need to change to allow this. Any chance you could give this newbie a clue?!!

Don't need to, just set the post count to zero :)

GeorgeB85 07-26-2011 12:08 PM

This posted a birthday thread for me today exactly at midnight, but even though in my profile it says the 26th is my birthday, it posted that my birthday was the 25th.

AusPhotography 07-26-2011 11:32 PM

Quote:

Originally Posted by GeorgeB85 (Post 2225158)
This posted a birthday thread for me today exactly at midnight, but even though in my profile it says the 26th is my birthday, it posted that my birthday was the 25th.

What timezone is your server?
What timezone is your user profile?
When it posted at midnight, was that in your timezone or the servers?

Did you change the job schedule at all? It should run hourly not on the exact hour.

Thanks

sweetpotato 08-04-2011 02:32 AM

It does not work for my site even I run AP Scheduled task mannually.
Please give me more instructions,
thanks

AusPhotography 08-05-2011 11:45 AM

What settings do you have ... posts etc?

sweetpotato 08-06-2011 02:40 PM

Thank you. It have worked like a charm now. But AP thread delayed after some hours them forum shows member birthday.

I think because off server time zone.

cykelmyggen 08-07-2011 05:17 PM

As I run a non-english forum I would like to know if it is possible to remove the "th" after the age and the english version of date (f.ex. 20th= 20 and "7th of August"=7. august) ?

AusPhotography 08-08-2011 11:26 PM

Quote:

Originally Posted by cykelmyggen (Post 2230567)
As I run a non-english forum I would like to know if it is possible to remove the "th" after the age and the english version of date (f.ex. 20th= 20 and "7th of August"=7. august) ?

Feel free to edit the source to suit your needs. :up:

cykelmyggen 08-09-2011 07:13 PM

Quote:

Originally Posted by snoopytas (Post 2231093)
Feel free to edit the source to suit your needs. :up:

Thanks for the generous offer, unfortunately I haven't got any coding skills ;-)

AusPhotography 08-10-2011 02:21 AM

Quote:

Originally Posted by cykelmyggen (Post 2231470)
Thanks for the generous offer, unfortunately I haven't got any coding skills ;-)

Time to learn? In this case it is very easy, a great way to pick up some skills

boazor 05-03-2012 08:19 AM

Is this support 4.1.12?

AusPhotography 05-04-2012 03:12 AM

Yes 4.1.12 - no problems! (We run 4.1.12 ourselves).

Kym

JustAskJulie 06-09-2012 04:59 PM

Can you please show what needs to be changed in php code to set posts to 0?

JustAskJulie 06-09-2012 05:56 PM

Quote:

Originally Posted by ricktas (Post 2223882)
Don't need to, just set the post count to zero :)

it doesn't allow it from the admin panel, it defaults to 1. You addressed this in an earlier post stating that it had to be changed in the .php file. Can you post the code that needs changed?

AusPhotography 06-11-2012 05:14 AM

I've updated the product to allow zero active posts :)

Also, it works on our 4.2.0 system

Kym

Greek Wizard 09-01-2012 08:29 PM

Surprised no one has mentioned this, but the xml is hard coded to "yourforum" so when the cron runs and a thread is created the link in the post is wrong as it's something like yourforum.com/forum/member,......

Would be nice to see this take your path automatically, but an easy fix is to edit the product xml to your own correct path and reinstall/over write the xml.

AusPhotography 09-03-2012 12:10 AM

The 'hard' coded bit is not.
It is a default value in a parameter you are supposed to edit :D

Code:

<defaultvalue><![CDATA[Happy {xx} Birthday {username}! 

Hope you have a wonderful day, and very best wishes from everyone here at the Forum.

({bdate})]]></defaultvalue>


Janmaat 03-22-2013 12:51 PM

Quote:

Originally Posted by cykelmyggen (Post 2230567)
As I run a non-english forum I would like to know if it is possible to remove the "th" after the age and the english version of date (f.ex. 20th= 20 and "7th of August"=7. august) ?

Me too!

How can I change this? Could 't find it.

smirkley 03-22-2013 02:26 PM

I am going to give this a try. Been using the other mod but it is always a day early and changes the birthdate to be a day early.

I know this is cron run, and as such if you have ten crons stacked up in the schedule and no visitors in the wee hours, it will take a pageview for each cron to run consecutively. That obviously will cause a delay, but better a tad late in the morning than a whole day early I think.


All times are GMT. The time now is 02:44 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.01501 seconds
  • Memory Usage 1,834KB
  • 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
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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