1

Topic: green online gif beside members name.

Then a member is online it show (members name) Online Now!
I did this on my site:(members name) Online Now! [img]http://webbsupport.eu/image/online.gif[/img]
[img]http://webbsupport.eu/image/online.png[/img]

change it in your templates ...(I have dark_yellowish) ... member_sections_name.tpl
open it in notepad++ ...and you can save online.gif [img]http://webbsupport.eu/image/online.gif[/img] and offline.gif [img]http://webbsupport.eu/image/offline.gif[/img] upload it to yours /templates/media/.

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link} ">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"}</span><!-- ENDIF -->
</h2>

replace it with this if you only will have online/offline.gif:

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online"> <img src=/templates/dark_yellowish/media/online.gif border=0 title="Online"></span>
<!-- ELSE -->
<img src=/templates/dark_yellowish/media/offline.gif border=0 title="Offline"></span>
<!-- ENDIF -->
</h2>

or replace it with this if you will have members name and online/offline.gif:

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"} <img src=/templates/dark_yellowish/media/online.gif border=0 title="Online"></span>
<!-- ELSE -->
<img src=/templates/dark_yellowish/media/offline.gif border=0 title="Offline"></span>
<!-- ENDIF -->
</h2>

and save a copy of member_sections_name.tpl before you change anything in case something goes wrong

Last edited by gugu (2010-09-12 19:37:15)

2

Re: green online gif beside members name.

Nice one.

3

Re: green online gif beside members name.

nice one. and for offline? red icon?

4

Re: green online gif beside members name.

nice one. and for offline? red icon?

5

Re: green online gif beside members name.

Icon for offline [img]http://webbsupport.eu/image/offline.gif[/img]

Last edited by gugu (2009-06-12 04:15:26)

6

Re: green online gif beside members name.

gugu, please, not works links and not see icon online in the homepage.tpl. i have this code:

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{session.username}</a><img src="{top.virtual_tpl_path}{session.template}/media/online.gif" alt="Online ahora!!" border="0" /><br>
   
</h2>

thanks
teclia.com

7

Re: green online gif beside members name.

I try the code and it work like a charm and of course you must upload online.gif to yours ../templates/media/

Last edited by gugu (2009-05-03 15:08:52)

8

Re: green online gif beside members name.

this is ok, but not works. help me please. post code correct.

thanks

9

Re: green online gif beside members name.

I don´t know why it not works but you can download the member_sections_name.tpl file directly here
upload it to the templates folder for that templates you have for yours site ...
this code is not for homepage.tpl ... look at the picture here above ...

Last edited by gugu (2009-05-04 04:54:07)

10

Re: green online gif beside members name.

TECLIA wrote

this is ok, but not works. help me please. post code correct.

thanks

can you explain for me that you mean with post code correct ...

this is tutorials and guides and you must know some about php html css ...
this works on my both sites and I hope you upload it to yours sites templates folder.
it is one templates folder for controlpanel and one for yours sites templates.

maybee you have done others change on yours site so it not work .. I don´t know ...
this can only bee done if you not have change your templates before ...
hope you can get it work ... but it is nothing wrong on my code ...

Last edited by gugu (2009-05-04 04:10:11)

11

Re: green online gif beside members name.

Hi gugu just wanted to say thanks, worked great smile just have one question; do you know where to change the default "Online now!" to "Online Now" just personal preference, i looked but could not find where to change.

Thanks in advance

ooooh gugu did you ever find a solution to show Offline Now and offline.gif

Last edited by BigDog (2009-05-22 05:22:31)

12

Re: green online gif beside members name.

it is in lang.core.php ... in the middle of lang.core ..
look after ...

"userinfo_online" =>
"Online now!",

replace with ...

"userinfo_online" =>
"Online Now!",

and I´m sorry have no solution to show Offline Now ...
write more here then I get it to work ... maybee someone else know ?

13

Re: green online gif beside members name.

Perfect thanks mate smile maybe vlad can help us

14

Re: green online gif beside members name.

member_sections_name.tpl
add ELSE to IF statement to show member is offline.

15

Re: green online gif beside members name.

Thanks radioact would you be able to help me with the code, this is the current code for my member_sections_name.tpl

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"} <img src=/templates/softgreen/media/online.gif border=0 title="Online Now"></span><!-- ENDIF -->
</h2>

Thanks in advance

16

Re: green online gif beside members name.

You are welcome

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"} <img src=/templates/softgreen/media/online.gif border=0 title="Online Now"></span>
<!-- ELSE -->
<img src=/templates/softgreen/media/offline.gif border=0 title="Offline"></span>
<!-- ENDIF -->
</h2>

Last edited by radioact (2009-05-22 09:17:55)

17

Re: green online gif beside members name.

Thanks radioact we are getting close, I used the following code which also calls the offline text besides the members name, but I do not have enough skills to make it correct, the "Offline" is displayed in the same font colour and style Black & Bold as the member name, there must need to be something else in the code or the content.css to have the "Offline" display as Red not bold so as to be the same display as "Online" I hope I explain correctly.

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"} <img src=/templates/softgreen/media/online.gif border=0 title="Online"></span>
<!-- ELSE -->
<span class="offline">{lang:"core","userinfo_offline"} <img src=/templates/softgreen/media/offline.gif border=0 title="Offline"></span>
<!-- ENDIF -->
</h2>

