PDA

View Full Version : [AddOn] Useful Additions For Quickreply (and normal reply page)


KuraFire
20 Jan 2003, 14:24
HACK: [AddOn] Useful Additions to QuickReply box & Normal Reply page
BY: KuraFire [www.kurafire.com]
REQUESTED BY: My left brainhalf. *gives credit*
DESCRIPTION: Puts several small additions to the QuickReply box, as well as some to the normal Reply page.
DIFFICULTY: Medium
INSTALL-TIME: 10-15 minutes + time for FireFly/Chen's QuickReply box if you haven't installed that yet
STEPS: 7

!! NOTE: instructions updated on 22:19 CET* - make sure to clear your cache and re-download if you downloaded it already!

(* = see edit of this post timestamp for your own time)

EXTENDED DESCRIPTION:
What this hack do is simple: it adds a Signature checkbox, E-mail notification checkbox, and a Return-to dropdown box to your Quick Reply box (hack by FireFly). For Admins and Mods, it also adds two checkboxes: Close thread, and Stick thread (so that you can stick/unstick & close/open threads when you make a reply).
On the normal Reply page, it adds the same stuff minus Signature and E-mail checkboxes, of course (as they are already there :p).


Files to hack: newreply.php, showthread.php
Templates to mod: showthread_replybox*, newreply, newpost_attachment


Instructions are in the Attachment :)

KuraFire
20 Jan 2003, 14:26
Screenshot:


NOTE: the Close Thread and Stick Thread boxes are only visible to Admins & Mods!!

SemperFidelis
20 Jan 2003, 14:39
Wohooo !
It gets released
Cheers KuraFire
:)

To use your addon, should I just :
1. outright remove Tecks quick reply with close
2. install fireflys quick reply
3. install your add-ons ?

KuraFire
20 Jan 2003, 14:49
Yeah, that'd be best cos I have no idea how Teck did his quickreply hack, so it's probably not compatible with my add-on to FireFly's hack.

In fact, I'm 99% sure that it's incompatible. So Install FireFly's instead ^_^

SemperFidelis
20 Jan 2003, 14:53
Ok
Thanks for the quick answer.
Will do.

One other question, can you possibly incorporate you add-ons to editpost as well ?

KuraFire
20 Jan 2003, 14:57
uhm, good idea :)

I'll update the hack later so that it incorporates that (and I'll update the zipfile in the attachment) :)

thx 4 tip ^_^

X-Fan
20 Jan 2003, 14:57
Kura, I can't extract the files from the RAR archive (and I've got WinRAR). Could you please just post the text files? Thanks! :)

KuraFire
20 Jan 2003, 15:00
Update your WinRAR to the latest version

SemperFidelis
20 Jan 2003, 15:35
Sweet
Ive now un-installed Tecks and installed Firefly's

Quick question though.
Your instructions say :

FIND:
<tr bgcolor="{secondaltcolor}">

REPLACE WITH:
<tr bgcolor="{firstaltcolor}">


But the standard vb 2.2.9 newpost_attachment template contains :

<tr>
<td bgcolor="{secondaltcolor}" valign="top"><normalfont><b>Attach file:</b></normalfont><br>
<smallfont>Maximum size: $maxattachsize bytes</smallfont></td>
<td bgcolor="{secondaltcolor}" valign="top"><smallfont><input type="hidden" name="MAX_FILE_SIZE" value="$maxattachsize_temp">
<input type="file" class="bginput" name="attachment"><br>
Valid file extensions: $attachextensions</smallfont></td>
</tr>



Do you mean replace both instances of : <td bgcolor="{secondaltcolor}" ?

Dean C
20 Jan 2003, 16:42
Nice hack buddy :)

Thanks for releasing

- miSt

LOD-squa
20 Jan 2003, 17:19
can someone post the file has a txt file? :p

Boofo
20 Jan 2003, 19:12
The RAR has text files inside. :)

But here you go, anyway. Also, there are a couple of small fixes in there for the signature checked option and a parse error fix. I had to add some extra code to get the signature box to be checked if you had a signature in your options and not checked if you don't.

Boofo
20 Jan 2003, 19:17
KuraFire, in step 7, you forgot to add a ; at the end of the line. I got a parse error, but all is well now. ;)

Your code:

$ugid = $bbuserinfo['usergroupid']

