Change order of info on right side of the screen

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
Webmaster Chuck
Registered User
Posts: 20
Joined: Thu Feb 25, 2016 10:21 pm
Name: Charles Waters
Contact:

Change order of info on right side of the screen

Post by Webmaster Chuck » Mon Jan 01, 2018 10:43 pm

Good afternoon all, and Happy New Year.

I was wondering if someone could point me in the right direction of which file I would need to edit in order to move the information around that is shown in the attached image? Like say move Location up, move Gender down, etc.

Thank you for your assistance in advance.
Capture.PNG
How do I move the lines up and down?
Capture.PNG (18.23 KiB) Viewed 262 times

User avatar
Christian 2.0
Former Team Member
Posts: 4442
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Change order of info on right side of the screen

Post by Christian 2.0 » Tue Jan 02, 2018 10:12 pm

Hello Chuck :)

So, the template file for this area is viewtopic_body.html , and also ucp_pm_viewmessage.html if you'd like to make the same changes to the Private Message template.

Specifically, the code you're looking for is:

Code: Select all

		<dl class="postprofile" id="profile{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
			<dt class="<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG -->has-profile-rank<!-- ELSE -->no-profile-rank<!-- ENDIF --> <!-- IF postrow.POSTER_AVATAR -->has-avatar<!-- ELSE -->no-avatar<!-- ENDIF -->">
				<div class="avatar-container">
					<!-- EVENT viewtopic_body_avatar_before -->
					<!-- IF postrow.POSTER_AVATAR -->
						<!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}" class="avatar">{postrow.POSTER_AVATAR}</a><!-- ELSE --><span class="avatar">{postrow.POSTER_AVATAR}</span><!-- ENDIF -->
					<!-- ENDIF -->
					<!-- EVENT viewtopic_body_avatar_after -->
				</div>
				<!-- EVENT viewtopic_body_post_author_before -->
				<!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
				<!-- EVENT viewtopic_body_post_author_after -->
			</dt>

			<!-- EVENT viewtopic_body_postrow_rank_before -->
			<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd class="profile-rank">{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
			<!-- EVENT viewtopic_body_postrow_rank_after -->

		<!-- IF postrow.POSTER_POSTS != '' --><dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> <!-- IF postrow.U_SEARCH !== '' --><a href="{postrow.U_SEARCH}"><!-- ENDIF -->{postrow.POSTER_POSTS}<!-- IF postrow.U_SEARCH !== '' --></a><!-- ENDIF --></dd><!-- ENDIF -->
		<!-- IF postrow.POSTER_JOINED --><dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
		<!-- IF postrow.POSTER_WARNINGS --><dd class="profile-warnings"><strong>{L_WARNINGS}{L_COLON}</strong> {postrow.POSTER_WARNINGS}</dd><!-- ENDIF -->

		<!-- IF postrow.S_PROFILE_FIELD1 -->
			<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
			<dd><strong>{postrow.PROFILE_FIELD1_NAME}{L_COLON}</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
		<!-- ENDIF -->

		<!-- EVENT viewtopic_body_postrow_custom_fields_before -->
		<!-- BEGIN custom_fields -->
			<!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
				<dd class="profile-custom-field profile-{postrow.custom_fields.PROFILE_FIELD_IDENT}"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
			<!-- ENDIF -->
		<!-- END custom_fields -->
		<!-- EVENT viewtopic_body_postrow_custom_fields_after -->

		<!-- EVENT viewtopic_body_contact_fields_before -->
		<!-- IF not S_IS_BOT and .postrow.contact -->
			<dd class="profile-contact">
				<strong>{L_CONTACT}{L_COLON}</strong>
				<div class="dropdown-container dropdown-left">
					<a href="#" class="dropdown-trigger" title="{postrow.CONTACT_USER}">
						<i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">{postrow.CONTACT_USER}</span>
					</a>
					<div class="dropdown">
						<div class="pointer"><div class="pointer-inner"></div></div>
						<div class="dropdown-contents contact-icons">
							<!-- BEGIN contact -->
								{% set REMAINDER = postrow.contact.S_ROW_COUNT % 4 %}
								<!-- DEFINE $S_LAST_CELL = ((REMAINDER eq 3) or (postrow.contact.S_LAST_ROW and postrow.contact.S_NUM_ROWS < 4)) -->
								<!-- IF REMAINDER eq 0 -->
									<div>
								<!-- ENDIF -->
									<a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
										<span class="contact-icon {postrow.contact.ID}-icon">{postrow.contact.NAME}</span>
									</a>
								<!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
									</div>
								<!-- ENDIF -->
							<!-- END contact -->
						</div>
					</div>
				</div>
			</dd>
		<!-- ENDIF -->
		<!-- EVENT viewtopic_body_contact_fields_after -->

		</dl>
Quite a lot there, but I promise it's not that scary :)

Basically it starts off by including the avatar, then ranks, then post profile information such as post count, joined date, location etc. I see you're running a few extesnions, the information added by these extensions is inserted through "event" hooks, such as:

Code: Select all

<!-- EVENT viewtopic_body_postrow_custom_fields_before -->
Basically there are hundreds of these dotted through phpBB's template files. In this case, the extension Author can inject code in this location. If you were to remove the event line here, none of your extension information would be output.

Template files are read top-down, so to change the order of the output, you can cut/paste blocks of code around. Whatever is higher up in the template file will be displayed first in the output.

Unfortunately I don't actually know how the order of extension code is determined. For example if you have 3 extensions using the same hook I think the output might be determined by whichever was installed first, or could be alphabetically. Not sure, maybe one to ask the extension Author(s).

Hope this helps and sets you off in the right direction :)
🚀 Premium phpBB Styles
Premium 3.2 Styles: Modern phpBB Style, NEW - Volare Material phpBB Style
Premium 3.2 Extensions: phpBB sidebar Extension
Custom work available on request

User avatar
Webmaster Chuck
Registered User
Posts: 20
Joined: Thu Feb 25, 2016 10:21 pm
Name: Charles Waters
Contact:

Re: Change order of info on right side of the screen

Post by Webmaster Chuck » Tue Jan 02, 2018 10:21 pm

It absolutely does, sir!

I was actually in this file yesterday looking through it. But for some reason, it just didn't catch my eye on anything that was in there to just jump out at me.

Much appreciated, sir!

Post Reply

Return to “[3.2.x] Styles Support & Discussion”

Who is online

Users browsing this forum: No registered users and 10 guests