vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   an fatal error. Help please (https://vborg.vbsupport.ru/showthread.php?t=35161)

mondaynightmike 02-17-2002 05:02 PM

Hi i was looking at some script which stops users from viewing the thread if they have under 25 posts.

I added it to my forums:
if($forumid=="53" AND $bbuserinfo[posts]<=25) {
show_nopermission();

but now when i click on 53 i get this error:

Fatal error: Call to undefined function: show_nopermission() in /usr/local/psa/home/vhosts/f1modelnews.com/httpdocs/modelforums/forumdisplay.php on line 4

Can somone help. Or tell me a way of making it re-direct so if they have not go enough pages it go's to a custom error page.

Thanks

Andy Z 02-17-2002 05:17 PM

() tells PHP that show_nopermission is a function. That isn't a standard PHP function, and I don't believe it is defined by vb's functions.php, either. The fatal error is PHP telling you it doesn't understand the function nad can't excute the script. I'm not sure what you should use instead of that function or you can define that function (if you know how) in functions.php. I'm sure someone else can tell you what to replace show_nopermissions() with. You cannot redirect a PHP fatal error to a custom error page.

mondaynightmike 02-17-2002 05:31 PM

i meant can i if the user does not have 25 post get it to go to a page. Not can i re-direct if there is a fatal error.

Ok i will wait to see if someone can help.

TECK 02-17-2002 05:33 PM

where u edit it? what file? place the segment of code attached, not displayed, due to vBulletin copyright

mondaynightmike 02-17-2002 05:37 PM

1 Attachment(s)
ok it was forumdisplay.php

right at the top. I got the code from a thread but can't find it now. But fire fly posted in it (still does not help)

Um here i have attached the code as a notpade file

TECK 02-17-2002 05:39 PM

the file is incomplete. post the bits the proper way. i need to see where exacly u placed the code

mondaynightmike 02-17-2002 05:43 PM

ok here is the update one showing my whole file with the bit i added.

TECK 02-17-2002 06:16 PM

<a href="https://vborg.vbsupport.ru/showthread.php?postid=169347#post169347" target="_blank">https://vborg.vbsupport.ru/showt...347#post169347</a>

mondaynightmike 02-17-2002 06:24 PM

will that work with only guests? or can it be modified for memebers as well? like add posts=25?

TECK 02-17-2002 07:15 PM

your answer is there. take the time to read it.
https://vborg.vbsupport.ru/showthrea...263#post170263


All times are GMT. The time now is 04:24 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.05462 seconds
  • Memory Usage 1,731KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete