• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to make the Information Tab the First Tab (Member Profile)

Brogan

XenForo moderator
Staff member
#3
I tried and couldn't get it to work.

There doesn't seem to be any way of doing it from the templates.
It will most likely require editing a .php file.
 
R

ragtek

Guest
#4
You would just need to edit the member_view template and move some code, BUT

i've tried it and it seems that there is some javascript conflict.
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/xenforo/js/xenforo/xenforo.js?_v=fc20a874 :: anonymous :: line 6122" data: no]
I need to check first, why this happens, then i'll post the howto
 

Nasr

Well-known member
#6
Instead of having it the first tab. Why not just have it the selected tab instead? Maybe it would be much easier that way?
 

Dr.Yontem

Formerly Tilkißey
#9
member_view template
these codes are tabs' names' listing order

HTML:
<ul class="tabs mainTabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
<li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
<xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
<li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
<li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
<xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
</ul>
so, your new order will be like that
HTML:
<ul class="tabs mainTabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
<li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
<xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
<li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
<li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
<xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
</ul>
but, it isnt enough
you have to re-order
HTML:
<li id="info" class="profileContent">....</li>
code
so, find these codes
HTML:
<li id="info" class="profileContent">

<xen:if is="{$user.signature}">
<div class="section">
<h3 class="textHeading">{xen:phrase signature}</h3>
<div class="primaryContent">
<div class="baseHtml signature ugc">{xen:raw $user.signatureHtml}</div>
</div>
</div>
</xen:if>

<xen:if hascontent="true">
<div class="section">
<h3 class="textHeading">{xen:phrase about}</h3>

<div class="secondaryContent">
<xen:contentcheck>
<xen:if hascontent="true">
<div class="pairsColumns aboutPairs">
<xen:contentcheck>
<xen:if is="{$user.gender}">
<dl><dt>{xen:phrase gender}:</dt> <dd><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd></dl>
</xen:if>

<xen:if is="{$birthday}">
<dl><dt>{xen:phrase birthday}:</dt> <dd>{xen:date $birthday.timeStamp, $birthday.format} <xen:if is="{$birthday.age}">({xen:phrase age}: {xen:number $birthday.age})</xen:if></dd></dl>
</xen:if>

<xen:if is="{$user.homepage}">
<dl><dt>{xen:phrase home_page}:</dt> <dd><a href="{xen:string censor, $user.homepage}" rel="nofollow" target="_blank">{xen:string censor, $user.homepage}</a></dd></dl>
</xen:if>

<xen:if is="{$user.location}">
<dl><dt>{xen:phrase location}:</dt> <dd>{xen:string censor, $user.location}</dd></dl>
</xen:if>

<xen:if is="{$user.occupation}">
<dl><dt>{xen:phrase occupation}:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>

<xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
</xen:contentcheck>
</div>
</div>
</xen:if>

<div class="section">
<h3 class="textHeading">{xen:phrase interact}</h3>

<div class="primaryContent">
<div class="pairsColumns contactInfo">
<dl>
<dt>{xen:phrase content}:</dt>
<dd><ul>
<li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}">{xen:phrase find_all_content_by_x, 'name={$user.username}'}</a></li>
<li><a href="{xen:link search/member, '', 'user_id={$user.user_id}', 'content=thread'}">{xen:phrase find_all_threads_by_x, 'name={$user.username}'}</a></li>
</ul></dd>
</dl>
<xen:if is="{$canStartConversation}">
<dl><dt>{xen:phrase conversation}:</dt> <dd><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></dd></dl>
</xen:if>
<xen:if is="{$identities}">
<xen:foreach loop="$identities" value="$identity">
<dl><dt>{$identity.title}:</dt> <dd>{xen:string censor, $identity.value}</dd></dl>
</xen:foreach>
</xen:if>
</div>
</div>
</div>
</li>
and move to this code's below
HTML:
<ul id="ProfilePanes">
 
R

ragtek

Guest
#10
member_view template
these codes are tabs' names' listing order

HTML:
<ul class="tabs mainTabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
<li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
<xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
<li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
<li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
<xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
</ul>
so, your new order will be like that
HTML:
<ul class="tabs mainTabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
<li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
<xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
<li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
<li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
<xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
</ul>
but, it isnt enough
you have to re-order
HTML:
<li id="info" class="profileContent">....</li>
code
so, find these codes
HTML:
<li id="info" class="profileContent">

