Previous Thread
Next Thread
Print Thread
Rate Thread
#213135 01/31/2002 2:52 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Name: AutoQuote

Description: Allow your users to reply to a message while quoting someone. Lets the user just click on a link/icon and it will automatically put the tags around the body of the message that they want to qoute.

Example: http://www.terranbbs.com/testboard/ubbthreads.php (Username: test / Password: test)

Link: http://www.terranbbs.com/mods/5.5/AutoQuote.txt

Special Thanks: AllenAyers, poil, razvan for getting me started. []/forum/images/icons/smile.gif[/]

Sponsored Links
SDS #213136 02/19/2002 6:59 AM
Joined: Feb 2002
Posts: 67
Power User
Power User
Offline
Joined: Feb 2002
Posts: 67
In reply to:

Name: AutoQuote

Description: Allow your users to reply to a message while quoting someone. Lets the user just click on a link/icon and it will automatically put the tags around the body of the message that they want to qoute.

Example: http://www.terranbbs.com/testboard/ubbthreads.php (Username: test / Password: test)

Link: http://www.terranbbs.com/mods/5.5/AutoQuote.txt

Special Thanks: AllenAyers, poil, razvan for getting me started.




Hmm .. Link doesn't work - any other link available?

Joined: Feb 2002
Posts: 1
Lurker
Lurker
Offline
Joined: Feb 2002
Posts: 1
Quote


Hmm .. Link doesn't work - any other link available?


?
Attachments
44651-AutoQuote.txt (0 Bytes, 57 downloads)

jockel #213138 02/19/2002 12:15 PM
Joined: Feb 2002
Posts: 67
Power User
Power User
Offline
Joined: Feb 2002
Posts: 67
Thanks!

Regards,
Stefan

MRLefferts #213139 02/19/2002 12:57 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Which link doesn't work? Both appear to be working fine for me.

Sponsored Links
SDS #213140 02/19/2002 1:00 PM
Joined: Feb 2002
Posts: 67
Power User
Power User
Offline
Joined: Feb 2002
Posts: 67
In reply to:

Which link doesn't work? Both appear to be working fine for me.




Hmm ... strange .. tried it several times ... now it works - thanks!

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
No problem. The instructions are fairly straight-forward. Let me know if you run into any difficulties.

SDS #213142 02/19/2002 1:17 PM
Joined: Feb 2002
Posts: 67
Power User
Power User
Offline
Joined: Feb 2002
Posts: 67
In reply to:

No problem. The instructions are fairly straight-forward. Let me know if you run into any difficulties.




Installed in a fiew seconds ... thanks again!

SDS #213143 02/22/2002 9:43 PM
Joined: Feb 2002
Posts: 2
Lurker
Lurker
Offline
Joined: Feb 2002
Posts: 2

SDS #213144 03/12/2002 11:49 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay little bug between two hacks?

In this hack it has you find

echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
";

and replace with

if ($quote) {
$Body2 = ereg_replace(""",""",$Body);
$Body2 = ereg_replace("<br>","\n",$Body2);
$Body2 = $html -> undo_markup($Body2);
$quote = "[quote=$ResUsername] $Body2


";
}
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body">$quote</textarea>
<p>
";

Now the clickable image version two hack has you find the same line and has you put this instead

echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
Insert an image:<br>  
<a href="javascript:addImage('[]/forum/images/icons/blush.gif[/] ');"><img alt="{$ubbt_lang['ICON_BLUSH']}" width="15" height="15" border="0" src="{$config['images']}/icons/blush.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/cool.gif[/] ');"><img alt="{$ubbt_lang['ICON_COOL']}" width="15" height="15" border="0" src="{$config['images']}/icons/cool.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/crazy.gif[/] ');"><img alt="{$ubbt_lang['ICON_CRAZY']}" width="15" height="15" border="0" src="{$config['images']}/icons/crazy.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/frown.gif[/] ');"><img alt="{$ubbt_lang['ICON_FROWN']}" width="15" height="15" border="0" src="{$config['images']}/icons/frown.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/laugh.gif[/] ');"><img alt="{$ubbt_lang['ICON_LAUGH']}" width="15" height="15" border="0" src="{$config['images']}/icons/laugh.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/mad.gif[/] ');"><img alt="{$ubbt_lang['ICON_MAD']}" width="15" height="15" border="0" src="{$config['images']}/icons/mad.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/shocked.gif[/] ');"><img alt="{$ubbt_lang['ICON_SHOCKED']}" width="15" border="0" height="15" src="{$config['images']}/icons/shocked.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/smile.gif[/] ');"><img alt="{$ubbt_lang['ICON_SMILE']}" width="15" height="15" border="0" src="{$config['images']}/icons/smile.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/tongue.gif[/] ');"><img alt="{$ubbt_lang['ICON_TONGUE']}" width="15" height="15" border="0" src="{$config['images']}/icons/tongue.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/wink.gif[/] ');"><img alt="{$ubbt_lang['ICON_WINK']}" width="15" height="15" border="0" src="{$config['images']}/icons/wink.gif"></a>
<p>
";

Now this is what both hacks look like now?

