![]() |
Restrict [code] and [php] to registered members only
Hi,
Long time since I release a hack and this was only a little one I brushed up. Still useful nevertheless. What does it do? It allows you to restrict the content of the [ php] and [ code] tags to registered members only. If the user is not registered then they get a 'Sorry you must be registered to view this code.' displayed in the boxes :) Instructions: In admin/functions.php find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
In search.php find: PHP Code:
PHP Code:
Enjoy :D! - Dean |
nice job ^^ now fix the bug
|
Already did it ;) ^^
|
Mist does it again
|
Mist - wow.
But have you done it working, so you we can use real workin php code in vB 2 templates? No hack worked for me. How is it with you? |
kind of like vb.org not displaying code boxes to unliscensed members? :)
|
nice and useful mist, thanks
|
Mist, about a hack extremely similar to this?
Making the php & code tags viewable in only certain forums and not viewable in the rest. Is this possible? |
nice hack Dean ^^
no fix the bugs of showing codes in search as posts and quoting msgs :p if you done so, i'll give you the vb2 code we used at vb.org ;) |
Weird issue, null, the owner of the board I am Admin of installed this and it removed the usernames from the postbit. We are using vb 2.3.2 :(
|
Very odd t c - i tested this on my localboard and it worked fine :)
@Stefan - i'll have a crack at fixing that tonight ;) |
ewww i made the fix for searching but look at the bottom php code box - ignore it for now until the bug on vb.org is fixed :)
|
Lmao @ the code box error up there. Nice mod anyway Mist, Thank!
Could that error be there because vB.org is not a vB2 board? Or wouldnt this matter. |
It's a vb3 bug MindTrix :) I've reported it at vb.com
|
Oh ok sorry, Cheers for clearing it up for me
|
Mist, could you maybe make a hack to restrict 'ALL' vB code to registered members only?
|
I was hoping for a similar thing.
I'd like to make it so that guests would see a replacement image instead of the actual imbedded image that would do the same thing. Then Admins could create any image they wanted that also said words to the effect of "Sorry, you must register in order to view this image." Would it be difficult/possible to convert this hack to the IMG tag instead? |
It's possible - my time is too limited right now though sorry - make a request in the 'Requests' forum :)
|
No problem Mist, thanks for the reply.
I posted it a week or so ago on the requests forum, but no one was interested. :( |
nice hack dean
|
Chen helped me rewrite the code to compensate for the vb3 "bogus" bug as they're calling it and also this is a lot cleaner. So this hack is fully functional now :)!
|
any change of getting a text file? I'd like to install this. All I see right now is Codedisplayerror: (Update license status) You cannot view codes as long as you haven't proven your license status!
which is not the case |
Well you'll need to contact the administrators privately about that issue if there are problems with your licensing status. Seems as you posted here you are licensed alright :)
|
Hi All
I tried to install the hack on my 2.3.2 forum and the result was: Parse error: parse error in /home/safwaci1/public_html/testforum/admin/functions.php on line 967 Fatal error: Call to undefined function: vbdate() in /home/safwaci1/public_html/testforum/admin/sessions.php on line 400 Can you please tell me what the problem is?? Thanks |
You applied the hack incorrectly ;) ^^ reapply the changes.
|
All times are GMT. The time now is 06:25 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|