Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 10-30-2016, 10:47 PM
JamesStPattrick JamesStPattrick is offline
 
Join Date: Oct 2016
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PHP Call 'No Permissions Page'

Hello,

I'm coding a plugin, does anyone know how I can call the vBulletin 'No Permission Page'?

Thanks!

--------------- Added [DATE]1477871411[/DATE] at [TIME]1477871411[/TIME] ---------------

I've tried calling: 'print_no_permission();' but then I get this error:
Quote:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes) in C:\xampp\htdocs\includes\functions.php on line 2890
Any idea?

--------------- Added [DATE]1477871762[/DATE] at [TIME]1477871762[/TIME] ---------------

Nevermind, issue has been fixed.

For those who want the solution, make your own php file that calls the print_no_permission(); and call that file from plugin
Reply With Quote
  #2  
Old 10-30-2016, 10:59 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no reason at all to do that, just call print_no_permission() in the plugin, it works just fine (a lot of my vB3 plugins have this).
Reply With Quote
  #3  
Old 10-31-2016, 12:46 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JamesStPattrick View Post
I've tried calling: 'print_no_permission();' but then I get this error:


Any idea?
Your PHP Script is using too much memory (128MB+). You can either increase the memory allowed by using a php.ini file (if your host allows it, but I would not recommend this method since you are consuming 128MB) or figure out why your script uses that much memory and adjust it.
Reply With Quote
  #4  
Old 11-04-2016, 07:29 PM
JamesStPattrick JamesStPattrick is offline
 
Join Date: Oct 2016
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
There is no reason at all to do that, just call print_no_permission() in the plugin, it works just fine (a lot of my vB3 plugins have this).
I tried it but it generates that error.

Quote:
Originally Posted by Dragonsys View Post
Your PHP Script is using too much memory (128MB+). You can either increase the memory allowed by using a php.ini file (if your host allows it, but I would not recommend this method since you are consuming 128MB) or figure out why your script uses that much memory and adjust it.
I see not how it's possible that this issue occurs due to memory.
I even assigned 16GB now and still same issue.

I'll just stay with my solution.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07649 seconds
  • Memory Usage 2,184KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete