Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2010-12-13 21:26:24

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

[FIXED] search feature

It seems that the search featrue is not working properly. If you try to search for somethnig like brunette this is what you get back ** No videos found while searching for ''! **

Offline

#2 2010-12-14 09:07:38

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] search feature

Fixed. You just need to set search_type to simple in admin (complex will be for sphinx).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2010-12-14 12:33:30

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: [FIXED] search feature

symtab wrote:

Fixed. You just need to set search_type to simple in admin (complex will be for sphinx).

I changed the search_type to simple in the admin and I am still getting the same thing ** No videos found while searching for ''! **

Offline

#4 2010-12-14 12:56:39

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] search feature

Hmm...worked for me. Here's another way to fix, edit modules/video/components/search.php and replace:

                $sql_count      = "SELECT COUNT(DISTINCT v.video_id) AS total_videos
                                   FROM #__video_tags AS t, #__video AS v
                                   WHERE t.name IN (".implode(',', $sql_add).")
                                   OR v.title LIKE '".$this->db->escape($query)."'";
                $sql            = "SELECT DISTINCT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
                                          v.thumbs, v.total_views, v.add_time, v.ext, v.premium, u.username
                                   FROM #__video_tags AS t, #__video AS v
                                   WHERE t.name IN (".implode(',', $sql_add).")
                                   OR v.title LIKE '".$this->db->escape($query)."'";

with:

                $sql_count      = "SELECT COUNT(*) AS total_videos
                                   FROM #__video_tags AS t
                                   LEFT JOIN #__video AS v ON (v.video_id = t.video_id AND v.status = 1)
                                   WHERE t.name IN (".implode(',', $sql_add).")";
                $sql            = "SELECT DISTINCT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
                                          v.thumbs, v.total_views, v.add_time, v.ext, v.premium, u.username
                                   FROM #__video_tags AS t
                                   LEFT JOIN #__video AS v ON (v.video_id = t.video_id AND v.status = 1)
                                   LEFT JOIN #__user AS u ON (u.user_id = v.user_id)
                                   WHERE t.name IN (".implode(',', $sql_add).")
                                   ORDER BY v.video_id DESC";

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2010-12-14 18:51:28

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Re: [FIXED] search feature

mfeat50 wrote:
symtab wrote:

Fixed. You just need to set search_type to simple in admin (complex will be for sphinx).

I changed the search_type to simple in the admin and I am still getting the same thing ** No videos found while searching for ''! **


Tested at your Site. Works for me with brunette.


sgt-halfsize-banner.jpg

Offline

#6 2010-12-14 23:47:48

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: [FIXED] search feature

Coscast wrote:
mfeat50 wrote:
symtab wrote:

Fixed. You just need to set search_type to simple in admin (complex will be for sphinx).

I changed the search_type to simple in the admin and I am still getting the same thing ** No videos found while searching for ''! **


Tested at your Site. Works for me with brunette.

lol I must not have been fully awake as I did not refresh my screen.... It was a DOH moment..... It worked just fine by changing the search_type.

Offline

#7 2010-12-15 05:17:55

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] search feature

Initially the search_type simple was for title based search (which is slow, and mysql cannot use a key for this kind of search and even with a key it works with word*ANYTHINGHERE, not *word*) and complex was for mysql MATCH_AGAINST which is a pretty good method for searching, however after you have 10.000 its slow.

Right now search_type simple searches by tags, which is like very very fast (i cant give a aproximate number here) and complex will be for sphinx based search once done (which will also work instantly, even for 500.000 videos).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB