vForums Support > Programming & Coding :: Code Requests & Support :: > [Request] Happy Birthday in news fader

[Request] Happy Birthday in news fader - Posted By Nick (nickb) on 27th Jan 08 at 2:10am
Im requesting, a Happy Birthday thing in the news fader, just like the code, that says. Welcome to new member [user]

Darkmage

Re: [Request] Happy Birthday in news fader - Posted By Ross (admin) on 31st Jan 08 at 10:01am
Code: JavaScript
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Show Todays Birthdays in the News Fader - Open Source */
  4. if(bdays = get('birthdays', ID)) {
  5. var birthdays = bdays.getElementsByTagName('div').item(0).innerHTML;
  6. } else {
  7. var birthdays = "<i>Nobody</i>";
  8. }
  9. if("undefined" != typeof news) {
  10. for(n=0; n<news.length; n++) {
  11. news[n] = news[n].replace(/\[birthdays\]/, birthdays);
  12. }
  13. }
  14. else if(get('forum_news', ID)) {
  15. news_table = get('forum_news', ID);
  16. news_table.innerHTML = news_table.innerHTML.replace(/\[birthdays\]/, birthdays);
  17. }
  18. //-->
  19. </script>
 


Place that in the main footer. Then place [birthdays] in the news fader to display the birthdays {Smile}