themac

themac does not currently provide support for this item.

235 comments found.

The minlength error isn’t working. You get an error: Warning: sprintf(): Too few arguments in…

hi,

yes it’s right (for the drawSearchresults method) – you could comment this line

if (!$str || $lenA < $this->minlength) return false;  //minlength
and this line
if (!$str || $lenB < $this->minlength) return false;  //minlength after stripping
by adding two slashes at the very beginning of each mentioned line … this prevents from stopping searchin for string lower as the defined minlenght and allows the output from the drawSearchresults method

rgds
mac

Ok thank you. I comment out those lines and it now works ok.

fine :)

Hi, themac, can you recommend me a Hosting Service who has pdftotext installed?, I can’t find any.

Hi,

I’m sorry – I don’t know any hoster with pdftotext – I’m my own hoster :)

maybe

  • you could ask in the forum if anybody knows such a hoster or
  • ask some hosters
  • you could think about a VPS (Virtual Server) wher you could do anything you need.

best wishes
mac

Hi On this site www.westmelton.school.nz only the index.html is searched I have referred sitemap.xml but still the same. Please advise settings I should use.

Regards Graham

Thanks for that, but I already had those settings, can I send livesearch.class to you for you to check and modify as neceesary

Regards Graham

have you cleared the cache or recached?

but if you like you could send me the settings you made through my profile page (~line 1 – 190)

and maybe you like to take a look to webserver’s log?

rgds
mac

fixed – gramae has used true instead the URL/Path of his sitemap as given in examples, documentation and comment’s answer

I’m using LiveSearch manager to cache my files as I keep getting an error on the search page, but it’s getting stuck at about 1682 files and never finishes. Same thing works on a site with less links perfectly. Anything I can look for that may be causing this?

hi,

some ideas independent from each other:
  • check webserver’s error_log
  • activate $saveURLfiles and check which was the last url indexed successfully (cache-Dir)
  • try to activate the $performance_fix
  • take a look into the urls in tmpContentUrls.php (cache-Dir)

maybe you like to send me the URL to your wensite to try a LS-Installation on my server

rgds
mac

Thanks this worked, all nice a fast too.

Hi, Does LiveSearch works with https url ? I have no search results since i have changed Thanks

please try curl OR url_fopen as method, maybe it works

maybe your server is not allowed to access port 443 (https) – your webserver is acting as client to browse, index and cache your website

there shouldn’t be any problems with your website – quick working demo: http://ls.envato.homac.at/demo/search.sibureautique.php

rgds

i have try to set server port to 443 on htaccess but with no sucess. For no I have delete the rewrite rules on htaccess. I will chek later for https. Thanks

hi, the default server port of HTTPS is 443 https://en.wikipedia.org/wiki/HTTPS and cannot be set via the .htaccess – the question is – is you server able to access your website on specifc port (you could try a wget)

rgds
mac

hey, this plug-in is really awesome. The only problem I have is with UTF8 language. äöü in words will not be displayed correctly. It shows some strange &% symbols instead. Help would be great!

hi,

please try to use the livesearch.class.ISO8859-15.php AND/OR play with the $utf8DecodeResults

don’t forget to re-cache/index after each try of change

best wishes
mac

Hi Is it possible to view the image search results with lightcase/lightbox instead of opening it in a separate window? The img tag just needs to have ‘data-rel=’lightcase’’ to initiate lightbox, but I’m just not sure where to add it to your script.

thanks James

es muss ein Verzeichnispfad auf deinem Webserver sein, in dem Deine Website liegt (i.e. DirectoryPath im Virtualhost der ApacheConfig) – die Struktur wäre wie im Beispiel ”/users/envato/www/yoursite.com/htdocs/” oder bei dir evt. ”/home/webjames/www/webjames.at/htdocs/”

Perfekt. jetzt passt alles. Danke für deine Hilfe, werde gleich zu den 5 Sternen wandern, lg. James

Hi themac,

I’m trying to install your script on a client’s site but it seems to hang when I start the cacheing process from lsMngr. I can see that it creates a SearchStrings.php and a tmpContentUrls.php (so it can write to the folder okay) but these contain nothing more than the search terms and the baseurl. If I turn on the saveUrl function, it will only produce one file called 0.url. The search page consistently returns no results.

