-
AuthorPosts
-
hcharly Friend
hcharly
- Join date:
- April 2008
- Posts:
- 107
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 14
- Thanked:
- 11 times in 1 posts
February 13, 2011 at 10:47 am #160123Hello,
Problem noticed developing at localhost with the latest version of JA Voice, but is the same at your demo site:
With “Tag settings” enabled, users are supposed to input tags separated by a comma (,)
Doing so, I found out that only the last provided TAG will be added.What is the fix for that?
Thanks and Regards.
-Charlesnghiatd Friendnghiatd
- Join date:
- October 2009
- Posts:
- 324
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 7
- Thanked:
- 39 times in 37 posts
February 14, 2011 at 9:21 am #376602Hello,
The bug has been reported: http://pm.joomlart.com/browse/JAVOICE-386
we will release with this bug fixed in next version.
Please follow my guide to fix out it:
Open file componentscom_javoicecontrollerstags.php then find the code:
function addnew(){
$tags = JRequest::getVar("taglist", "");
if($tags){
$list = explode(",", $tags);
$model = & $this->getModel('tags');
$post = array();
$tags = "";
$objects = array ();
$helper = new JAVoiceHelpers ( );
foreach ($list as $i=>$item){
$id = $model->checkExistTag($item);
if(!$id){
$post["name"] = $item;
$post["published"] = 1;
$post["id"] = 0;
if($i==0){
$tags .= $post["name"];
}else{
$tags .= ",".$post["name"];
}
$id = $model->save($post,1);
$k=0;
$object [$k] = new stdClass ( );
$object [$k]->id = $id;
$object [$k]->type = $item;
$k++;
}else{
$k=0;
$object [$k] = new stdClass ( );
$object [$k]->id = $id;
$object [$k]->type = $item;
$k++;
}
}
$helper = new JAVoiceHelpers ( );
echo $helper->parse_JSON_new ( $object );
exit ();
}else{
exit();
}
}
then replace it to:
function addnew(){
$tags = JRequest::getVar("taglist", "");
if($tags){
$list = explode(",", $tags);
$model = & $this->getModel('tags');
$post = array();
$tags = "";
$objects = array ();
$helper = new JAVoiceHelpers ( );
$k=0;
foreach ($list as $i=>$item){
$id = $model->checkExistTag($item);
if(!$id){
$post["name"] = $item;
$post["published"] = 1;
$post["id"] = 0;
if($i==0){
$tags .= $post["name"];
}else{
$tags .= ",".$post["name"];
}
$id = $model->save($post,1);$object [$k] = new stdClass ( );
$object [$k]->id = $id;
$object [$k]->type = $item;
$k++;
}else{$object [$k] = new stdClass ( );
$object [$k]->id = $id;
$object [$k]->type = $item;
$k++;
}
}
$helper = new JAVoiceHelpers ( );
echo $helper->parse_JSON_new ( $object );
exit ();
}else{
exit();
}
}Best Regards.
1 user says Thank You to nghiatd for this useful post
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by hcharly 13 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum