Slim down profile

Forum
Last Post
Threads / Messages

ipengu

Member
Premium Member
Joined
Aug 8, 2011
Messages
50
Points
0
Age
34
Location
Central NY
Mysidian Dollar
5,061
Now works with 1.2.3

The profiles get too cluttered when you have all this stuff (aim, website, msn, yim) taking up space just to say that it has no information in the field. Plus with me adding more fields in the future, I can't have unnecessary clutter.

Open profile.php

Find: (Around line 62)
PHP:
if($row['website'] == "")
		{
			$row['website'] = "No Website Information Given";
		}
		else
		{
			$row['website'] = "<a href='{$row['website']}' target='_blank'>{$row['website']}</a>";
		}

		if(empty($row['msn']))
		{
			$row['msn'] = "No MSN Information Given";
		}
		
		if(empty($row['aim']))
		{
			$row['aim'] = "No AIM Information Given";
		}

		if(empty($row['yahoo']))
		{
			$row['yahoo'] = "No YIM Information Given";
		}

Replace:
PHP:
		if($row['website'] != "")
		{
			$row['website'] = "<img src='templates/icons/web.gif' /> <a href='{$row['website']}' target='_blank'>{$row['website']}<br /></a>";
		}
		if($row['msn'] != "")
		{
			$row['msn'] = "<img src='templates/icons/msn.gif' /> {$row['msn']}<br />";
		}
		if($row['aim'] != "")
		{
			$row['aim'] = "<img src='templates/icons/aim.gif' /> {$row['aim']}<br />";
		}
		if($row['yahoo'] != "")
		{
			$row['yahoo'] = "<img src='templates/icons/yahoo.gif' /> {$row['yahoo']}<br />";
		}

Find: (Around line 103)
PHP:
<img src='templates/icons/web.gif' /> {$row['website']}<br />
							<img src='templates/icons/aim.gif' /> {$row['aim']}<br />
							<img src='templates/icons/msn.gif' /> {$row['msn']}<br />
							<img src='templates/icons/yahoo.gif' /> {$row['yahoo']}<br />

Replace:
PHP:
							{$row['website']}
							{$row['aim']}
							{$row['msn']}
							{$row['yahoo']}

And there you have it, a simple but useful mod.
 
Last edited:
No problem, honestly this script comes pretty well packaged besides the little things that really matter. I plan on releasing future mods depending on own work I have going on.
 
So what will this do? Does is make the fields invisible if there's no information in them?
 
Exactly. It'll only list the field if they put something in the field. It will also make yahoo and aim usernames into links to message them just by clicking the link
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top