View Full Version : Display 'No Permission' in custom template
ExoticAgenda
06-10-2012, 07:53 PM
I am creating a template, and I have the if statement to show what I want to certain groups, however I am having difficulty showing the "You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:" message with the login box using the vb:else. Any insight would be appreciated. thanks
Lynne
06-10-2012, 11:30 PM
What code are you using for the else statement and what is actually showing up? Usually that is all handled in the php code, not just template code and that could be why you aren't getting the results you want.
ExoticAgenda
06-10-2012, 11:38 PM
When I put text in the else section I can see that, but I want to get the whole permission denied message with login prompt. This is what im using.
<vb:if condition="is_member_of($vbulletin->userinfo, 6, 7, 2, 5, 9, 10, 11)">
Show stuff here
<vb:else />
This is where i want to show the login box and whatnot.
</vb:if>
Lynne
06-11-2012, 01:32 AM
As I said previously, it is usually called via php and it calls a function that spits out the who page/form. You would need to use php to do what you want instead of template conditions.
ExoticAgenda
06-12-2012, 01:36 AM
Ok cool, do you know what the function I need to call is off hand? If not I can look it up, atleast I have a lead.
Thanks
Disco_Stu
06-12-2012, 01:57 AM
I think you're looking for the "print_no_permission();" function call
ExoticAgenda
06-16-2012, 01:53 AM
ok, let me try that, is there a certain way to call that function? do i just insert it in the vb:else ? thanks
Disco_Stu
06-16-2012, 02:14 AM
Here's an example of the function being called in PHP
if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}
I'm not sure where you're trying to call this from but it's usually called from a PHP file as Lynne has stated. Check forum.php, blog.php , etc in your forum root directory to see how it is used.
ExoticAgenda
06-18-2012, 12:33 AM
ok thanks ill take a look, but i have been trying to do this in a template i created
Disco_Stu
06-18-2012, 03:04 AM
Check in your templates for STANDARD_ERROR_LOGIN . This may be what you're looking for
ExoticAgenda
06-23-2012, 12:00 PM
thanks i see it there, how can i reference that in the <vb:else /> section of my template?
ExoticAgenda
07-14-2012, 01:24 PM
???
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.