inherit
154088
0
Jan 6, 2014 7:13:23 GMT -8
Liz
499
May 2010
frenchliving
|
Post by Liz on Dec 22, 2012 6:30:53 GMT -8
I would like to hide Users Online from guests. Can some kind person give me a template mod for this please
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 22, 2012 7:04:36 GMT -8
|
|
inherit
154088
0
Jan 6, 2014 7:13:23 GMT -8
Liz
499
May 2010
frenchliving
|
Post by Liz on Dec 22, 2012 8:13:35 GMT -8
Thanks but I already have that code from Paul.
But now I want to show the Info Center for guests and only hide Users Online from guests
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Dec 27, 2012 8:57:36 GMT -8
When I get home tonight (about 1am gmt) I'll knock this up for you. =]
|
|
inherit
154088
0
Jan 6, 2014 7:13:23 GMT -8
Liz
499
May 2010
frenchliving
|
Post by Liz on Dec 27, 2012 11:49:26 GMT -8
Thanks Paul
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 27, 2012 12:03:21 GMT -8
But now I want to show the Info Center for guests and only hide Users Online from guests Hello Liz... Understood and now that Paul is going to put something together, I've bookmarked this thread. p.s. even have my info ctr hidden from guests right now.
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Dec 28, 2012 17:20:41 GMT -8
Okay, here we go; First off, if you're using the 'hide info center from guest' mod, then you'll want to remove it, or this will be redundant. Then, in your Home template (Admin Panel -> Themes -> Layout Templates -> Home), look for the following, approx lines 76-86; <tr><th>Users Online</th></tr> <tr><td>$[total_staff_online] Staff, $[total_members_online] Member{if $[total_members_online] != 1}s{/if}, $[total_guests_online] Guest{if $[total_guests_online] != 1}s{/if}.</td></tr> <tr><td> {foreach $[online_user]} $[online_user]{if $[online_user.invisible]} <span class="small">(invisible)</span>{/if}$[online_user.comma] {/foreach} {if $[total_online_not_shown]} , and <a class="$[view_active_members_link.class]" href="$[view_active_members_link.href]">$[total_online_not_shown] more...</a> {/if} </td></tr> <tr><td>$[view_todays_active_members_link]</td></tr>Replace it with the following, changes in bold; {if $[current_user.is_member]}<tr><th>Users Online</th></tr> <tr><td>$[total_staff_online] Staff, $[total_members_online] Member{if $[total_members_online] != 1}s{/if}, $[total_guests_online] Guest{if $[total_guests_online] != 1}s{/if}.</td></tr> <tr><td> {foreach $[online_user]} $[online_user]{if $[online_user.invisible]} <span class="small">(invisible)</span>{/if}$[online_user.comma] {/foreach} {if $[total_online_not_shown]} , and <a class="$[view_active_members_link.class]" href="$[view_active_members_link.href]">$[total_online_not_shown] more...</a> {/if} </td></tr> <tr><td>$[view_todays_active_members_link]</td></tr> {else} <tr><td>To view the members currently online, please $[login_link] or $[register_link]. Thankyou!</td></tr>{/if}The text in blue you can change to whatever you want. This will give you a result like this; If you want the entire table row to vanish for guests, look instead for the following, approx lines 68-93, and again make the changes in bold at the beginning and end; {if $[current_user.is_member]}<tr class="last"> <td colspan="2"> <table> <tr> <td class="icon">$[image.online]</td> <td class="info last"> <table> <tbody> <tr><th>Users Online</th></tr> <tr><td>$[total_staff_online] Staff, $[total_members_online] Member{if $[total_members_online] != 1}s{/if}, $[total_guests_online] Guest{if $[total_guests_online] != 1}s{/if}.</td></tr> <tr><td> {foreach $[online_user]} $[online_user]{if $[online_user.invisible]} <span class="small">(invisible)</span>{/if}$[online_user.comma] {/foreach} {if $[total_online_not_shown]} , and <a class="$[view_active_members_link.class]" href="$[view_active_members_link.href]">$[total_online_not_shown] more...</a> {/if} </td></tr> <tr><td>$[view_todays_active_members_link]</td></tr> </tbody> </table> </td> </tr> </table> </td> </tr>{/if}After this, look for the following, around lines 28-32. Once more, changes in bold; <div class="content"> <table> <tbody> {if $[current_user.is_member]}<tr>{else}<tr class="last">{/if} <td>This should give you a result like this; Hope that helps. If you have any trouble, let me know. =]
|
|
inherit
154088
0
Jan 6, 2014 7:13:23 GMT -8
Liz
499
May 2010
frenchliving
|
Post by Liz on Dec 29, 2012 3:30:55 GMT -8
Thanks Paul
It worked but is showing this in the Info Centre: class="last">
I think there may be a conflict with the other code to remove 'View members online in the last 24 hours' because that one's not working now.
It's not a major prob and I know you are busy just now. I can re-set and use the code to hide the Info Centre in the meantime
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Dec 29, 2012 11:50:45 GMT -8
Huh. Well it looks like I've broken something. xD
Try the same again, only ignore the <tr {if !$[current_user.is_member]}class="last"{/if}> bit. I'll have a look and see what I've done wrong, in the meantime. =]
Try what I've replaced the last portion with. Haven't yet tested it (being lazy, loads of tabs open), but it should work. Will confirm when I get round to it. =]
ed2; seems to work to me. =]
|
|
inherit
154088
0
Jan 6, 2014 7:13:23 GMT -8
Liz
499
May 2010
frenchliving
|
Post by Liz on Dec 29, 2012 12:24:30 GMT -8
Paul, as usual you're a star!! It worked perfectly Many thanks
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Dec 29, 2012 12:31:41 GMT -8
No worries. =]
|
|