Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 01-28-2002 Last Update: Never Installs: 1206
 
No support by the author.

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.

NOTE: For the vB 2.3.2 version please see this post.

Extras:
  • If you want users who have the Use Email Notification option ON, to automatically subscribe to threads they reply to with this hack, see this post.
  • If you want to add an option for each user to turn this feature on and off, please see this post.
  • If you want smilies in your quick reply box please see this post.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #257  
Old 03-31-2002, 10:35 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you look at the showthread page, there is a < Last Thread Next Thread > section at both the top of the thread table and the bottom of the thread table. I believe you put $replybox below the first when you should have put $replybox under the second next/prev section - you just need to move "$replybox" in your showthread template until you get it where you want it to display.
Reply With Quote
  #258  
Old 03-31-2002, 10:36 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

P.S. Anyone figure out how to only show the quick reply box for users who are logged in? (And not for unregistered users who are also allowed to post as guests... only for people who are logged in?)

(Forgive me because I am still very weak at PHP)...

Looking at the other posts in this forum I see this code:
Code:
if (!in_array($bbuserinfo['usergroupid'], array(5,6,7))) {
$replybox='';
} else {
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}
Is something like this all I need to do to not show the quick reply box to Unregistered Users (who do have permission to post, but I still want to encourage them to register and thus don't want to make it too easy to post as a guest.) Would I just enter the usergroupid for Unregistered in the array?

Or shoud I use this which I also see up in the thread:

Code:
if (($bbuserinfo['usergroupid']=="5") or ($bbuserinfo['usergroupid']=="6")) {
  /*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;
}
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
} else {
   $replybox=''
};
If one of the PHP experts could come up with the definitive code to use to not show the quick reply to guests (Unregistered Group who do have permission to post) I would really appreciate it.
Reply With Quote
  #259  
Old 04-01-2002, 03:11 AM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Previously in the thread I see that putting the quick reply box only on the last page was discussed, and many didn't see a point. I guess my reasons are that:

1.) Even though you can hit the normal "Post Reply" on any page, at least you see the recap on the newreply page so you won't accidentally miss the second page and post something redundant.

2.) Placing the reply box on the last page makes it clearer that the first page isn't all there is. I'm afraid if the reply box is on every page that I'll have to make all the page numbers bigger so newbies don't miss multiple page threads.

3.) Putting the quick reply on all pages rather than just the last page encourages people to post without reading what is already there (as I myself was guilt of earlier in this thread )... how can you know if your post is redundant if you haven't read all the way to the end of the thread?

Or is it really difficult to only show it on the last page?
Reply With Quote
  #260  
Old 04-02-2002, 05:28 AM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK - it was easier than I thought.

Just add

Code:
} elseif ($bbuserinfo['usergroupid']=="1") {
	$replybox='';
in the list of conditionals to not show the reply box to guests.

Now the only thing I can't figure out is how to only show the reply box if:
1.) it is the last page of a multipage thread, or
2.) it is a single page thread.

I can use
} elseif ($pagenumber!="1") {
$replybox='';

for example to not show it on page 1 but to show it on page 2.

I see above there is this conditional statement:
if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") {

Which I thought I would be able to easily adapt, but I can't seem to make it work.

Can anyone give me a hand?
Reply With Quote
  #261  
Old 04-02-2002, 10:29 AM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when i add the smilies box and press one smilie it doesnt add one in the box...
Reply With Quote
  #262  
Old 04-02-2002, 04:01 PM
pHAZE_1 pHAZE_1 is offline
 
Join Date: Mar 2002
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey firefly

i installed this hack, but the box is above the thread and i want it below the thread, just like it is here, how would i do that? please be specifi. thanks

btw it is very cool.
Reply With Quote
  #263  
Old 04-02-2002, 09:46 PM
hukgwai's Avatar
hukgwai hukgwai is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Firefly: great hack.. it's working pefectly on my board..

just a cosmetic question..

how would i go about putting the reply buttons right next to the form rather than another table below it?
Reply With Quote
  #264  
Old 04-02-2002, 11:08 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
how would i go about putting the reply buttons right next to the form rather than another table below it?
From your admin CP edit the showthread_replybox template.
Reply With Quote
  #265  
Old 04-02-2002, 11:12 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
i installed this hack, but the box is above the thread and i want it below the thread, just like it is here, how would i do that? please be specifi. thanks
If you look at the showthread page, there is a < Last Thread Next Thread > section at both the top of the thread table and the bottom of the thread table. I believe you put $replybox below the first when you should have put $replybox under the second next/prev section - you just need to move "$replybox" in your showthread template until you get it where you want it to display.
Reply With Quote
  #266  
Old 04-03-2002, 12:37 AM
hukgwai's Avatar
hukgwai hukgwai is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by boatdesign

From your admin CP edit the showthread_replybox template.
i already know that much.. i don't know what to do... just cut and paste and make it a nested table? i would appreciate it if someone showed me exactly what the code is.. thanks
Reply With Quote
  #267  
Old 04-05-2002, 06:49 PM
banoota's Avatar
banoota banoota is offline
 
Join Date: Nov 2001
Location: UAE
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

am i the only one having trouble installing this?!
Reply With Quote
  #268  
Old 04-05-2002, 06:56 PM
banoota's Avatar
banoota banoota is offline
 
Join Date: Nov 2001
Location: UAE
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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="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 -->
i don't get this bit, you mean we should put the code in our original showthread.php template? and if yes, where exactly?

cuz the text above sounds like "type $replybox" after the code block above

i couldn't find such thing in the original showthread.php
Reply With Quote
  #269  
Old 04-06-2002, 01:02 AM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone tell me why I get parse error on line 480 on 2.2.5, the last line?
Reply With Quote
  #270  
Old 04-06-2002, 01:13 AM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fixed it, I missed a '}'
Reply With Quote
  #271  
Old 04-06-2002, 01:54 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by banoota


i don't get this bit, you mean we should put the code in our original showthread.php template? and if yes, where exactly?

cuz the text above sounds like "type $replybox" after the code block above

i couldn't find such thing in the original showthread.php
It's not in showthread.php, it's in the showthread template in teh admin cp And yes, after that code in the template, put $replybox on the next line

Hope that helps
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:10 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.07360 seconds
  • Memory Usage 2,371KB
  • Queries Executed 30 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete