Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show Birthday Icon in Postbit Details »»
Show Birthday Icon in Postbit
Version: 1.0.4, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 06-06-2005 Last Update: 09-07-2005 Installs: 172
Uses Plugins Template Edits
 
No support by the author.

Description
This hack adds a small icon in the postbit if the user has a birthday.

Details
Files to modify: 0
Templates to modify: 1
Difficulty: Easy

History
1.0.0
Initial Version for vBulletin 3.5.0 Beta 1

1.0.1
Removed Debug-Code

1.0.2
Now phrased and packaged as Product

1.0.3
Fixed Timezone Issue, Fixed logical expression glitch

1.0.4
Updated for RC3, does take care of User selection for Birthday Privacy

Please only click Install if you actually have installed/are using this Hack, and click Uninstall whan you don't use it any longer!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
BWS

Comments
  #32  
Old 08-06-2005, 02:52 PM
hobbes747 hobbes747 is offline
 
Join Date: Jul 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The icon was showing up for every member that had a birthday in the current month on both RC1 and RC2 for me.

Had to change
Code:
	$this->post['hasbday'] = ($birthday[0] == $this->cache['month']) AND ($birthday[1] == $this->cache['day']);
to

Code:
	$this->post['hasbday'] = ($birthday[0] == $this->cache['month']) && ($birthday[1] == $this->cache['day']);
Otherwise it's working in RC2. Thanks!
Reply With Quote
  #33  
Old 08-07-2005, 02:38 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent! That fixed my problem.

Thanks hobbes!
Reply With Quote
  #34  
Old 08-07-2005, 09:18 PM
mOdEtWo mOdEtWo is offline
 
Join Date: Dec 2003
Location: Norway
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hobbes747
The icon was showing up for every member that had a birthday in the current month on both RC1 and RC2 for me.

Had to change
Code:
	$this->post['hasbday'] = ($birthday[0] == $this->cache['month']) AND ($birthday[1] == $this->cache['day']);
to

Code:
	$this->post['hasbday'] = ($birthday[0] == $this->cache['month']) && ($birthday[1] == $this->cache['day']);
Otherwise it's working in RC2. Thanks!
This fixed it for me too, I had the exact same problem.
Reply With Quote
  #35  
Old 08-07-2005, 09:59 PM
mOdEtWo mOdEtWo is offline
 
Join Date: Dec 2003
Location: Norway
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, doesn't this plugin respect the timezone settings? One of my users had her birthday yesterday, but the birthdayicon is still showing for me @ 0:57 am GMT. The forum is configured with an EDT timezone.
Reply With Quote
  #36  
Old 08-07-2005, 10:21 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uuh! I fear you're right.

Please try this Plugin Code instead and let me know if it does work correctly

PHP Code:
if (!$this->cache['year'])
{
    
$this->cache['year'] = vbdate('Y'TIMENOWfalsefalse);
    
$this->cache['month'] = vbdate('n'TIMENOWfalsefalse);
    
$this->cache['day'] = vbdate('j'TIMENOWfalsefalse);;
}
if (empty(
$this->cache['hasbday'][$this->post['userid']]))
{
    
$birthday explode('-'$this->post['birthday']);
    
$this->post['hasbday'] = (($birthday[0] == $this->cache['month']) AND ($birthday[1] == $this->cache['day']));
    
$this->cache['hasbday'][$this->post['userid']] = $this->post['hasbday'];
}
else
{
    
$this->post['hasbday'] = $this->cache['hasbday'][$this->post['userid']];

Reply With Quote
  #37  
Old 08-07-2005, 10:40 PM
mOdEtWo mOdEtWo is offline
 
Join Date: Dec 2003
Location: Norway
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aye, that worked Kirby. It now seems to respect timezone settings.

I suggest you change the "AND" statement to "&&" to get rid of the bug several of us have pointed out.

Reply With Quote
  #38  
Old 08-07-2005, 11:02 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

&& does not comply with vBulletin Code Standards, therefore I don't use it

Anyway, the Problem (Icon being shown for wrong Users) should not happen anymore with the above Code.
Could you check if this is correct?
Reply With Quote
  #39  
Old 08-08-2005, 07:13 AM
mOdEtWo mOdEtWo is offline
 
Join Date: Dec 2003
Location: Norway
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Anyway, the Problem (Icon being shown for wrong Users) should not happen anymore with the above Code.
Could you check if this is correct?
I changed it back to "AND", and it seems to work now. Haven't seen any users with the cake which hasn't got a birthday.
Reply With Quote
  #40  
Old 08-08-2005, 12:11 PM
Brinnie's Avatar
Brinnie Brinnie is offline
 
Join Date: Jul 2005
Location: Louisiana
Posts: 360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it add any queries, or whateber?
Reply With Quote
  #41  
Old 08-08-2005, 01:58 PM
hobbes747 hobbes747 is offline
 
Join Date: Jul 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mOdEtWo
I changed it back to "AND", and it seems to work now. Haven't seen any users with the cake which hasn't got a birthday.
Same for me, the extra brackets in the birthday line did the trick.

Thank you!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06996 seconds
  • Memory Usage 2,326KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete