vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Removed No permission page with custom page? (https://vborg.vbsupport.ru/showthread.php?t=228633)

Loget 11-22-2009 07:22 PM

Removed No permission page with custom page?
 
Hello,

I'd like to remove the no permission page for guests with a custom page. Can someone please assist me on how to do it?

Many thanks.

Loget 11-25-2009 06:29 PM

Anyone, please?

Lynne 11-25-2009 08:07 PM

You have a custom page and it is giving guests a no permission message? You must have the code in the page then. Look for something like this and remove it (I don't know what your's looks like since you haven't printed out your code):
PHP Code:

if (!isset($vbulletin->userinfo['userid']) OR $vbulletin->userinfo['userid'] == 0)
{
        
print_no_permission(); 



Loget 11-26-2009 07:04 PM

Hey Lynne,

You misunderstood me, I meant that I want a custom page shown to guests instead of using a no permission page.

Thanks

kh99 11-27-2009 12:25 AM

Maybe you could try this mod: https://vborg.vbsupport.ru/showthread.php?t=172989

or you could try this plugin code:

Code:

if (!$vbulletin->userinfo['userid'])
{
  $vbulletin->url = 'custom page url';
  eval(print_standard_redirect('no permission'));
}


using the error_nopermission hook (replacing 'custom page url' with your page url of course). I did a brief test, but you'd want to test it more if you try using this.

Loget 11-27-2009 06:53 PM

Hello,

Where do I find the error_nopermission hook :$ ?

Lynne 11-27-2009 06:58 PM

Do a search in your files for "error_nopermission" and you'll find it in functions.php

Loget 11-27-2009 07:13 PM

Hello Lynne,

I don't exactly know where kh99 is asking me to put the following code:
Quote:

if (!$vbulletin->userinfo['userid'])
{
$vbulletin->url = 'custom page url';
eval(print_standard_redirect('no permission'));
Quote:

using the error_nopermission hook (replacing 'custom page url' with your page url of course). I did a brief test, but you'd want to test it more if you try using this.
Is he/she talking about the functions.php file edit or something within vbulletin admincp?

Thanks, I appreciate your help.

Lynne 11-27-2009 07:18 PM

He's talking about creating a plugin using the error_nopermission hook location. Take a look at this in the manual - Plugin System

Brandon_R 11-27-2009 07:24 PM

You could edit the STANDARD_ERROR templates and replace it with your custom code.


All times are GMT. The time now is 02:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01161 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete