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)

99SIVTEC 08-28-2003 10:06 PM

I finally got this to work with 2.3.2 . The problem is that the instructions for showthread.php are wrong, or at least they were for my site.

PHP Code:


***  FIND  ***

if (!
$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}

***  
REPLACE WITH  ******

if (!
$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}


***  
FIND  ***

if (
$noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}

***  
REPLACE WITH   ***


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')."\";");
}

if (
$noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";



and then it works. In the instructions they have the top two finds as one. Problem is there is a bunch of code between them.

Cal Poly Forum 08-28-2003 10:32 PM

Got it. I'll try it out.

99SIVTEC 08-28-2003 11:10 PM

I used jeffyJoe's version of the hack found on page 74 and just replaced the step 2 file edit of showthread.php with the one I posted above.

Cal Poly Forum 08-28-2003 11:54 PM

The code is not there for newreply.php Step 4.

This is for ver 2.3.2. HOw did you get yours to work?

teamsupra 08-29-2003 09:31 PM

Ive tried JeffyJoe's code and the Quick Reply was there fine, but the CLose Open Button is missing.. Any Ideas?

HaVeNita 08-30-2003 01:42 PM

Version 2.3.2 didn't work!
someone can post a new .txt with the correct Instructions?

|oR|Greg 08-30-2003 10:46 PM

Thanks Jeff...good rehack :) Now I just gotta re-add the smilies somehow.. :P

|oR|Greg 08-30-2003 11:45 PM

Got the smilies in... happy day :)

|oR|Greg 08-30-2003 11:47 PM

Anyone know how to make the smilies box so it uses the same formatting as the actual one in a new reply? I used the same $vbcode_smilies line as the newreply.php, and it displays the box, but without the proper border on the table, odd... ?

www.OrderOfRonin.com

JeffyJoe 08-31-2003 04:19 PM

Quote:

08-29-03 at 12:06 AM 99SIVTEC said this in Post #1121
I finally got this to work with 2.3.2 . The problem is that the instructions for showthread.php are wrong, or at least they were for my site.

PHP Code:


***  FIND  ***

if (!
$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}

***  
REPLACE WITH  ******

if (!
$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}


***  
FIND  ***

if (
$noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}

***  
REPLACE WITH   ***


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')."\";");
}

if (
$noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";



and then it works. In the instructions they have the top two finds as one. Problem is there is a bunch of code between them.


the problem is this line:
PHP Code:

 if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();


is found twice in showthread.php

the second instance of this line in showthread has this line:

PHP Code:

if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}

if (
$noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";


so the instruction code is correct... there should be no code between them... and there should be only one instance of this code in showthread.php


All times are GMT. The time now is 07:36 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.02879 seconds
  • Memory Usage 1,775KB
  • 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_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