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)
-   -   Miscellaneous Hacks - VSa - Auto Birthday Greeter (https://vborg.vbsupport.ru/showthread.php?t=236131)

ardseidel 09-26-2010 09:32 AM

Well there used to be an offset option to make the threads appear later or earlier..... but it was removed.

BadgerDog 09-26-2010 09:58 AM

Quote:

Originally Posted by oly51 (Post 2103208)
Mine just kicked in 4 hours early (@20:00). The post had the date as 9/25 not the correct date of 9/26. My server is at GMT -5. Maybe there needs to be a GMT offset setting in the control panel options.

I think for it to work successfully, this is exactly what it needs ... :)

Regards,
Badger

spillage 09-26-2010 02:43 PM

2.0.6 seemed to work properly for two days, then started the post a day early routine.

Once again disabled.

Keep at it Valter, you'll get it sooner or later. ;)

oly51 09-27-2010 07:58 PM

Quote:

Originally Posted by oly51 (Post 2103208)
Mine just kicked in 4 hours early (@20:00). The post had the date as 9/25 not the correct date of 9/26. My server is at GMT -5. Maybe there needs to be a GMT offset setting in the control panel options.

Let me correct that post. My server is at GMT-4 (Daylight savings) which would make it it off by 4 hours.

MichaelDance 09-29-2010 02:55 PM

I have VB4.0.7 and it broke my forum. had to remove it for it to work again.

midnz 09-30-2010 05:38 PM

Running vB:4.0.7, Auto Birthday Greeter: 2.0.6

I've had to disable due to multiple threads being generated.

Threads generated for one individual at: 04:09 AM, 07:18 AM & 07:22 AM (GMT +13)
Threads generated for another individual at: 12:01 AM, 04:10 AM & 07:21 AM (GMT +13)

I disabled at 07:23 AM (GMT +13)
Server time GMT -5

indiancinema 09-30-2010 08:15 PM

worked for two days, now again started creating multiple threads

angelimnot 10-01-2010 02:15 AM

worked for a few days.. then multi threads ... like .. 10-12 a day

-=Leb=- 10-02-2010 12:47 PM

Hi valter, sorry for keep coming with bad news. I had to disable the hack coz it started creating multiple threads.

it created like 50 threads for 2 members within like 20 mins.

One question, when i uninstalled it. i got database error, it forced me to reinstall the hack but disabled it temp until the next fix

Footman 10-02-2010 04:10 PM

Never got one single post... don't know why :(

oly51 10-08-2010 01:35 AM

Yesterday it greeted a member who lives in Norway at ~2:00pm EST (10 hours early). Today it greeted a member who lives in IL in the US ( GMT-6) at ~10:00pm (2 hours early).
Could the program be triggering on the members time zone instead of the servers?

GeorgeB85 10-14-2010 04:35 PM

This is working incorrectly. on 4.0.7. It is posting the birthday messages roughly 25 hours late. I just had a posting for a members birthday that was yesterday, and it didn't post till almost 1am last night.

Julie 10-16-2010 09:57 AM

I've had this installed for a while now, even on 4.0, and it's been working OK, it just posted the thread too early (about an hour before midnight or so), so I just had to manually edit the date inside the thread. Which wasn't a problem, because not a lot of birthday threads were posted.

But today I had to disable it. I had two members who had a birthday, and during the night, this script posted over 100 threads :S

Hopefully there'll be an update soon, because I really like this script!

kras 10-17-2010 08:31 AM

Even though i have created translations of the phrases; It's still uses the default English phrases in the gratulations.

woffie 10-17-2010 03:46 PM

Not posting any threads. Giving up on this one.

persianpros 10-27-2010 07:07 AM

Persian Translation :cool:

By Persian Prince

kras 11-02-2010 02:57 AM

1 Attachment(s)
The original code used the vbdate()-function in a way that created bogus times, which actually is a design flaw in the function itself. However, since the Unix timestamp is independent from the default timezone settings i see no point in the original logic anyway, unless you alter the code to take advantage of vbdate's built in hourdiff mechanism, but since that mechanism uses the current users timezone you could get pretty unpredictable times.

I have altered the code so that a current UTC time is first created and then modified with the forums' timezone setttings to create a local forum time. In short, the product works fine now with the following changes.


Replace:

PHP Code:

$vsaabgreeter_servertime mktime('0'.date('H'TIMENOW),    '0'.date('i'TIMENOW), '0'.date('s'TIMENOW), '0'.date('m'TIMENOW),    '0'.date('d'TIMENOW), '0'.date('Y'TIMENOW), -1);
 