if ($quote) {
$Body2 = ereg_replace(""",""",$Body);
$Body2 = ereg_replace("<br>","\n",$Body2);
$Body2 = $html -> undo_markup($Body2);
$quote = "[quote=$ResUsername] $Body2


";
}
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
Insert an image:<br>  
<a href="javascript:addImage('[]/forum/images/icons/blush.gif[/] ');"><img alt="{$ubbt_lang['ICON_BLUSH']}" width="15" height="15" border="0" src="{$config['images']}/icons/blush.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/cool.gif[/] ');"><img alt="{$ubbt_lang['ICON_COOL']}" width="15" height="15" border="0" src="{$config['images']}/icons/cool.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/crazy.gif[/] ');"><img alt="{$ubbt_lang['ICON_CRAZY']}" width="15" height="15" border="0" src="{$config['images']}/icons/crazy.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/frown.gif[/] ');"><img alt="{$ubbt_lang['ICON_FROWN']}" width="15" height="15" border="0" src="{$config['images']}/icons/frown.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/laugh.gif[/] ');"><img alt="{$ubbt_lang['ICON_LAUGH']}" width="15" height="15" border="0" src="{$config['images']}/icons/laugh.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/mad.gif[/] ');"><img alt="{$ubbt_lang['ICON_MAD']}" width="15" height="15" border="0" src="{$config['images']}/icons/mad.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/shocked.gif[/] ');"><img alt="{$ubbt_lang['ICON_SHOCKED']}" width="15" border="0" height="15" src="{$config['images']}/icons/shocked.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/smile.gif[/] ');"><img alt="{$ubbt_lang['ICON_SMILE']}" width="15" height="15" border="0" src="{$config['images']}/icons/smile.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/tongue.gif[/] ');"><img alt="{$ubbt_lang['ICON_TONGUE']}" width="15" height="15" border="0" src="{$config['images']}/icons/tongue.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/wink.gif[/] ');"><img alt="{$ubbt_lang['ICON_WINK']}" width="15" height="15" border="0" src="{$config['images']}/icons/wink.gif"></a>
<p>
";

The images are there and they work but quote does not? You can still reply no big deal but no auto quote!! any ideas?


Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I see the autoquote does not work here as well because of the body images v2 hack!! HMMM if you take the body images code out of newreply.php quotes work.

The only difference in coding if you read it is that the java images are placed between the </textarea> and <p> tags
which of course somehow is messing with something.

Last edited by omegatron; 03/12/2002 2:27 PM.
damien #213146 03/13/2002 8:59 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
anyone figure out the problem or bug. I am only guessing that the javacode of the clickable images are interfereing with the quote code.

sf49rminer #213147 03/14/2002 12:46 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Hmm, this one is interesting. I haven't had time to install the clickable images hack on my site or I would have caught this one myself.

I'll have to look into it when I get a chance and see what I can come up with. Don't know when that will be. Work, school, etc. is rapidly draining my time away. []/forum/images/icons/smile.gif[/]

SDS #213148 03/14/2002 8:27 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Thanks as you can see even here on this site quote no longer works because of the image buttons. I assume it is a java conflict of sorts. I have tried moving the code a bit but nothing works.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Yes, Ihaven't stopped to find out why/how yet, but yes, you are right []/forum/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Anyone figure out how to get the clickable Icons and Autoquote to play fair with each other?


Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
I haven't had the time to be honest. If anyone else would like to take a look at it, please go right ahead. I don't know when I'll have the time.

Life, school, work, etc.

Joined: Apr 2002
Posts: 3
Lurker
Lurker
Offline
Joined: Apr 2002
Posts: 3
Well, the solution's quite simple really - you're missing the $quote variable in the "Body" textarea. So what you have at the moment is :
----------------------------------------
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>

-------------------------------------------
it should be :
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body">$quote</textarea>
-------------------------------------------------------
note the $quote []/forum/images/icons/smile.gif[/]

that is all.

liugj #213153 04/12/2002 4:31 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Actually, the instructions say to do just that. I don't believe that is the issue. The instructions read:

code:
2a. Locate the following around line 302:

echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
";

2b. Replace that with:

if ($quote) {
$Body2 = ereg_replace(""",""",$Body);
$Body2 = ereg_replace("<br>","\n",$Body2);
$Body2 = $html -> undo_markup($Body2);
$quote = "
Originally Posted by $ResUsername
$Body2
";
}
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body">$quote</textarea>
<p>
";

I still haven't had the chance to look into this at all. I've been really busy with transferring webhosting companies, school, etc. I'm also waiting for v6.0 to come out so that I can see how this works with the templates and determine what other modifications may be required in order for it to operate correctly. I'll get around to it eventually. []/forum/images/icons/smile.gif[/]

SDS #213154 04/12/2002 4:50 AM
Joined: Apr 2002
Posts: 3
Lurker
Lurker
Offline
Joined: Apr 2002
Posts: 3
Well - i know the instructions say to do what you just posted, i installed it this morning without any problems, with the whole two hack thing aswell. - however - if you read omegatron's previous post - the one with all the code in it - you'll see the combined hack code he pasted is missing the necessary variable.

At the bottom of the post he even says that everything works fine except for the quote button : "Nothing Happens" - just means it's not displaying the $quote variable. Anyway *shrugs* use it don't use it []/forum/images/icons/smile.gif[/]

liugj #213155 04/12/2002 2:25 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Thanks, That worked like a charm!

Seems to have fixed it perfectly.


liugj #213156 04/12/2002 3:21 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Ah, I see what you're getting at. I didn't realize you were referring to the combined code published above. My mistake.

I'm glad to see it was such an easy fix. I'll take it off of my list of things to work on. []/forum/images/icons/laugh.gif[/]

liugj #213157 04/12/2002 9:47 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
With the combined hacks you see if does not work here either before they switched to 6.0


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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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 20221218)