What it should be:

$ugid = $bbuserinfo['usergroupid'];

LOD-squa
20 Jan 2003, 20:04
Thanks, Boofo. I shall be installing it soon ^^;

Boofo
20 Jan 2003, 20:05
You're very welcome. Let me know how it goes. ;)

KuraFire
20 Jan 2003, 20:17
Originally posted by Boofo
The RAR has text files inside. :)

But here you go, anyway. Also, there are a couple of small fixes in there for the signature checked option and a parse error fix. I had to add some extra code to get the signature box to be checked if you had a signature in your options and not checked if you don't.

Ack, yeah, I forgot to update the parse error code in the zipfile, will do that right away tomorrow!

Boofo: I deliberately made it _not_ to check on whether you had a signature or not, to have it auto-checked or not. I *Hate* signatures for each post, I disabled sigs for 80% on my board (you really simply have to put effort into it if you want your sig to show more than once in a thread) and I would rather see _more_ boards use sigs off by default.

I also hate it that vb.org has sigs on if you use quickreply. It's yucky and hugely annoying (esp. for ppl on slow connections like me)


v-net: ack, yeah, I couldn't remember what the original template was (I overwrite my vB-Default templates instead of add my own for my style) but that's what I had.
Yeah, you have to replace both instances in that case :)

I'll update the hack instructions as well on that, tomorrow :)

KuraFire
20 Jan 2003, 20:27
s/tomorrow/2 minutes ago/

Yes, I updated the install file (attachment in first post)

Make sure to clean your cache before you re-download! :)

Boofo
20 Jan 2003, 20:33
Originally posted by KuraFire


Ack, yeah, I forgot to update the parse error code in the zipfile, will do that right away tomorrow!

No biggie. It jumped right out at me, easy to fix. ;)

Boofo: I deliberately made it _not_ to check on whether you had a signature or not, to have it auto-checked or not. I *Hate* signatures for each post, I disabled sigs for 80% on my board (you really simply have to put effort into it if you want your sig to show more than once in a thread) and I would rather see _more_ boards use sigs off by default.

I also hate it that vb.org has sigs on if you use quickreply. It's yucky and hugely annoying (esp. for ppl on slow connections like me)


I was trying to follow how it is in the newreply, that's why I did the extra code for the signature. It's easy enough to turn it off in your options, but I kind of like having it follow suit. Just personal preference, I guess. I have a cable connection, so I don't get the slowdown. That probably makes a difference in my desire for this, too. :)

Great hack, though. Nice touch. ;)

LOD-squa
20 Jan 2003, 21:26
On the second step I don't find


<tr bgcolor="{secondaltcolor}">

KuraFire
20 Jan 2003, 21:26
I should make a hack that gives you the option "only display user's sigs once per threadpage" I think....

cos I wanna see them, but only -ONCE- ffs :)

LOD-squa
20 Jan 2003, 21:39
You could also make this for new threads. Like you can make a thread sticky or close it or even both. Just a suggestion.

PiotrasG
20 Jan 2003, 21:48
great hack nice job one question return to: forum forumhome doesnt want to work any ideas???


Also I get this from database

Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1043104125',lastposter='admin',sticky='0',open ='1' WHERE forumid IN (28,37,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054

Date: Monday 20th of January 2003 05:08:45 PM
Script: http://www.polskieforum.com/forum/forum/newreply.php
Referer: http://www.polskieforum.com/forum/showthread.php?postid=25366


the script its not located where its says to many /forum the strip should be

http://www.polskieforum.com/forum/newreply.php[/url]

any ideas

KuraFire
20 Jan 2003, 23:28
gohanssj2: I can, but I'm not gonna.

PiotrasG: erm, wtf?!?!?!

How the h*** do you not have a sticky column?! o_O

xevious
20 Jan 2003, 23:33
i get the same thing

LOD-squa
20 Jan 2003, 23:38
I installed it and it works fine for me.

xevious
20 Jan 2003, 23:40
i fixed it, it was this step:

Next, a little bit below this, you will find _TWO_ occurences of:
addslashes($postusername)."' WHERE

REPLACE BOTH WITH:
addslashes($postusername)."'$modbit WHERE

I accidently skipped one. Nice hack :)

PiotrasG
20 Jan 2003, 23:51
Originally posted by KuraFire
gohanssj2: I can, but I'm not gonna.

