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)

snyx 01-30-2002 03:15 AM

this is awesome man, I saw the hack awhile from someone else back but it wasnt complete, or somthing.... oh well, looks great, I plan to install it asap.

larryz 01-30-2002 08:58 AM

If you want the Quicky Reply Box to not appear when the thread is closed, you can simply wrap an if statement around it.

ORIGINAL:

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='';
} else {
        $textareacols = gettextareawidth();
        eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}


New:

Code:

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


SWFans.net 01-30-2002 09:46 AM

Worked great larryz. Thanks. :)

MikeWarner 01-30-2002 09:52 AM

nice - I'll install this later! :)

TurboFC3S 01-30-2002 12:45 PM

Great hack, and so easy! Works perfect for me ...

Admin 01-30-2002 12:51 PM

Updated the text file with new code to hide the box from non-mods in closed threads.
Add this:
Code:

if (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
        $replybox='';
} else

right after this:
Code:

        $replybox='';
} else


TurboFC3S 01-30-2002 01:05 PM

In your template, you have

<input type="hidden" name="signature" value="yes">

Listed twice. I think you should have signatures tured off by default also ...

Admin 01-30-2002 01:21 PM

Fixed... if you want to have sigs turned of just delete that hidden field.

Gutspiller 01-30-2002 02:20 PM

Quote:

Originally posted by Psychdrone
hmmmm this is pretty neat indeed!

Yet are there any other people out there with me, that think this will increase spam, as how easy it is to reply?

thats probaly why I wouldn't install it, but none the less great hack chen!

I already noticed this on my board. You may want to increase the time between posts that's allowed. I had mine to 10 seconds, but I am setting it to 15 as we speak. (sorta an active board) ;)

ladyfyre 01-30-2002 03:08 PM

Just FYI:

This is a GREAT hack...and I am sure my members are going to love it. Only one complaint: In your instructions for the template creation, it would REALLY be great if you could set the templates to use the replacement values...the blues you used looked REALLY funky on my forums until I went in and reset them...and it would be nice to know that the table bg colors would change if/when the site templates are changed.

But again: Good job!

Admin 01-30-2002 03:14 PM

Oops, my bad, it got replaced somehow after I updated the file - fixed now! :)

ladyfyre 01-30-2002 03:24 PM

no problem :) Just thought I would let ya know :)

Gutspiller 01-30-2002 03:37 PM

Quote:

Originally posted by FireFly
Oops, my bad, it got replaced somehow after I updated the file - fixed now! :)
Now make me a quote button. :D

Come on, it would be nice, just the same as the VB code button does, but instead of it looking like a button, it would be good as just a text link. Then when people click it, it brings up a field thing just like the VB code button does and then you paste whoever you are quoting in there.

If you are such a great hacker you will do this little thing. ;) heheh

Kumaro 01-30-2002 08:07 PM

excellent hack! installed it, works great!

Freddie Bingham 01-30-2002 08:40 PM

Interesting idea. hmm vb3, ok. It won't be a user option though, only an admin option to enable/disable.

cyrus 02-01-2002 08:37 AM

how can I make it so that alllllll active members can view it ?

cheerz chen ... lovely hack

Admin 02-01-2002 11:43 AM

For cyrus:
Replace:
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')."\";");
}

with:
Code:

$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");


cyrus 02-01-2002 03:17 PM

thanks FF

Jawelin 02-01-2002 04:16 PM

Quote:

Originally posted by cyrus
how can I make it so that alllllll active members can view it ?

cheerz chen ... lovely hack

Sorry. What do you mean with 'active' ? :noid:
I saw FF correction and seems with many many less checks before displaying the box...
:stupid:
Thnx

Gutspiller 02-01-2002 05:19 PM

Quote:

Originally posted by Gutspiller


Now make me a quote button. :D

Come on, it would be nice, just the same as the VB code button does, but instead of it looking like a button, it would be good as just a text link. Then when people click it, it brings up a field thing just like the VB code button does and then you paste whoever you are quoting in there.

If you are such a great hacker you will do this little thing. ;) heheh

Please firefly. :( Just two text buttons, it will take you like 4 minutes or less. :D

gimmie gimmie gimmie. :?:

eva2000 02-02-2002 09:21 AM

Quote:

Originally posted by FireFly
Here's an easy one, it barely took 4 minutes to do. :china:
This hack will add a quick replying box at the bottom of all threads, only if the user has permission to reply, so when you need to reply to something real quickly you don't need to click the Post Reply button and wait for the page to load.

Instructions are in the attached .txt file, and if you want a demo... just look below. :D

i go away for a couple of days and look what happens! Firefly yet again comes up with an awesome hack :)

r.cakir 02-02-2002 10:10 AM

test

Erwin 02-02-2002 10:15 AM

Love it love it love it.... :)

Craig Antill 02-02-2002 10:30 AM

Any way that I can allow users to subscribe to the topic with the quick reply ? Ideally by way of a hidden field which simply subscribes the user if they have set their options to subscribe by default...?

Great hack BTW! :)

life is boost 02-03-2002 05:48 AM

I installed this on my board and i followed the insturctions exaclty but it does not work? im on version 2.2.1

Palmer ofShinra 02-03-2002 07:44 AM

Definately going to try this out... maybe fiddle with it some too...

Jawelin 02-03-2002 10:31 AM

Just a trick: I think the QuickReplyBox should appear only below the lastest post in thread, don't you agree ?

I mean, when there are multi-page threads, the reply box should be hidden until the last page.

What do you think about ?
Thnx

KuraFire 02-03-2002 12:26 PM

Great hack, gonna install right away! :)

JTMON 02-03-2002 01:08 PM

Quote:

Originally posted by Jawelin
Just a trick: I think the QuickReplyBox should appear only below the lastest post in thread, don't you agree ?

I mean, when there are multi-page threads, the reply box should be hidden until the last page.

What do you think about ?
Thnx

I don't see why as you could click the reply button before the last page.

Admin 02-03-2002 01:17 PM

Agree with JTMON. :)

Danny 02-03-2002 04:44 PM

FireFly m8, done what you said and it doesn't seem to work did you test it first ?

using vb 2.2.2

Danny 02-03-2002 04:52 PM

FireFly m8, done what you said and it doesn't seem to work did you test it first ?

using vb 2.2.2

Admin 02-03-2002 05:05 PM

It worked for JTMON, right?

Danny 02-03-2002 05:07 PM

Sorry it works fine i forgot to upload the showthread file sorry m8 :(

JTMON 02-03-2002 05:08 PM

umm, didn't do it yet, I will try it now:D I am running 2.2.1 though

JTMON 02-03-2002 05:26 PM

Hmm, the smilie part isn't working for some reason, where do I put those two lines of script in the showthread_replybox? Do they go after the <form blah blah blah> or after the closing </form> tag?

Danny 02-03-2002 05:30 PM

i put mine after the <form>

JTMON 02-03-2002 05:48 PM

Ok, somethings up here. I just replied to this thread twice using the quick reply and it's not showing in the thread at all. This time I am trying the normal reply.

Where is there a plain <form> tag? I see the <form enctype etc> and </form> tags and that's it.

Danny 02-03-2002 07:14 PM

Here is my code JTMON hope this helps.

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)">
<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">
<script language="Javascript" src="vbcode.js"></script>
<script language="Javascript" src="vbcode_language.js"></script>
<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}" valign="top" nowrap><normalfont><b>Your Reply:</b></normalfont>$clickysmilies</td>
        <td bgcolor="{secondaltcolor}">
                <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.vbform);">[check message length]</a></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>


JTMON 02-03-2002 07:21 PM

Didn't work-time to recheck showthread. Mods-again I replied using the quick reply and it did not post!


All times are GMT. The time now is 08:22 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.02531 seconds
  • Memory Usage 1,837KB
  • 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
  • (7)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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