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 (with Close/Open thread switch) (https://vborg.vbsupport.ru/showthread.php?t=40380)

TECK 06-27-2002 10:00 PM

Quick Reply Box (with Close/Open thread switch)
 
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:

TECK 06-28-2002 02:53 AM

A screenshot in Show Thread...
To view the Open/Close check box in New Reply for example, click here.

LightBringer 06-28-2002 03:01 AM

Nakkid..is this compatible with the "Reason for Closed Thread" hack?

TECK 06-28-2002 03:04 AM

ya.. it is. the steps are identical, except the showthread.php changes. btw, i released v1.1 for 'Quick Close/Open Thread'.

LightBringer 06-28-2002 03:07 AM

Quote:

Originally posted by Nakkid
ya.. it is. the steps are identical, except the showthread.php changes. btw, i released v1.1 for 'Quick Close/Open Thread'.
forgive my ignorance..but uhh..where did you release v1.1 at?

LightBringer 06-28-2002 03:39 AM

Nakkid,

How about some upgrade instructions for those of us who have already added the quick reply box? :)

Velocd 06-28-2002 03:57 AM

Looks nice, although I sorta like the space of FireFly's quick reply. So I will just extract the quick close option on yours and apply it to his ;)

Once again, good job.

TECK 06-28-2002 04:25 AM

the idea was to have the close/open switch handy everywhere. i made this template because i like it smaller... :)
just a note for you.. firefly forgot to add his new template into $templatesused so that will add an extra query and also there are some code leftovers from his hacked board.
make sure you remove them from the template. ;)

TECK 06-28-2002 04:33 AM

Quote:

Originally posted by LightBringer
Nakkid,
How about some upgrade instructions for those of us who have already added the quick reply box? :)

the 2 hacks are totally different. there are present 9 lines of code from firefly's hack. i clearly mark them on the hacked code. also i included credits for that code segment. ;)
best way is to compare firefly's showthread.php and replybox template with mines. that's the only resemblance to the hack.

Bro_Joey_Gowdy 06-28-2002 05:00 AM

Nice hack

TECK 06-28-2002 05:02 AM

let me know if everything was clear in the install steps and if it's working well, so others collegues here, know.

Chris M 06-28-2002 11:31 AM

FireFly Modification for Quick Reply :
here

^^ - That url downloads the attachment to Nakkid's post which has his Quick Reply Box in the style of FireFly's...

Satan

TECK 06-28-2002 12:04 PM

FireFly's style template for my hack (remove the space inside the bracketed variables):

LightBringer 06-28-2002 01:17 PM

Quote:

Originally posted by hellsatan
It sorta works...

I keep getting this though :



Satan

Hey Satan..what steps were you going through to produce that error?

TECK 06-28-2002 07:47 PM

you rock satan... :)
he helped me fix a little code bug in there, while checking the script.. i corrected the bug and updated the .txt file. :)

thank you for helping me help others ;)
now the hack is bug free. enjoy.

Chris M 06-28-2002 08:38 PM

No problem:)

BTW : I recommend this hack to people - It rocks!:D

Satan

Gaz.t 06-29-2002 03:17 PM

NOTE: Remove the spaces in front of each bracketed variable.

what is ment by this

Chris M 06-29-2002 03:20 PM

Well...

For example, there are spaces in the template, such as :

Code:

{ tablebgcolor}
Just find each case of "{ ", and remove the space...

P.S. - Only do it for ones that start with "{ " and end with "}"...

Satan

Seifer 06-30-2002 03:34 AM

I installed it just fine, and I like it pretty much, aside from the gobutton replacing the "Submit Reply"...Is there some way to make it so it's perhaps a different graphic button that I make, or just a regular "Submit Reply" button?

I'm not too good with PHP, I just follow instructions, so moddifying isn't such an easy task =P

mashby 06-30-2002 09:05 AM

This hack was a long one, but if you follow the directions, it installs without a hitch. Excellent work and a VERY nice hack. Thank you! :D

TECK 06-30-2002 03:00 PM

Quote:

Originally posted by Seifer
I installed it just fine, and I like it pretty much, aside from the gobutton replacing the "Submit Reply"...Is there some way to make it so it's perhaps a different graphic button that I make, or just a regular "Submit Reply" button?
replace [high]$gobutton[/high] with this:
Code:

<input type="submit" class="bginput" name="submit" value="Submit" tabindex="2">
change the value to whatever name you want to give it to your button.

GMeadows 07-25-2002 09:49 AM

Bah...

I'm getting the following error:

Parse error: parse error in /usr/local/psa/home/vhosts/forum.com/httpdocs/newreply.php on line 312

Any tips?

Gary

TECK 07-25-2002 05:25 PM

if you get any parse errors, please read the information placed at the end in the instructions file.
a parse error is due only to code errors, while you modify or write it.

DrkFusion 07-25-2002 05:28 PM

Nice work Nakkid, thanks for this mod

Drk

dssforum 08-24-2002 07:51 PM

how can i change color of the hack it shows up green someone take a look if i did it correctly www.dssforum.com

dssforum 08-25-2002 04:01 PM

ok i changed color now when i try to edit a a thread i get : parse error in /var/www/html/forum/editpost.php on line 109
anyone know how to fix this?

crazza 09-19-2002 07:37 PM

I've installed the Hack.. and it does what it's supposed to..

Except.. that when you either open or close a thread (and post a comment), the thread comes back without my post attached to it.

It only shows up after a reload of the thread..

Does anyone else notice this.. or did I screw up somewhere ?

PS: And another question.. how do I make this box respond to Alt-S (instead of pressing the button).

TECK 09-19-2002 07:40 PM

crazza, there are several people who installed this hack without any problem.
check your code segments, there is alot of it.

havefun 09-19-2002 08:32 PM

thanks 4 your box!

works fine on 227...

lg, havefun :rambo:

crazza 09-19-2002 08:52 PM

I've checked the code and the templates. But the problem still persists.

Can anyone who actually installed this hack confirm that newreply.php does not correctly reload the page immediately when you "reply with open/close" ... and does reload correctly if when you "reply without open/close".

You can probably imagine that I want this confirmed before I go digging deep into the code again.

TECK 09-19-2002 09:01 PM

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. :)

crazza 09-20-2002 07:50 AM

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\");");
}




aLuCaRD 09-20-2002 11:28 AM

Any ideas why my avatars arent showing in the thread now..? There still in the PMs though...

aLuCaRD 09-20-2002 11:47 AM

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. :D

**EDIT** I mean without not with :D

TECK 09-20-2002 02:27 PM

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.

crazza 09-20-2002 02:41 PM

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..

TECK 09-20-2002 02:42 PM

np, the important thing is that it's working great for you now. congrats. :)

crazza 09-20-2002 02:46 PM

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..

TECK 09-20-2002 11:01 PM

good to hear this.. and welcome to our community.

yzztik 09-22-2002 02:47 PM

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?


All times are GMT. The time now is 06:35 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.01335 seconds
  • Memory Usage 1,820KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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