vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [Release] - Mist's Hackless Quick Reply (https://vborg.vbsupport.ru/showthread.php?t=56834)

RAGE-UAE 04-11-2003 02:14 PM

Sweetness!! this thing roX

MentaL 04-11-2003 03:43 PM

i dont like it o_O..

Dean C 04-11-2003 04:09 PM

Hehe why not ;)? and thanks ;)

neocorteqz 04-16-2003 04:31 AM

small question, i asked this in the other thread.. Can this be made to be forum Specific? I only want specific Forums on the Board to be able to utilize this. I have a Spam forum so I can keep the Spam outta the other forums. I just want to utilize it in that forum, and maybe one or two others. Thanks.:)

This is a good mod IMO.:) and saves the file hacking, and possible pains of rehacking them if you make a mistake. Which I constantly do:D

Dean C 04-16-2003 10:10 AM

^^ This can be done either with the logician's dynamic templates hack or by hacking :)

- miSt

MentaL 04-16-2003 11:58 AM

Quote:

04-11-03 at 05:09 PM Mist said this in Post #63
Hehe why not ;)? and thanks ;)

if u ask me.. it should inc an option in control panel to have it turned on or off :)

just my idea...

Dean C 04-16-2003 03:27 PM

Yes but that requires hacking my friend - and this is a template modification ;)

- miSt

MentaL 04-16-2003 04:13 PM

anyone can modify a template :) a hack requires skill.. skill which i dont posses.. but im sure someone will make it since ive said it :)

Dean C 04-16-2003 04:59 PM

Yes but like i said - for that you should go to the hacked version of the quick reply thread :)

Brad 04-22-2003 11:19 PM

Quote:

04-16-03 at 12:31 AM User_001 said this in Post #64
small question, i asked this in the other thread.. Can this be made to be forum Specific? I only want specific Forums on the Board to be able to utilize this. I have a Spam forum so I can keep the Spam outta the other forums. I just want to utilize it in that forum, and maybe one or two others. Thanks.:)

This is a good mod IMO.:) and saves the file hacking, and possible pains of rehacking them if you make a mistake. Which I constantly do:D

This sould work.

Stick this in the phpinclude: (edit the forumids part)

PHP Code:

if (strpos($_SERVER['PHP_SELF'], 'showthread.php') != false)
{
$textareacols gettextareawidth();
$forumids "1"// forum ids quick reply will show in, seprate with comma's
if ($forumids==$forumid) {
eval(
"\$quickreply = \"".gettemplate("mist_quickreply")."\";");
} else { 
$quickreply "";
}


In the showthread template find:

Code:

<!-- 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="https://vborg.vbsupport.ru/images/prev.gif" alt="" border="0">
        <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextoldest">Last Thread</a>
        &nbsp;
        <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextnewest">Next Thread</a>
        <img src="https://vborg.vbsupport.ru/images/next.gif" alt="" border="0">
        </smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->

Below that add:

Code:

$quickreply
Make a new template named mist_quickreply and populate it with:

Code:

<! -- hackless quick reply -->

<br />
<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>


<table width="{contenttablewidth}" cellpadding="4" cellspacing="0" border="1" style="border-collapse: collapse" bordercolor="{tablebordercolor}" {tableinvisibleextra} align="center" >
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2">
<normalfont color="{tableheadtextcolor}"><b>Post Reply:</b></normalfont>
</td>
</tr>


<tr valign="top">
<td width="20%" bgcolor="{firstaltcolor}">
<normalfont color="{pagetextcolor}"><b>Your Reply:</b></normalfont>
</td>
<td bgcolor="{firstaltcolor}" width="80%">

<form enctype="multipart/form-data" action="newreply.php" name="quickreply" 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">
<textarea name="message" rows="7" cols="$textareacols" wrap="virtual" tabindex="1"></textarea>

<br />
<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">
<br />
<smallfont><a href="javascript:checklength(document.quickreply);">[check message length]</a></smallfont>
</form>


</td>

</tr>

</table>
<! -- /hackless quick reply -->

Note: This will add one query to forums that use quick reply (on showthread.php), this is because i put it in a template. You can avoid the query by hacking showthread.php or hard coding the template into phpinclude (something i dident want to do because of overhead). if you want to hack:

open showthread.php

Find:

Code:

showthread
Replace with:

Code:

showthread,mist_quickreply


All times are GMT. The time now is 02:12 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.04179 seconds
  • Memory Usage 1,769KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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