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
Quick Reply Box (with Close/Open thread switch) Details »»
Quick Reply Box (with Close/Open thread switch)
Version: 1.00, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-27-2002 Last Update: Never Installs: 327
 
No support by the author.

This hack will let your users post a Quick Reply, instead of going through the New Reply steps.
If you have permissions, it will show you a Close/Open Thread check box beside the Quick Reply. Also, the check box will show in New Thread, New Reply, New Post and Edit Post.

ESTIMATED INSTALL TIME: 10 minutes
REQUESTED BY: hellsatan
TESTED IN VERSION: 2.2.7

CREDITS: The hack includes one small code segment of FireFly's Quick Reply Box related to user permissions.
(9 lines of code)

[high]RELATED HACKS[/high]
Quick Delete Post
Quick Close/Open Thread (with reason)

You like this hack? Please click on the [high]Install[/high] button.
To download the latest version of this hack, click below:

Show Your Support

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

Comments
  #32  
Old 09-19-2002, 09:01 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
You can probably imagine that I want this confirmed before I go digging deep into the code again.
you will have to do it. you made a mistake. the hack works perfectly for everyone... well at least for 100 of them.
Reply With Quote
  #33  
Old 09-20-2002, 07:50 AM
crazza's Avatar
crazza crazza is offline
 
Join Date: Sep 2002
Location: The Lowlands
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After checking the code four times, installing the hack on a brand spanking new installation of VBulletin 2.2.6 I discovered that I did nothing wrong in the first place.

Route 1.

When entering a thread by clicking the thread's title (e.g. ..../forums/showthread.php?s=&threadid=6055) the thread is only called by threadid.

After entering something in the QuickReply box AND clicking either close or open.. the exact same link will be called as stated above, thus showing you an 'old copy' of the page, without your new post.

Route 2.

When entering a thread by clicking the 'last post' button for this thread (e.g. ..../forums/showthread.php?s=&goto=lastpost&threadid=6055) a 'forced query' is run to determine what the actual lastpost is.

After entering something in the QRB and doing an open or close.. the exact same link will be called.. the same query will be run.. and voila.. there's your post.

Conclusion

Reloading the same page without running the extra query doesn't update correctly when closing or opening the thread. This can be fixed by forcing the reload to run the query (i.e. adding a 'lastpost' statement).

Code change

Only the php code for newreply.php needs to be altered in two places [around lines 308 and 450]

Old code:

Quote:

$threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
$DB_site->query("UPDATE thread SET open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");

eval("standardredirect(\"".gettemplate("redirect_o penclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");

} else {
eval("standardredirect(\"".gettemplate("redirect_p ostthanks")."\",\"$goto\");");
}


New Code:

Quote:

$threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
$DB_site->query("UPDATE thread SET open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");

$goto="showthread.php?s=&goto=lastpost&threadid=$t hreadid";
eval("standardredirect(\"".gettemplate("redirect_o penclose")."\",\"$goto\");");

} else {
eval("standardredirect(\"".gettemplate("redirect_p ostthanks")."\",\"$goto\");");
}


Reply With Quote
  #34  
Old 09-20-2002, 11:28 AM
aLuCaRD aLuCaRD is offline
 
Join Date: Jun 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any ideas why my avatars arent showing in the thread now..? There still in the PMs though...
Reply With Quote
  #35  
Old 09-20-2002, 11:47 AM
aLuCaRD aLuCaRD is offline
 
Join Date: Jun 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My bad, was a hack I done before but didnt realise the avatars missing, lmao. Great hack mate, I perfer the QR box without smilies, less load on the server.

**EDIT** I mean without not with
Reply With Quote
  #36  
Old 09-20-2002, 02:27 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

crazza, do you have it showing:
Code:
eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
or:
Code:
eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session
[sessionhash]&threadid=$threadid\");");
??

it must be in one line. if separated, that's why is not redirecting you properly.
in the hack, it is listed in one line.
Reply With Quote
  #37  
Old 09-20-2002, 02:41 PM
crazza's Avatar
crazza crazza is offline
 
Join Date: Sep 2002
Location: The Lowlands
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tech,

Sorry for the inconvenient wrapping in my earlier post.. but yes, the statement was on one line (it wouldn't even end up in the right thread if it wasn't).

But the "fix" I put in works a charm.. so I'm a happy camper after all..
Reply With Quote
  #38  
Old 09-20-2002, 02:42 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

np, the important thing is that it's working great for you now. congrats.
Reply With Quote
  #39  
Old 09-20-2002, 02:46 PM
crazza's Avatar
crazza crazza is offline
 
Join Date: Sep 2002
Location: The Lowlands
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And as a bonus I am actually starting to understand all this mumbly jumbly lame excuse for a programming language vbportal vbulletin myseekwall thingamajig

It makes me happy I might add..
Reply With Quote
  #40  
Old 09-20-2002, 11:01 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good to hear this.. and welcome to our community.
Reply With Quote
  #41  
Old 09-22-2002, 02:47 PM
yzztik's Avatar
yzztik yzztik is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I notice that when you reply using the quick reply box, it does not register that you have posted to subscribe you to the thread if you have that as a default ... is there anything I can add to the code to make it do that? even if I have to add another checkbox below it to do it that would be great!

Any ideas anyone?
Reply With Quote
  #42  
Old 09-22-2002, 04:57 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ya, you are right... i added this to the file.
in showthread.php, find:
Code:
  $textareacols=gettextareawidth();
replace it with:
Code:
  if ($bbuserinfo['emailnotification']) {
    $emailchecked = 'yes';
  } else {
    $emailchecked = '';
  }
  $textareacols=gettextareawidth();
in template showthread_replybox, find:
Code:
<input type="hidden" name="email" value="">
replace it with:
Code:
<input type="hidden" name="email" value="$emailchecked">
now it will look in your default preferences, all done in the background, so there is no need for an ugly extra checkbox. if you have it set to automatically recieve email notifications, that change will allow you to do it from now on.
for those who installed the hack already, just change the code listed above.
Reply With Quote
  #43  
Old 09-22-2002, 05:28 PM
yzztik's Avatar
yzztik yzztik is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG! You are a god! Thank you, thank you, thank you!!!

*runs to edit*

EDITED: just made the changes. Works like a charm! Thanks a million!
Reply With Quote
  #44  
Old 09-24-2002, 04:09 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting reports of a JS error in IE5

PHP Code:
Line864 
Char

Error
Object expected 
Code

my line 864 is
PHP Code:
<form enctype="multipart/form-data" action="newreply.php" name="vbform" method="post" onSubmit="return validate(this)"
Wish I knew javascript

Dave
Reply With Quote
  #45  
Old 09-24-2002, 04:12 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello dave. try this:
onSubmit="return validate(this);"

notice the ; an the end. let me know if it fix it.
it could also be because you have some javascript that you added in the header, that is not part of vBulletin.
in this case i cannot help you.

cheers.
Reply With Quote
  #46  
Old 09-24-2002, 04:18 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ill give it a shot

thanks

Dave
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 12:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11425 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
  • (7)bbcode_code
  • (2)bbcode_php
  • (2)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
  • (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