Online/Offline User Icons

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
Locked
User avatar
Post Bot
BBCoder II
BBCoder II
Posts: 44
Joined: 04 Mar 2010, 20:53

Online/Offline User Icons

Post by Post Bot »

Online/Offline User Icons
Written by arrow816

This guide will show you how to add an offline image, and also how to make it show up when some one views a post, or views some ones profile. To do this you are going to have to edit the following files:
HTML Edits:
  • viewtopic_body.html
  • memberlist_view.html
CSS Edits:
  • colours.css
  • content.css
viewtopic_body.html Edits:
Find:

Code: Select all

<div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE --> online<!-- ENDIF -->">
and replace with:

Code: Select all

<div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE --> online<!-- ELSE --> offline<!-- ENDIF -->">
memberlist_view.html Edits:
Find:

Code: Select all

<form method="post" action="{S_PROFILE_ACTION}" id="viewprofile">
    <div class="panel bg1<!-- IF S_ONLINE --> online<!-- ENDIF -->">
and replace with:

Code: Select all

<form method="post" action="{S_PROFILE_ACTION}" id="viewprofile">
<div class="panel bg1<!-- IF S_ONLINE --> online<!-- ELSE --> offline<!-- ENDIF -->">
colours.css Edits:
Find:

Code: Select all

.online {
	background-image: url("{T_IMAGESET_LANG_PATH}/icon_user_online.gif");
}
Add after:

Code: Select all

.offline {
	background-image: url("{T_IMAGESET_LANG_PATH}/icon_user_offline.gif");
}
content.css Edits:
Find:

Code: Select all

.online {
	background-image: none;
	background-position: 100% 0;
	background-repeat: no-repeat;
}
Add after:

Code: Select all

.offline {
	background-image: none;
	background-position: 100% 0;
	background-repeat: no-repeat;
}
Then to make the offline image show up just upload the attached image to this directory:
root/styles/yourstyle/imageset/en
**Replace yourstyle with the name of your style that you are using.**

Additional:(Optional)
Stoker wrote:One more template edit if you want to add offline when reading a private message.

Open ucp_pm_viewmessage.html
Find:

Code: Select all

<!-- IF S_ONLINE --> online
Inline, add after:

Code: Select all

<!-- ELSE --> offline

After you do that you should be able to go to the proflile of a user thats not online and see where the online would be an offline image.
Hopes this helps a lot,
Steve C
Attachments
icon_user_offline.gif
icon_user_offline.gif (1.17 KiB) Viewed 3667 times
Locked