To use this website completely, it is necessary to store cookies on your computer.
 

* Statistic

  • *Total Posts: 16399
  • *Total Topics: 2548
  • *Online Today: 10
  • *Most Online: 292
(2016 November 12, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 4
  • *Total: 4

  • *Yahoo!
  • *Google (2)
  • *Baidu

Upcoming birthdays

Started by DirtRider, 2008 November 24, 19:42:22

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

b4pjoe

#15
2011 January 05, 01:02:58
Quote from: afrosheen ,  2011 January 04, 22:05:42
Thanks for the help fixing to upgrade in a few hours!

What's the trick on the copy and paste to keep it all going on 1 line when pasting the code?


I wish I knew that answer too. It happens sometimes and sometimes it doesn't. I've had it happen here at this site, SMF's site, and my site and I've had it work properly at all 3 sites too. I just tried it copying directly from the post above into a PortaMx PHP block and it worked fine for me this time.

feline

#16
2011 January 05, 09:47:20
If the copy/paste not work properly this is often a browser problem or char set mistake.
We use utf-8 here and if you have iso set for your browser, this can get complications.
Best way ..
move the mouse to the first position in the code block, hold down the left mouse key and move the mouse down until all code is marked. Then take a right click, select copy from drop down menu.

Fel
Many are stubborn in relation to the path, a few in relation to the target.

kev

#17
2011 August 22, 11:26:46
Quote from: feline ,  2011 January 04, 21:52:13
Here es a other script that show the birthdays of the current month.
Use this only with SMF 2.0 RC4 ...

PHP block code:
Code Select

global $smcFunc, $scripturl, $sourcedir, $txt;

include_once($sourcedir .'/Subs-Calendar.php');
$month = (int) strftime('%m', forum_time());
$year = (int) strftime('%Y', forum_time());

$start_data = date('Y-m-d', mktime(0, 0, 0, $month, 1, $year));
if($month == 12)
{
$month = 1;
$year++;
}
else
$month++;
$end_data = date('Y-m-d', mktime(0, 0, 0, $month, 0, $year));

$calbirthdays = getBirthdayRange($start_data, $end_data);
ksort($calbirthdays);

foreach($calbirthdays as $cdate => $data)
{
list($cdt['year'], $cdt['month'], $cdt['day']) = explode('-', $cdate);
foreach($data as $vals)
echo $smcFunc['substr']($txt['months'][intval($cdt['month'])], 0, 3) .' '. $cdt['day'] .': <a href="'. $scripturl .'?action=profile;u='. $vals['id'] .'">'. $vals['name'] .(!empty($vals['age']) ? '('. $vals['age'] .')' : '') .'</a><br />';
}


Looks like the attached image ..

Fel


Hi will this code work for SMF Gold ? thank you

feline

#18
2011 August 22, 13:47:26
I think yes .. simple try it  ;)
Many are stubborn in relation to the path, a few in relation to the target.

star45

#19
2011 December 28, 12:55:02
I have improved the question and a lot of columnames .. that's all.

star44

#20
2011 December 30, 16:22:30
Thanks it works great.thanks