vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Quick search pre-populated results: give your visitors quick thread suggestions (https://vborg.vbsupport.ru/showthread.php?t=222001)

ibautocommunity 08-27-2009 10:00 PM

Quick search pre-populated results: give your visitors quick thread suggestions
 
1 Attachment(s)
Product video demo: http://www.youtube.com/watch?v=eOUq4Z6R7xI

This product integrates with the quicksearch drop down box in NAVBAR; and suggests popular threads while the visitor is typing in search keywords.

Read INSTRUCTIONS.txt for installation instructions.

NOTICE: To fine-tune and configure "relevancy threshold" you must edit /includes/cron/autocomplete-generate.php file. Default installation assumes you have a big discussion forums and suggests only threads which have more than 1000 replies or 1000 views. Edit this number, the query looks like this:

PHP Code:

// This query needs to be customized on a per site basis
$ac_sql "SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' ORDER by views DESC"


TimberFloorAu 08-28-2009 10:17 PM

*Awesome* gonna test :)

Shamil. 08-28-2009 10:57 PM

Thanks Michael, installing.

al-Rsha.com 08-28-2009 11:06 PM

Dose it support other languges
like ARABIC languge ..
becouse many mods dosn't support it ^^

Hornstar 08-29-2009 01:43 AM

It is really awesome to see these modifications being released to the public. Now I just wish they were default in VB too.

Thanks.

Hornstar 08-29-2009 01:58 AM

Does this error mean I don't have Sed on my server or that I have something else disabled on my server?

I was up to the scheduled task part and ran it and got this error:

Warning: system() has been disabled for security reasons in [path]/includes/cron/autocomplete-generate.php on line 21

Warning: system() has been disabled for security reasons in [path]/includes/cron/autocomplete-generate.php on line 22
The file /home/****/***/autocomplete/data_1251514584.txt is not writable

bleros 08-29-2009 02:13 AM

thanks bro nice job

0ptima 08-29-2009 03:43 AM

Great hack, thanks for releasing it. Im going to install this when I come back from vacation.

ctrlbrk 08-29-2009 04:26 AM

Hi, this looks fantastic --- except it is not working for me. I ran into no problems or errors, but my search box results are unchanged.

Can you take a look please?

http://forum.bigmiketrading.com

Mike

ctrlbrk 08-29-2009 04:27 AM

Quote:

Originally Posted by hornstar1337 (Post 1876163)
Does this error mean I don't have Sed on my server or that I have something else disabled on my server?

I was up to the scheduled task part and ran it and got this error:

Warning: system() has been disabled for security reasons in [path]/includes/cron/autocomplete-generate.php on line 21

Warning: system() has been disabled for security reasons in [path]/includes/cron/autocomplete-generate.php on line 22
The file /home/****/***/autocomplete/data_1251514584.txt is not writable

You probably need to check permissions on your autocomplete directory, make sure it is owned by the same user as your normal forum directory (ie: www-data), and set to 755.

Mike

funkmeister 08-29-2009 05:26 AM

Quote:

Originally Posted by ctrlbrk (Post 1876201)
Hi, this looks fantastic --- except it is not working for me. I ran into no problems or errors, but my search box results are unchanged.

Same here. Followed instructions to the letter. No errors at all. But search box is just as before.

I did lower the number from 1000 to reflect fewer replies and views on my site, but other than that. Just as per the instructions.

Any suggestions?

Zaivndotcom 08-29-2009 08:41 AM

When I ran sheduled task manager, it appeared that. Help me plz
Quote:

Refreshes autocomplete data

The file /autocomplete/data_1251538806.txt is not writable

RvG2 08-29-2009 08:44 AM

try to CHMOD it to 777

Zaivndotcom 08-29-2009 09:28 AM

Maybe I placed the dirctory autocomplete in the wrong place, cause i don't understand much about this sentence
Quote:

Create writeable directory outside of publicly accessible forum root directory called "autocomplete"

Example: /var/www/autocomplete
Plz tell me exactly where I should create this folder
http://img340.imageshack.us/img340/8076/capturet.jpg

NAZIA 08-30-2009 08:59 AM

goody.. will test it ASAP...

WildWeb 08-30-2009 03:58 PM

Thanks for this fine work. Seems to be working fine for me.

