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)

bigdaddy04 01-17-2004 04:38 PM

Something is up here, I'm trying to install this on vB 2.3.3 and its just not working,
the showthread_replybox template is created, the $replybox in the showthread template is there, and i did infact upload the new showthread.php..

very weird, im kinda confused since it worked for everyone else...

bigdaddy04 01-17-2004 04:49 PM

installed this one:
https://vborg.vbsupport.ru/showpost....postcount=1180

works fine, but its on top of the page instead of the bottom :( in showthread.php

bigdaddy04 01-17-2004 05:15 PM

never mind, its all fine...

except i want the fields to be checkboxes, not hidden fields...how can i do that?

where is everyone??

Elyk X 01-17-2004 05:46 PM

Its not working at all for me..... im on 2.3.4 and its not working.... Ive done everything 3 times now and still nothing.

bigdaddy04 01-17-2004 06:02 PM

Here is my showthread_replybox template...everything works, except the signature, url parsing and email notification options..

Code:

<script language="javascript">
<!--
var postmaxchars = $postmaxchars;
function validate(theform) {
        if (theform.message.value=="") {
                alert("Please complete the message field.");
                return false; }
        if (postmaxchars != 0) {
                if (theform.message.value.length > $postmaxchars) {
                        alert("Your message is too long.\n\nReduce your message to $postmaxchars characters.\nIt is currently "+theform.message.value.length+" characters long.");
                        return false; }
                else { return true; }
        } else { return true; }
}
function checklength(theform) {
        if (postmaxchars != 0) { message = "\nThe maximum permitted length is $postmaxchars characters."; }
        else { message = ""; }
        alert("Your message is "+theform.message.value.length+" characters long."+message);
}
//-->
</script>

<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)">

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
        <td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Post Reply</b></normalfont></td>
</tr>
<tr>
        <td bgcolor="{secondaltcolor}">
                      <table cellpadding="0" cellspacing="0" border="0" align="center">
                <tr valign="top">
                  <td>
                    <textarea name="message" rows="7" cols="$textareacols" wrap="virtual" tabindex="1"></textarea>
                    <br><smallfont><a href="javascript:checklength(document.vbform);">[check
                    message length]</a></smallfont>                   
                  </td>
                  <td><smallfont><input type="hidden" name="s" value="$session[sessionhash]">
                    <input type="hidden" name="action" value="postreply">
                    <input type="hidden" name="threadid" value="$threadid">
                    <input type="hidden" name="title" value="">
                    <input type="hidden" name="iconid" value="0">
                    <input type="checkbox" name="parseurl" value="yes">
                    Parse URLs?<br>
                    <input type="checkbox" name="email" value="">
                    Email Notification?<br>
                    <input type="hidden" name="disablesmilies" value="">
                    <input type="hidden" name="closethread" value="">
                    <input type="hidden" name="hiddenreply" value="">
                    <input type="checkbox" name="signature" value="yes">
                    Signature?<br>
                    <input type="hidden" name="rating" value="0"></smallfont></td>
                </tr>
              </table>
        </td>
</tr>
</table>
</td></tr></table>

<br>

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
        <td align="center"><normalfont>
        <input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2">
        <input type="reset" class="bginput" name="reset" value="Reset Form" accesskey="r" tabindex="3">
        </normalfont></td>
</tr>
</table>

</form>


bigdaddy04 01-17-2004 06:03 PM

Quote:

Originally Posted by Elyk X
Its not working at all for me..... im on 2.3.4 and its not working.... Ive done everything 3 times now and still nothing.

use this one :)
https://vborg.vbsupport.ru/showpost....postcount=1180

Elyk X 01-17-2004 06:38 PM

Quote:

Originally Posted by bigdaddy04

I did do that one =\

thats the one thats not working

bigdaddy04 01-17-2004 06:56 PM

where is everyone!?

Elyk X 01-17-2004 08:10 PM

