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)
-   -   Quick Reply Box (https://vborg.vbsupport.ru/showthread.php?t=34597)

Ghard296 03-11-2002 01:26 AM

Nice. :)

Admin 03-11-2002 11:24 AM

eva -- instead of this in showthread.php:
Code:

if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
        $replybox='';
} elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) {
        $replybox='';
} elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
        $replybox='';
} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}

use:
Code:

if (!in_array($bbuserinfo['usergroupid'], array(5,6,7))) {
        $replybox='';
} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}


HTP 03-11-2002 10:39 PM

This isn't working with my fresh install of 2.2.4

Neo 03-12-2002 02:33 PM

Yup, does nto work with 2.2.4

Admin 03-12-2002 02:37 PM

Updated to work with 2.2.4.

Neo 03-12-2002 03:11 PM

Many thanks. It works perfectly now :D

Radon3k 03-12-2002 05:30 PM

Really? It worked fine with my install of 2.2.4 before Chen updated it (at least I think it was before he updated it...)

eva2000 03-12-2002 10:34 PM

Quote:

Originally posted by FireFly
eva -- instead of this in showthread.php:
Code:

if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
        $replybox='';
} elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) {
        $replybox='';
} elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
        $replybox='';
} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}

use:
Code:

if (!in_array($bbuserinfo['usergroupid'], array(5,6,7))) {
        $replybox='';
} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}


thanks.. just had to change the usergroup for mods since onmy forum mod usergroup id isn't 7

Freddie Bingham 03-12-2002 11:01 PM

Remember that while this looks cool
PHP Code:

if (!in_array($bbuserinfo['usergroupid'], array(5,6,7))) { 

it isn't nearly as efficient as
PHP Code:

if ($bbuserinfo['usergroupid'] != AND $bbuserinfo['usergroupid'] != AND $bbuserinfo['usergroupid'] != 7) { 


Freddie Bingham 03-12-2002 11:11 PM

Also why don't you just use:
PHP Code:

if (!ismoderator($foruminfo['forumid'])) { 

Permissions are cached so it won't add any new queries to the code.


All times are GMT. The time now is 05:07 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
  • Page Generation 0.01945 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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