vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Hide Post Buttons (https://vborg.vbsupport.ru/showthread.php?t=38682)

Birdie501 06-28-2002 01:09 PM

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!
:confused:

Birdie501 07-02-2002 11:57 PM

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:


All times are GMT. The time now is 08:41 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
  • Page Generation 0.01146 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete