testing quote

Tell us how to make this service better.

Moderators: chossmonkey, Dom, granite_grrl

testing quote

Postby Fred » Wed Apr 12, 2006 7:12 pm

We seem to have been experiencing some difficulties with the "quote" command.

this is a test
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Re: testing quote

Postby Fred » Wed Apr 12, 2006 7:12 pm

Fred wrote:We seem to have been experiencing some difficulties with the "quote" command.

this is a test


testing quote command
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Fred » Wed Apr 12, 2006 7:13 pm

hmmm? I dunno what's going on here. Must have been a problem with the recent upgrade. Anyone have any ideas?
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Andrew » Thu Apr 13, 2006 9:08 pm

Hey fred, just a thought, but check your profile/account settings. Verify that PHP tags are turned on. It may have been reset, or maybe check on the board settings to see if php tags are turned on globaly. They might have been reset with the upgrade.

TTYL.

Fred wrote:hmmm? I dunno what's going on here. Must have been a problem with the recent upgrade. Anyone have any ideas?
User avatar
Andrew
 
Posts: 551
Joined: Fri Oct 22, 2004 10:54 am
Location: Quispamsis

Postby Fred » Fri Apr 14, 2006 4:48 pm

Andrew wrote:Hey fred, just a thought, but check your profile/account settings. Verify that PHP tags are turned on. It may have been reset, or maybe check on the board settings to see if php tags are turned on globaly. They might have been reset with the upgrade.

TTYL.

Fred wrote:hmmm? I dunno what's going on here. Must have been a problem with the recent upgrade. Anyone have any ideas?


I've checked that and it still doesn't seem to work.
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Fred » Wed Apr 26, 2006 8:30 am

I still haven't figured out why the quote feature isn't working. Anyone out there with programing experience??? Any help would be greatly appreciated.
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Pierre » Wed Apr 26, 2006 8:47 am

Hey Fred,

Try this...

In includes/functions_post.php

Change the code:

$message = str_replace('"', '\\"', $message);

to

Code:
$message = addslashes($message);

Later
Pierre
Pierre
 
Posts: 179
Joined: Tue Mar 22, 2005 2:26 pm
Location: Moncton

Postby Fred » Wed Apr 26, 2006 4:20 pm

Here is part of the code from that file. It already reads 'add slashes'. What version were you looking at? I wonder if my updgrade didn't update that file. But why would the other BBCODE functions such as color (blue here) work????



//
// This function will prepare a posted message for
// entry into the database.
//
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
{
global $board_config, $html_entities_match, $html_entities_replace;

//
// Clean up the message
//
$message = trim($message);

if ($html_on)
{
// If HTML is on, we try to make it safe
// This approach is quite agressive and anything that does not look like a valid tag
// is going to get converted to HTML entities
$message = stripslashes($message);
$html_match = '#<[^\w<w>#';
$matches = array();

$message_split = preg_split($html_match, $message);
preg_match_all($html_match, $message, $matches);

$message = '';

foreach ($message_split as $part)
{
$tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
$message .= htmlspecialchars($part) . clean_html($tag);
}

$message = addslashes($message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}

if($bbcode_on && $bbcode_uid != '')
{
$message = bbencode_first_pass($message, $bbcode_uid);
}

return $message;
}

function unprepare_message($message)
{
global $unhtml_specialchars_match, $unhtml_specialchars_replace;

return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $message);
}
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Pierre » Wed Apr 26, 2006 9:48 pm

Fred,

Ignore my first post on how to fix this... I asked someone else that I thought knew and they were doing but I obviously assumed wrong.

I looked over functions_post.php and believe this to be a quick hack to fix the problem.


open functions_post.php and find
Code:
$message = addslashes($message);


After add
Code:
$message = str_replace('&quot;', '\&quot;', $message);


I will try and test this tomorrow at work or at the very least check out the lastest code of phpBB from their CVS site and see if any changes have been made there.

I'm almost certain the above code should work.

Later
Pierre
 
Posts: 179
Joined: Tue Mar 22, 2005 2:26 pm
Location: Moncton

Postby Pierre » Thu Apr 27, 2006 8:53 am

Hey Fred,

I found this information on phpbb.com website:

http://www.phpbb.com/phpBB/viewtopic.php?t=382680

I believe the information here should help you out.

Later
Pierre
 
Posts: 179
Joined: Tue Mar 22, 2005 2:26 pm
Location: Moncton

Postby Fred » Thu Apr 27, 2006 12:44 pm

Pierre wrote:Hey Fred,

I found this information on phpbb.com website:

http://www.phpbb.com/phpBB/viewtopic.php?t=382680

I believe the information here should help you out.

Later


test
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby Fred » Thu Apr 27, 2006 12:46 pm

ok looks like I got it to work but perhaps all the messages that were quoted before don't get corrected. I can live with that. I wonder if this is because of the way the php actually saves the message in the database? Anywho.

thx a bunch
I want to go to hell... there's probably lots of rock to climb there.
User avatar
Fred
Site Admin
 
Posts: 3140
Joined: Wed Oct 20, 2004 12:30 am
Location: Fredericton, NB

Postby vbpad » Thu Apr 27, 2006 3:24 pm

Fred wrote:ok looks like I got it to work but perhaps all the messages that were quoted before don't get corrected. I can live with that. I wonder if this is because of the way the php actually saves the message in the database? Anywho.

thx a bunch


cool
User avatar
vbpad
 
Posts: 84
Joined: Tue Jul 05, 2005 8:24 pm
Location: Freddy N.B.


Return to Suggestions Box / Site News

Who is online

Users browsing this forum: No registered users and 3 guests

cron