Hi.
The title says it all. What do I have to change (and where) to make the Stats sidebar only appear in admin accounts?
Thanks.


![]() |
| | Thread Tools | Display Modes |
| |||
|
Hi. The title says it all. What do I have to change (and where) to make the Stats sidebar only appear in admin accounts? Thanks. |
| ||||
|
FYI: Admin already has a stats shown in the admin panel - the simplest way is to disable the sidebar_stats module if you think others donot have to see it. Other possible case is: Just open your /modules/sidebar_stats/templates/sidebar_stats.tpl and add this line below the first line where some config files are loaded: Code: {if $isadmin eq 1} Code: {* this is a temporary fix. When you load a new config file the existing config gets dropped. *} Code: {/if} |
| |||
|
I have a similar problem: I want to hide "who voted" from non-admins. Since the relevant file story.php is not a tpl file the syntax must be different. Can you tell me? Edit: Consequently, I have to do the same with "Commented" at user.php. Last edited by tbones; 07-16-2007 at 02:08 AM. |
| ||||
|
A simple way I would recommend is to just hide the "Who voted tab" - when there is no link - users will not follow - and show it only to admin. This will do it: In file /templates/yget/story_center.tpl Replace this line Code: <span><a href="#" rel="who_voted">{#PLIGG_Visual_Story_Who_Voted#}</a></span> Code: {if $isadmin eq 1}<span><a href="#" rel="who_voted">{#PLIGG_Visual_Story_Who_Voted#}</a></span>{/if} |
| |||
|
Great! Do you have a similar solution for "Commented" ?
|
| |||
|
Where is my coffee? *g* I´ve meant "Voted" Edit: I did some extensive trial´n´error and found yget/user_center.tpl as the responsible file for display. Last edited by tbones; 07-16-2007 at 04:01 AM. |
| ||||
| ? - I didnot get what you exactly wanted - you meant - you donot want the comments to be displayed? Quote:
|
| |||
|
I confused myself due to the lack of coffee ;-) Ok, thatīs what I want: Users (except admin and god level) mustnīt see who voted for their stories. To achieve this the tabs "Who voted" at yget/story_center.tpl and "Voted" at yget/user_center.tpl have to be written inside the conditional. I mixed up "Voted" and "Commented", sorry. |
| ||||
|
np, hope you got your cup of coffee |
| ||||
|
For hiding from user profile the stories where the user voted and enabling it only for the admin and that user - as requested by tbones: In file templates/yget/story_center.tpl Replace this code Code: <li><a href="{$user_url_news_voted}" class="navbut{$nav_nv}"><span>{#PLIGG_Visual_User_NewsVoted#}</span></a></li> Code: {if $isadmin eq 1 or $user_login eq $user_logged_in}<li><a href="{$user_url_news_voted}" class="navbut{$nav_nv}"><span>{#PLIGG_Visual_User_NewsVoted#}</span></a></li>{/if} Last edited by dollars5; 07-16-2007 at 05:19 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pligg prof. can you make some empty area's in de sidebar for banners etc. | Fred007 | Questions and Comments | 3 | 12-31-2008 01:30 AM |
| Module Hooks | Yankidank | Wiki Articles | 1 | 09-15-2008 11:33 PM |
| [SOLVED] Enable 'admin' to killspam from a user's profile | longcountdown | Questions and Comments | 5 | 05-26-2008 02:16 PM |
| How do I make the footer sit BELOW the sidebar on all pages? | littledipper | Questions and Comments | 5 | 11-29-2006 05:54 PM |