- Posts: 13
COMMUNITY FORUM
K2 AJAX Search Module
- Lee Tempest
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago #162690
by Lee Tempest
K2 AJAX Search Module was created by Lee Tempest
Hello,
Is it possible to modify the K2 AJAX Search Module so that it only searches on the K2 Item title and not the entire item?
I've tried looking in the module code but cannot see any obvious place.
Thanks
Lee
Is it possible to modify the K2 AJAX Search Module so that it only searches on the K2 Item title and not the entire item?
I've tried looking in the module code but cannot see any obvious place.
Thanks
Lee
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 months ago #162700
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic K2 AJAX Search Module
Hello Lee,
We are not affiliated with this module.
Unfortunately I am not familiar with the module either.
We are not affiliated with this module.
Unfortunately I am not familiar with the module either.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Lee Tempest
- Topic Author
- Offline
- New Member
Less
More
- Posts: 13
7 years 4 months ago #162706
by Lee Tempest
Replied by Lee Tempest on topic K2 AJAX Search Module
I actually found the solution, open up:
plugins/k2ajaxsearch/k2ajaxsearch/k2ajaxsearch.php
Around line 100 and 125 is this code:
$wheres2 = array();
$wheres2[] = 'i.title LIKE '.$text;
$wheres2[] = 'i.introtext LIKE '.$text;
$wheres2[] = 'i.fulltext LIKE '.$text;
$wheres2[] = 'i.extra_fields_search LIKE '.$text;
$wheres2[] = 'i.image_caption LIKE '.$text;
$wheres2[] = 'i.image_credits LIKE '.$text;
$wheres2[] = 'i.video_caption LIKE '.$text;
$wheres2[] = 'i.video_credits LIKE '.$text;
$wheres2[] = 'i.metadesc LIKE '.$text;
$wheres2[] = 'i.metakey LIKE '.$text;
$wheres2[] = 'i.created_by_alias LIKE '.$text;
Then comment out the lines you do not want the module to search through. Save and upload the modified file and then test your search.
Hope that helps.
Lee
plugins/k2ajaxsearch/k2ajaxsearch/k2ajaxsearch.php
Around line 100 and 125 is this code:
$wheres2 = array();
$wheres2[] = 'i.title LIKE '.$text;
$wheres2[] = 'i.introtext LIKE '.$text;
$wheres2[] = 'i.fulltext LIKE '.$text;
$wheres2[] = 'i.extra_fields_search LIKE '.$text;
$wheres2[] = 'i.image_caption LIKE '.$text;
$wheres2[] = 'i.image_credits LIKE '.$text;
$wheres2[] = 'i.video_caption LIKE '.$text;
$wheres2[] = 'i.video_credits LIKE '.$text;
$wheres2[] = 'i.metadesc LIKE '.$text;
$wheres2[] = 'i.metakey LIKE '.$text;
$wheres2[] = 'i.created_by_alias LIKE '.$text;
Then comment out the lines you do not want the module to search through. Save and upload the modified file and then test your search.
Hope that helps.
Lee
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 months ago #162708
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic K2 AJAX Search Module
Nice one Lee :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.