PDA

View Full Version : an fatal error. Help please


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
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/showthread.php?postid=170263#post170263