PiotrasG: erm, wtf?!?!?!

How the h*** do you not have a sticky column?! o_O
I have the sticky column


also for this step

Next, a little bit below this, you will find _TWO_ occurences of:
addslashes($postusername)."' WHERE

REPLACE BOTH WITH:
addslashes($postusername)."'$modbit WHERE

I did that

djr
21 Jan 2003, 00:05
Originally posted by KuraFire
I should make a hack that gives you the option "only display user's sigs once per threadpage" I think....

cos I wanna see them, but only -ONCE- ffs :)
Already done by TWTCommish here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=36470

don't know if it works on 2.2.9 though (last post says not, but I didn't check)

- djr

Boofo
21 Jan 2003, 00:13
KuraFire, I think a sticky for a new thread might not be a bad idea, but a close thread option for a new thread is ridiculous. Why would you want to close a thread you are just opening? LOL You have to be really bored to do that one. :)

HiSquad
21 Jan 2003, 00:24
Nice Hack

Thanks

LOD-squa
21 Jan 2003, 00:39
Originally posted by Boofo
KuraFire, I think a sticky for a new thread might not be a bad idea, but a close thread option for a new thread is ridiculous. Why would you want to close a thread you are just opening? LOL You have to be really bored to do that one. :)


I do it sometimes, you know sometimes I make rule threads for the forum. And I close them for new replies.

KuraFire
21 Jan 2003, 16:10
Originally posted by gohanssj2

I do it sometimes, you know sometimes I make rule threads for the forum. And I close them for new replies.

Use Announcements :):up:

KuraFire
21 Jan 2003, 16:10
Originally posted by djr

Already done by TWTCommish here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=36470

don't know if it works on 2.2.9 though (last post says not, but I didn't check)

- djr

Thanks! :)

LOD-squa
21 Jan 2003, 18:43
Originally posted by KuraFire


Use Announcements :):up:

I know but I usually don't like em :P

eva2000
21 Jan 2003, 20:44
hmm the rar file is corrupt ?

Boofo
21 Jan 2003, 20:46
I downloaded it and it unpacked fine. But I am also using the latest version of WinRAR, so that might make a difference.

eva2000
21 Jan 2003, 20:48
i get

[addon]_useful_additions_for_quickreply.rar: Invalid or corrupt authenticity information

Skyrender
21 Jan 2003, 21:02
On the first page some one posted a .zip version of it.

Boofo
21 Jan 2003, 21:10
I posted the zip version here.

http://www.vbulletin.org/forum/showthread.php?postid=344063#post344063

jjj0923
24 Jan 2003, 20:29
in 2.2.9 there are two occurrances of:

// redirect
if ($visible) {

in newreply.php

which occurrance do I replace?

the first or the second..with your new code???

thanks

Hwulex
24 Jan 2003, 23:17
Installed and working perfectly first time (with 2.2.6). Thankyou, great hack :)

<EdiT>
I've changed the template around a bit. Take a look at the template for changes.
I've also added a "New Posts" option to the Return To: select box. A lot of my members view posts from the new posts page, so found this most useful.

Tomorrow, I'm probably going to use the hack so that it works with editing posts as well.
If I get the time, or can be bothered, I might run up a quick instructions.txt for the changes I've made :)

Hwulex
25 Jan 2003, 12:14
I received an email requesting the code that I altered to enable "Return To New Posts' option, so here it is (attached).

I may also do the editpost option later on.

over
25 Jan 2003, 16:15
will use parts of this hack :)

close / make sticky dead useful :D
cheers.

eva2000
25 Jan 2003, 20:53
okay i have a problem

my usergroups are

admin = 6
super mod = 5
mod = 30

now the problem is even after i change the occurences of usergroup == 7 to ==30

my super mods can't close or stick threads using quick reply box but my mods and admin can

some of my super mods are also assigned to mod specific forums too

KuraFire
27 Jan 2003, 00:35
I'll look into it tomorrow at work, should be fixable, no? :)

Don't really know what could be the problem here, though.. I probably have to
'extrapolate' the hack code and see the dependancies of the entire codeblock, those might be relevant for the problem...

but since it's 2:30 am and I have to work tomorrow, I'm gonna sleep now... :)