$vsaabgreeter_forumtime mktime('0'.vbdate('H'TIMENOW),    '0'.vbdate('i'TIMENOW), '0'.vbdate('s'TIMENOW), '0'.vbdate('m',    TIMENOW), '0'.vbdate('d'TIMENOW), '0'.vbdate('Y'TIMENOW), -1);
 
 
$vsaabgreeter_propertime TIMENOW;
 if (
$vsaabgreeter_servertime $vsaabgreeter_forumtime)
 {
         
$vsaabgreeter_timeoffset $vsaabgreeter_servertime $vsaabgreeter_forumtime;
         
$vsaabgreeter_propertime TIMENOW $vsaabgreeter_timeoffset 10;
 }
 else
 {
         
$vsaabgreeter_timeoffset $vsaabgreeter_forumtime $vsaabgreeter_servertime;
         
$vsaabgreeter_propertime TIMENOW $vsaabgreeter_timeoffset 10;
 }
 
 
$vsaabgreeter_execdate date('m-d'$vsaabgreeter_propertime);
 
 
$vsaabgreeter_done false;
 
$vsaabgreeter_posted $vbulletin->db->query_read(" SELECT daydone    FROM " TABLE_PREFIX "vsa_birthdaythread WHERE daydone =    '".$vbulletin->db->escape_string($vsaabgreeter_execdate)."' ");
 
 if (
$vbulletin->db->num_rows($vsaabgreeter_posted) > 0)
 {
         
$vsaabgreeter_done true;
 }
 
 
$vsaabgreeter_exechour date('H'$vsaabgreeter_propertime); 

[hr]-[/hr]

With:

PHP Code:

 $vsaabgreeter_Time = new DateTime("now", new DateTimeZone('UTC'));
 
$vsaabgreeter_offset $vbulletin->options[timeoffset];
 
$vsaabgreeter_Time->modify(($vsaabgreeter_offset >= '+' $vsaabgreeter_offset $vsaabgreeter_offset) . 'hour');
 
 
$vsaabgreeter_execdate $vsaabgreeter_Time->format('m-d');
 
 
$vsaabgreeter_done false;
 
$vsaabgreeter_posted $vbulletin->db->query_read(" SELECT daydone  FROM " TABLE_PREFIX "vsa_birthdaythread WHERE daydone =  '".$vbulletin->db->escape_string($vsaabgreeter_execdate)."' ");
 
 if (
$vbulletin->db->num_rows($vsaabgreeter_posted) > 0)
 {
         
$vsaabgreeter_done true;
 }
 
 
$vsaabgreeter_exechour $vsaabgreeter_Time->format('H'); 

[hr]-[/hr]


Note that the exclude times are still there, which by default means that no threads will be created after 20:00. These times can be altered in the array shown below


PHP Code:

 $vsaabgreeter_exchrs = array(20,21,22,23); 

[hr]-[/hr]

or removed completely by replacing:

PHP Code:

 $vsaabgreeter_exechour $vsaabgreeter_Time->format('H');
 
$vsaabgreeter_exchrs = array(20,21,22,23);
 
 if (!
$vsaabgreeter_done AND !in_array($vsaabgreeter_exechour$vsaabgreeter_exchrs)) 

[hr]-[/hr]

with

PHP Code:

 if (!$vsaabgreeter_done

[hr]-[/hr]

Attached is a file with all changes.

voglermc 11-02-2010 10:56 AM

Thanks Kras!

voglermc 11-02-2010 12:00 PM

Kras, I'm getting this error since installing your version

Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (hour) at position 0 (h): The timezone could not be found in the database in [path]/includes/class_bootstrap.php(517) : eval()'d code on line 91

-=Leb=- 11-02-2010 12:19 PM

I wouldn't install it without valter's permission!

voglermc 11-02-2010 12:26 PM

reinstalled valter's version

kras 11-02-2010 03:17 PM

Quote:

Originally Posted by voglermc (Post 2117109)
Kras, I'm getting this error since installing your version


Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (hour) at position 0 (h): The timezone could not be found in the database in [path]/includes/class_bootstrap.php(517) : eval()'d code on line 91

There was a typo in the code that affected negative time offsets. Now it should work for you. The code is available at the previous post.

BadgerDog 11-02-2010 07:01 PM

Quote:

Originally Posted by kras (Post 2117166)
There was a typo in the code that affected negative time offsets. Now it should work for you. The code is available at the previous post.

Testing updated code ... will advise ...

Thanks for trying to fix this ... :)

Regards,
Badger

voglermc 11-02-2010 07:02 PM

Please remove the link in the quote above to my site. Thanks for the update!

BadgerDog 11-02-2010 07:17 PM

Quote:

Originally Posted by voglermc (Post 2117232)
Please remove the link in the quote above to my site. Thanks for the update!

You mean there's a link in the code you re-wrote to your site that needs to be removed? :confused:

...or, do you mean the link to your original post in the "quote" above?

I'm not much of a coder, so I downloaded your replacement file and installed it, which went fine, so is there something else I need to do while I wait to see if it works?

Regards,
Badger

voglermc 11-02-2010 08:21 PM

Speaking to Kras

BadgerDog 11-02-2010 09:10 PM

Quote:

Originally Posted by voglermc (Post 2117253)
Speaking to Kras

Roger that ... :up:

Regards,
Badger

kras 11-03-2010 01:49 AM

Quote:

Originally Posted by voglermc (Post 2117232)
Please remove the link in the quote above to my site. Thanks for the update!

Done

Quote:

Originally Posted by BadgerDog (Post 2117238)
You mean there's a link in the code you re-wrote to your site that needs to be removed? :confused:

...or, do you mean the link to your original post in the "quote" above?

I'm not much of a coder, so I downloaded your replacement file and installed it, which went fine, so is there something else I need to do while I wait to see if it works?

Regards,
Badger

You could create a new user in your ACP with todays date as birth date. Then you would know at once if it works (when your main forum page loads).

BadgerDog 11-07-2010 10:07 AM

Quote:

Originally Posted by kras (Post 2117324)
Done



You could create a new user in your ACP with todays date as birth date. Then you would know at once if it works (when your main forum page loads).

Tested on 4.04 and confirmed that this patched version by kras seems to work fine ... :up:

Thank you kras ... appreciate you addressing the problem ... :)

Regards,
Badger

GeorgeB85 11-07-2010 11:08 AM

I thought this was fixed? I had it post a birthday yesterday that was meant for today??

bulldog71169 11-11-2010 04:01 PM

Quote:

Originally Posted by kras (Post 2117324)
Done



You could create a new user in your ACP with todays date as birth date. Then you would know at once if it works (when your main forum page loads).

I have tried this and nothing shows? is there a way to test this mod immediately, to check the functionality and wording of the message?

Hall of Famer 11-12-2010 07:14 AM

umm will it send birthday emails to users?

bulldog71169 11-17-2010 09:05 AM

yes it does

BadgerDog 11-17-2010 09:39 AM

Quote:

Originally Posted by GeorgeB85 (Post 2118981)
I thought this was fixed? I had it post a birthday yesterday that was meant for today??

Use kras's modified version ... works fine ... :up:

Released version has the problems you describe ..

Regards,
Badger

Vick98 11-18-2010 04:32 PM

Very nice mod, Thank you.

cuocsongso 11-20-2010 06:26 PM

Quote:

Originally Posted by Valter (Post 2054097)
Use CSS. Change:

- opening tag to:
Code:

<span style="color:#0000FF;font-weight:bold;">
- closing tag to:
Code:

</span>
- 'User title' to:
Code:

<span style="color:#0000FF;font-weight:bold;">Modding Guru</span>
Change red part to color code you want to use for selected usergroup.

I have same error like that ( color=roup/member.gif]Member1[/color] )
https://vborg.vbsupport.ru/
My code use in Username HTML Markup box
Open tag:
Quote:

<img src="images/colorgroup/member.gif" border="0" />
Close tag: None
I don't use User Title
Help me fix it,plz
Thank you

pantani 11-21-2010 04:45 PM

Thank you, nice hack

3loomShia 11-22-2010 12:11 PM

I got it working. Installed

Valter 11-23-2010 07:33 PM

Quote:

Originally Posted by cuocsongso (Post 2123947)
I have same error like that ( color=roup/member.gif]Member1[/color] )
http://img443.imageshack.us/img443/6...1jun091420.gif
My code use in Username HTML Markup box
Open tag:

Close tag: None
I don't use User Title
Help me fix it,plz
Thank you

Check La Emperadora's usergroup tags.

If it's add-on then other usernames should be affected too.

CybaGirl 11-27-2010 01:19 AM

Thanks for the update(s) I have re installed it and everything seems to be working on vBulletin v4.0.3.

However have the same issue with the persons birthday being posted a day earlier.

I have installed Kras's fix so hopefully this will resolve this issue. So thanks! But won't know until tomorrow.


All times are GMT. The time now is 07:41 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.01624 seconds
  • Memory Usage 1,864KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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