to busy working on vb3, but the only reason i installed vb2 again was cause it has hacks that vb3 doesnt have yet. like..the rpg hacks.

I had a quick reply working on my old 2.2.8 version....but for some reason this ones just being stupid.

Solid-Snake 01-17-2004 10:25 PM

I cant find this bit in my showthread.php. I can find the first line of it but not the rest, its different. It says to find this
Code:

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

if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") {
  $pagenumber=1;
}

Instead I have
Code:

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

        $bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
        $imgcodeon=iif($forum[allowimages],$ontext,$offtext);
        $htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
        $smilieson=iif($forum[allowsmilies],$ontext,$offtext);

        $post=$DB_site->query_first("
        SELECT
        post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
        attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
        ".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
        FROM post
        ".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
        LEFT JOIN user ON user.userid=post.userid
        LEFT JOIN userfield ON userfield.userid=user.userid
        ".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                              LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
        LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
        WHERE post.postid = '$postid'
        ");

        if (!$getperms['cangetattachment']) {
                $viewattachedimages=0;
        }

and I also have this in the same code
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'";
}

if ($bbuserinfo[cookieuser]) {
  set_bbarraycookie('threadview', $threadid, time());
}

Can someone tell me what to do I really want this its like a necessity.

I use 2.3.4 despite what it says to the left.

Elyk X 01-18-2004 01:27 AM

oh yeah...its a good thing the support over here is so good *rolls eyes*

Elyk X 01-18-2004 08:46 PM

Ok..nvm, i put in an old one for 2.2.6 that works....but its kinda funny that it works...and this one doenst.

kurv 01-20-2004 08:53 PM

I can not get this working either... any help would be appreciated :) I am running 2.3.4

I have checked and rechecked my settings and the install...

Deska 01-21-2004 02:07 AM

This hack work with v2.3.4!

MeTaL_oRgY 01-21-2004 02:20 AM

