Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Hide Post Buttons Details »
Hide Post Buttons
Mod Version: 1.00, by tubedogg (Member) tubedogg is offline
Developer Last Online: Dec 2016 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (0 vote - 0 average) Installs: 21
Released: 16 May 2002 Last Update: Never Downloads: 3
Not Supported  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements MARCO1 BBCODE Hide Tags [ hide] [/ hide] MARCO1 vBulletin 4.x Add-ons 372 01 Feb 2018 12:21
BB Code Enhancements MARCO1 BBCODE Hide Tags [ hide] [/ hide] - Updated For VB 4.1.0 my123world Modification Graveyard 5 06 Dec 2010 20:30

Comments
  #2  
Old 16 May 2002, 05:12
RDX1 RDX1 is offline
 
Join Date: Apr 2002
not bad... wont install it tho - no need
Reply With Quote
  #3  
Old 16 May 2002, 05:38
cessna140 cessna140 is offline
 
Join Date: Feb 2002
Awesome! Thanks for the quick response. I have installed it but have a problem. I have vB 2.2.5.

Your instructions state:
---------------------------------------------------------------
= = = = = = = S H O W T H R E A D . P H P = = = =
---------------------------------------------------------------
__Find__
updateuserforum($thread['forumid']);

__Right after that add__
// ****** //
$showthreadbutton = 1;
if (!$getperms['canpostnew']) {
$showthreadbutton = 0;
}

$showreplybutton = 1;
if (!$getperms['canreplyown'] or (!$getperms['canreplyothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid'] == 0))) {
$showreplybutton = 0;
}
if (!$thread['open'] == 0 and ($bbuserinfo['userid'] == 0 or $bbuserinfo['usergroupid'] != 6 or !ismoderator($thread['forumid']))) {
$showreplybutton = 0;
}

if ($showthreadbutton == 1) {
eval("\$threadbutton = \"".gettemplate("showthread_threadbutton")."\";");
} else {
$threadbutton = " ";
}
if ($showreplybutton == 1) {
eval("\$replybutton = \"".gettemplate("showthread_replybutton")."\";");
} else {
$replybutton = " ";
}
// ****** //
In showthread.php there are two occurances of updateuserforum($thread['forumid']);. The first on line ~86 the second on line ~468.

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.
Reply With Quote
  #4  
Old 16 May 2002, 05:46
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
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.
Reply With Quote
  #5  
Old 16 May 2002, 06:54
cessna140 cessna140 is offline
 
Join Date: Feb 2002
Hey tubedogg,

Originally posted by tubedogg
You wanted the second occurance, correct.
Not sure what you meant by this? If you meant at the Thread level, no I would rather not have any buttons show if the person is not allowed to post/reply.

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.
I downloaded the file again but did not notice anything different. I searched for a second occurance in the showthread template but did not see one. The only duplicate occurance of anything in your instructions was in the showthread.php file. Is that what you were referring to?

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?
Attached Images
File Type: jpg pic.jpg (43.0 KB, 115 views)

Last edited by cessna140; 16 May 2002 at 16:27.
Reply With Quote
  #6  
Old 16 May 2002, 07:19
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Real name: Alan
augh! the color! it burns my eyes!
Reply With Quote
  #7  
Old 16 May 2002, 08:04
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Following the instructions for the second find&replace under "showthread template" in the file from will fix your problem.
Reply With Quote
  #8  
Old 16 May 2002, 10:39
inphinity's Avatar
inphinity inphinity is offline
 
Join Date: Oct 2001
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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(remove space after { )

showthread_replybutton

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and in showthread.php i would probably add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

just under


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
inphinity
Reply With Quote
  #9  
Old 16 May 2002, 17:55
cessna140 cessna140 is offline
 
Join Date: Feb 2002
tubedogg,

Thanks for taking the time. I've got half of it working...


Originally posted by tubedogg
Following the instructions for the second find&replace under "showthread template" in the file from will fix your problem.
First, this hack does work at the forum level. :laugh:

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!
Reply With Quote
  #10  
Old 16 May 2002, 20:52
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
This is taken verbatim from the instructions file and is what you need to do to make the thread buttons disappear.

__Find__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__Replace with__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__Find__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__Replace with__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #11  
Old 16 May 2002, 20:55
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
I left off two instructions, for adding the showthread_threadbutton and showthread_replybutton templates. I've updated the instructions file.
Reply With Quote
  #12  
Old 16 May 2002, 22:40
cessna140 cessna140 is offline
 
Join Date: Feb 2002
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!

Last edited by cessna140; 18 May 2002 at 04:54.
Reply With Quote
  #13  
Old 17 May 2002, 04:23
cessna140 cessna140 is offline
 
Join Date: Feb 2002
Here is what I get when logged in with permission to post/reply... the normal operation of a thread.
Attached Images
File Type: gif pic2.gif (19.8 KB, 46 views)
Reply With Quote
  #14  
Old 17 May 2002, 04:25
cessna140 cessna140 is offline
 
Join Date: Feb 2002
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...
Attached Images
File Type: gif pic3.gif (16.6 KB, 43 views)
Reply With Quote
  #15  
Old 17 May 2002, 05:34
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
You apparently haven't completed this step. That's the only reason why it wouldn't work.
Originally posted by tubedogg
__Find__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__Replace with__

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 05:51.

Layout Options | Width: Wide Color: