Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Profile for Falco

  • OFFLINE
  • Time Zone: GMT +0:00
  • Local Time: 15:57
  • Posts: 2
  • Profile Views: 2486
  • Location: Unknown
  • Gender: Unknown
  • Birthdate: Unknown

Signature

Posts

Posts

emo
I'm using K2 from joomlaworks and i have problem when try to add tags from joomla FE, i received every time "You need to enter a tag!" .
With JomSEF disable the problem is not present.
I think that the problem is on this piece of code that is present on /administrator/components/com_k2/models/tag.php, i think that the problem is on the red code


function addTag(){

global $mainframe;
$tag=JRequest::getString('tag');

$response = new JObject;
$response->set('name',$tag);


require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'lib'.DS.'JSON.php');
$json=new Services_JSON;

if (empty($tag)){
$response->set('msg',JText::_('You need to enter a tag!',true));
echo $json->encode($response);
$mainframe->close();
}

$db = & JFactory::getDBO();
$query = "SELECT COUNT(*) FROM #__k2_tags WHERE name=".$db->Quote($tag);
$db->setQuery($query);
$result = $db->loadResult();

if ($result>0){
$response->set('msg',JText::_('Tag already exists!',true));
echo $json->encode($response);
$mainframe->close();
}

$row = & JTable::getInstance('K2Tag', 'Table');
$row->name=$tag;
$row->published=1;
$row->store();

$cache = & JFactory::getCache('com_k2');
$cache->clean();

$response->set('id', $row->id);
$response->set('status','success');
$response->set('msg', JText::_('Tag added!',true));
echo $json->encode($response);

$mainframe->close();

}



could you verify ?
Problem with K2 and ...
Category: JoomSEF 3
emo
Could you make a plugin (with payment if necessary) for Fabrik form manager (www.fabrikar.com) ?

thanks

if you need to convert i have attache the plugin for sh404

thanks
[Request] Plugin for ...
Category: Extension Requests
More
User Login Empty