Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.2.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=38)
-   -   Slim down profile (http://www.mysidiaadoptables.com/forum/showthread.php?t=2308)

ipengu 08-16-2011 04:37 PM

Slim down profile
 
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 Code:

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 Code:

        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 Code:

<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 Code:

                            {$row['website']}
                            {
$row['aim']}
                            {
$row['msn']}
                            {
$row['yahoo']} 

And there you have it, a simple but useful mod.

SilverDragonTears 08-16-2011 04:42 PM

Very nice =) Thanks!

Teshia 08-17-2011 01:01 AM

<3 This is much better thank you.

ipengu 08-17-2011 06:35 AM

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.

Teshia 08-18-2011 02:32 AM

Cool! More mods = love

Hall of Famer 08-18-2011 09:23 AM

It does look quite impressive, thanks for posting this.

Linkin-Dreamer 08-25-2011 07:56 AM

So what will this do? Does is make the fields invisible if there's no information in them?

ipengu 08-25-2011 08:06 AM

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

Linkin-Dreamer 08-25-2011 01:01 PM

Ah, awesome! I'll have to use this mod :3 Thanks!

ipengu 08-25-2011 01:15 PM

No problem.


All times are GMT -5. The time now is 05:44 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.