Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
Post
by all4phone » 05 Dec 2011, 04: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.
You do not have the required permissions to view the files attached to this post.
Last edited by all4phone on 06 Dec 2011, 13:23, edited 1 time in total.
Post
by Stoker » 05 Dec 2011, 04:58
Nice
Post
by FTH » 05 Dec 2011, 06: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 ?
Post
by all4phone » 06 Dec 2011, 13: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
offline.png
Refresh template of your style.
Demo:
You do not have the required permissions to view the files attached to this post.
Last edited by all4phone on 06 Dec 2011, 20:04, edited 1 time in total.
Post
by all4phone » 06 Dec 2011, 13: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
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.
You do not have the required permissions to view the files attached to this post.
Post
by Sniper_E » 06 Dec 2011, 18: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 -->
Post
by all4phone » 06 Dec 2011, 19: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
.