<xen:if is="{$user.signature}">
<div class="section">
<h3 class="textHeading">{xen:phrase signature}</h3>
<div class="primaryContent">
<div class="baseHtml signature ugc">{xen:raw $user.signatureHtml}</div>
</div>
</div>
</xen:if>

<xen:if hascontent="true">
<div class="section">
<h3 class="textHeading">{xen:phrase about}</h3>

<div class="secondaryContent">
<xen:contentcheck>
<xen:if hascontent="true">
<div class="pairsColumns aboutPairs">
<xen:contentcheck>
<xen:if is="{$user.gender}">
<dl><dt>{xen:phrase gender}:</dt> <dd><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd></dl>
</xen:if>

<xen:if is="{$birthday}">
<dl><dt>{xen:phrase birthday}:</dt> <dd>{xen:date $birthday.timeStamp, $birthday.format} <xen:if is="{$birthday.age}">({xen:phrase age}: {xen:number $birthday.age})</xen:if></dd></dl>
</xen:if>

<xen:if is="{$user.homepage}">
<dl><dt>{xen:phrase home_page}:</dt> <dd><a href="{xen:string censor, $user.homepage}" rel="nofollow" target="_blank">{xen:string censor, $user.homepage}</a></dd></dl>
</xen:if>

<xen:if is="{$user.location}">
<dl><dt>{xen:phrase location}:</dt> <dd>{xen:string censor, $user.location}</dd></dl>
</xen:if>

<xen:if is="{$user.occupation}">
<dl><dt>{xen:phrase occupation}:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>

<xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
</xen:contentcheck>
</div>
</div>
</xen:if>

<div class="section">
<h3 class="textHeading">{xen:phrase interact}</h3>

<div class="primaryContent">
<div class="pairsColumns contactInfo">
<dl>
<dt>{xen:phrase content}:</dt>
<dd><ul>
<li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}">{xen:phrase find_all_content_by_x, 'name={$user.username}'}</a></li>
<li><a href="{xen:link search/member, '', 'user_id={$user.user_id}', 'content=thread'}">{xen:phrase find_all_threads_by_x, 'name={$user.username}'}</a></li>
</ul></dd>
</dl>
<xen:if is="{$canStartConversation}">
<dl><dt>{xen:phrase conversation}:</dt> <dd><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></dd></dl>
</xen:if>
<xen:if is="{$identities}">
<xen:foreach loop="$identities" value="$identity">
<dl><dt>{$identity.title}:</dt> <dd>{xen:string censor, $identity.value}</dd></dl>
</xen:foreach>
</xen:if>
</div>
</div>
</div>
</li>
and move to this code's below
HTML:
<ul id="ProfilePanes">
Does this work for you?
Do you have no errors in your js console?
I'm getting
Code:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: [URL]http://localhost/xenforo/js/xenforo/xenforo.js?_v=fc20a874[/URL] :: anonymous :: line 6122" data: no]
It's something because of the editor:/
 

Dr.Yontem

Formerly Tilkißey
#11
Does this work for you?
Do you have no errors in your js console?
I'm getting
Code:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: [URL]http://localhost/xenforo/js/xenforo/xenforo.js?_v=fc20a874[/URL] :: anonymous :: line 6122" data: no]
It's something because of the editor:/
it works in localhost
and, i didnt get any error
i wrote something to user's profile page and it sent
 

Phillip

Active member
#14
I tried to make these changes. The good news is that the content of the default tab changed to show what's in the "information" page. However the selected tab is still "profile posts" and not "information". Attached is a screenshot to visualize what's happening.

Here is my code...
Code:
<ul class="tabs mainTabs Tabs" data-panes="#ProfilePanes > li" data-history="on">
                <li><a href="{$requestPaths.requestUri}#profilePosts">{xen:phrase profile_posts}</a></li>
                <xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
                <li><a href="{$requestPaths.requestUri}#postings">{xen:phrase postings}</a></li>
                <li><a href="{$requestPaths.requestUri}#info">{xen:phrase information}</a></li>
                <xen:hook name="member_view_tabs_heading" params="{xen:array 'user={$user}'}" />
            </ul>
        </div>

        <ul id="ProfilePanes">

