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)

2600 07-19-2002 01:32 PM

Never mind all sorted now and ive marked as installed! Great hack thanks!

2600

Darth Cow 07-22-2002 07:06 PM

I've got a modification that I wrote for my forums that allows users to turn the quick reply box on/off in their profile. If anyone's interesting, let me know, because otherwise I won't bother :).

James Cridland 07-22-2002 07:21 PM

I'm very interesting, and also very interested in this hack.

(Actually, I'm quite boring.)

Boofo 07-22-2002 08:54 PM

I want to be mature about this so...gimme, gimme, gimme, pweez! :)

Quote:

Originally posted by Darth Cow
I've got a modification that I wrote for my forums that allows users to turn the quick reply box on/off in their profile. If anyone's interesting, let me know, because otherwise I won't bother :).

Darth Cow 07-22-2002 10:22 PM

Since I already have two requests...

First, run this database query:

Code:

ALTER TABLE user ADD showquickreply tinyint(1) DEFAULT '1' not null AFTER nosessionhash
EDIT: Corrected it to "AFTER nosessionhash" (I forgot I was basing the location after another hack I installed :p)

That will set the default to show the quick reply - changing "DEFAULT '1'" to "DEFAULT '0'" should set the default to no display.

Make a new template "modifyoptions_showquickreply" with the following contents:

Code:

<tr>
        <td bgcolor="#13486D"><normalfont><b>Show Quick Reply Box?</b></normalfont><br>
        <smallfont>Disabling this option will hide the quick reply boxes at the end of
each thread. You can still reply by clicking on "Post Reply".</smallfont></td>
        <td bgcolor="#13486D"><normalfont>
                <input type="radio" name="showquickreply" value="yes" $showquickreplychecked> yes
                <input type="radio" name="showquickreply" value="no" $showquickreplynotchecked> no
        </normalfont></td>
</tr>

Now, in member.php, after:

PHP Code:

  if ($bbuserinfo[nosessionhash]) {
    
$nosessionhashchecked="checked";
    
$nosessionhashnotchecked="";
  } else {
    
$nosessionhashchecked="";
    
$nosessionhashnotchecked="checked";
  } 

Add:

PHP Code:

// Show Quick Reply Option
  
if ($bbuserinfo[showquickreply]) {
    
$showquickreplychecked="checked";
    
$showquickreplynotchecked="";
  } else {
    
$showquickreplychecked="";
    
$showquickreplynotchecked="checked";
  }
// Show Quick Reply Option 

Still in member.php, before:

PHP Code:

  eval("dooutput(\"".gettemplate("modifyoptions")."\");");
}

// ############################### start update options ############################### 

Add:

PHP Code:

// Show Quick Reply Option
  
eval("\$showquickreplyoption = \"".gettemplate("modifyoptions_showquickreply")."\";");
// Show Quick Reply Option 

EDIT: Forgot this step at first, but here it is :). In member.php after:

In member.php, after:

PHP Code:

  $cookieuser=iif($cookieuser=="yes",1,0);
  
$nosessionhash=iif($nosessionhash=="yes",1,0); 

Add:

PHP Code:

// Show Quick Reply Option
  
$showquickreply=iif($showquickreply=="yes",1,0);
// Show Quick Reply Option 

Still in member.php, find:

PHP Code:

  $DB_site->query("UPDATE user
                   SET "
.$updatestyles."adminemail='$adminemail',
                      showemail='
$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='"
.addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='"
.addslashes($timezoneoffset)."',emailnotification='$emailnotification',
                      startofweek='"
.addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='
$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
                      nosessionhash='
$nosessionhash

Add (continuing previous line):
Code:

,showquickreply='$showquickreply'
Finally, in showthread.php, after:

PHP Code:

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

(Note: you'll have to install the regular quick reply hack first to find this)

Add:
PHP Code:

} elseif ($bbuserinfo['showquickreply']==0) {
    
$replybox=''

EDIT: One final step I forgot:

Edit the modifyoptions template. After the following code:

Code:

<!-- *** -->
<tr>
        <td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF"><b>Thread View Options</b></normalfont></td>
</tr>
<!-- *** -->

Add:

Code:

$showquickreplyoption
There, that should do the trick :). If you have any trouble or can't get it to work, let me know.

Sweet Evil 07-23-2002 08:38 AM

vB 2.2.6
Been trying to add the smilies to this with no luck...
I tried $vbcode_smilies as in the new reply,etc.. but it is not working. Anyone know the code?

Thanks,

Boofo 07-23-2002 11:00 PM

To add smilies to the quick reply box:

Add this line:

PHP Code:

$clickysmilies getclickysmilies(); 

to showthread.php right after this:

PHP Code:

$textareacols gettextareawidth(); 

then use $clickysmilies in the showthread_quickreply template to add the box with the smilies in it, but you will also need to add these two lines:

PHP Code:

<script language="Javascript" src="vbcode.js"></script>
<
script language="Javascript" src="vbcode_language.js"></script

to the template right after the <form> tag. That should work.

Kiraly 07-26-2002 05:35 PM

Parse error: parse error, unexpected '}' in c:\programmi\easyphp\www\upload\showthread.php on line 94

:(

Boofo 07-26-2002 08:03 PM

Post the lines 89 to 99 here and let us look at it.

Quote:

Originally posted by Kiraly
Parse error: parse error, unexpected '}' in c:\programmi\easyphp\www\upload\showthread.php on line 94

:(


Kiraly 07-26-2002 08:55 PM

Quote:

Originally posted by Boofo
Post the lines 89 to 99 here and let us look at it.


line? how can i see this line? in the notepad?


All times are GMT. The time now is 01:13 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.02114 seconds
  • Memory Usage 1,779KB
  • 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
  • (12)bbcode_php_printable
  • (3)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