Results 1 to 3 of 3
  1. #1
    EmuTalk Member DSF's Avatar
    Join Date
    Nov 2001
    Posts
    66

    Talking forum hack - fast reply

    Hey Martin i found an good hack.
    It's easy to implement it and it's very useless. Try out !

    ==============
    // ######################################## ##########
    // ################ Quick Reply Box #################
    // ########### Hack version 1.0 (01.29.02) ##########
    // ############## for vBulletin v2.2.2 ##############
    // ######################################## ##########
    // ########### by Chen 'FireFly' Avinadav ###########
    // ########## (chen.avinadav@vbulletin.com) #########
    // ######################################## ##########

    1. In showthread.php find this bit of code:
    // ######################################## ##########
    if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
    show_nopermission();
    }

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

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

    2. Create a new template, with the name "showthread_replybox":
    // ######################################## ##########
    <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)">
    <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="hidden" name="parseurl" value="yes">
    <input type="hidden" name="email" value="">
    <input type="hidden" name="disablesmilies" value="">
    <input type="hidden" name="closethread" value="">
    <input type="hidden" name="hiddenreply" value="">
    <input type="hidden" name="signature" value="yes">
    <input type="hidden" name="rating" value="0">

    <table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="100%" align="center"><tr><td>
    <table cellpadding="4" cellspacing="1" border="0" width="100%">
    <tr>
    <td bgcolor="#336699" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Post Reply</b></normalfont></td>
    </tr>
    <tr>
    <td bgcolor="#eeeeee" valign="top" nowrap><normalfont><b>Your Reply:</b></normalfont></td>
    <td bgcolor="#eeeeee">
    <table cellpadding="0" cellspacing="0" border="0">
    <tr valign="top">
    <td><textarea name="message" rows="7" cols="$textareacols" wrap="virtual" tabindex="1"></textarea><br>
    <smallfont><a href="javascript:checklength(document.vb form);">[check message length]</a></smallfont></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td></tr></table>

    <br>

    <table cellpadding="2" cellspacing="0" border="0" width="100%" 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>
    // ######################################## ##########

    3. In the "showthread" template add $replybox right after the following:
    // ######################################## ##########
    <!-- first unread and next/prev -->
    <table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
    <tr>
    <td><smallfont>$pagenav&nbsp;</smallfont></td>
    <td align="right"><smallfont>
    <img src="http://www.vbulletin.org/forum/images/prev.gif" alt="" border="0">
    <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextoldest">Las t Thread</a>
    &nbsp;
    <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextnewest">Nex t Thread</a>
    <img src="http://www.vbulletin.org/forum/images/next.gif" alt="" border="0">
    </smallfont></td>
    </tr>
    </table>
    <!-- first unread and next/prev -->
    // ######################################## ##########

    You're all done, now upload showthread.php back to your server and enjoy this hack. :-)



    Chen
    =============

    End of file


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    omg h4x CpU MasteR's Avatar
    Join Date
    Nov 2001
    Location
    Yuma Arizona, USA
    Posts
    1,507
    What the hell is that?

  3. #3
    I Am The Stig Martin's Avatar
    Join Date
    Nov 2001
    Location
    Malmö
    Posts
    3,814
    DSF: Yeah, I've seen a lot of vBulletin board using that hack, and I might add it. Will think about it. Thanks


    The Emulation64 Network offers you free hosting!
    Click here for requirements and contact info.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •