php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#315575 - 09/07/07 05:34 PM Custom island happy birthday
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
A custom island that mentions today's birthdays!

see attachments smile

Enjoy!


Attachments
readme.txt (108 downloads)
Description: [goodisland] The instructions on how to install this island.

happybirthdayisland.txt (117 downloads)
Description: [goodisland] the cody for the island

birthdaymod-7-3.txt (19 downloads)
Description: 7.3 version




Edited by Ian_W (05/12/08 01:28 AM)
Edit Reason: added 7.3 version
_________________________

Top
#315576 - 09/07/07 08:07 PM Re: Custom island happy birthday [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
dude, i so wanted to do that and it was on my list of 'sh*t i want to do, but don't have time'

ty blaaask!!!!!
_________________________

Top
#315577 - 09/07/07 08:11 PM Re: Custom island happy birthday [Re: sirdude]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
boom.. quickest 'mod' ever. copy/paste, cpanel enable.. *poof*

workie..

i bow to you!
_________________________

Top
#315578 - 09/07/07 11:10 PM Re: Custom island happy birthday [Re: sirdude]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 134
Loc: Orlando, FL
so easy I could do it lol
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315584 - 09/08/07 01:04 AM Re: Custom island happy birthday [Re: AshtarRose]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
Great job blaaask! Love it hehe... I am however moving you up to the templates forum wink...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315588 - 09/08/07 02:40 AM Re: Custom island happy birthday [Re: sirdude]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
Originally Posted By: sirdude
dude, i so wanted to do that and it was on my list of 'sh*t i want to do, but don't have time'


I didn't have the time too, so I copied over most of the code from the public calender island smile
_________________________

Top
#315589 - 09/08/07 04:30 AM Re: Custom island happy birthday [Re: blaaskaak]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
I just added v2.00 to post #1.

This one ignores banned users and users with a last visit day of more then X days ago (I set it to 60 days default).
_________________________

Top
#315590 - 09/08/07 10:54 AM Re: Custom island happy birthday [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
hrm i have a v2.10 now for the banned guys..

for them, the string is 'Happy Bday, you Lahewwwwwzer ..'

laugh
_________________________

Top
#315601 - 09/09/07 01:01 AM Re: Custom island happy birthday [Re: sirdude]
jgeoff Offline
Power User

Registered: 04/05/01
Posts: 93
Loc: NJ

Very nice... thanks!! cool
_________________________
GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0

Top
#315608 - 09/09/07 09:41 AM Re: Custom island happy birthday [Re: jgeoff]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
we need v2.10 (colorize names - based upon Display color, admin, mod) laugh
_________________________

Top
#315615 - 09/10/07 12:22 AM Re: Custom island happy birthday [Re: sirdude]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
Originally Posted By: sirdude
we need v2.10 (colorize names - based upon Display color, admin, mod) laugh


v2.10 is already there, with the banned guys special messages.

So that would be v2.20 atleast smile
_________________________

Top
#315616 - 09/10/07 03:00 PM Re: Custom island happy birthday [Re: blaaskaak]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
Originally Posted By: blaaskaak
So that would be v2.20 atleast smile


v2.20 it is smile