Question - the autosearch only seems to populate with matches/suggestions when I am in a sub-forum itself and not from Forum Home or any other place on the site. Is this the default behavior or is there something I can change to have it "autocomplete/suggest" topics from anywhere on the site?

ctrlbrk 08-30-2009 10:20 PM

Is the author going to provide support for this?

Mike

Hornstar 08-31-2009 11:40 AM

nah, it looks like it is currently not supported by the author, but I am still really glad they shared it. I am currently about to enable the function on my server that was disabled (due to the tightened security on my server)

goyo 08-31-2009 02:26 PM

I've followed word by word and enabled the system and exec execution in php.ini...unfortunately the cron job doesn't write anything to data.txt (although it creates the file with 0 byte).

We have our own dedicated servers but the hack doesn't work :(

ibautocommunity 08-31-2009 03:14 PM

Quote:

Originally Posted by goyo (Post 1877195)
I've followed word by word and enabled the system and exec execution in php.ini...unfortunately the cron job doesn't write anything to data.txt (although it creates the file with 0 byte).

We have our own dedicated servers but the hack doesn't work :(

Try chmodding the directory and/or the data file 777; it's either not writeable or the server does not have support for "sed".

TimberFloorAu 08-31-2009 10:28 PM

any suggestions as to where autocomplete.php file is ?, not in either of the 2 download packages we have d/l

ibautocommunity 08-31-2009 10:39 PM

There is no autocomplete.php; there is autosearch.php, that goes into your forum root folder; then the cron job .php file goes into the /forumroot/includes/cron folder; that's it in terms of file uploads.

TimberFloorAu 08-31-2009 11:11 PM

Quote:

Originally Posted by ibautocommunity (Post 1877454)
There is no autocomplete.php; there is autosearch.php, that goes into your forum root folder; then the cron job .php file goes into the /forumroot/includes/cron folder; that's it in terms of file uploads.

Your instructions mate not mine ;)

Quote:

STEP #2) Configure writeable directory path in PHP files. To do this, open AUTOCOMPLETE.PHP and /includes/cron/AUTOCOMPLETE-GENERATE.PHP files and FIND & REPLACE:

ibautocommunity 08-31-2009 11:21 PM

Quote:

Originally Posted by TimberFloorAu (Post 1877474)
Your instructions mate not mine ;)

You are right, I am wrong. AUTOSEARCH.PHP; not AUTOCOMPLETE.PHP in the forums root. Sorry about that.

ibautocommunity 09-01-2009 04:07 PM

Quote:

Originally Posted by TimberFloorAu (Post 1877474)
Your instructions mate not mine ;)

Hi Steve, did you ever try this out?

funkmeister 09-02-2009 12:29 AM

OK, got this working after uninstall/reinstall...

