Previous Thread
Next Thread
Print Thread
Rating: 9
#218169 06/07/2002 1:50 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Name: AutoQuote v2.0

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 quote.

Updates: Moved all HTML into templates. Modified code to be XHTML compliant.

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

Link: http://www.terranbbs.com/ubb/mods/6.0/AutoQuote.txt

Special Thanks: AllenAyers, poil, and razvan for getting me started, and JustDave for helping me with the bug fixes.

Sponsored Links
SDS #218170 06/07/2002 1:53 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Just a note... I believe the <hr> tags need to be <hr /> to be xhtml compliant too.

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Yep, missed that one. I've fixed the instructions file.

SDS #218172 06/07/2002 6:07 PM
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
good job. But what I don't understand is why this isn't a standard feature for threads?

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Believe me, that's a question I've been asking for quite some time. Especially since it's a feature in UBB.classic

*shrug*

Only Scream can answer that one.

Sponsored Links
SDS #218174 06/09/2002 2:54 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks for this. Works great...

Ian.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Writes canvey:
Thanks for this. Works great...

Ian.


I agree


- Allen wavey
- What Drives You?
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Glad 'ya both like it. One of my few actual contributions to the software.

SDS #218177 06/10/2002 10:03 AM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Originally Posted by WrÅith
Name: AutoQuote v2.0

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 quote.


As you can see, there is a problem with it as it is right now: Its not language dependent.
You should be using [:"red"]{$ubbt_lang['TEXT_QUOTE']}[/] instead of hardcoded "
[:"blue"] quote [/] .

For example, though I havent tested it, I think:
[:"blue"] $quote = "
Originally Posted by $ResUsername
$Body2
"; [/]
should be changed to:
[:"red"] $quote = "[{$ubbt_lang['TEXT_QUOTE']}=$ResUsername] $Body2 [/{$ubbt_lang['TEXT_QUOTE']}]"; [/]


Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
That should work. I'll test it out later this afternoon when I'm at home and I have access to my computer.

Sponsored Links
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Seems to work just fine. I've updated the instructions accordingly.

SDS #218180 06/12/2002 8:32 PM
Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
Hi,

I've obtained the autoquote from http://www.terranbbs.com/ubb/mods/6.0/AutoQuote.txt. However, there seems to be a problem. In part seven, you're supposed to open ubbt.inc.php and edit the ///quote markup. However, I can't find the exact lines in my ubbt.inc.php. Could anyone please help me? Anyone else have this problem? Thanks!

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Unless you are using the v6 final code, your lines will be different, they changed from the last beta to the final coding.


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
umm.. yeah, i'm using the final code... dunno why!

Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
fixed that..
what does this supposed to mean?

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/www/e46toronto/forum/newreply.php on line 253

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Same problem here. My problem is that I installed the MarkUpHack, and that has you change the whole section from ubbt.inc.php that the autoquote hack also asks you to change. (That's why the lines aren't there.)


[:"red"]Lisa[/]
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
I have both installed and haven't run into any problems. Can you show me what you put into your newreply.php at that line location?

SDS #218186 06/12/2002 11:42 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
I was slow hitting the continue button after I typed that. Sorry! I actually meant I had the previous problem. I don't know where to put in the "Quote Markup" stuff because those lines are no longer in my ubbt.inc.php.


[:"red"]Lisa[/]
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
In a clean ubbt.inc.php file the quote markup sections are found beginning at lines 569 and 661.

SDS #218188 06/13/2002 4:47 PM
Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
Writes WrÅith:
In a clean ubbt.inc.php file the quote markup sections are found beginning at lines 569 and 661.


Could you please tell me how you added those lines to ubbt.inc.php when you have MarkUpHack installed? Thanks!

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
I have the MarkAllRead hack installed that only works on an entire board basis. I haven't installed the second revision that will mark each forum as read individually. I'll take a look though and see If I can spot where they can be reconciled.

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Writes stanmo:
Could you please tell me how you added those lines to ubbt.inc.php when you have MarkUpHack installed? Thanks!
Okay, maybe I'm missing something here, but I don't see where ubbt.inc.php is modified as part of the MarkAllRead hack. Either with v6.0 or v6.1. I'm not sure if I'm missing something here or not, but the lines that I instruct you to replace are there in the clean version of UBB.threads and I don't see anywhere in either v6.0 or v6.1 of the MarkAllRead hack that you're instructed to remove them or modify them.

Can you explain a little bit about the steps you've taken so far?

SDS #218191 06/13/2002 5:40 PM
Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
Oh, actually Lisa and I are talking about MarkUpHack not MarkAllRead! hehehe..

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Okay, that makes better sense. LOL, I really need to stop copying JustDave and quit staying up until 3:00 AM. It's starting to affect my brain.

Okay, what I would do is look for the following line :

code:
function do_markup($Body="") {


Add the lines from Part Seven - Step 2b after that.

Then, look for this line :

code:
function undo_markup($Body="") {


Add the lines from Part Seven - Step 3b after that.

Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
Can you please tell me how should I fix this?

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/www/e46toronto/forum/newreply.php on line 253

The first line is my 250...

code:
// ------------------------------------
// No options, we use the board default
else {
if ( ($HTML == "Off") && ($Markup == "On") ) {
$markupselect = "<input type="hidden" name="convert" value="markup" />";
}
elseif ( ($HTML == "On") && ($Markup == "On") ) {
$markupselect ="<input type="hidden" name="convert" value="both" />";
}
elseif ( ($HTML == "Off") && ($Markup == "Off") ) {
$markupselect ="<input type="hidden" name="convert" value="none" />";
}
else {
$markupselect = "<input type="hidden" name="convert" value="html" />";
}
}

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

if ($postername != $ubbt_lang['ANON_TEXT']) {
$emailselect = "
<input type="checkbox" name="mail" value="1" $Eselected class="formboxes" />
{$ubbt_lang['DO_EMAIL']}
<br /><br />



Thank you again!!!

Last edited by stanmo; 06/13/2002 7:26 PM.
SDS #218194 06/17/2002 9:50 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
posted by WrÅith:
Okay, that makes better sense. LOL, I really need to stop copying JustDave and quit staying up until 3:00 AM. It's starting to affect my brain.




yes, that will do it


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
I am now having the same problem stano is having. After going to 6.0.1 and re-applying the hack its broken. Getting a parse error for this:

$quote = "[{$ubbt_lang['TEXT_QUOTE']}=$ResUsername]$Body2[/{$ubbt_lang['TEXT_QUOTE']}]";

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Weird. I upgraded to 6.0.1 without any problems. There isn't anything in that line that would be causing a parse error that I can see. I'll look into it some more and see if I can come up with anything.

Joined: Mar 2001
Posts: 26
User
User
Offline
Joined: Mar 2001
Posts: 26
posted by msula:


$quote = "[{$ubbt_lang['TEXT_QUOTE']}=$ResUsername]$Body2[/{$ubbt_lang['TEXT_QUOTE']}]";


Try to put a blank before and after $Body2

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Ack, you're right. I didn't even notice that. I ran into the same problem when I first did it and I forgot to update the instructions. I'll fix them when I get home to include the spaces around $Body2

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Just thought I'd make a note that the conflicting lines have been sorted out in the new version of my MarkupHack. The markup won't be exactly the same, but it should be adequate I think.

The new hack can be found in this thread.

SDS #218200 06/20/2002 9:08 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Instructions have been updated to reflect correct spacing. They can be downloaded at the link in the first post.

SDS #218201 06/22/2002 11:29 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
This mod has been moved to the finished forum at this location. Please close this thread.


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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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
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)