DESCRIPTION: Adds a quick reply box to the bottom of a thread. Version 3.0 adds a Pulldown Menu for Post Icons, a Preview Post Button, a Spellcheck button and a popup Graemlin Panel (thanks JustDave)
BY: JoshPet, Allen Ayres, Gardener and JustDave for bug fixes
DATE: 12.26.2002
CREDITS: Allen Ayres for version 1, Gardener for Javascript, JustDave for bug fixes and Graemlin Popup, JoshPet for bug fixes and enhancements. German translation by jluerken.
VERSION: 3.0 for UBB.Threads 6.2
REQUIREMENTS: A full version of UBB.Threads 6.2 COMPATIBILITY: UBB.Threads 6.2
DEMO: login at www.measurection.com with username: testing and password: testing
NEW FILES: graemlinpanel.php (thanks JustDave!) NOTE: If you are using JustDave's Popup Graemlin modification already, you don't need to add this file. The script is the same.
Version history:
Version 1.0: released (08/10/2002)
Version 1.1: ubbcode parsed and post icons fixed (08/11/2002)
Version 1.2: Quick Reply only avail. to Logged in User Correctly adds the "Re:" (only once) to reply. (08/12/2002
Version 1.3: Languages settings added (08/12/2002)
Version 1.4: Fix added to remove box if thread is closed (08/13/2002)
Version 1.5: User can select which post to reply to. (08/14/2002)
Version 1.6: Fixed "Re:" issue with Javascript and added code so quick reply link does not appear if the user is not logged in or the thread is closed (08/17/2002)
Version 1.7: Javascript adds the quote instead of replacing. (08/18/2002) "Re:" checking added to javascript. Added a quick reply box to threaded view as well.
Version 1.8: Quick Reply now works with Mozilla, Opera won't break. Fixed a bug when replying to anonymous posts. Now adds the username correctly. *
Version 2.0: Updated for UBB.Threads 6.2 (12/26/2002) by JoshPet. This simply does a quick reply and not a quick quote as the Auto Quote is now a standard function of Threads
Version 2.1: With JustDave's help we've finally licked the problem voting in polls when Quick Reply was installed.
Version 2.2: Fixes a bug which allowed a reply to a moved post pointer and created some wacky results. 1/12/03
Version 3.0: Adds a pulldown menu for Post Icons, a preview Post Button, a Spell Check Button, and a popup Graemlin Panel (thanks JustDave ) 2/1/03
I was wondering if the bug where it caused Polls not to work properly in showflat was fixed or was ever tracked down? I useed to use this on my site and it was great but I am leary of reinstalling it since we use a lot of Polls. Thanks
I had the poll issue on my site in 6.2 in testing and prior to installing the quick reply mod.
Myself and Navaho experienced the poll bug at our development board. Not sure what exactly makes polls work for some and not for others.
So since polls weren't working right for all my users anyway, I went ahead and installed the quick reply mod.
I'm going to do some more testing with the poll thing. But I don't think it's quick reply related. I still can't vote in a poll here at threadsdev... and we don't have quick reply installed.
One poll for me it works... one poll for me it doesn't. I always use flat. I have threaded users who get the "not found" error too. So I haven't really found the common factor yet.
Now if I come back here and contradict myself, that'll probably cause troubles. Anyway, I had a couple of users early on complain about the poll. But it must have been something else.
I've had a good number of users testing a couple of polls, and no trouble. We've also tested at our development board.
<shrug>
Time will tell if it surfaces again.
Let me know if you use this mod and see any trouble.
I will, I havent upgraded yet to 6.2 and plan on testing this weekend on an offline server (so I can clean up any other Mods that may go haywire) I will definately keep you updated on the results
Just to update. The issue of polls seems to be cleared up in a "clean" install of threads.
I had one or two errors reported when I was on a clean copy. There may still be something lingering, but it was very isolated. Might have been a browser thing.
I added in Quick Reply, and the problem seemed better. Some errors did pop up though. It seems that if the poll is the first in the thread, it doesn't work right for everyone if quick reply is installed. But if the poll is in a reply, it seems to work better. Go figure.
I'm determined to solve this so it's totally bug free if it kills me. LOL I'll go through this again, and make sure there are no conflicting variables. When I try to validate the page with quick reply, it says there's an extra </form> tag. That could be the culprit...since a poll is a form, that could goof things up.
If I can't nail it down, plan B would be to redesign it so it doesn't appear at all if there's a poll in the thread. Might be the best way around it.
So if you use alot of polls, hold off on the quick reply.
Just a thought... What seemed to be happening was that dopoll.php wasn't getting all of the values of the variables that are passed to it when a person votes. Check for additional <form> tags of course and in the case of javascript being used make sure that the forms have specific names so that only one can be referenced.
Josh I was about to add this here when I noticed what may be the cause of the poll problems. Do you have a site I can see this up and running at? I can't say completely sure by looking at the code. I need to see the html it's generating.
Ok I believe the problem is that there are forms within forms. This must be messing with the values that get sent to dopoll.php
I'll go over the code tomorrow some when I get a change and see how to fix it.
I kinda have an idea how since I noticed the possible error while reading your instructions. What your doing is placing a new <form name="posts".... before the body ($printbody)? of the post being displayed. Then closing the form after the body is displayed. Any post inside that contains a poll may be impaired.
That whole FORM thing kind of confused me. I really didn't "create" it as you know. Allen started and Gardener did the JavaScript stuff. But it seemed to be an extra </form> in the HTML when I validated the page (or tried to) but I couldn't figure out what it was doing.
Dave will win the UBB.Threads Noble Prize for sure if he fixes Quick Reply.
I just tried it again to make sure I wasn't crazy and it told me that my post already exists......hehe I just hit the Continue button without entering anything......
Some people read their stars..... I choose to write my own
I posted a test here and asked my members to give it a test. I gave you credit for the fix.
I tested from several of my usernames, and all seems fine.
Hey, you know what. Note in my instructions I had tagged that step as (not sure)..... that's because I didn't think it was needed. But somehow when I left it out before, I had trouble. Probably because the </form> tag was still in there. Guess I was on the right track. Since I didn't "create" it, I really didn't fully understand all of it. Will let you know how I made out.
Probably if we can get it working well and show it doesn't cause problems, we can get Rick to come near it. I don't think he'd touch it with a 10 foot poll, considering what was happening to the polls.
It seems to happen when you click on the quick reply in the middle of the thread. The javascript probably needs to set the hidden field's values to the related post number or something like that.
hmmmmm I took out java code that is used in the body. That's all I did so I'll put that back and see. I'll also go over what I did. I don't think I missed anything other than excluding that unused form tag.
[]It seems to happen when you click on the quick reply in the middle of the thread. The javascript probably needs to set the hidden field's values to the related post number or something like that. [/]
No, but you probably could easily include clickable smileys at the bottom of the post list. That might be a good idea. I would think to limit it to the first 10 graemlins or so..... off to the left (to keep it simple and load fast).
The new one doesn't quote the text anymore. I didn't write the original, just tweaked it. But it's just "quick reply", no longer "quick quote" as we have a built in quote feature now.
Is the pull down post icons available as a seperate hack? They are rarely used on my site, so taking all those icons and putting them into a pull down menu would be excellent!
Hey Josh... I have already got the graemlinpanel.php file installed with the popup hack... I didn't bother u/l the one you supply, so I notice that it is popping up, however graemlins aren't inserted into the message. So, I need yours uploaded but will it cause a conflict with the popup graemlin hack?
Some people read their stars..... I choose to write my own
In the templates/alternate directory... a ubbt_icon_select.tmpl template is provided. But this only gives you a pull down for the standard icons. It doesn't factor in custom icons.
Yeah, Good question. I'll edit my instructions above.
If you are already using JustDave's WONDERFUL popup Graemlin hack.... then this uses the SAME file. So you don't need to re-upload it.
I included it in this zip, rather than saying that the other hack was required, incase somebody didn't want it for their posting pages.... you can add it with this hack without having to fool with editing any other files.
Oh man, I can't get them both to work at the same time.... *L* Thinking I'm gonna give up until someone comes up with something or 6.2 comes out...... Hiding from my users 'til then....hehe
Some people read their stars..... I choose to write my own
Josh I am getting a runtime error trying to run this one with the popup greamlin panel. Error Line 8 Doesn't support this property or method Everything else seems ok for now..
Greamlin box works perfect if you continue on with post. Just the quick reply.
Also in the instructions I see us modifying a file but it doesn't happen (/languages/showthreaded.php)
But in the list of alter files generic.php is altered but it wasn't listed up top. Should I have edited the showthreaded instead of the generic?
This looks like a winner once I get rid of that bug
Looks like it was the extra modification I added with lisas code. I uploaded the panel you supplied and it worked fine. Thanks great for another great add on!!
Ah good. You fixed it before I had a chance to look at it. Glad it works for you.
Although I didn't create it. It's originally Allen's and Gardener's work. I just updated/tweaked a bit, again basing all greatness on JustDave's work. LOL
Table wrappers? I just installed table wrappers and I see the quick reply doesn't have them. I know I had to use extra code with the reply to who that conflicted with this hack. (both working now) Perhaps that got modified during the change or not accounted for?
Quick Reply typically saves some... because people don't need to load another page to reply... they don't need to load all the greaemlins and post icons etc....
I've learned most people use it for replies, unless they are composing something lengthy... So often you are saving a page load per reply, plus all those images.
a) you might have popup stopper software installed
or you missed or made a mistake with the instructions to the templates. That's where the javascript is to pop open the new window.
If it works for you here when you click, then I would recheck your instructions.
Similar to the problem to the language files.... some of those instructions are "BELOW" or "ABOVE" this ADD this and not replace.
I've made the same mistake myself every once in a while, so used to finding this and replacing.... but some instructions in there call for you to find this and add something either below or above. I bet that's the problem. I did that just 2 nights ago.
I just finished this mod and I had the previous version so it took me a couple of hours. Everything works really well except for 1 thing. When I click on the "use Graemlins" the box pops up but it doesn't put the graemlins in the post. I can see them in the pop up box and click on them but it doesn't put them there. Does anyone have an idea where to start looking so I don't have to completely redo the mod?
It seems to be correct from what I can tell. It doesn't give an error, the gif files quit moving when I click on them though. Login: test password: test. Thanks.
I can't find that function on the showflat page at least, so it seems that you've missed the step that adds that javascript function. Or, it could be missing from the instructions, I haven't looked at it. Either way, the function DoPopupSmilie needs to be added to the javascript section of showflat.tmpl and showthreaded.tmpl.
You guys are too much. I just hope you all realize how illiterate and incompetant we feel when talking to you. Thanks a million, that at least gives me a place to start looking. I'm pretty sure I did everything according to the instructions though. I'll let ya know what I find.
OK I redid everything and it still doesn't work. I also noticed that I did the menu clock mod that uses javascript and it doesn't work either. Is there something about the javascript that might be the problem? I know next to nothing about this stuff.
Well, you didn't follow my instructions, if you had it would probably work.
There is a javascript function missing from your showflat template, without it, there is no possible way the graemlins can be added to your text box, because that is the function that actually does it.
Here is how you fix it. Find these lines in showflat.tmpl and showthreaded.tmpl (I've split one line so that this post won't be too wide):
Edit: I just took a look at the code of the graemlin popup here at threadsdev and it isn't exactly the same, it doesn't need the DoPopupSmilie() function which is probably why it isn't included in the instructions. You should probably get the latest version of the graemlinpopup script, either from this mod or from JustDaves original mod, then you don't need to do the changes above.
I just did what you told me to and it works! (at least with the showflat) I have to go to work and I'll do the rest later. Thanks a million! I really had no idea what you were talking about the first time, I thought that I had missed a step in the instructions so I redid them. After your last post I can understand what you are saying. I appreciate you guys. You have to remember that you are doing us a great service here and even though this stuff is second nature to you all, it's greek to us. Thanks again.
The one include in the first post of this thread is the correct one, which doesn't need the extra instructions I wrote.
But dman must have gotten his version from somewhere, so I'm guessing it's an old version of JustDaves graemlinpanel.php. Might be good to mention that.
Update: I bit of research tells me that the graemlinpanel.php of JustDaves Popup Graemlin Panel hack has been updated by Astaran with the added javascript function. This was to make sure the graemlin is inserted at the cursor when possible (I think, didn't read too closely). Perhaps an update of this hack is needed to include the most current version of the graemlinpanel.php and have it work. That way there won't be compatibility problems like this. =]
Clicking on USE GRAEMLINS brings up the graemlin panel but with a white background. I can only see the smilies which are working but my style for the tables is not used?
Hmm. It seems the anchor for the Quick Reply box is missing, so there is nothing to jump to for the Quick Reply link.
Also, the javascript function storeCaret() is missing from the page, so every time I enter a character into the box I get a javascript error.
Also, even though I have threaded mode set in my preferences and reply from threaded mode I get redirected to a flat view of my post. Not very nice at all.
Edit: It did work to reply with the quick reply box on threaded mode though, there were just a lot of errors when writing.
It should be using the stylesheet that you are on the main page. Not sure. This is part of JustDave's graemlin mod.... might need to wait for him to weigh in. I can't see what might be causein that.
and try posting a quick reply in threaded view there to my test forum.
I have several users there that do use the threaded view regularly, and have no trouble. I've had this version of quick reply running there about a month before I pulled it together to release.
Here is a more clear explanation of the spell check. Spell Check works fine outside of the quick reply box. It is installed in on newreply newpost editpost_nopoll etc etc. It works fine there. It produces JAVA error when clicked inside the quick reply. I checked the code you use is the same as the original spellcheck. There are multiple errors with this hack on depending with who installed it that would you not think it from the JAVAscript compiled within this hack interfering with another instance of JAVA being run?
Time to start getting everyone to list what hacks they have that use java listed
That one stumps me too.. that spell checker is so simple.... just the button which sends the form data off to spell check.net. Odd that it doesn't work on once screen, but does on others.
I don't get any javascript errors for the spellchecker here on threadsdev either on showthreaded or showflat and from what I can see in the code it looks OK. I'm using Mozilla 1.2 on Linux. But that shouldn't matter.
Possibly "document.replier.Body.value" could be changed to "document.forms['replier'].Body.value" but that shouldn't be necessary.
Edit: The storeCaret() functions is still missing here on threadsdev though, at least on showthreaded.
Is this also linked to the problem whereby if you reply to a PM, and decide to edit some more, you also get a script error when trying to add a graemlin from the pop up box.
I had the problem with the graemlinpanel.php being out of sync so that it was not putting the gremmies into the message. Got that fixed, but the updatePost function in the new panel is not quite working correctly.
The code in the Quick Reply graemlinpanel.php looks like this:
Ah you know what I think that was "leftover" from.
Gardener had a function in here that quoted the body down to the quick reply. When the Quote feature appeared in 6.2 I took the "quote" ability off of the quick reply.
Looks like it was used to "unmarkup" that.
Thanks for the report.
I'll be re-releasing this updated for 6.3 if any/many changes are needed. Shouldn't be much. I've got it running under 6.3. Probably just need to update the instructions for 6.3.
The storeCaret() and insertAtCaret() javascript code is missing in the instructions, so in threaded mode when clicking on the text area it throws a javascript error.
I don't really know Javascript. Gardener wrote that bit. The javascript in showflat assigns the post number when you click "Quick Reply". But it's not needed in threaded. You could probably safely take that out.
I've installed this on no less than 50 sites for sure, nobody's ever had an error. <shrug>
OK, everything seems to be working - but now I've noticed another minor irritation. The title of the thread ("RE: ...") shown above the main quick reply text box is often truncated. Sometimes entire words are simply "lopped off" the end. The trouble is, you can't physically ammend this problem - by clicking on the entry and adding the missing letters!
Presumably this has something to do with the way the board is configured? If so, how come the problem isn't present when replying to post via the conventional route?
I have installed quick reply 2.0 and there is a bug letting blank posts to be posted. Is this fixed in 3.0 or can be fixed ? I show Justdave's answer regarding this matter but I couldn't make it work.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.