Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide Post Buttons Details »»
Hide Post Buttons
Version: 1.00, by tubedogg tubedogg is offline
Developer Last Online: Dec 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-15-2002 Last Update: Never Installs: 21
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-28-2002, 01:09 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by aidler
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.
hi i still have 2.2.5 and still test my board offline. I also have the same problem. If i am logged in as admin, i see both buttons!
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:
-------------------------------------------------------------------------------------------------------------------
- - - - - - - - - - - - - - - = = = = = = = 
S H O W T H R E A D P H P = = = = = = = - - - - - - - - - - - - - - -
-------------------------------------------------------------------------------------------------------------------
__Find around line 468__
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'] == and ($bbuserinfo['userid'] == or $bbuserinfo['usergroupid'] != 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 " ";
}
// ****** // 

Thanks for any help!
Reply With Quote
  #23  
Old 07-02-2002, 11:57 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
// ****** //

$showthreadbutton 1;
if (!
$getperms['canpostnew']) {
    
$showthreadbutton 0;
}

$showreplybutton 1;
if ((
$bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
    
$showreplybutton 0;
    } elseif (!
$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) {
    
$showreplybutton 0;
} elseif (!
$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
    
$showreplybutton 0;
} else {
$showreplybutton 1;
}


if (
$showthreadbutton == 1) {
    eval(
"\$threadbutton = \"".gettemplate("showthread_threadbutton")."\";");
} else {
    
$threadbutton " ";
}
if (
$showreplybutton == 1) {
    eval(
"\$replybutton = \"".gettemplate("showthread_replybutton")."\";");
} else {
    
$replybutton " ";
}
// ****** // 
:bandit:
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03883 seconds
  • Memory Usage 2,241KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete