How to display the friends list outside of ucp

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
Post Reply
User avatar
Mannix_
Registered User
Posts: 349
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

How to display the friends list outside of ucp

Post by Mannix_ » Sun Oct 21, 2018 3:52 pm

Hello friends I'm trying to figure out how to display friends list on every page not just ucp. Would that require an extension or is there something i miss in terms of code that needs to be there in order for friend list to be displayed? The code used in the ucp_header.html file to show friend list is :

Code: Select all

		<!-- IF .friends_online or .friends_offline -->
		<div class="cp-mini">
			<div class="inner">

			<dl class="mini">
				<dt>{L_FRIENDS}</dt>

				<!-- BEGIN friends_online -->
					<dd class="friend-online" title="{L_FRIENDS_ONLINE}">{friends_online.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --> <input type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" class="button2" /><!-- ENDIF --><!-- IF friends_online.S_LAST_ROW and .friends_offline --><hr /><!-- ENDIF --></dd>
				<!-- END friends_online -->

				<!-- BEGIN friends_offline -->
					<dd class="friend-offline" title="{L_FRIENDS_OFFLINE}">{friends_offline.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --><input type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" class="button2" /><!-- ENDIF --></dd>
				<!-- END friends_offline -->
			</dl>

			</div>
		</div>
		<!-- ENDIF -->
So if I just use that i get no results.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
My CDB contributions . Like my work? Want me to do make a style just for you? PM here or on twitter.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Need some graphics? PM here or on twitter.

User avatar
GanstaZ
Registered User
Posts: 566
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: How to display the friends list outside of ucp

Post by GanstaZ » Sun Oct 21, 2018 4:00 pm

You need php side for that. If template data for friends/foes is not set, you can't use it outside of ucp. Yes, you will need an extension for that.
"When answer lies in the question,.. question becomes redundant!"

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: John_Miller and 14 guests