Moving $bannedwarning to error template - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Support (https://community.mybb.com/forum-72.html) +---- Thread: Moving $bannedwarning to error template (/thread-116755.html) |
Moving $bannedwarning to error template - mattias - 2012-04-12 Hi, when a user is banned, he gets two notifications: 1) $bannedwarning = <div class="red_alert"?>You are banned etc.<div> 2) error_no_permission = <td class="trow1">{$error}</td> = You don't have permission etc. In my opinion the second notification is not necessary since everyone knows that if you are banned, you don't have permission for anything. That's why I created this thread, seeking an alteration of the error_no_permission template for banned users. Since nobody provided me with the information I am seek yet, I thought of an alternate solution. The solution is to put both notifications together and thus making them appear like one single notification. So my questions is, how can I put $bannedwarning in the error template and making it work? It won't work just by moving $bannedwarning to the error template. Additional things have to be done to make it work. I hope somebody can help me Thanks RE: Moving $bannedwarning to error template - Mr.Kewl - 2012-04-12 Many sites have different settings for banned members. I may allow my banned members to view all topic but can't post. RE: Moving $bannedwarning to error template - mattias - 2012-04-12 By banned members I actually mean this permission: if($mybb->usergroup['canview'] != 1) RE: Moving $bannedwarning to error template - Mr.Kewl - 2012-04-12 You can change that to
RE: Moving $bannedwarning to error template - mattias - 2012-04-12 What should that accomplish? I want to move the $bannedwarning output into the error no permission template. Here are two pictures: WRONG GOOD Edit: But in a perfect world the page banned users should see is this: PERFECT EDIT2: I think I got it now. In inc/functions.php I replaced this:
with this:
I made an additional template error_banned:
Now it works exactly as it should. Can anyone verify if I forgot something? |