Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
all4phone
BBCoder IV
Posts: 150 Joined: 11 Feb 2011, 13:50
BBCodes: 28
Favourite BBCode: Random text signature
Favourite MOD: BBCode Strikethrough MOD
Location: Poland
Contact:
Post
by all4phone » 05 Dec 2011, 06:09
Online/Offline images Info
Written by all4phone, inspired by
Stoker
This phpBB3 snippet will show you how to display Online/Offline image in viewtopic and profile.
Open styles/prosilver/template/viewtopic_body.html
Find: Code: Select all
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
Before add: Code: Select all
<dd><strong>Status:</strong><!-- IF postrow.S_ONLINE --><img src="images/online.gif" border="0" alt="" title="Online" /><!-- ELSE --><img src="images/offline.gif" border="0" alt="" title="Offline" /><!-- ENDIF --></dd>
Open styles/prosilver/template/memberlist_view.html
Find:
Before add:
Code: Select all
<dt>Status:</dt><dd><!-- IF S_ONLINE --><img src="images/online.gif" border="0" alt="" title="Online" /><!-- ELSE --><img src="images/offline.gif" border="0" alt="" title="Offline" /><!-- ENDIF --></dd>
Selected images put in the root/images directory.
Attachments
onoffline.zip
(14.17 KiB) Downloaded 242 times
11online.gif (468 Bytes) Viewed 3225 times
11user_online.gif (790 Bytes) Viewed 3225 times
Last edited by
all4phone on 06 Dec 2011, 15:23, edited 1 time in total.
Stoker
Site Admin
Posts: 3536 Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:
Post
by Stoker » 05 Dec 2011, 06:58
Nice
Board rules! No PM support
FTH
BBCoder III
Posts: 124 Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:
Post
by FTH » 05 Dec 2011, 08:26
thanks very much for this snippet
just a question
it's not better to replace
by
Code: Select all
<img src="styles/{T_THEME_PATH}/images/online.gif"
to display differents images per Style ?
all4phone
BBCoder IV
Posts: 150 Joined: 11 Feb 2011, 13:50
BBCodes: 28
Favourite BBCode: Random text signature
Favourite MOD: BBCode Strikethrough MOD
Location: Poland
Contact:
Post
by all4phone » 06 Dec 2011, 15:21
Yes it is a fantastic idea
Franck , many thanks for that.
Here are the correct changes that need to be done:
Open: styles/your_style/template/viewtopic_body.html
Find: Code: Select all
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
Before add: Code: Select all
<dd>Status: <!-- IF postrow.S_ONLINE --><img src="{T_THEME_PATH}/images/online.png" border="0" alt="" title="Online" /><!-- ELSE --><img src="{T_THEME_PATH}/images/offline.png" border="0" alt="" title="Offline" /><!-- ENDIF --></dd>
Open: styles/prosilver/template/memberlist_view.html
Find:
Before add: Code: Select all
<dt>Status: </dt><dd><!-- IF S_ONLINE --> <img src="{T_THEME_PATH}/images/online.png" border="0" alt="" title="Online" /><!-- ELSE --><img src="{T_THEME_PATH}/images/offline.png" border="0" alt="" title="Offline" /><!-- ENDIF --></dd>
Place these two eg images in
styles/your_style/theme/images directory:
online.png (433 Bytes) Viewed 3004 times
offline.png (439 Bytes) Viewed 3004 times
Refresh template of your style.
Demo:
Attachments
Last edited by
all4phone on 06 Dec 2011, 22:04, edited 1 time in total.
all4phone
BBCoder IV
Posts: 150 Joined: 11 Feb 2011, 13:50
BBCodes: 28
Favourite BBCode: Random text signature
Favourite MOD: BBCode Strikethrough MOD
Location: Poland
Contact:
Post
by all4phone » 06 Dec 2011, 15:52
Sorry for the twice posting, but only three attachments was not enough to show what I wanted
Additionally, you can remove the standard status icon:
icon_user_online.gif (423 Bytes) Viewed 2999 times
Open: style/your_style/theme/colours.css
Find and remove: Code: Select all
.online {
background-image: url("{T_IMAGESET_LANG_PATH}/icon_user_online.gif");
}
Find and remove in
styles/prosilver/imageset/your_language directory,
icon_user_online.gif file.
Sniper_E
BBCoder II
Posts: 44 Joined: 04 Dec 2011, 06:30
BBCodes: 1
Contact:
Post
by Sniper_E » 06 Dec 2011, 20:18
That would create a CSS error to remove the .online class from the colours.css file.
IF you are going to remove the online image for this snippet...
I would suggest removing the online class from the viewtopic_body.html template instead.
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 and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
InLine Remove
Code: Select all
<!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->
all4phone
BBCoder IV
Posts: 150 Joined: 11 Feb 2011, 13:50
BBCodes: 28
Favourite BBCode: Random text signature
Favourite MOD: BBCode Strikethrough MOD
Location: Poland
Contact:
Post
by all4phone » 06 Dec 2011, 21:59
Sniper_E wrote: IF you are going to remove the online image for this snippet...
I would suggest removing the online class from the viewtopic_body.html template instead.
@Sniper_E , thanks for your suggestion, it works perfectly
.