The "Offline" now displays as;

"member_profile_name Offline [offline.gif]" but it is all black bold text

I would like it to display as;

"member_profile_name" black bold text "Offline" red text not bold [offline.gif]

Thanks for the help

18

Re: green online gif beside members name.

Solution Found smile

First of all I would like to thank gugu and radioact for their skills, info and help, this is what I did so you can show "Online" and "Offline" in bold with .gif button beside members profile names.

1. Search G for .gif that you like, I used small green & red bullets, download them to your PC and rename online.gif and offline.gif and then FTP them to your server /templates/your_current_template/media

2. Change the member_sections_name.tpl

From

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"}</span><!-- ENDIF -->
</h2>

To

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{member_username}</a>
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"} <img src=/templates/your_current_template/media/online.gif border=0 title="Online"></span>
<!-- ELSE -->
<span class="offline">{lang:"core","userinfo_offline"} <img src=/templates/your_current_template/media/offline.gif border=0 title="Offline"></span>
<!-- ENDIF -->
</h2>

3. Change the lang.core.php

If you would like to change the "Online now!" to "Online" as I did you need to change the lang.core.php or you can skip this step

domain/includes/languages/english


From

"userinfo_online" =>
"Online now!",

To

"userinfo_online" =>
"Online",

4. Change content.css

If you would like the "Online" and "Offline" to be bold as I did you need to add "bold" to the font command at around line 326

From

div#content h2.inner span.online {
        font: 11px/16px arial, verdana, sans-serif;
        color: #2F8509; }

To

div#content h2.inner span.online {
        font: bold 11px/16px arial, verdana, sans-serif;
        color: #2F8509; }

To have the "Offline" display in red bold, copy the command above and change span.online to span.offline and change colour to red #DE2929 and past below span.online command.

Copy

div#content h2.inner span.online {
        font: bold 11px/16px arial, verdana, sans-serif;
        color: #2F8509; }

To

   

div#content h2.inner span.offline {
        font: bold 11px/16px arial, verdana, sans-serif;
        color: #DE2929; }

FTP all files to your server and you are good to go smile always remember to keep copies of the originals on your PC before you start.

Hope this helps others

BigDog

19

Re: green online gif beside members name.

TECLIA wrote

gugu, please, not works links and not see icon online in the homepage.tpl. i have this code:

<h2 class="inner">
    <a href="{top.virtual_path}{member_profile_link}">{session.username}</a><img src="{top.virtual_tpl_path}{session.template}/media/online.gif" alt="Online ahora!!" border="0" /><br>
   
</h2>

thanks
teclia.com

Its not in homepage.tpl look for the template :  member_sections_name.tpl

Hope it helps

20

Re: green online gif beside members name.

this is that I call teamwork smile

21

Re: green online gif beside members name.

I made a small change on the language file : lang.core.php

"userinfo_online" =>
"<br>Online !",

"userinfo_offline" =>
"<br>Offline !",


I put a <br> befour the online and offline, so is not the name together with the online/offline, it looks nice.

smile

22

Re: green online gif beside members name.

Cool amizadex I will test your idea, yes agree gugu many heads help to find the solution that all members can use smile

gugu wrote

this is that I call teamwork smile

23

Re: green online gif beside members name.

Esta modificación es para mostrar solo imágenes en la busqueda y en el perfil del usuario:


Modificar el archivo: member_sections_quick_actions.tpl

<li class="profile"><a href="{top.virtual_path}{member_profile_link}" title="{lang:"core","userinfo_view_profile"}">{lang:"core","userinfo_view_profile"}</a></li>

por:

<li class="profile"><a href="{top.virtual_path}{member_profile_link}" title="{lang:"core","userinfo_view_profile"}">{lang:"core","userinfo_view_profile"}</a></li>

<!-- IF settings.show_online AND member_online -->
</ul><img src="{top.virtual_tpl_path}{session.template}/media/online.png" width="46" height="20" title="{lang:"core","userinfo_online"}">
<!-- ELSE -->
</ul><img src="{top.virtual_tpl_path}{session.template}/media/offline.png" width="46" height="20" title="{lang:"core","userinfo_offline"}">
<!-- ENDIF -->

Modificar tambien el archivo: member_sections_name.tpl

<!--    <a href="{top.virtual_path}{member_profile_link}"> --> {member_username} <!-- </a> -->
    <!-- IF settings.show_online AND member_online --><span class="online">{lang:"core","userinfo_online"}</span><!-- ENDIF -->

por:

<!--    <a href="{top.virtual_path}{member_profile_link}"> --> {member_username} <!-- </a> -->

<!-- IF active_module = "member_profile" AND settings.show_online AND member_online -->
<img src="{top.virtual_tpl_path}{session.template}/media/online.png" width="46" height="20" title="{lang:"core","userinfo_online"}">
<!-- ELSEIF active_module = "member_profile" AND settings.show_online AND member_online != "1" -->
<img src="{top.virtual_tpl_path}{session.template}/media/offline.png" width="46" height="20" title="{lang:"core","userinfo_offline"}">
<!-- ENDIF -->

Mucha suerte!
Good luck!

24

Re: green online gif beside members name.

or if you will show a text Last visit:
Last visit {member_last_visit}<!-- ENDIF -->

thanks radioact ...

25

Re: green online gif beside members name.

Thanks. Just added it on my website. Cheers.