Apostrophes (') are not working for me in Safari/Firefox (pc & mac). I'm seeing question marks (?) instead. Also, and maybe this is how it's written for now; but it doesn't work in individual forum's search boxes (or sub-forums) for me, but only in the main forum (home) search box (navbar area)...is this as it should be for now? If so, a request...please add it's functionality everywhere!

I assume we can change highlight colors etc via CSS (the grey and white color scheme, navy blue highlight etc)? If so, where?

Other than that, it's very cool and works for me now. Thank you.

l_amhed 09-19-2009 11:45 PM

Hi ! Surely a dumb question but, what is the difference between your hack and the live search hack : https://vborg.vbsupport.ru/showthrea...ghlight=search ??

0ptima 09-30-2009 11:43 PM

Any feedback from members on this hack?

0ptima 10-03-2009 10:07 PM

I added this hack to my forum and tweaked the SQL

Following will select only open threads.
PHP Code:

$ac_sql "SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' AND open = '1' ORDER by views DESC"

Following will select threads that are not in forums 1,2,3,4,5.
PHP Code:

$ac_sql "SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' AND forumid NOT IN ('1', '2', '3', '4', '5') ORDER by views DESC"

Following will select threads that are only in forums 1,2,3,4,5.
PHP Code:

$ac_sql "SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' AND forumid IN ('1', '2', '3', '4', '5') ORDER by views DESC"

Following will select only open threads that are not in forums 1,2,3,4,5.
PHP Code:

$ac_sql "SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' AND open = '1' AND forumid NOT IN ('1', '2', '3', '4', '5') ORDER by views DESC"


0ptima 10-04-2009 12:42 AM

Can this hack be changed so it populates the search box with popular thread titles and not take you directly to the thread?

For example, if someone searches for "Tickle me Elmo", I get a few suggestions. However, when they click on the suggestion, they are taken to very old threads. I would like the thread title to populate the search box and then a regular search is performed based on which auto suggested thread title that was selected.

ExplosiveGFX 10-27-2009 08:41 PM

I don't understand this:

PHP Code:

This query needs to be customized on a per site basis
$ac_sql 
"SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' ORDER by views DESC"

the
PHP Code:

"thread where threadid between" 

Do I change this, or leave it like that? Hopefully I can get a response, you've replied to me in the past..

ibautocommunity 10-27-2009 08:55 PM

Quote:

Originally Posted by ExplosiveGFX (Post 1907125)
I don't understand this:

PHP Code:

This query needs to be customized on a per site basis
$ac_sql 
"SELECT * FROM "TABLE_PREFIX ."thread where threadid between ".$startat." AND ".$endat." AND (views > 1000 OR replycount > 1000) AND visible = '1' ORDER by views DESC"

the
PHP Code:

"thread where threadid between" 

Do I change this, or leave it like that? Hopefully I can get a response, you've replied to me in the past..

See the number 1000?

This number means VIEWS/REPLIES need to be MORE THAN 1000 to get into the list. This works for BIG forums, but may not work on a small forum. If you have a small board you can change the 1000 to 100, and scale it even smaller to include all threads.

ExplosiveGFX 10-27-2009 09:06 PM

I changed it to "3" and tried it.. hmm, it's not working. I ran the scheduled task and it's saying on there, that it's not been run since january.

I'll try again tomorrow...

ibautocommunity 10-27-2009 09:12 PM

Quote:

Originally Posted by ExplosiveGFX (Post 1907137)
I changed it to "3" and tried it.. hmm, it's not working. I ran the scheduled task and it's saying on there, that it's not been run since january.

I'll try again tomorrow...

You can look at the file system to physically verify that the cron task actually created the text file for you, in the directory you specified. Also have to make sure Jquery is included.

ExplosiveGFX 10-27-2009 09:20 PM

Well, actually, now I've looked for data.txt (I'd already looked, the code referenced it, I assumed it'd create it) it's not there.

DIR is CHMODDED to 777.

Could it be that I don't have SED on my server? How common is it on Linux/Unix Distros? This feature would be sweet for my site..

But Wait, RSS feeds and anything to do with scheduled tasks aren't working either.. looks like I have a conflict in mods.

ibautocommunity 10-27-2009 09:21 PM

When you press RUN NOW button on that specific cron job it has to build the data file; if its not - sed is missing or your cron system is not working for some reason. This is a really simple mod.

ExplosiveGFX 10-27-2009 09:28 PM

hmm, ok, so now the data_1256681036.txt files have appeared in my CHMOD'd dir, but still not autocompleting.

I'll go over the installation process and re-do it all..

ibautocommunity 10-27-2009 09:34 PM

Quote:

Originally Posted by ExplosiveGFX (Post 1907158)
hmm, ok, so now the data_1256681036.txt files have appeared in my CHMOD'd dir, but still not autocompleting.

I'll go over the installation process and re-do it all..

Oh, I see the problem. You are using the vBNexus product which also loads jquery. In your head template, remove the jquery line you've added for autocomplete product.

Remove this first line:

<script src="autocompfiles/jquery-latest.min.js"></script>

oddmud 10-27-2009 10:06 PM

Ok,

I've got it creating the text file properly... now when I'm trying to use the search function nothing is happening.

I cut and paste the code in to the template, but still nothing.. it runs, but it does not work on the board.

:(

ExplosiveGFX 10-28-2009 12:51 AM

Quote:

Originally Posted by oddmud (Post 1907170)
Ok,

I've got it creating the text file properly... now when I'm trying to use the search function nothing is happening.

I cut and paste the code in to the template, but still nothing.. it runs, but it does not work on the board.

:(

Same situation here.


All times are GMT. The time now is 04:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01486 seconds
  • Memory Usage 1,845KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete