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
Member

Registered: 02/25/07
Posts: 299
Loc: The Netherlands

   Custom island happy birthday to Del.icio.us Add to del.icio.us
  Digg Custom island happy birthday Digg it
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
Bada bing!
Enthusiast

Registered: 11/08/03
Posts: 439
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!!!!!
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

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

workie..

i bow to you!
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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: 5123
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
Member

Registered: 02/25/07
Posts: 299
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
Member

Registered: 02/25/07
Posts: 299
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
Bada bing!
Enthusiast

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

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

laugh
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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
Bada bing!
Enthusiast

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

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 02/25/07
Posts: 299
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
Member

Registered: 02/25/07
Posts: 299
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
Bada bing!
Enthusiast

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

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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: 25432
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: 2574
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: 2574
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
Bada bing!
Enthusiast

Registered: 11/08/03
Posts: 439
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
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 11/08/03
Posts: 439
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
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 02/25/07
Posts: 299
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 (), 35 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
AllenAyres 12
blaaskaak 8
tackaberry 7
FREAK1 6
Gizmo 4
Mike L_dup1 4
Chris Bale 4

 

 

 
fusionbb message board php hacks