CodeCanyon

Live Search - Searchengine for your Website

  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Austria
  • Referred between 10 and 49 users
themac says
Author

Hi there,

LiveSearch V2.0 released:

  • < script > blocks are excluded now
  • Added possibility to search for META -description and META -keywords
  • Added possibility to search for images by filename, alt-tag or title-tag
    Imagesearch can be turned on/off
  • Thumbnails of found images will be displayed and can be generated on the fly with the help of the GD-Library
    can be turned on (GD-thumbs)/off (CSS-thumbs)
  • Images can be hidden by using the LSHIDE image class
  • Added performance fix for larger websites running into a timout or memory exhaustion

check out the demo

bye
mac

Posted 5 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
adamdehaven says
Purchased

@Mac regarding the above comment – I’ve customized the code a little bit. Is there a snippet of code I can install in what I already have to implement the image search? Thanks

Posted 5 months ago
Author
themac themac replied

all the changes from V1.3 to V2.0 can be found in the

livesearch.class.php_1.3_to_2.0.html

hope this helps
mac

Posted 5 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
adamdehaven says
Purchased

One last question: I have implemented the new version here: http://www.adamdehaven.com/

The images that come up during search are clickable, but when you click on them, the image just loads alone in the page (not ideal for my photography website).

Is there a way to set it up so that when a user clicks the image, they are taken to the page where the image was found?

Also, when I search the term, “engagement” I get the following errors:

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/content/87/7666287/html/ls/livesearch.class.php on line 505

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: ’/home/content/87/7666287/html/images/content/services/02engagement.png’ is not a valid JPEG file in /home/content/87/7666287/html/ls/livesearch.class.php on line 505

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/content/87/7666287/html/ls/livesearch.class.php on line 506

Posted 5 months ago
Author
themac themac replied

hi,

Is there a way to set it up so that when a user clicks the image, they are taken to the page where the image was found?

yes :)

first of all you receive an array with all the information including the URL where the image was found (key: parenturl)

but if you’re using the content key or the drawSearchresults method please search for

" . $thisimg["src"] . "
and replace it with
" . $thisimg["parenturl"] . "

to engagement – please take a look on my last reply

rgds
mac

Posted 5 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
adamdehaven says
Purchased

[UPDATE] (to the above post) I’ve disabled the image search for now until you have a chance to respond.

The errors and issues are outlined above.

Thanks!

Posted 5 months ago
Author
themac themac replied

hi,

you could re-enable the image share

var $collect_images = true;
and disable GD thumbs
var $create_thumbs = false;
to check out what’s happening when searching for engagement

bye
mac

Posted 5 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
adamdehaven says
Purchased

@MAC

Changing the array results worked PERFECTLY to make the click bring up the page the image was found on.

I have turned the image search back on for http://www.adamdehaven.com/ but could you please check out what happens when you search the term “engagement”? I would REALLY appreciate it. I’m thinking it has something to do with there being so many image results for the term, but I’m not sure.

Thanks! :)

Posted 5 months ago
Author
themac themac replied

please try to turn off $create_thumbs ‘till this issue is fixed and to find out where’s an imagetag containing engagement

rgds mac

Posted 5 months ago
Author
themac themac replied

short fix ‘til the next release coming out within the next days

find

$image = imagecreatefromjpeg($img);
replace with
switch (strtolower(substr(strrchr($img,"."),1))) {
      case "gif": $image = imagecreatefromgif($img); break;
      case "png": $image = imagecreatefrompng($img); break;
      default: $image = imagecreatefromjpeg($img); break;
    }
bye
mac

Posted 5 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
adamdehaven says
Purchased

I implemented the changes in the above post which seems to have taken care of the error messages I was receiving, but for some reason, it is not pulling images with the word “engagement” contained in the alt tags.

Posted 5 months ago
Author
themac themac replied

hi,

did you clear the cache after adding the code once?

$liveSearch->clearCache();

rgds
mac

Posted 5 months ago
Purchased
Default-user adamdehaven replied

Yes I believe I did clear the cache. I also have the timer in the settings set to clear it by default every 4 hours I believe.

Posted 5 months ago
Author
themac themac replied

hi,

thx for your reply

take a look to the 6805db9aa8d4796fdccedadc356c77b3.srch file in your ls-cache directory

the images are found too

are you using the array or the draw-method?
what shows a dumped output?

strange – maybe we should work on a solution via email – maybe you’re willing to gimme a temporary FTP -account to take a look

rgds
mac

Posted 5 months ago
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
dmayer5 says
Purchased

This works/looks perfect for a non-profit website I am completing!

Posted 5 months ago
Author
themac themac replied

thank ya dmayer5 B)

Posted 5 months ago
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
  • Azerbaijan
Wisha says

Hi nice work, is it support utf-8 ?

Posted 5 months ago
Author
themac themac replied

hi,

thx B)

UTF -8 it should :)

could you gimme an URL (maybe through my profile) to test it out for your project

thx
mac

Posted 5 months ago
Author
themac themac replied

hi,

should work if ya add

header("Content-Type: text/html; charset=utf-8");
after the
<?php
in the livesearch.class.php

rgds
mac

Posted 5 months ago
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 50 and 99 items
  • United States
mgunnels says
Purchased

