PDA

View Full Version : QuickReply addon: choose destination after posting


N!ck
07 Oct 2002, 04:10
Here is a very simple hack that allows your users to choose where they want to be redirected to after posting a reply via QuickReply. I made this because I don't think it's truly quick unless you have the option to go back to the forum or main index. Screenshot is here (http://www.vbulletin.org/forum/showthread.php?action=showpost&postid=307617).

---------------------------------------------------------------------------------
Step 1 - newreply.php

Find:

if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}


Replace with:

if ($visible && !$returntowhere) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
if ($returntowhere=="forumhome") {
$goto="index.php?s=$session[sessionhash]";
} elseif ($returntowhere=="thread") {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
}

---------------------------------------------------------------------------------
Step 2 - Template: showthread_replybox

Find:

</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>


Replace with:

</tr>
</table>
</td>
</tr>
<tr><td bgcolor="#F1F1F1" valign="top"><normalfont><b>Return to:</b></normalfont></td>
<td bgcolor="#F1F1F1"><select name="returntowhere" class="bginput"><option value="thread" selected>this thread</option><option value="forumdisplay">this forum</option><option value="forumhome">$bbtitle home</option></select><br><smallfont>After submitting reply, where do you want to go?</smallfont></td>
</tr>
</table>
</td></tr></table>

---------------------------------------------------------------------------------
Step 3 - Template: redirect_postthanks

Find:
You will now be taken to your post.

Replace with:
You will now be taken to your post or selected destination.
---------------------------------------------------------------------------------

Done! Please click install if you use this.

If you would like to use this on your regular post reply page as well, click here (http://www.vbulletin.org/forum/showthread.php?s=&postid=321822&action=showpost) for instructions.

2 X Viverridae
07 Oct 2002, 04:58
Heh, heh! Thanks Nick! :D

Areku
07 Oct 2002, 12:04
/me installs this hack!

Tu!

scottct1
07 Oct 2002, 14:53
Good hack thanks!

Scott Clicks Install

Scott
DBSTalk.COM

Pancreas Paul
07 Oct 2002, 15:39
Thanx. Instaled perfectly.

techno
08 Oct 2002, 00:53
/me likes it!

ZiRu$
08 Oct 2002, 03:44
I like it.....will install

DWZ
08 Oct 2002, 07:07
Can someone post a screenshot please?

Devil-GOD
08 Oct 2002, 12:38
nice hacks
i will install it

N!ck
08 Oct 2002, 13:52
here's a screenshot...options are "this thread", "this forum", and "<BOARD NAME> main index"

JFry
08 Oct 2002, 22:43
Great hack :) Thanks.

lordofgun
09 Oct 2002, 04:18
nice! installed!

matthepepe
09 Oct 2002, 05:24
very nice hack
/me installs

Lesane
09 Oct 2002, 15:37
Just installed it, nice little addon. Thanks Nick.

N!ck
09 Oct 2002, 22:24
wow...the great Lesane likes my hack

/me blushes

(lol, j/k about the blushing part ;) ) thanks.

TheCaver
09 Oct 2002, 23:17
Has this been installed by anyone who is using Spellcheck for their quickreply?

Mine won't work, seems the other embedded forms are causing problems with this one.... :(

JC

N!ck
09 Oct 2002, 23:33
Originally posted by TheCaver
Has this been installed by anyone who is using Spellcheck for their quickreply?

Mine won't work, seems the other embedded forms are causing problems with this one.... :(

JC

double-check that you've done everything correctly. there is a similar code in newreply.php that is pretty much exactly the same except for one little variable. (hint: search for the FIRST line of the code you have to replace in WordPad.)

if that still doesn't work, let me know.

obiwan8472
09 Oct 2002, 23:47
Brilliant Hack! Thanx! :)

N!ck
10 Oct 2002, 00:06
:)

Sh4z0n
29 Oct 2002, 20:01
i can't find showthread_replybox template... why?

Chris M
29 Oct 2002, 20:09
Probably because :

a.) You havent installed FireFly's Quick Reply Box hack
b.) You arent looking in the "custom templates" part of the templates;)

Satan

mewgood
29 Oct 2002, 22:49
great
installed:D

Sh4z0n
30 Oct 2002, 05:08
Originally posted by hellsatan
Probably because :

a.) You havent installed FireFly's Quick Reply Box hack
b.) You arent looking in the "custom templates" part of the templates;)

Satan

much thanks :)
i'm a noob on php :p

JFry
01 Nov 2002, 19:48
Does this conflict with Firefly's hack (http://www.vbulletin.org/forum/showthread.php?s=&threadid=26734) to return to forum after a regular reply (instead of a quick reply)? I want to give users the option to return to forum after either a quick reply or a regular reply. Thanks.

N!ck
01 Nov 2002, 23:18
actually, this could be used with the regular reply too...just put the code that's supposed to go in showthread_replybox in showthread instead...if you need more specific instructions, let me know.

AsedaH
12 Nov 2002, 21:34
i installed this one....nice addon indeed.

except i swithced mine so the default selection is to go back to the forums.

actually, this could be used with the regular reply too...just put the code that's supposed to go in showthread_replybox in showthread instead...if you need more specific instructions, let me know.

wouldnt that be "new reply" and "new thread" instead of in"showthread_replybox"?

in either case, can you give more specific instructions please?

thanks

N!ck
12 Nov 2002, 23:26
err...yeah, i made a typo. anyway:

1) find this in template "newreply":

</tr>
$attachmentoption
$threadratingoption
</table>
</td></tr></table>


Replace with:

</tr>
$attachmentoption
$threadratingoption
<tr><td bgcolor="#F1F1F1" valign="top"><normalfont><b>Return to:</b></normalfont></td>
<td bgcolor="#F1F1F1"><select name="returntowhere" class="bginput"><option value="thread" selected>this thread</option><option value="forumdisplay">this forum</option><option value="forumhome">$bbtitle home</option></select><br><smallfont>After submitting reply, where do you want to go?</smallfont></td>
</tr>
</table>
</td></tr></table>


Done!

AsedaH
13 Nov 2002, 03:12
thanks, it work perfectly

ChrisLohman
02 Jan 2003, 18:11
2.2.9, works great, many thanks.

Ice Effect69
06 Jan 2003, 19:30
I am running it on 2.2.9, well trying to anyways. I installed fireflys then nicksaunders, but i still cant get it to work. The quickreply box will not show up at the bottom of the pages. Someone Please Help... *Edit*Do I need to do the same thing with newthread as i do with newreply?*/edit*

__________________________
Steve Giuffre
http://prowrestlingdirect.com/forums/

Ice Effect69
06 Jan 2003, 21:00
well i got the reply box to work, i tried to put the addon of where to go to after posting, but it dont work for me, but no sweat anyways...

ed2k_2
21 Jan 2003, 16:28
I installed the hack "Quick Reply Box" and this Add-Ons but still get this message after I click on Submit Reply:

--------------------------
vBulletin Message
No thread specified. If you followed a valid link, please notify the webmaster
--------------------------

Kindly help me to figure it out where I've done mistake.