added name color stuff, stolen (but redid some of the if's) from showflat.inc.php smile

Code:
/* PHP CODE HERE */

$maxdaysago=60;

$temp = getdate($now);
$month = $temp["mon"];
$mday = $temp["mday"];
$year  = $temp["year"];

$visitlimit=time()-60*60*24*$maxdaysago;

if (isset($config['BIRTHDAYS_IN_CALENDAR']) && $config['BIRTHDAYS_IN_CALENDAR']) {
	$query = "
		SELECT t1.USER_DISPLAY_NAME,t2.USER_BIRTHDAY,t1.USER_IS_UNDERAGE,t1.USER_ID,t2.USER_NAME_COLOR
		FROM   {$config['TABLE_PREFIX']}USERS as t1,
			{$config['TABLE_PREFIX']}USER_PROFILE as t2,
			{$config['TABLE_PREFIX']}USER_DATA as t3
		WHERE  t2.USER_BIRTHDAY LIKE ?
		AND    t1.USER_IS_BANNED != '1'
		AND    t2.USER_PUBLIC_BIRTHDAY = '1'
		AND    t3.USER_LAST_VISIT_TIME >= ?
		AND t1.USER_ID = t2.USER_ID
		AND t1.USER_ID = t3.USER_ID
	";
	$sth = $dbh -> do_placeholder_query($query,array("$month/$mday/%",$visitlimit),__LINE__,__FILE__);
	$marray[0] = "";
	while(list($uname,$birthday,$coppauser,$birthdayuser,$Color) = $dbh -> fetch_array($sth)) {
		@list($bmonth,$bday,$byear) = @split("/",$birthday);
		$age = "";
		if ($config['AGE_WITH_BIRTHDAYS'] && !$coppauser) {
			$age = $year - $byear;
			$age = " ($age)";
		} // end if
		$Color = trim($Color);
		if ($Color) 
		{
			$uname = "<span style=\"color:$Color;\">$uname</span>";
		}
		else
		{
			if ($PostStatus == "Administrator") 
			{
				$uname = "<span class=\"adminname\">$uname</span>";
			}
			elseif ($PostStatus == "Moderator") 
			{
				$uname = "<span class=\"modname\">$uname</span>";
			}
		}

		$bdays .= "<a href=\"{$config['BASE_URL']}/ubbthreads.php?ubb=showprofile&User=$birthdayuser\">$uname</a>$age, ";
	} // end while
} // end if
if (!$bdays)
{
	$bdays="No birthdays today";
}
else
{
	$bdays = substr($bdays,0,strlen($bdays)-2);
	$bdays = "Happy birthday ".$bdays.".";
}
/* BODY HERE */
$body = <<<EOF
$bdays
EOF;
_________________________

Top
#315617 - 09/10/07 04:31 PM Re: Custom island happy birthday [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
mr blaaask.. sexaaay...!
_________________________

Top
#315625 - 09/11/07 03:49 PM Re: Custom island happy birthday [Re: sirdude]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
Very nice, I'm gonna try this one smile
_________________________
- Allen wavey
- What Drives You?

Top
#315691 - 09/15/07 05:58 AM Re: Custom island happy birthday [Re: AllenAyres]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Many thanks smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#315704 - 09/16/07 11:58 AM Re: Custom island happy birthday [Re: Ian_W]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 134
Loc: Orlando, FL
My other Admin Caught this:

I noticed that the birthday thing on the main page was not actually doing its job, so have changed the cache setting so it actually shows up the people whose birthday it is. Guess why I noticed it doesn't work lol. Hope you don't mind!
Balance
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315709 - 09/16/07 03:15 PM Re: Custom island happy birthday [Re: AshtarRose]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Showing fine on our site smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#315777 - 09/22/07 03:57 PM Re: Custom island happy birthday [Re: Ian_W]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
fyi,

for 7.3 the colorizing will be easier. just do:
Php Code:
$uname = $html->user_color($uname, $Color, $PostStatus); 
and it's done for you.

this will also take into account the globalmod color. :2c:

good stuff blaask wink
_________________________

Top
#315778 - 09/22/07 04:28 PM Re: Custom island happy birthday [Re: sirdude]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
hrm, you have a bug. $PostStatus is undefined.. fyi

Code:
SELECT t1.USER_DISPLAY_NAME,t2.USER_BIRTHDAY,
t1.USER_IS_UNDERAGE,t1.USER_ID,t2.USER_NAME_COLOR,
t1.USER_MEMBERSHIP_LEVEL


and
Code:
while(list($uname,$birthday,$coppauser,$birthdayuser,$Color,$PostStatus) = $dbh -> fetch_array($sth)) {


i believe smile
_________________________

Top
#315779 - 09/22/07 08:20 PM Re: Custom island happy birthday [Re: sirdude]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
that looks about right smile

I'll have a cleanup on post #1 tomorrow. There's a nice comfy bed waiting now.
_________________________

Top
Page 1 of 3 1 2 3 >


Moderator:  sirdude 
Who's Online
0 registered (), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks