TinyPortal
Development => Support => Topic started by: welshdog on January 24, 2011, 06:12:03 AM
I'm sure I've asked this before but can't see any record of it or any other requests, but it must have happened to other people... so...
My Site: www.australianopinion.com.au
SMF 1.1.12; TinyPortal 1.0; Default Theme.
I've not included the entire info requested because everything in TP works perfectly as usual and is perfectly integrated. The only problem is the Shoutbox in which we have a backslash preceding every apostrophe. I can edit them out individually and when I save they don't reappear (which is a bit odd to my way of thinking but still... ) but I can't find out how to stop it happening to begin with.
A search in SMF support mentions something about Ajax integration... and also "Magic Quotes"... but I can only find a zipped file and I have no idea how to fix it anyway.
Is there something simple I can do to get rid of the backslashes??
In tp-files/tp-modules/TPShout/Sources/TPShout.php
Find this code:
while($row = tpdb_fetch_assoc($request))
{
$row['avatar'] = $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt=" " />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt=" " />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt=" " />');
$ns[] = template_singleshout($row);
}
Replace with this:
while($row = tpdb_fetch_assoc($request))
{
$row['value1'] = stripslashes($row['value1']);
$row['avatar'] = $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt=" " />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt=" " />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt=" " />');
$ns[] = template_singleshout($row);
}
Thanks, I was looking for a fix for this. :)
Quote from: IchBin on January 24, 2011, 03:20:46 PM
In tp-files/tp-modules/TPShout/Sources/TPShout.php
<snip>
Many thanks - I aplogise for the time taken to respond. My kids were on summer holiday and have only just gone back to school!
I'll go change the file and fix the problem.
By the way, Tiny Portal is still my favourite Mod... and your Themes are great! :)
Quote from: welshdog on January 31, 2011, 07:27:44 AM
Quote from: IchBin on January 24, 2011, 03:20:46 PM
In tp-files/tp-modules/TPShout/Sources/TPShout.php
<snip>
Many thanks - I aplogise for the time taken to respond. My kids were on summer holiday and have only just gone back to school!
I'll go change the file and fix the problem.
Many thanks... all fixed. :)