MyBB Community Forums

Full Version: How to make separate member profiles?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! I've searched the forums tying to find the solution to my problem, but can't seem to find what I'm looking for.

Essentially, what I am trying to do is to create separate member-profiles based on a custom profile selection (ooc/ic). How am I able to do that? I have touched javascript in a while, so I'm a little unsure on the details or if what I have done so far is correct. Any help would be greatly appreciated!

Heres a profile on my site:
https://vestige-rpg.com/member.php?action=profile&uid=3

Member-profile template:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1820"></script>
</head>
<body>
<div id="member_profile">
{$header}
<div class="username">{$formattedname}</div>
<if {$post['fid9']} == 'OOC' then>
<div class="trow1">
        {$avatar}
       <div class="author_information">
               member information
       </div>
</div>
</if>
<else>	
<div class="trow1">
        {$avatar}
       <div class="author_information">
               character information
       </div>
</div>
</else>	
{$awaybit}
{$bannedbit}
{$modoptions}
{$adminoptions}
</div>
{$footer}
</body>
</html>

Examples of what Im trying to do:

Member: 
http://www.amaryllis-lions.com/member.ph...le&uid=523
https://khiyaal-rpg.com/member.php?action=profile&uid=3

Character: 
- http://www.amaryllis-lions.com/member.ph...le&uid=938
https://khiyaal-rpg.com/member.php?actio...ile&uid=37
Please elaborate in your inquiry, for me both all links look like profile images, each being different users.

I can only think of the following plugin for Profile fields:
http://mybbhacks.zingaburga.com/showthread.php?tid=1271

And my plugin, but I don't think they are using this:
https://community.mybb.com/thread-229439.html
I just want the member profiles to show different profile types/fields based on the selection of either OOC/IC. So OOC accounts will display specific information vs IC accounts. IC accounts will have in depth information about their characters, whereas OOC accounts will show only minimal information about the player.
You're likely going to need a plugin that outputs a different template entirely rather than adding a ton of conditionals to the existing template.
Solved. I figured it out. No plug-in required. Thanks!
(2021-08-17, 01:17 PM)Whiskey Wrote: [ -> ]Solved. I figured it out. No plug-in required. Thanks!

will you please explain , how did you solve it ?
Hi! I basically just assigned the OOC/IC selection in the custom member profile field as a class. So when players select "OOC" the "IC" class is set to "display: none;". Hope that makes sense? Heres the HTML/CSS for it!

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1820"></script>
</head>
{$userfields['fid10']}
<body>
<div id="member_profile">
<div class="{$userfields['fid9']}">
{$header}
<div class="username">Profile of <span class="formatted_name">{$formattedname}</span></div>
<div class="ooc_profile">
<div class="trow1">
        {$avatar}
       <div class="author_information">
               <div class="profile_box">Member Information</div>
               <b>Age:</b> {$userfields['fid4']} <br />
               <b>Gender:</b> {$userfields['fid5']} <br />
               <b>Pronouns:</b> {$userfields['fid3']} <br />
               <b>Discord:</b> {$userfields['fid6']}
       </div>
       <div class="description">
               <div class="profile_box">Description</div>
               {$userfields['fid8']}
       </div>
</div>
</div>
<div class="ic_profile">
<div class="trow1">
        {$avatar}
        <div class="character_information">
                <div class="fancy">{$userfields['fid11']}</div>
                King of Carus
        </div>
               <div class="profile_box">Character Information</div>
</div>
</div>
{$awaybit}
{$bannedbit}
{$modoptions}
{$adminoptions}
</div>
{$footer}
</body>
</html>

/**Member Profile**/

#member_profile #panel {
    display: none;
}

#member_profile .Out.of.Character .ic_profile {
    display: none;
}

#member_profile .In.Character .ooc_profile {
    display: none;
}

#member_profile .username {
    background: rgb(11 12 12);
    padding: 15px;
    color: rgb(67, 72, 75);
    font: italic 20px EB Garamond; 
    text-transform: lowercase;
    text-align: center;
    border: 1px solid rgba(47, 51, 54, .5);
    border-bottom: 0;
}

#member_profile .username .formatted_name {
    font: 15px EB Garamond;
    font-style: normal;
    padding-left: 3px;
}

#member_profile div.author_information {
    display: inline-block;
    vertical-align: top;
    width: 23.3%;
    min-height: 125px;
    
    margin-left: 13px;
    padding: 0;
    padding-right: 15px;
    color: rgba(87, 92, 94, 0.8);
}

#member_profile .trow1 .description {
    overflow-y: auto;
    display: inline-block;
    vertical-align: top;
    width: 58.4%;
    height: 125px;
    padding-left: 15px;
    border-left: 1px solid rgba(47, 51, 54, .5);
}

#member_profile .profile_box {
    margin-top: -5px;
    padding-top: 0;
    padding: 7px;
    font: 10px Open Sans; 
    color: rgb(95, 101, 105);
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid rgba(47, 51, 54, .5);
    margin-bottom: 7px;
    
}

#member_profile .character_information {
    height: 124px;
    width: 85.8%;
    display: inline-block;
    vertical-align: top;
    margin-left: 10px;
    border-bottom:  1px solid rgba(47, 51, 54, .5);
}

#member_profile .character_information .fancy {
    font: italic 40px EB Garamond;
    text-transform: lowercase;
    
}