TinyPortal

Development => Support => Topic started by: saks on December 01, 2011, 03:09:43 AM

Title: TAGs add problem
Post by: saks on December 01, 2011, 03:09:43 AM
Link to my site: http://www.paraplanoff.net
SMF version: SMF ver. 2.0.1
TP version: TP ver. 1.0 RC2
Default Forum Language: Your Default Forum Language Russian_UTF8
Theme name and version: Impulse
Browser Name and Version: all
Mods installed: Mods listed here
Related Error messages: If I add tag in tags system, i have the database error and error in file: C:\www\www.paraplanoff.net\Sources\TPortalAdmin.php
String: 2735
foreach ($_POST as $what => $value)
{
if(substr($what, 0, 7) == 'tp_tags')
{
// check the value, only letters and underscore allowed
$allowed = "/[^a-zA-Z0-9_]/";
$value = preg_replace($allowed, '', $value);
if(!empty($value))
$smcFunc['db_query']('REPLACE',
'{db_prefix}tp_variables',
array('value1' => 'string', 'type' => 'string'),
array($value,'globaltag'),
array('id')
        [b]string 2735[/b] );
}
}
Title: Re: TAGs add problem
Post by: IchBin on December 01, 2011, 06:30:42 PM
Change this line:
$smcFunc['db_query']('REPLACE',

To this:
$smcFunc['db_insert']('REPLACE',
Title: Re: TAGs add problem
Post by: saks on December 02, 2011, 01:34:59 AM
Bug is fixing ! Many Thanks!
Title: But in articles I found next bug...
Post by: saks on December 02, 2011, 03:02:14 AM
... with add tags from article... if I add tag from article and press Save, I have $value, but not TAG...
look this:


and in list of TAGs adds $value
Title: Re: TAGs add problem
Post by: IchBin on December 03, 2011, 10:08:32 PM
If you search for that error I'm sure I've already posted a fix for it. If not I'll have to come back later. Working on my car problems at the moment. lol
Title: Re: TAGs add problem
Post by: saks on December 06, 2011, 05:49:25 AM
I am search it, but not found how fix this bug in my case :(
Title: Re: TAGs add problem
Post by: IchBin on December 06, 2011, 05:55:04 PM
Probably because I posted it at SMF. :D
http://www.simplemachines.org/community/index.php?topic=27642.msg3095779;topicseen#msg3095779
Title: Re: TAGs add problem
Post by: saks on December 08, 2011, 09:01:01 AM
I do not search it in SMF forum, but it work and fixing my bug! Thank you for help ! :)