SimplePortal
Development => Feature Requests => Topic started by: Sudhakar on December 01, 2008, 07:42:40 PM
-
Hi Team,
Could i Hide a block to Admin. :)
-
Hmmm, not really. Because they have all the permissions for all blocks.
It is like the board permissions in SMF; you cannot hide a board from admin.
-
Why would you want to do this? :)
-
Some admins like to show some blocks to guests and members that they don't always want to see themself. Like me, I set up the news board block, which cannot be collapsed, yet I really as admin, do not need to always see it, since I wrote all the posts there. :P
-
Perhaps then it would be an idea for admins to be able to collapse any block, regardless of what it is set to?
-
That would be good idea. :)
Maybe move this to Feature Requests?
-
Yes BurkeKnight,
You are really right. I need to hide news and other block to Admin.
Burkeknight and K give me a sample code to workout . :)
-
I'm only a beta tester, not a coder... Well, ok, I'm a coder, but not for SP yet.... Well, not for long time, as I still have TONS to learn.
I'll leave that coding to the more experienced team members. :)
-
Ok, and hope some team member will help me soon. :whistle:
-
Any Updates for this post.
Once this feature is added, Simple portal will be more reliable to admin.
where they could hide advertisement tabs. :)
-
Any update on the Feature Request Team. :shh:
-
Suppose, if i have a advertisement block.
I could block that particular block to an admin.
-
Greetings!
Yes, an advertisment block is something an admin must not see always.
Try
if ($context['user']['is_logged']){
"your code here"
}
if($context['user']['is_admin']){
"leave blank"
}
This should show the content to all logged users, but not to admins.
I have some problems with $context. It seems that SP don't use some SMF code automatic.
So it is possible that you have to add something like
global $context, $scripturl, $settings, $member, $memberContext, $member_id
at the very beginning of you blockcode. I haven't figure out yet how SP handeles this.
-
Great "ianus".
I do even have a member group where i have removed the ads using the block permissions at simple portal configuration.
-
http://simpleportal.net/index.php?issue=116.0
-
Greetings!
Yes, an advertisment block is something an admin must not see always.
Try
if ($context['user']['is_logged']){
"your code here"
}
if($context['user']['is_admin']){
"leave blank"
}
This should show the content to all logged users, but not to admins.
I have some problems with $context. It seems that SP don't use some SMF code automatic.
So it is possible that you have to add something like
global $context, $scripturl, $settings, $member, $memberContext, $member_id
at the very beginning of you blockcode. I haven't figure out yet how SP handeles this.
Where is this info to go ? inside of the block ? and did you getting it working ?
This is definately a needed feature for 2.2 >:-D
-
Not really. 2.2 is feature frozen ATM, you'll have to wait next version.
About some frequently used variables not being as default globals for PHP block; that is how it should be. You should global what you need yourself.
-
Where is this info to go ? inside of the block ? and did you getting it working ?
This is definately a needed feature for 2.2 >:-D
You would want to create a "PHP Block" adding the above code and then adding your needed code where it says "your code here".
-
Where is this info to go ? inside of the block ? and did you getting it working ?
This is definately a needed feature for 2.2 >:-D
You would want to create a "PHP Block" adding the above code and then adding your needed code where it says "your code here".
thanks. ... but what about all this you posted
global $context, $scripturl, $settings, $member, $memberContext, $member_id
?
-
Hi Team,
Could i Hide a block to Admin. :)
Still i could not hide the block for admin.
Any idea would be appreciated.
-
I had a second admin who objected to seeing every block (sometimes duplicated for different member groups with different content).
I set him up as Admin2 then manually altered his permissions. Be careful if you do this to your own profile and make sure you still retain the permissions to give yourself full admin privileges or leave these on a second login account.
-
Thanks for your reply willerby.
But i need to hide the blocks for my id - main admin id.
How it is possible.
-
This is a feature planned for version 2.4.
-
This is a feature planned for version 2.4.
Nice that you have answered me.
Could you tell me some estimated time for v 2.4 to get released.
-
V 2.4 will be released when our developers have time to work on it.
Unfortunately, they are very busy students, and will not work on this code until they have time to devote to doing it properly.
In the meantime, please have a look at this topic, which gives you a customization you can apply:
http://simpleportal.net/index.php?issue=116.0 (http://simpleportal.net/index.php?issue=116.0)
-
+1 vote for this.
-
V 2.4 will be released when our developers have time to work on it.
Unfortunately, they are very busy students, and will not work on this code until they have time to devote to doing it properly.
In the meantime, please have a look at this topic, which gives you a customization you can apply:
http://simpleportal.net/index.php?issue=116.0 (http://simpleportal.net/index.php?issue=116.0)
what this will do?
-
what this will do?
Once you have done with this update.
Admin will not get the blocks. But once you have made the edit , we need to reconfigure agian the roles under simple portal block page.
-
what this will do?
Once you have done with this update.
Admin will not get the blocks. But once you have made the edit , we need to reconfigure agian the roles under simple portal block page.
admin will not get the blocks at all? Or just if ti is not selected in the block permisions?
-
Just if admin is chosen not to see the block in permissions.
You can try the change, and if you don't like it, go back to the previous version of the file.
-
Just if admin is chosen not to see the block in permissions.
You can try the change, and if you don't like it, go back to the previous version of the file.
i can not find this code in Subs-Portal.php, can anybody update this for SP 2.3.2?
if (allowedTo('sp_moderate'))
return true;
-
Search for
if (allowedTo('sp_admin'))
-
thank you AngelinaBelle, when modification is acticevd I can not see blocks in the admin panel.
is this it what this do?
-
I'm sorry. My advice was wrong.
Now, I don't know the answer.
-
I am sorry I was not well expressed, you helped me a lot.
When I uploaded the modification, blocks related to guests are missing, but I made membergroup Admin SP and made it invisible. Then I have all the blocks related to guest set permissions and include new membergroup Admin SP. Now when i want edit those blocks in my profile settings add additional group Admin SP. and that is it.
When i dont want look in block for guests, then remove additional group Admin SP.
sorry for my bad english, AngelinaBelle 8)
-
Is this working for you?
-
Is this working for you?
Yes, it works. :)
-
Good!
-
It is like the board permissions in SMF too.