The site is hosted with Heart Internet and their database reports the following: “If your script attempts to make an HTTP connection to a URL on the same server, it will fail. This is called a loopback connection, and we block those connections because they can be exploited by attackers.”

I haven’t seen a similar problem reported on your comments page. Could this be a Heart Internet problem, or have I missed something else?

Hi,

the webserver itself acts as client to browse the website – there’s no other way to access the client-side output of the website – so the webserver needs access to your website …

you could try url_fopen and curl as connection method – if both failed Heart Internet really blocked accessing their hosted websites from being called from their hosted websites.

the only quick idea I have in your case is to create the cache from another server and use the cached files in your installation and just use the search functionality, not the cache and index functionality …

rgds
mac

I installed the script but the result of the search is “No search results for …”

I don’t know what is wrong, could you please let me know where to look into?

Thanks.

Thanks, I did so and it’s better now.

One quick question please: On my site I can see that there are searches with spam words (like xxx, porn, etc). I assume that these are probably automatic searches. So I would like to know if there is a way to set up a list of banned words… which will return nothing ( exit() ) or something. Thanks.

hi,

you could block these words before using the LiveSearch functionality, something like

if (in_array($_REQUEST["q"],array("xxx","porn","evil charcters"))) {
  exit("Stop molesting me");
}

rgds
mac

yes, you’re right thanks

Hello! Any chance you can add support for searching inside word documents (docx) too? https://stackoverflow.com/questions/19503653/how-to-extract-text-from-word-file-doc-docx-xlsx-pptx-php

i am having issues with this not pulling all my images into the results. and when it does, i can not figure out how it is getting the few it does display. www.greengate.ca/search.php

hi,

figured it out – reason is an unclosed script tag inside a HTML comment which won’t harm the HTML Output but LS stripped script tags

<script>
...
...
</script>
and found the next closing script tag was anywhere at the end of the page

you could comment the script tag remover from the class by replacing

$body = preg_replace('/<script.*<\/script>/Us', "", $body);
with (by adding two slashes at the beginning)
// $body = preg_replace('/<script.*<\/script>/Us', "", $body);

another (not recommended for your website) way would be adding

$body = preg_replace('/<!--(.*)-->/Uis', '', $body);
above
$body = preg_replace('/<script.*<\/script>/Us', "", $body);
which would/should remove the HTML comments

a running installation for your site can be found here: http://ls.envato.homac.at/demo/search.greengate.php

and don’t forget – if you are satisfied with the settings in your livesearch configuration adapt the $cachetime to fit your needs to reduce unwanted waiting time when searching your site

best wishes
mac

Hi so if I build a simple page with this search on it and have a directory of pdfs in it this will search and display the links to the pdfs? please let me know.

Hi,

if the pdfs inside a directory you should enable directory browsing for this directory to get a page where are links to the pdfs which LS can follow to index and cache

rgds
mac

Hi themac. What do you mean by medium size site? Just curious. I’ve been trying to get it going, but I keep crashing my server, maybe it’s not intended for 5k + pages?

could/would work too ;) – 5k it’s a bit bigger to analyze – it’s more the analyzing than the caching process

have you tried the performance_fix?

would you like to send me the url to your site to test it out – please use envato [AT] homac [DOT] net because envato notifications/pm system doesn’t work reliable

rgds
mac

Hi themac, How can I “enable directory browsing” to enable the seach in a folder with pdf-files inside (“pdfdocs”)? Thanks for your answer! Kind Regards, Ecki

In Addition to my recent post:
Here are two screens from dashboard: https://www.bvcms.de/livesearch/ls38-settings.png
https://www.bvcms.de/livesearch/ls38-cachedfiles.png
No PDF-Files were found ?!
They are under the base-directory, stored in ”/pdfdocs”.
I don’t know what’s wrong …

Thanks for your help.

hey

I’m on vacation until June 18th and rarely online – maybe this can help ya out: https://codecanyon.net/item/livesearch-searchengine-for-your-website/86875/comments?page=12&filter=all#comment_18622639

LS can only follow links, if there are no link to the pdf, the pdf can’t be catched

best wishes
mac

by
by
by
by
by
by