<!-- MC Custom change profile tabs-->
                    <li id="info" class="profileContent">

                <xen:if is="{$user.signature}">
                    <div class="section">
                        <h3 class="textHeading">{xen:phrase signature}</h3>
                        <div class="primaryContent">
                            <div class="baseHtml signature ugc">{xen:raw $user.signatureHtml}</div>
                        </div>
                    </div>
                </xen:if>

                <xen:if hascontent="true">
                    <div class="section">
                        <h3 class="textHeading">{xen:phrase about}</h3>

                        <div class="secondaryContent">
                            <xen:contentcheck>
                                <xen:if hascontent="true">
                                    <div class="pairsColumns aboutPairs">
                                    <xen:contentcheck>
                                        <xen:if is="{$user.gender}">
                                            <dl><dt>{xen:phrase gender}:</dt> <dd><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$birthday}">
                                            <dl><dt>{xen:phrase birthday}:</dt> <dd>{xen:date $birthday.timeStamp, $birthday.format} <xen:if is="{$birthday.age}">({xen:phrase age}: {xen:number $birthday.age})</xen:if></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.homepage}">
                                            <dl><dt>{xen:phrase home_page}:</dt> <dd><a href="{xen:string censor, $user.homepage}" rel="nofollow" target="_blank">{xen:string censor, $user.homepage}</a></dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.location}">
                                            <dl><dt>{xen:phrase location}:</dt> <dd>{xen:string censor, $user.location}</dd></dl>
                                        </xen:if>

                                        <xen:if is="{$user.occupation}">
                                            <dl><dt>{xen:phrase occupation}:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
                                        </xen:if>
                                    </xen:contentcheck>
                                    </div>
                                </xen:if>

                                <xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
                            </xen:contentcheck>
                        </div>
                    </div>
                </xen:if>

                <div class="section">
                    <h3 class="textHeading">{xen:phrase interact}</h3>

                    <div class="primaryContent">
                        <div class="pairsColumns contactInfo">
                            <dl>
                                <dt>{xen:phrase content}:</dt>
                                <dd><ul>
                                    <xen:hook name="member_view_search_content_types">
                                    <li><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}">{xen:phrase find_all_content_by_x, 'name={$user.username}'}</a></li>
                                    <li><a href="{xen:link search/member, '', 'user_id={$user.user_id}', 'content=thread'}">{xen:phrase find_all_threads_by_x, 'name={$user.username}'}</a></li>
                                    </xen:hook>
                                </ul></dd>
                            </dl>
                            <xen:if is="{$canStartConversation}">
                                <dl><dt>{xen:phrase conversation}:</dt> <dd><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></dd></dl>
                            </xen:if>
                            <xen:if is="{$identities}">
                                <xen:foreach loop="$identities" value="$identity">
                                    <dl><dt>{$identity.title}:</dt> <dd>{xen:string censor, $identity.value}</dd></dl>
                                </xen:foreach>
                            </xen:if>
                        </div>
                    </div>
                </div>
            </li>
<!-- End Custom -->

            <li id="profilePosts" class="profileContent">

            <xen:if is="{$canViewProfilePosts}">
                <xen:require css="message_simple.css" />

                <xen:if is="{$canPostOnProfile}">
                    <form action="{xen:link members/post, $user}" method="post"
                        class="messageSimple profilePoster AutoValidator primaryContent" id="ProfilePoster"
 

Attachments

Dr.Yontem

Formerly Tilkißey
#15
I tried to make these changes. The good news is that the content of the default tab changed to show what's in the "information" page. However the selected tab is still "profile posts" and not "information". Attached is a screenshot to visualize what's happening.

Here is my code...
***codes***
you have to move the "info" tab's codes as like as i wrote in the explaining message

see my post for this lines' below
but, it isnt enough
you have to re-order
 

tommydamic68

Well-known member
#16
There is no change in those two codes above, there identical. So just putting this code:
<ul id="ProfilePanes"> below what is the only edit here?
 

tommydamic68

Well-known member
#17
Ok - got it after awhile, not so clear directions. Now, I want to move the about to the top, i figured out to just move the code above occupation but How can I code a proper space between? It looks cluttered and on top of the occupation info. a <br />?
Code:
<xen:if is="{$user.about}"><div class="baseHtml ugc">{xen:raw $user.aboutHtml}</div></xen:if>
Screen Shot 2013-10-20 at 7.28.01 AM.png