Ok, tried bigdaddy`s hack first and it didn?t work..... the box don?t appear....

can?t get the box to appear... I?m on 2.3.4, here are my files:

showthread.php
PHP Code:

<?php

error_reporting
(7);

$action $HTTP_GET_VARS['action'];
$goto $HTTP_GET_VARS['goto'];

if ( isset(
$goto) and ($goto=='lastpost' or $goto=='newpost')) {
  
$noheader=1;
}

// ############################################################################
// ############################# SHOW POST ####################################
// ############################################################################

if ($action=="showpost") {

    
$templatesused 'postbit_search,postbit_buddy,postbit_useremail,icq,aim,yahoo,postbit_homepage,postbit_profile,postbit_ip_show,postbit_ip_hidden,postbit,postbit_sendpm,postbit_avatar,postbit_offline,postbit_online,postbit_editedby,postbit_signature,postbit_attachment,postbit_attachmentimage,showpost';
    include(
'./global.php');

    if (isset(
$postid) and $postid!=and $postid!="") {
      
$postid verifyid("post",$postid);

      
$getthread=$DB_site->query_first("SELECT threadid FROM post WHERE postid='$postid'");
      
$threadid=$getthread[threadid];
    }

    
$threadid intval($threadid);
    
$thread verifyid("thread",$threadid,1,1);

    if (!
$thread['visible']) {
      
$idname="thread";
      eval(
"standarderror(\"".gettemplate("error_invalidid")."\");");
      exit;
    }

    
$forum=getforuminfo($thread['forumid']);

    
$getperms=getpermissions($thread['forumid'],-1,-1,$forum['parentlist']);
    if (!
$getperms['canview']) {
      
show_nopermission();
    }
if (!
$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
  
show_nopermission();
}

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 ((!isset(
$pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") {
  
$pagenumber=1;
}

    
$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
    
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
    
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
    
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

    
$post=$DB_site->query_first("
    SELECT
    post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,"
.iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
    attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
    "
.iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
    FROM post
    "
.iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
    LEFT JOIN user ON user.userid=post.userid
    LEFT JOIN userfield ON userfield.userid=user.userid
    "
.iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                           LEFT JOIN customavatar ON customavatar.userid=user.userid"
,"")."
    LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
    WHERE post.postid = '
$postid'
    "
);

    if (!
$getperms['cangetattachment']) {
        
$viewattachedimages=0;
    }

    
$postbits getpostbit($post);

    
updateuserforum($thread['forumid']);

    eval(
"dooutput(\"".gettemplate("showpost")."\");");
    exit;
}

// ##############################################################################
// ############################# SHOW THREAD ####################################
// ##############################################################################

$templatesused 'showthread_ratingdisplay,postbit_search,postbit_buddy,postbit_ignore,postbit_useremail,icq,aim,yahoo,postbit_homepage,postbit_profile,postbit_ip_show,postbit_ip_hidden,postbit,postbit_sendpm,postbit_avatar,postbit_offline,postbit_online,postbit_editedby,postbit_signature,postbit_attachment,postbit_attachmentimage,showthread_adminoptions,showthread_threadrate,showthread_pollresults_voted,showthread_pollresults_closed,showthread_pollresults_cantvote,showthread_firstunread,showthread_nextnewestthread,showthread_nextoldestthread,forumrules,showthread';
require(
'./global.php');

// words to highlight from the search engine
$replacewords = array();
if (!empty(
$highlight)) {
    
$highlight preg_quote(strtolower($highlight), '#');
    if (
$allowwildcards) {
        
$highlight str_replace('\*''[^\s]*'$highlight);
    }
    
$highlight str_replace('\<''<'$highlight);
    
$highlight str_replace('\>''>'$highlight);
    
$highlightwords explode(' '$highlight);
    while (list(
$key,$val) = each($highlightwords)) {
        if (
$val=='or' OR $val=='and' OR $val=='not') {
            continue;
        }
        
$replacewords["$key"] = htmlspecialchars($val);
    }
}

// oldest first or newest first
if ($postorder==0) {
  
$postorder="";
} else {
  
$postorder="DESC";
}

// goto last post
if ($goto=="lastpost") {
  if (isset(
$threadid) and $threadid!=0) {
    
$threadid verifyid("thread",$threadid);

    if (
$getlastpost=$DB_site->query_first("SELECT postid,post.dateline FROM post,thread WHERE post.threadid=thread.threadid AND thread.threadid='$threadid' AND post.visible=1 AND thread.visible=1 ORDER BY post.dateline DESC LIMIT 1")) {
      
header("Location: showthread.php?s=$session[sessionhash]&postid=$getlastpost[postid]iif(!empty($highlight), "&highlight=$highlight""") . "#post$getlastpost[postid]");
      exit;
    }
  }
  if (isset(
$forumid) and $forumid!=0) {
    
$foruminfo=verifyid("forum",$forumid,1,1);
    
$forumid=$foruminfo['forumid'];

        
$forumslist "";
        
$getchildforums=$DB_site->query("SELECT forumid,parentlist FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',$forumid,')>0");
        while (
$getchildforum=$DB_site->fetch_array($getchildforums)) {
            if (
$getchildforum[forumid]==$forumid) {
                
$parentlist=$getchildforum[parentlist];
            }
            
$forumslist.=",$getchildforum[forumid]";
        }

    
$thread=$DB_site->query_first("SELECT threadid FROM thread WHERE forumid IN (0$forumslist) AND visible=1 AND (sticky=1 OR sticky=0) AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");

    if (
$getlastpost=$DB_site->query_first("SELECT postid FROM post WHERE threadid='$thread[threadid]' AND visible=1 ORDER BY postid DESC LIMIT 1")) {
      
header("Location: showthread.php?s=$session[sessionhash]&postid=$getlastpost[postid]iif(!empty($highlight), "&highlight=$highlight""") . "#post$getlastpost[postid]");
      exit;
    }
  }
}

// goto newest post
if ($goto=="newpost") {
  
$threadid verifyid("thread",$threadid);

    if ((
$tview get_bbarraycookie('threadview'$threadid)) > $bbuserinfo['lastvisit']) {
    
$bbuserinfo['lastvisit'] = $tview;
  }

  if (
$posts=$DB_site->query_first("SELECT postid,dateline FROM post WHERE post.threadid=$threadid AND post.visible=1 AND post.dateline>'$bbuserinfo[lastvisit]' ORDER BY dateline LIMIT 1")) {
    
header("Location: showthread.php?s=$session[sessionhash]&postid=$posts[postid]iif(!empty($highlight), "&highlight=$highlight""") . "#post$posts[postid]");
    exit;
  } else {
    
header("Location: showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=lastpost" iif(!empty($highlight), "&highlight=$highlight"""));
    exit;
  }
}

if (
$goto=="nextnewest") {
  
$thread verifyid("thread",$threadid,1,1);
  if (
$getnextnewest=$DB_site->query_first("SELECT threadid
            FROM thread
            WHERE forumid='
$thread[forumid]'
              AND lastpost>'
$thread[lastpost]'
              AND visible=1
              AND open<>10
            ORDER BY lastpost LIMIT 1"
)) {
    
$threadid=$getnextnewest[threadid];
    unset (
$thread);
  } else {
    eval(
"standarderror(\"".gettemplate("error_nonextnewest")."\");");
  }
}

if (
$goto=="nextoldest") {
  
$thread verifyid("thread",$threadid,1,1);
    if (
$getnextoldest=$DB_site->query_first("SELECT threadid
            FROM thread
            WHERE forumid='
$thread[forumid]'
                AND lastpost<'
$thread[lastpost]'
                AND visible=1
                AND open<>10
            ORDER BY lastpost DESC LIMIT 1"
)) {
        
$threadid=$getnextoldest[threadid];
        unset(
$thread);
    } else {
    eval(
"standarderror(\"".gettemplate("error_nonextoldest")."\");");
    }
}

$umaxposts explode(','$usermaxposts ",$maxposts");
$newmaxposts max($umaxposts);

if (isset(
$postid) and $postid!=and $postid!="") {
  
$postid verifyid("post",$postid);

  
$getthread=$DB_site->query_first("SELECT threadid FROM post WHERE postid='$postid'");
  
$threadid=$getthread[threadid];

  if (!
$postorder) {
    
$getpagenum=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE threadid='$threadid' AND postid<='$postid'");
  } else {
    
$getpagenum=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE threadid='$threadid' AND postid>='$postid'");
  }
  if (
$bbuserinfo['maxposts']!=-and $bbuserinfo['maxposts']!=and $bbuserinfo['maxposts'] <= $newmaxposts)    {
      
sanitize_pageresults($getpagenum[posts], $pagenumber$perpage$newmaxposts$bbuserinfo['maxposts']);
  } else {
       
sanitize_pageresults($getpagenum[posts], $pagenumber$perpage$newmaxposts$maxposts);
  }
  
$pagenumber ceil($getpagenum['posts']/$perpage);
}

$threadid intval($threadid);
$thread verifyid("thread",$threadid,1,1);

if (
$wordwrap!=0) {
  
$thread['title']=dowordwrap($thread['title']);
}

if (!
$thread['visible']) {
  
$idname="thread";
  eval(
"standarderror(\"".gettemplate("error_invalidid")."\");");
  exit;
}

if (
$thread['open'] == 10) {
   
// send them to their correct thread
    
header("Location: showthread.php?s=$session[sessionhash]&threadid=$thread[pollid]");
    exit;
}

$forum=getforuminfo($thread['forumid']);

$getperms=getpermissions($thread['forumid'],-1,-1,$forum['parentlist']);
if (!
$getperms['canview']) {
  
show_nopermission();
}
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'";
}

if (
$bbuserinfo[cookieuser]) {
  
set_bbarraycookie('threadview'$threadidtime());
}

// display ratings if enabled
$ratingdisplay '';
if (
$forum['allowratings']==1) {
    if (
$thread['votenum'] > 0) {
        
$thread['voteavg'] = sprintf('%.2f', ($thread['votetotal'] / $thread['votenum']));
        
$thread['rating'] = intval(round($thread['voteavg']));
    }
    if (
$thread['votenum']>=$showvotes) {
        eval(
"\$ratingdisplay = \"".gettemplate('showthread_ratingdisplay')."\";");
    }
}

// draw nav bar
$navbar=makenavbar($threadid,"thread",0);

$curforumid $thread['forumid'];

makeforumjump();

if (
$thread[pollid]) {
  
$pollid=$thread[pollid];
  
$pollinfo=$DB_site->query_first("SELECT * FROM poll WHERE pollid='$pollid'");

  
$pollinfo[question]=bbcodeparse($pollinfo[question],$forum[forumid],1);

  
$splitoptions=explode("|||"$pollinfo[options]);
  
$splitvotes=explode("|||",$pollinfo[votes]);

  
$showresults 0;
  
$uservoted 0;
  
$cantvote 0;

  if (!
$pollinfo['active'] OR !$thread['open'] or ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < time() AND $pollinfo['timeout'] != 0)){
    
//thread/poll is closed, ie show results no matter what
    
$showresults 1;
  } else if (!
$getperms['canvote']) {
      
$cantvote true;
  } else {
    
//get userid, check if user already voted
    
if (get_bbarraycookie('pollvoted'$pollid) or ($bbuserinfo['userid'] and $uservote=$DB_site->query_first("SELECT pollvoteid FROM pollvote WHERE userid='$bbuserinfo[userid]' AND pollid=$pollid"))) {
      
$uservoted 1;
    }
  }

  
$counter=0;
  while (
$counter++ < $pollinfo[numberoptions]) {
    
$pollinfo[numbervotes] += $splitvotes[$counter-1];
  }

  
$counter=0;
  
$pollbits="";
  
$option = array();

  while (
$counter++<$pollinfo[numberoptions]) {
    
$option[question] = bbcodeparse($splitoptions[$counter-1],$forum[forumid],1);
    
$option[votes] = $splitvotes[$counter-1];  //get the vote count for the option
    
$option[number] = $counter;  //number of the option

    //Now we check if the user has voted or not
    
if ($showresults OR $uservoted OR $cantvote) { // user did vote or poll is closed

      
if ($option[votes] == 0){
        
$option[percent] = 0;
      } else{
        
$option[percent] = number_format($option[votes]/$pollinfo[numbervotes]*100,2);
      }

      
$option[graphicnumber]=$option[number]%1;
      
$option[barnumber] = round($option[percent])*2;
      if (
$showresults) {
        eval(
"\$pollstatus = \"".gettemplate("showthread_pollresults_closed")."\";");
      } elseif (
$cantvote) {
          eval(
"\$pollstatus = \"".gettemplate("showthread_pollresults_cantvote")."\";");
      } elseif (
$uservoted) {
        eval(
"\$pollstatus = \"".gettemplate("showthread_pollresults_voted")."\";");
      } else {
        
$pollstatus ''// just in case
      
}
      eval(
"\$pollbits .= \"".gettemplate("pollresult")."\";");
    } else {
      if (
$pollinfo['multiple']) {
            eval(
"\$pollbits .= \"".gettemplate("polloption_multiple")."\";");
        } else {
            eval(
"\$pollbits .= \"".gettemplate("polloption")."\";");
        }
     }
  }

  if (
$pollinfo['multiple']) {
       
$pollinfo['numbervotes'] = $pollinfo['voters'];
    }

  if (
$showresults OR $uservoted OR $cantvote) {
    eval(
"\$poll = \"".gettemplate("showthread_pollresults")."\";");
  } else {
    eval(
"\$poll = \"".gettemplate("showthread_polloptions")."\";");
  }
} else {
  
$poll="";
}

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$counter=0;

// can do it this way or use a strstr() for each post but I feel this will be quicker overall
unset($ignore);
$ignorelist explode(' '$bbuserinfo['ignorelist']);
while ( list(
$key$val)=each($ignorelist) ) {
  
$ignore[$val] = 1;
}

$postscount=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE post.threadid='$threadid' AND post.visible=1");
$totalposts=$postscount[posts];

if (
$bbuserinfo['maxposts']!=-and $bbuserinfo['maxposts']!=and $bbuserinfo['maxposts'] <= $newmaxposts)    {
   
sanitize_pageresults($totalposts$pagenumber$perpage$newmaxposts$bbuserinfo['maxposts']);
} else {
   
sanitize_pageresults($totalposts$pagenumber$perpage$newmaxposts$maxposts);
}

$limitlower=($pagenumber-1)*$perpage+1;
$limitupper=($pagenumber)*$perpage;

$getpostids=$DB_site->query("
    SELECT post.postid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage
"
);

if (
$limitupper>$totalposts) {
  
$limitupper=$totalposts;
  if (
$limitlower>$totalposts) {
    
$limitlower=$totalposts-$perpage;
  }
}
if (
$limitlower<=0) {
  
$limitlower=1;
}
$postids="post.postid IN (0";
while (
$post=$DB_site->fetch_array($getpostids)) {
  
$postids.=",".$post['postid'];
}

$postids.=")";


$posts=$DB_site->query("
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,"
.iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
"
.iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
"
.iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
"
.iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                       LEFT JOIN customavatar ON customavatar.userid=user.userid"
,"")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE 
$postids
ORDER BY dateline 
$postorder
"
);


if (!
$getperms['cangetattachment']) {
    
$viewattachedimages=0;
}

$postbits '';
$counter=0;
$postdone = array();
$sigcache = array();
while (
$post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }
  
$postbits .= getpostbit($post);
}

$pagenav getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&amp;threadid=$threadid&amp;perpage=$perpage".iif(isset($highlight), "&amp;highlight=$highlight"""));

$DB_site->free_result($posts);
unset(
$post);
unset(
$sigcache); //don't need the signature cache anymore

if ($thread[open]) {
  
$replyclose="{replyimage}";
} else {
  
$replyclose="{closedthreadimage}";
}

if (
$thread[lastpost]>$bbuserinfo[lastvisit]) {
  
// do blue arrow link

  
if ($firstnew) {
        
$newpostlink="#newpost";
  } else {
        
$newpostlink="showthread.php?s=$session[sessionhash]&amp;threadid=$threadid&amp;goto=newpost";
  }

  eval(
"\$firstunread = \"".gettemplate("showthread_firstunread")."\";");

} else {
  
$firstunread="";
}
if (
$forum[allowratings]) {
  eval(
"\$threadrateselect = \"".gettemplate("showthread_threadrate")."\";");
} else {
  
$threadrateselect "&nbsp;";
}

if (
ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
  eval(
"\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
  
$adminoptions "&nbsp;";
}
getforumrules($forum,$getperms);

updateuserforum($thread['forumid']);

eval(
"dooutput(\"".gettemplate("showthread")."\");");

?>

showthread template
HTML Code:

<!-- first unread and next/prev -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
        <td><smallfont>$pagenav $firstunread&nbsp;</smallfont></td>
        <td align="right"><smallfont>
        <img src="{imagesfolder}/prev.gif" alt="" border="0">
        <a href="showthread.php?s=$session[sessionhash]&amp;threadid=$threadid&amp;goto=nextoldest">Last Thread</a>
        &nbsp;
        <a href="showthread.php?s=$session[sessionhash]&amp;threadid=$threadid&amp;goto=nextnewest">Next Thread</a>
        <img src="{imagesfolder}/next.gif" alt="" border="0">
        </smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->
$replybox

I?ve tried on the showthread template to move the $replybox after </table> and before <!--first unread and next/prev> tags... but stilll it don?t show up... What am I doing wrong??? :ermm:

sticky 01-21-2004 04:01 AM

I can't get this to work on 2.3.4 either :( My members are pissed there is no quick reply and I can't seem to find one that works on this version.

MeTaL_oRgY 01-21-2004 04:15 AM

lol, I have no members so I can wait lol.... I have to install all the hacks and then design them... so I have around a month and a half :)... hope someone creates a quick reply hack soon XD

Prince 01-21-2004 02:27 PM

not sure what you all are talking about...I have this installed and working perfectly on vB 2.3.4

:confused:

Marcellus 01-22-2004 12:18 AM

If it's not working for you in 2.3.4, it is very likely you missed one important thing in the instuctions when editing the showthread.php file. There are TWO instances of the code you are supposed to replace. I overlooked this one minor detail at first and the box didn't show up. As soon as I replaced both instances, everything worked fine.

Elyk X 01-22-2004 12:46 AM

tell me where it says to change it twice in the install file and ill kiss your butt. All it says is to find that code. It never mentions it beign there again.

MeTaL_oRgY 01-22-2004 12:50 AM

lol... I don´t know what I do wrong the first time... I didn´t found two instances... I don´t know.. the only thing I know is that now I can use Quick Reply... THNX!!!

Fargo 01-22-2004 11:37 AM

3rd hack, 1st headache & 1st post! After reading 90 pages (twice!!) I finally got it working.

How I did it? By using someone elses posted showthread.php :(

Personal opinion:
Every forum should have a quick reply box - they rock, theyre a time saver if you post a lot & they save some bandwidth, however I think the instructions need to be looked over again - or at least supply a version that deals with the code of the newer versions.

Either way, great hack and I thank you and the others here who submitted their additional features for this hack. Well done.

johnkruk 01-22-2004 12:59 PM

I just installed this hack and only added it once in showthread.php. Its my own fault. It reads right in the text file

Quote:

1. In showthread.php find this bit of code both times!:
Working like a charm now!

Kerr 01-22-2004 03:40 PM

Can someone help me. My users are griping that my quick reply box is above all the posts. It is above them not like this box which is below, and they want it changed. I am not stupid but not good yet...so can someone please tell me how to get the damn thing below my posts and not the first box you see on the thread?

BTW the instructions are right...there are two instances of that code in showthread.php and it says both times....just like johnkruk said.

I just need to know how to change its location. Oh my version is 2.3.4. Waiting for a very stable 3 to come out.

I FIXED IT. sorry

Marcellus 01-22-2004 07:00 PM

Quote:

Originally Posted by Elyk X
tell me where it says to change it twice in the install file and ill kiss your butt. All it says is to find that code. It never mentions it beign there again.

Start kissing. If you read the previous posts and are in fact using the 2.3.2 version like you are supposed to, the then instuctions specificaly state to replace BOTH instances. Direct copy/past from the file:

Quote:

// ##################################################
// ################ Quick Reply Box #################
// ########### Hack version 1.0 (01.29.02) ##########
// ############## for vBulletin v2.3.2 ##############
// ##################################################
// ########### by Chen 'FireFly' Avinadav ###########
// ########## (chen.avinadav@vbulletin.com) #########
// ########## Updated by Chris #########
// ########## www.runaked.com #########
// ##################################################

1. In showthread.php find this bit of code both times!:
// ##################################################
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}
// ##################################################
And replace it with the following:
// ##################################################
if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}

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

borg69 01-23-2004 10:29 PM

Quote:

Originally Posted by Kerr
Can someone help me. My users are griping that my quick reply box is above all the posts. It is above them not like this box which is below, and they want it changed. I am not stupid but not good yet...so can someone please tell me how to get the damn thing below my posts and not the first box you see on the thread?

BTW the instructions are right...there are two instances of that code in showthread.php and it says both times....just like johnkruk said.

I just need to know how to change its location. Oh my version is 2.3.4. Waiting for a very stable 3 to come out.

I FIXED IT. sorry

Can you tell me how you fixed it mate?

Mine is still stuck at the top!! :ermm:

Cheers

Prince 01-23-2004 10:46 PM

Quote:

Originally Posted by borg69
Can you tell me how you fixed it mate?

Mine is still stuck at the top!! :ermm:

Cheers


go into your showthread template and find where you put $replybox

and move it down below this code:

</tr>
</table>
<!-- first unread and next/prev -->


that is what controls where the reply box shows in the thread.

armani1072 01-24-2004 06:34 AM

any reason why i cannot get it to work for vb 2.3.4???? please help.

MeTaL_oRgY 01-24-2004 11:17 AM

lol, I don´t know dude.... you should search for that line two times..... or so... dunno...

Prince 01-24-2004 03:43 PM

Quote:

Originally Posted by armani1072
any reason why i cannot get it to work for vb 2.3.4???? please help.

ummm...because you can't follow directions?

borg69 01-25-2004 10:24 PM

onece i moved the $replybox down to the next part it worked fine!!

Cheers prince!!

This was one of the easiest to install by far.

Chris|vB 01-28-2004 01:20 AM

Nice work.

Riot-Boards 02-01-2004 07:32 PM

Hey, I was wondering why its not working on vB version 2.3.4. I attempted to look through all 91 pages, but after 10... I just strayed... Im sorry if you have to repeat urself again, but I really need some help. If you can tell me why it wont should up for version 2.3.4, that would really help me out, a lot!

Thanks!

Prince 02-01-2004 11:36 PM

Quote:

Originally Posted by Riot-Boards
Hey, I was wondering why its not working on vB version 2.3.4. I attempted to look through all 91 pages, but after 10... I just strayed... Im sorry if you have to repeat urself again, but I really need some help. If you can tell me why it wont should up for version 2.3.4, that would really help me out, a lot!

Thanks!

you obviously did not read this thread very well because as I have already said IT WORKS IN 2.3.4!

jaliam 02-02-2004 03:36 AM

Quote:

Originally Posted by Riot-Boards
Hey, I was wondering why its not working on vB version 2.3.4. I attempted to look through all 91 pages, but after 10... I just strayed... Im sorry if you have to repeat urself again, but I really need some help. If you can tell me why it wont should up for version 2.3.4, that would really help me out, a lot!

Thanks!

Here you go, Riot-Boards! This is the possible fix to your problem with the Quick Reply Box.

https://vborg.vbsupport.ru/showpost....postcount=1345

markblair 02-02-2004 04:19 AM

When I clicked on the .txt file in the first post by Chen, it opens up blank. Does anyone have a copy of this hack or know why it is empty? I'm going to try again but so far, I can't get it... :(

markblair 02-02-2004 04:31 AM

Oh' Lord, please disregard the above post. I figured out how to right-click and "save as" to get the file. Probably something quirky with my browser or something that was mentioned back on page 2...

MrSleepy 02-06-2004 01:07 PM

nice one!

frizor 02-10-2004 05:14 PM

i have version 2.3.3 and the quick reply hack doesn't work. it just doesn't show up.....any help?

Emmy2 02-13-2004 08:51 PM

I have installed this hack on my vB2.3.4 board and it works beautifully.

I would like to make one small tweak to it but am having problems. I would like for the title of the post to be automatically filled in as "Re: whatever the original thread title is" whenever someone uses the box.

I managed to do this with the REGULAR reply box by inserting

name="title" value="Re: $threadinfo[title]"

into the input field for the reply box. This doesn't seem to work with the quick reply as just Re: [blank] appears when I post.

Any ideas what I would put in there instead? (the title field can be hidden or displayed so the user can change it...either way would be fine)


All times are GMT. The time now is 01:24 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.03066 seconds
  • Memory Usage 2,117KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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