(posted now mostly to get a new notifier if anyone posts after this, or if you (Eva) post a "already fixed it, nm!" or so ^_^)

Tony DiMera
27 Jan 2003, 16:40
Sweet thanks a lot.

KuraFire
03 Feb 2003, 09:34
Eva, have you edited this line:


$modbit = ($bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==7) ? ",sticky='$stickybit',open='$openbit'" : "";


as well? (ie. did you add " || $bbuserinfo['usergroupid']==30" ?)

L-Mane
02 Mar 2003, 20:31
I get this error when I use this

Database error in vBulletin 2.3.0:

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1046640222',lastposter='Leyonssio',sticky='0', open='1' WHERE forumid IN (18,4,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054

Date: Sunday 02nd of March 2003 04:23:42 PM
Script: http://www.allhiphop.com/community/community/newreply.php
Referer: http://www.allhiphop.com/community/showthread.php?s=&threadid=16485

king sting
09 Mar 2003, 18:41
uhmm.. I installed it and it looks great.. but now anyone (even if their not a mod or admin) can stcky and close threads.. any ideas on what I did wrong? how can i make it so only mods and admins can sticky and close threads?

ImportPassion
21 Mar 2003, 15:02
can this be added to newthread.php?

Skyrender
22 Mar 2003, 02:18
When ever anybody tries to post with the quick reply hack on my board it says: Invalid thread please contact webmaster.

Then I tried installing it again and I got the same thing.

Yuber
24 Mar 2003, 21:08
03-02-03 at 04:31 PM L-Mane said this in Post #48 (http://www.vbulletin.org/forum/showthread.php?postid=360265#post360265)
I get this error when I use this

Database error in vBulletin 2.3.0:

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1046640222',lastposter='Leyonssio',sticky='0', open='1' WHERE forumid IN (18,4,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054

Date: Sunday 02nd of March 2003 04:23:42 PM
Script: http://www.allhiphop.com/community/community/newreply.php
Referer: http://www.allhiphop.com/community/showthread.php?s=&threadid=16485

I am getting the same problem :

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1048543014',lastposter='Yuber',sticky='0',open ='0' WHERE forumid IN (5,3,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054


Also the optinos for This Thread, This Forum, and Homepage do not work, Ialways am returned to the thread.

Boofo
24 Mar 2003, 21:18
03-21-03 at 09:18 PM Skyrender said this in Post #51 (http://www.vbulletin.org/forum/showthread.php?postid=371080#post371080)
When ever anybody tries to post with the quick reply hack on my board it says: Invalid thread please contact webmaster.

Then I tried installing it again and I got the same thing.

Did you get that before installing this hack? Because there is a fix in the Quick Reply Box thread that addresses that very issue. ;)

Yuber
26 Mar 2003, 23:17
03-02-03 at 04:31 PM L-Mane said this in Post #48 (http://www.vbulletin.org/forum/showthread.php?postid=360265#post360265)
I get this error when I use this

Database error in vBulletin 2.3.0:

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1046640222',lastposter='Leyonssio',sticky='0', open='1' WHERE forumid IN (18,4,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054

Date: Sunday 02nd of March 2003 04:23:42 PM
Script: http://www.allhiphop.com/community/community/newreply.php
Referer: http://www.allhiphop.com/community/showthread.php?s=&threadid=16485

I am getting the same problem :

Invalid SQL: UPDATE forum SET replycount=replycount+1,lastpost='1048543014',lastposter='Yuber',sticky='0',open ='0' WHERE forumid IN (5,3,-1)
mysql error: Unknown column 'sticky' in 'field list'

mysql error number: 1054


Also the optinos for This Thread, This Forum, and Homepage do not work, Ialways am returned to the thread.

CodeDawg
27 Mar 2003, 02:11
Great hack, works great out of the box!!!!

Yuber
29 Mar 2003, 20:13
*bump*

Sanjiyan
18 Apr 2003, 03:05
How do I get the Signature tickbox to stay ticked for those that use signatures? because at the moment its not being ticked by default.

If users use the normal reply buttons, it puts thier sigs in, but if they use the quick reply box, without ticking anything, its not putting their sigs in, but if they tick the Sig box, it does.

I've looked at the code, and it says this: (which I thought was the default tick, but its not)
<p><smallfont><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Signature</b><br />
<input type="checkbox" name="email" value="yes" $emailchecked> <b>E-mail notification</b>

