Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
#230043 12/26/2002 11:03 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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>";


Attachments
62542-QuickReply3.0.zip (0 Bytes, 222 downloads)

Last edited by JoshPet; 02/23/2003 12:02 AM.
Sponsored Links
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
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


Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
EEK
Thanks for the "quick reply"
(Pun Intended hehe)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Sponsored Links
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I may try installing it yet tonight and just work the bugs out from here... lol

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ok this seems to be working...

What I changed, actually excluded, was this step:


Code
<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:


Code
<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 />&nbsp; </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.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
FYI - I also get the same error here on threaded, but this time on line 399

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Does that code server any purpose in either flat or threaded?

Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239


Some people read their stars..... I choose to write my own
#230063 12/31/2002 6:29 PM
Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
How can we fix that ^ pointing upward.....


Some people read their stars..... I choose to write my own
#230064 12/31/2002 6:32 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
hmmmmm perhaps I should put that code back in? lol

#230065 12/31/2002 6:33 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Does this one take???....

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Seems to be working... not sure what you did there Storm.. lol

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
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
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
That


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Post deleted by JustDave

Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
Yayyyyyyy! He did it..... hehe


Some people read their stars..... I choose to write my own
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
ahhh yes... I do recall someone saying something about this error once before..

I wonder why addpost.php isn't catching that?



Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
What a wonderful little mess.

Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
Well, at least it only lets us do it one time.....


Some people read their stars..... I choose to write my own
#230075 12/31/2002 6:53 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
And one mod that should be standard

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]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.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Was the error in threaded fixed by the removal of onkeyup="storeCaret(this);" onclick="storeCaret(this); then? As I see it is now working


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I guess so.

I removed that code since it didn't seem to be needed.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I didn't remove any code from showthreaded.... but I never had errors there.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Has the attachment been updated so the rest of us mortals can play with this one?

Page 1 of 5 1 2 3 4 5

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)