MOD NAME: QUICK REPLY MOD 3.0
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
FILES MODIFIED: showflat.tmpl, showflat.php, languages/english/showflat.php, showthreaded.php, showthreaded.tmpl, languages/generic.php
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
For discussion and bug reports, please come here:
https://ubbdev.com/ PLEASE MAKE BACKUP COPIES OF EVERY FILE YOU PLAN TO MODIFY!! Note: If you are running JustDave's very popular "Reply to Who" mod, you won't be able to find the code it tells you to find in showflat.php
Instead, look for
the second occurance of this:
$postrow[$i]['Subject'] = $Subject;
Change to this:
$postrow[$i]['Subject'] = "<span id="subject$i">$Subject</span>";
Hi Josh,
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.
EEK
Thanks for the "quick reply"
(Pun Intended hehe)
I may have spoken too soon.
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
Thanks Josh
Pappy,
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.
I had taken it off my site. But I just put the files back so it's there.
You will be the Hero for fixing this. I don't think it validates. LOL
I'll PM you with a login to my site ... as you have to login to test.
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 may try installing it yet tonight and just work the bugs out from here... lol
Ok this seems to be working...
What I changed, actually excluded, was this step:
<br />##<br />## Find this: (not sure)<br />##<br /><br /></td><br /></tr><br />$tbclose<br /><br /><br /><br /><br />$tbopen<br /><tr><br /><td colspan="2" class="tdheader"><br />$pageprint<br /></td><br /></tr><br />UBBTPRINT;<br /><br /><br />##<br />## Change to this:<br />##<br /><br /></td><br /></tr><br />$tbclose<br /><br /><br /><br /><br /><form name="posts" id="posts"><br />$tbopen<br /><tr><br /><td colspan="2" class="tdheader"><br />$pageprint<br /></td><br /></tr><br />UBBTPRINT;<br />
and then I removed the </form> closing tag from here:
<br />$pageprint<br /></td><br /></tr><br />$tbclose<br /><br />[:"red"]</form>[/]<br />UBBTPRINT;<br /><br />// -----------------------------------------------------<br />// Make sure we only put one Re: in front of the subject<br /> if (!ereg("Re:",$Subject) ) {<br /> $Subject = "Re: ".$Subject;<br /> }<br /><br /><br />if (($user['U_Username']) && ($Open != "C")) {<br />echo <<<UBBTPRINT<br /><table width="{$theme['tablewidth']}" align="center" cellpadding="1" cellspacing="1" class="tablesurround"><br /><tr><br /><td><br /><table cellpadding="4" cellspacing="1" width="100%" class="tableborders"><br /><tr><br /><td valign="top" class="tdheader" colspan="2"><br />{$ubbt_lang['QUICK_REPLY']}</td></tr><br /><tr><br /><td valign="top" class="darktable" width="17%"><br /> </td><br /><td valign="top" class="lighttable"><br /><form method="post" enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php" name="replier"><br /><input type="hidden" name="postername" value="{$user['U_Username']}" /><br /><input type="hidden" name="Board" value="$Board" /><br /><input type="hidden" name="Cat" value="$Cat" /><br /><input type="hidden" name="Reged" value="y" /><br /><input type="hidden" name="page" value="$page" /><br /><input type="hidden" name="Main" value="$current" /><br /><input type="hidden" name="Parent" value="$Number" /><br /><input type="hidden" name="view" value="$view" /><br /><input type="hidden" name="what" value="showflat" /><br /><input type="hidden" name="sb" value="$sb" /><br /><input type="hidden" name="o" value="$o" /><br /><input type="hidden" name="oldnumber" value="$oldnumber" /><br /><input type="hidden" name="fpart" value="$fpart" /><br /><input type="hidden" name="vc" value="$vc" /><br /><input type="hidden" name="replyto" value="$ResUsername" /><br /><input type="hidden" name="Icon" value="book.gif" $book /><br /><input type="hidden" name="convert" value="markup" /><br /><input type="text" name="Subject" maxlength="{$config['subjectlength']}" class="formboxes" size="60" value="$Subject" /><br /><br /><textarea cols="60" rows="10" class="formboxes" name="Body" onkeyup="storeCaret(this);" onclick="storeCaret(this);"></textarea><br /><br /><br /><br /><br /><input type="submit" name="textcont" value="{$ubbt_lang['TEXT_CONT']}" class="buttons" /><br /></form><br /></td></tr><br /></table></td></tr></table><br />UBBTPRINT;<br />} //UBBTREMARK<br /><br />echo <<<UBBTPRINT<br /><br /><br /><br />$tbopen<br /><br />
There didn't seem to be a purpose for this form.
Hope this works for everyone else.
Dave,
Installed with your modifications - and it is working fine in flatmode - and allows polls to be placed - and voted upon.
However in Threaded view - I get an error on line 610 object expected character 1.
This is
$sth = $dbh -> do_query($query);
However the error, allows the quick reply box to be filled and submitted without further error. (polls also work in threaded)
Ian
FYI - I also get the same error here on threaded, but this time on line 399
Ian
I hardly ever user threaded... lol
I knew the polls worked, or at least I thought they were working, in threaded so I never checked to see otherwise.
Is it a javascript error or an actuall database/php error?
Your probably seeing a javascript error for what ever browser your using, IE perhaps?
I don't believe that the code in this line: (in red)
<textarea cols="60" rows="10" class="formboxes" name="Body" [:"red"]onkeyup="storeCaret(this);" onclick="storeCaret(this);[/]">
servers any purpose.
That is unless your using the instant ubbcode panel.
Does that code server any purpose in either flat or threaded?
How can we fix that ^ pointing upward.....
hmmmmm perhaps I should put that code back in? lol
Does this one take???....
Seems to be working... not sure what you did there Storm.. lol
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......
That
Yayyyyyyy! He did it..... hehe
ahhh yes... I do recall someone saying something about this error once before..
I wonder why addpost.php isn't catching that?
What a wonderful little mess.
Well, at least it only lets us do it one time.....
Thanks Dave for your efforts on this. I will put your change into effect on my site and let you know.
This is one of the coolest mods ever... but it's been one with bugs to work out. Hope we get them this time.
And one mod that should be standard
Ian
I think this is working Dave.
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.
Thank you again!
[]And one mod that should be standard
Ian [/]
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.
Was the error in threaded fixed by the removal of onkeyup="storeCaret(this);" onclick="storeCaret(this); then? As I see it is now working
I guess so.
I removed that code since it didn't seem to be needed.
I didn't remove any code from showthreaded.... but I never had errors there.
Has the attachment been updated so the rest of us mortals can play with this one?
I'll check it and update if necessary.
Let me check.
Main Post has been updated to version 2.1 which includes JustDave's bug fixes.
[]Main Post has been updated to version 2.1 which includes JustDave's bug fixes.
[/]
I tried using the quick reply in this thread and I got an error saying that the post I am replying to had been deleted
Hmm.. worked for me.
Was there a reply that someone started which is now gone??
What post were you replying to?
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.
It's working for me at my site, but not here.
Maybe a step was missed here at threads dev?
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.
[]Hmm.. worked for me.
Was there a reply that someone started which is now gone??
What post were you replying to? [/]
The last post that you made at the time.
[]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. [/]
Yup, still broken here
I think it's just broken here at threadsdev. Either a missing step, or might be a conflict with something else.
Hmm, I can't get this installed due to the first step:
I can't find this
[]#######################
## Open showflat.php ##
#######################
##
## Find this:
##
if ($ParentPost) {
$postrow[$i]['Subject'] = "<a href="{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1" target="_new" title="{$ubbt_lang['RESPONSE_TO']}$ParentPost" alt="{$ubbt_lang['RESPONSE_TO']}$ParentPost">$Subject</a>";
}
[/]
The only other hacks I have installed right now are the Reply to Who, and the birthday hack. Hmm..
Did anyone ever fix the blank post bug?? Maybe I missed it?
You can blank post with the standard .threads reply/post by adding more than one blank space to a post. I'll demonstrate in the test board.
To prevent the single blank space from being accepted change this line located in addpost.php:
if ( (preg_match("/^\s*$/",$Subject)) || ($Body == "") || ($postername == "") ) {
to this:
if ( (preg_match("/^\s*$/",$Subject)) || ($Body == "") || ($postername == "") || ($Body == " ") ) {
Wow! That was fast...... hehe
Thanks as always Dave!
Here's a better way. This one will keep those from entering a ton of blank spaces from submitting the post.
$TempString = str_replace(" ","",$Body);
if ( (preg_match("/^\s*$/",$Subject)) || ($Body == "") || ($postername == "") || ($TempString == "") ) {
Awesome!!!!!!
To add the spell checker to the quick reply box...
in showflat.tmpl
after
<input type="submit" name="textcont" value="{$ubbt_lang['TEXT_CONT']}" class="buttons" />
add
<input type="button" name="spellcheck" value="{$ubbt_lang['SPELL_CHECK']}" onclick="window.open('http://www.spellcheck.net/cgi-bin/spell.exe?action=checkpg&string='+escape(document.replier.Body.value + '\\r\\n\\r\\n'), 'message', 'toolbar=yes,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,width=500,height=500');" class="buttons" />
(I've changed the width to 500 so that the user does not have to scroll from left to right, to see all the text in the box.)
Cool. Thanks Dave for the Fix.
Thanks Canvy for the Spell Checker Add.
Anyone tried adding smilies to this?
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).
Works great!! Now people on my board wont have to worry about which "reply" to click ;-))
-Jason
One problem for me that I dont get:
insertAtCaret(obj.Body, ' ');
All I get inserted is a spcae - not the text of the message. The "old" line was:
insertAtCaret(obj.Body, '[{$ubbt_lang['TEXT_QUOTE']}]' + document.getElementById('post' + id).innerHTML + '[/{$ubbt_lang['TEXT_QUOTE']}]\\n\\n');
Which worked - except it included the HTML tags which dont get converted...?
Even here if I click, I get a space.
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.
Doh! Makes sense. By the way, I still get that deleted error here for some reason.
***UPDATE - I'm updating the file in the main post to version 2.2****
If you have this installed all ready, do this:
Find this line:
if (($user['U_Username']) && ($Open != "C")) {
and change it to this:
if (($user['U_Username']) && (($Open != "C") && ($Open != "M"))) {
There are
2 of them in showflat.tmpl and
1 of them in showthreaded.tmpl file.
Without this, it allows a quick reply to a pointer (when a post is moved) and let me tell you.... that did some WACKY stuff.
So make that tweak and you'll be all set. If you haven't installed yet, I'm updating the file attached to the first post in this thread.
thanks josh... I'll be using this one today
Has anyone got this running with the the "Reply to Who" hack?? Maybe I should have put in quick reply first??
Yes, you are basically going to find this in showflat.php:
<br /><br /> if ($ParentPost) {<br /> $postrow[$i]['Subject'] = "<a href=\"{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1\" target=\"_new\" title=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\" alt=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\">$Subject</a>";<br /> }<br /><br />
and change to this:
<br /> $postrow[$i]['Subject'] = "<span id=\"subject$i\">$Subject</span>";<br /> $postrow[$i]['replyto_link'] = "<a href=\"{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1\" target=\"_new\" title=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\" alt=\"{$ubbt_lang['RESPONSE_TO']}$ParentPost\">";<br />
Hope that helps.... that's the only area where the 2 hacks cross paths.
Josh, if I haven't said it before... And hell, I have....hehe
THANKS man!! Hope the weekend is going well....
Updated the main post to Version 3.0!
Version 3.0 adds a Pulldown Menu for Post Icons, a Preview Post Button, a Spellcheck button and a popup Graemlin Panel (thanks JustDave)
DEMO: at
www.measurection.comYou have to login username: testing
password: testing
Once you do, all you'll see is a testing forum...in there, you can try it out.
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?
Ok, just tested and they both work great! Thanks again Josh! Man, this one is awesome!!!!!!!! Already getting raves and I just added it....
Dlantech... There is a seperate hack for that but both the spelling and the drop down is included in the instructions for the quick reply 3.0
Dalantech -
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.
I have posted instructions
here.
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.
Actually, ya have to use the file you have there Josh, there's no code for the quick reply box in Dave's WONDERFULLY AWESOME hack....
Right.... but the graemlinpanel.php script is the same... is taken (er.. borrowed with permission) from the graemlin panel hack.
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
What can't you get to work together?
The graemlin panel and the Quick Reply?
Install the graemlin panel first... then do quick reply.... but don't bother to upload the graemlinpanel.php scrip...as it's already there.
Hey Josh......
It's the Reply to Who and Quick Reply conflicting I think.... I have quick reply in now .....
Updated the instructions to include GERMAN language file additions - thanks jluerken.
no prob Josh,
If someone else is working on a hack which maybe needs a translation into german simply mail me!
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html> <br /><head> <br /><title>Graemlin Panel</title> <br /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <br /><link rel="stylesheet" href="/ubbthreads/stylesheets/test.css" type="text/css" /> <br /><script language="JavaScript" type="text/JavaScript"> <br />function updatePost(GraemlinCode) { <br />window.opener.DoPopupSmilie(GraemlinCode); <br />}
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
I'm good at riding on coattails.
fixed code in original post?
huh
?
We are running version 3.0 here at threadsdev now.
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?
Josh
Do you know if this mod creates any extra bandwidth?
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.
It's faster and uses less bandwidth.
Sounds like my next hack.
OK, Looks like I don't have this in showflat.php because I did the "reply to who" hack, what do I need to do?
## Find this:
##
if ($ParentPost) {
$postrow[$i]['Subject'] = "<a href="{$config['phpurl']}/showthreaded.php?Cat=$Cat&Board=$Board&Number=$ParentPost&page=$page&view=$view&sb=$sb&o=$o&vc=1" target="_new" title="{$ubbt_lang['RESPONSE_TO']}$ParentPost" alt="{$ubbt_lang['RESPONSE_TO']}$ParentPost">$Subject</a>";
}
If you are running the "Reply to Who" mod..... you won't be able to find that one bit in showflat.php
Instead, look for this:
$postrow[$i]['Subject'] = $Subject;
Change to this:
$postrow[$i]['Subject'] = "<span id="subject$i">$Subject</span>";
Josh
The line: $postrow[$i]['Subject'] = $Subject;
appears twice, is it the last one?
Correct!
I'll add clarification instructions to my first post, as these two hacks together are common....but confuse people.
Hmmm, I'm getting funky code at the top of every page like this:
$ubbt_lang['QUICK_REPLY'] = "Quick Reply:"; $ubbt_lang['POST_ICON'] = "Post Icon:"; $ubbt_lang['PREVIEW_REPLY'] = "Preview Reply"; $ubbt_lang['USE_GRAEMLINS'] = "Use Graemlins"; $ubbt_lang['SPELL_CHECK'] = "Check Spelling";
Any ideas?
When you put those strings in the language file.... They need to be just ABOVE the PHP closing tag ?> or else it'll output them as text.
Check your language file modifications and make sure each string is within the PHP tags <? and ?>
That's what I get for doing this when I'm a sleep, I read it as <? (I thought that was odd) Thanks again.
When I click on "Use Graemlins" nothing happens, is that another add-on hack?
You need to upload that included graemlin popup script to your threads directory.
That's part of the popup graemlin hack.. but I included it in this zip as well... so that you should have everything you need.
You just upload both to the main threads dir right?
Then if the popup isn't opening.....
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 was afraid of that.
Weird, the "Use Graemlins" popup works in threaded view but not in flat mode and the "quick reply" links do not work on threaded or flat.
All those are Javascript related.
I'd check your showflat.tmpl and showthreaded.tmpl files again.
Might want to start fresh with find and replace.
Um... what am I doing wrong? I've downloaded the zip file twice and both times, the install text file is corrupt. Help? Please?
I just d/l it again and it seems fine on my end. What text editor are you using to view it?
Ok.... I just used noted and it's ok. In notepad, it looked like i had downloaded it in binary.
Ok cool.... I use Ultra Edit here.... Glad it's working.....
Oh Man! This is SWEET! Thanks guys! AWESOME mod!
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?
See if it behaves that way for both showflat and showthreaded.
It's most likely the javascrpt at the top of showflat.tmpl or showthreaded.tmpl
But checking if it works in one and not the other may help narrow it down.
Thanks for the quick reply (excuse the pun
). It doesn't work in either one. It does the exact same thing.
Hmm.....
Then I'm not really sure.
Javascript really isn't my thing. (I didn't create that part).
Maybe JustDave, Gardener or a javascript guru will have an idea.
Thanks, I am trying to learn this and since it looks like it is supposed to then it's not in the template mods, am I correct in thinking this?
Just a guess, is the name of the reply form correct?
Could you give me a link to where it is, seeing the javascript error when clicking on the graemlin would surely help a lot.
http://www.doording.com/ubbthreads/login.php?Cat=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.
Most people have javascript errors turned off, so you wouldn't normally see them. Luckily, because there are quite a few of them while surfing...
When clicking on a graemlin opened from the quick reply box I get :
Error: window.opener.DoPopupSmilie is not a function
Source File:
http://www.doording.com/ubbthreads/graemlinpanel.phpLine: 9
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):
<br />function openGraemlinPanel() { <br /> graemlinWindow=window.open('http://www.doording.com/ubbthreads/graemlinpanel.php','graemlinpanel', <br />'scrollbars=yes,resizable=yes,width=300,height=400'); <br /> if (graemlinWindow.opener == null) graemlinWindow.opener = self; <br />} <br />
Add this code below in both files:
<br />function DoPopupSmilie(addSmilie) { <br /> insertAtCaret(document.replier.Body, ' '+ addSmilie + ' ' ); <br /> document.replier.Body.focus(); <br /> return; <br />} <br />
To make your clock work, you will have to find these lines:
<br /> window.setTimeout("tick(); <br />", 100); <br />
And replace them with this:
<br /> window.setTimeout("tick();", 100); <br />
I hope this is clear enough this time.
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.
Thanks Gardener.
There seems to be two versions of the graemlin popup panel, one which needs the extra function. Is that two different versions or what?
Not to my knowlege... but maybe.
I'm confused.... did the graemlin panel I included here work? I just included it from the other mod.... unless somethings been updated along the way.
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. =]
Will update this tonight.
I had this already installed 64685-graemlinpanel.6.2.zip if this helps.
The Spell Check feature I see works here. I get this error
document.replier.Body.value is null or not an object.
I have a question to 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?
Look at this:
http://www.clanforums.com/ubbthreads/graemlinpanel.phpBefore I start searching maybe one of you can directly say where the problem is...
Couple of isues in threaded view here at ThreadsDev..
1) If I click quick reply in threaded view nothing happens - I am not directed to the box (this is working on my version but not here)
2) If I do a quick reply I am getting a 'Runtime Error' Line 398 'Object Expected' (this also happens on my install)
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.
Interesting to say the least. One the site I have this installed on everything works as expected. However the spell check does not.
Weird to say the least. Lovely java editor error thing some up.
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.
I'm wondering if this is a browser/javascript error.
Just tried threaded view on your board... as an admin, no errors. Worked fine.
Go to
www.measurection.comusername: testing
password: testing
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.
Yes I know it is odd but it does invoke JAVA. I know there is an age old thing that JAVA can not be invoked twice. Who knows.
Hmmmm....
I'm really Java clueless.
I need to learn more.
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.
Ian
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:
<br />function updatePost(GraemlinCode) {<br /> BodyVal = opener.document.replier.Body.value;<br /> opener.document.replier.Body.value = BodyVal + GraemlinCode;<br />}<br />
This will always insert the graemlins at the end of the message rather than at the caret (cursor position).
If you change that function to this it will once again insert the graemlin at the caret:
<br />function updatePost(GraemlinCode) {<br /> opener.insertAtCaret(opener.document.replier.Body, GraemlinCode + ' ' );<br /> opener.document.replier.Body.focus();<br />}<br />
Hope that helps someone.
Thanks!
I'm just adding this now.
What has changed since 3.0?
Suggestion if it's not done already...
$tbopen and $tbclosed should be used instead
3.0 is the latest version. But it does not use the tbopen/tbclose though. The latest is attached to the first post in the thread.
It should.
Probably in the next update.
Okay so 3.0 contains the fixes within all these replies except a few recent ones here (if any) then?
Yeah, should be the most current.
I've installed it on a bunch of sites.
Okay thanks, I wasn't sure where to start reading this thread to find fixes to 3.0.
In the instructions for threaded view this looks like redundant code:
$Body2 = $html -> undo_markup($Body);
$Body2 = ereg_replace(""",""",$Body2);
$Body2 = ereg_replace("<br />","\n",$Body2);
$Body2 is never used.
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.
Error in instructions for showthreaded.tmpl
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.
This occurs on this site too.
Where are you clicking to get an error?
We've had this here for eons.
Haven't had any trouble.
Using Internet Explorer.
You click on the edit box in threaded mode. The two functions aren't given in the instructions and the mouse events cause errors.
<textarea cols="60" rows="10" class="formboxes" name="Body" onkeyup="storeCaret(this);" onclick="storeCaret(this);"></textarea>
showflat.tmpl instructions contains the javascript, showthreaded instructions does not
The events onkeyup and onclick cause object not found errors.
Hmmmm...
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>
I'm thinking that there doesn't need to be any Javascript in showthreaded.
In an older version it used to "quote" the whole message down. But now that we've got the Quote function built in, it's not used anymore.
I'll be updating and releasing this for 6.3 soon.
I think you can change this in showthreaded
<textarea cols="60" rows="10" class="formboxes" name="Body" onkeyup="storeCaret(this);" onclick="storeCaret(this);"></textarea>
To this:
<textarea cols="60" rows="10" class="formboxes" name="Body"></textarea>
See if that solves it, and it all still works.
I am using UBBThreads v6.2.
I've just installed v3.0 of the Quick Reply mod and everything seemed to go according to plan. I tested it in Flat mode - and it worked perfectly.
I then tested it in Threaded mode and received a Javascript error. Every time I click on the main text box, I receive the following warning:
A Runtime error has occurred
Do you wish to debug?
Line: 587
Error: Object Expected If I do run my debugger, it hi-lights the text as shown (in yellow):
onclick=" [:"yellow"]storeCaret(this)[/] ;"
Again, this error only occurs on the Threaded version. The Flat version works perfectly.
Any help would be most appreciated!
Did you just read my post above.
I just posted the fix for that same question.
Wow -
That's what I call sneaky!
...but your solution appears to work!
he he Someone just asked that this morning.
Looks like there's some javascript hanging around from an older version of this. It's no longer used.
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 think it does that when there are special characters... particularly quote marks seem to be the culpret.
This will be getting an overhaul for 6.3. I've got a couple new gizmos in the works for it.
I'll look at tracking that one down.
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.
OK -
I have released version 3.1 - which is for UBB.Threads version 6.2 ONLY. I have posted it
here.
I have also completed version 4.0 - which adds a few new things, and works for UBB.Threads version 6.3 ONLY. I have posted it
here.
Continue discussions there.
Edit: the bug for blank posts is fixed in 4.0.