hi, I have implemented the code onto my site, but for some reason the search is not crawling my entire site.

it seems to get the home page and then one other page.

I am not sure what the issue might be.

help ASAP would be great.

thanks!

Posted 4 months ago
Author
themac themac replied

hi mgunnels,

thx for purchasing LS :)

okay, it ssems LiveSearch is running

when testing your site I found that only these linked URLs was found from your baseurl and the URLs found
$cache_data[0] = array("url" => "http://www.corporatereport.com/SampleSites/GM/Site/",
          "description" => "",
          "keywords" => "",
          "title" => "");
$cache_data[1] = array("url" => "http://www.corporatereport.com/SampleSites/GM/Site/managementLanding.html",
          "description" => "",
          "keywords" => "",
          "title" => "");
$cache_data[2] = array("url" => "http://www.corporatereport.com/SampleSites/GM/Site/managementMessage.html",
          "description" => "",
          "keywords" => "",
          "title" => "");

LiveSearch is searching for links (a href…) to retrieve the site structure on every page found starting with the baseURL
If there’re no hrefs LS doesn’t kow what to collect

The same thing with the title tag – when you’re setting them with JavaScript LS is not able to know anything about that.

The found URLs can be found in the ls/cache/data.php

I hope this information helps you out

rgds mac

Posted 4 months ago
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 50 and 99 items
  • United States
mgunnels says
Purchased

ok, that makes sense. How can I force a list of URLs?

Posted 4 months ago
Author
themac themac replied

hi,

you could the links to your index page in a hidden DIV container for example or add the links to the $incl array in the livesearch.class.php

I suggest to use the first advice, ‘cause google and other searchengines would find these links after modifications too

rgds
mac

Posted 4 months ago
  • Has been a member for 0-1 years
  • Bought between 10 and 49 items
scarabsweepers says
Purchased

Great script many thanks.

A couple of questions,

is there a way to prevent swear words etc appearing in the cloud list if not will you consider looking in to it. :)

And i can get the images showing in search but only using the css format any ideas what i can look for to get the gd library method working.

Thanks again

Posted 3 months ago
Author
themac themac replied

hi,

thx for purchasing LiveSearch B)

is there a way to prevent swear words etc appearing in the cloud list if not will you consider looking in to it. :)

please open your

livesearch.class.php
post anywhere below but near
class LiveSearch {
an array with the stop words
var $stop_words = array("phrase 1", "word 2", "another one");
find
foreach ($q as $key => $val) {
insert beneath
if (in_array($key, $this->stop_words)) continue;
you could access the whole searchstings with SearchStrings.php and build your own cloud as well.

And i can get the images showing in search but only using the css format any ideas what i can look for to get the gd library method working.

  • GD-library activated?
  • $basepath correct?
  • $lsurl correct?
  • cache-dir writeable?
  • ...

rgds
mac

Posted 3 months ago
Author
themac themac replied

AND : use lowercased stop_words

Posted 3 months ago
  • Has been a member for 0-1 years
  • Bought between 1 and 9 items
WebsiteGirl says

HI Mac,

I am about to purchase this search code, and was just wondering, what level of coding is required??? I am a bit nervous, as I havent really done much php.

Thanks for the feedback

Posted 3 months ago
Author
themac themac replied

Hi WebsiteGirl,

it’s not that hard to install LiveSearch on your Website if the requirements are fullfilled (PHP 5 .x, activated allow_url_fopen)

detailed information can be found in the manual (http://envato.homac.at/demos/LiveSearch/example01/help.php)

if you like you could send me the URL to your Webproject via my profile

rgds
mac

Posted 2 months ago
  • Has been a member for 3-4 years
  • Bought between 50 and 99 items
Jackola says
Purchased

Hi,

I will be creating hundreds of folders in the root directory. I don’t know all the future names for these folders. How do I adapt the script to ensure they are included in the search?

Regards,

S

Posted 2 months ago
Author
themac themac replied

hi,

first of all, thx for purchasing S. B)

now to your issue, if the directories are linked anywhere on your site, there should be no prob – LS will find them
BUT if not you could either create a file which index your root folder or add the get folder function to your livesearch.class.php
something like

$dir = "/path/to/your/root/folder/";  //your root folder - could be relative too
if ($handle = opendir($dir)) {
  while ($node = readdir($handle)) {
    if (is_dir($dir.$node) && (!preg_match('/^\./',$node))) {
      $incl[] = $node;  //$this->incl
    }
  }
}
the code above works, but maybe you should modify it a bit to meet your requirements

hope it works
mac

Posted 2 months ago

You must sign in or sign up to purchase this item.

$6Regular Licence

$6

Regular Licence a website (commercial, personal, client), or intranet site project - Details

$30Extended Licence

$30

Extended Licence a website template for sale (including on ThemeForest or ActiveDen) - Details

281 Purchases 73 Comments

Buyer Rating
12345 ( 57 ratings )
themac

themac

  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Austria
  • Referred between 10 and 49 users
View Portfolio
Created 13 February 10
Compatible Browsers IE6, IE7, IE8, IE9, Firefox 2, Firefox 3, Firefox 4, Safari 4, Safari 5, Opera, Chrome
Software Version PHP 5.x, PHP 5.0 - 5.2
Files Included HTML, PHP
by
by
by
by
by