![]() |
Hide Post Buttons
Another small hack, this one requested by cessna140.
It will remove the New Thread and/or Post Reply buttons from showthread and forumdisplay if the user does not have permission to post a New Thread and/or Post a Reply. Again, it's really quite simple. Download the attached file and follow the instructions. Please no PMs, email, ICQ, or AIM about this hack. It will be ignored. |
not bad... wont install it tho - no need
|
Awesome! Thanks for the quick response. I have installed it but have a problem. I have vB 2.2.5.
Your instructions state: Quote:
I placed the code after the first one I came across, saved/uploaded the file and checked the result. The buttons were gone from the top of the thread but not the bottom. So I inserted the code after the second occurance, saved/uploaded and tried again. Same result, the buttons are still at the bottom of the thread. Any ideas? Thanks again. |
You wanted the second occurance, correct.
I missed one bit of the instructions, you need to do some additional stuff in the showthread template. Download the new file and do the second find/replace under showthread template. That will fix it. |
Hey tubedogg,
Quote:
Quote:
This hack works at the Main Forum level but not at the Thread level. Here are some screen shots that might better explain what I'm referring to. The top part of the image shows unhacked normal operation at Forum level. The middle part of the image shows a Forum, after installing your hack, where the visitor does not have permission to post. Notice there is no New Thread button! Perfect. The bottom part of the image shows an individual thread with the buttons still showing even though the visitor does not have permission to post there. What needs to be done to make those disappear? This also ties in to another hack somewhere on vb.org that hides the New Thread button on a Closed thread. Can all of these situations be covered in one hack? |
augh! the color! it burns my eyes!
|
Following the instructions for the second find&replace under "showthread template" in the file from will fix your problem.
|
nice hack :)
but correct me if i'm wrong but i think you missed some bits from the instructions add two new templates: showthread_threadbutton PHP Code:
showthread_replybutton PHP Code:
PHP Code:
PHP Code:
|
tubedogg,
Thanks for taking the time. I've got half of it working... Quote:
The problem is, the new thread and reply buttons are still showing at the thread level as depicted in the bottom of the previously attached image. :disappointed: Not to be a pain but, I have followed your instructions to the letter, several times, and can't get it to work. Obviously, I am missing something! Could I impose on you to write new instructions specifically to what I am not getting? Exactly what needs to be replaced and where in order to hide the new thread and reply buttons in threads that I do not have permission to post/reply? Perhaps as inphinity suggests, there are more steps to this? Again, thanks! |
This is taken verbatim from the instructions file and is what you need to do to make the thread buttons disappear.
__Find__ Code:
<!-- Thread nav and post images --> Code:
<!-- Thread nav and post images --> Code:
<td><a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]"><img src="https://vborg.vbsupport.ru/images/newthread.gif" border="0" alt="Post New Thread"></a></td> Code:
<td>$threadbutton</td> |
I left off two instructions, for adding the showthread_threadbutton and showthread_replybutton templates. I've updated the instructions file.
|
I finally got it to work with inphinity's help!
Thanks inphinity for sending me the updated code. I thought I was cracking up, I knew there had to be more steps than I had. For some reason I could not download any of the updated versions even though I flushed my cache. Thank you tubedogg for making the hack, works as advertised! |
Here is what I get when logged in with permission to post/reply... the normal operation of a thread.
|
This is what I get when visiting without permission to post/reply. The New Thread and Reply buttons are gone from the top but not from the bottom...
|
You apparently haven't completed this step. That's the only reason why it wouldn't work.
Quote:
|
instructions look fine now :)
cessna140 try clearing your browser's cache and redownloading the instructions. -- i was just thinking instead of _removing_ the buttons for the majority of boards replacing them with big _register_ buttons would probably be more beneificial for getting users to register ;) |
inphinity,
Good suggestion :alien: |
Is it confirmed that this hack works with 2.2.6?? I installed the hack and had the following problem: The reply button was gone even for users who have the permission to reply to other's posts.
in addition I use the quick reply box hack and would like to have the quick reply box vanish as well when a user has no permission to post. |
Ok... no reply :angry:
/ UNINSTALL HACK / Who need's a hack that doesn't work....very disappointing :disappointed: |
aidler - The Quick Reply Box DOES dissapear when you dont have permission to post...
@The Dissapearing buttons - Are you sure you didnt make an error somewhere? Nice hack btw... *installs* Satan |
Quote:
if i log in as user, there is only the new thread button!??? I have the quick reply box installed as well. What should i do? i think there is something wrong with this code. PHP Code:
Thanks for any help! :confused: |
ok thanks for the help!
But i found a solution for me. I just changed the code of firefly's quick reply box to this: now it works! PHP Code:
|
All times are GMT. The time now is 04:46 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|