As you can see the 'yes' is there for both the sig and email values, now on the showreply...quick reply box, email is ticked which is brill, but signature isnt...

Is there a way to fix this?

KuraFire
18 Apr 2003, 14:08
The var "$signaturechecked" doesn't get made in showthread.php. To do so, look in newthread.php or newreply.php, search the file for $signaturechecked, then copy the bit of code that creates the var and put it in showthread.php just before the piece where the quickreply box stuff is made.

Sanjiyan
18 Apr 2003, 16:28
Today at 02:08 PM KuraFire said this in Post #58 (http://www.vbulletin.org/forum/showthread.php?postid=383760#post383760)
The var "$signaturechecked" doesn't get made in showthread.php. To do so, look in newthread.php or newreply.php, search the file for $signaturechecked, then copy the bit of code that creates the var and put it in showthread.php just before the piece where the quickreply box stuff is made.

I've edited the showthread.php

urm, I copied:

$signaturechecked=iif($signature,"checked","");

and put it below:

$emailchecked = ($bbuserinfo['emailnotification']==1) ? "checked" : "";

So now it looks like

$emailchecked = ($bbuserinfo['emailnotification']==1) ? "checked" : "";
$signaturechecked=iif($signature,"checked","");
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");

But it still does not tick the Signature box nor add the signature.

Did I do it right? If not, where did I go wrong.

Thanks

Sanjiyan
21 Apr 2003, 05:59
bump

Sanjiyan
25 Apr 2003, 08:47
Bump for post:
http://www.vbulletin.org/forum/showthread.php?postid=383776#post383776

tmapm
22 Jul 2003, 17:21
The only thing that works for me is the sticky. Everything else refuses to update.. I've redid the hack, but still nothing. I figured out it was a conflict with Doublepost Guard -- http://www.vbulletin.org/hacks/index.php?action=showhack&threadid=40145 . I'll post up a fix as soon as I find it or if someone can enlighten me with the answer, that would be appreciated.

I know it has been 2 months, Sanjiyan and I bet you probably already dropped this hack or if you didn't get it working and your still trying... Try

$emailchecked = ($bbuserinfo['emailnotification']==1) ? "checked" : "";

if ($bbuserinfo[signature]!="") {
$signaturechecked="CHECKED";
}

$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");

jdmuniverse
06 Aug 2003, 21:06
Would be a great hack but, I too am getting db errors with 2.2.9

I tried installing twice.... same dealio

Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE thread SET lastpost='1060203767',replycount=replycount+1,lastposter='SIINSI',sticky='0',ope n='1' WHEREthreadid='12417'
mysql error: You have an error in your SQL syntax near 'WHEREthreadid='12417'' at line 1

mysql error number: 1064

Date: Wednesday 06th of August 2003 03:02:47 PM
Script: http://www.jdmuniverse.com/forums/forums/newreply.php
Referer: http://www.jdmuniverse.com/forums/showthread.php?threadid=12417

KuraFire
10 Aug 2003, 20:58
04-18-03 at 06:28 PM Sanjiyan said this in Post #59 (http://www.vbulletin.org/forum/showthread.php?postid=383776#post383776)
I've edited the showthread.php

urm, I copied:

$signaturechecked=iif($signature,"checked","");

and put it below:

$emailchecked = ($bbuserinfo['emailnotification']==1) ? "checked" : "";

So now it looks like

$emailchecked = ($bbuserinfo['emailnotification']==1) ? "checked" : "";
$signaturechecked=iif($signature,"checked","");
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");

But it still does not tick the Signature box nor add the signature.

Did I do it right? If not, where did I go wrong.

Thanks





Did you put $signaturechecked in the template? It has to be there in the right place, of course :)


jdmuniverse: you removed the space between WHERE and threadid in the query. Put the space back. :)

Preech
02 Oct 2003, 06:03
um yea im gettin the same problem with the unknown column sticky thing that a lot of other people are getting...whats the deal do we have a solution for that yet????

alkatraz
30 Oct 2003, 04:03
awesome! =)

KuraFire
30 Oct 2003, 08:51
I think an upgrade of vB at some point deleted the sticky column...

But I've dropped support for vB2 hacks because I'm focusing on vB3-only hacks now (and have been for a while already). Sorry! :/