vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 15 Most Recent Searches Made By Our Members (https://vborg.vbsupport.ru/showthread.php?t=61424)

Boofo 07-18-2004 12:17 PM

Quote:

Originally Posted by JimpsEd
Still definetly not working :surprised:

I cannot understand, i've resinstalled the hack, even installed it on a blank forum install.

Attatched is my Search.php and Template file if you can see anything wrong. The Search Template is a reverted one, with the hack added. The same goes for the search.php file, only with your above query modifications.

I have tried rebuilding search indexes etc.

PM a link to your search.php file and I will take a look at it. We can't post full vb files in posts in here, sorry.

j_86 07-18-2004 12:21 PM

Attatched, is an extract of the search.php (relevant), too save time.

Boofo 07-18-2004 12:28 PM

Quote:

Originally Posted by JimpsEd
Attatched, is an extract of the search.php (relevant), too save time.

Everything looks normal to me. I don't run 3.0.3 yet so is there anyone who has installed this on 3.0.3. that can maybe help us figure out what is going on? And I will do some checking on this end to see if I can come up with some sort of answer for you. Hang in there, we'll get it working for you. ;)

cteselle 07-18-2004 06:16 PM

Quote:

Originally Posted by Boofo
Everything looks normal to me. I don't run 3.0.3 yet so is there anyone who has installed this on 3.0.3. that can maybe help us figure out what is going on? And I will do some checking on this end to see if I can come up with some sort of answer for you. Hang in there, we'll get it working for you. ;)

I have 3.0.3 and it's working for me just fine. I didn't have a chance to look at your template, but your search.php snipit looks just like mine.

Boofo 07-18-2004 08:58 PM

Quote:

Originally Posted by cteselle
I have 3.0.3 and it's working for me just fine. I didn't have a chance to look at your template, but your search.php snipit looks just like mine.

Thank you for verifying that. ;)

I think he did the template snippets a few posts up if you want to look at it. ;)

cteselle 07-18-2004 10:21 PM

Quote:

Originally Posted by Boofo
Thank you for verifying that. ;)

I think he did the template snippets a few posts up if you want to look at it. ;)

I actually took a look at the search.php snippit, and found 2 things that did not match up to mine. 2 Queries:

Mine:
PHP Code:

 $querycount=$DB_site->query_first("SELECT COUNT(*) AS orderedids FROM " TABLE_PREFIX "search LEFT JOIN " TABLE_PREFIX "user USING (userid) WHERE query!='' AND usergroupid NOT IN (5,6,7)"); 

His:
PHP Code:

 $querycount=$DB_site->query_first("
SELECT COUNT(*) AS orderedids FROM " 
TABLE_PREFIX "search AS search
LEFT JOIN " 
TABLE_PREFIX "user AS user USING (userid)
WHERE query!=''
AND usergroupid NOT IN (5,6,7)
"
); 

(note the query has been cut up with line breaks)

Then another query:

mine:
PHP Code:

 $lastsearches=$DB_site->query("SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM " TABLE_PREFIX "search," TABLE_PREFIX "user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15"); 

his:
PHP Code:

 $lastsearches=$DB_site->query("
SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,use  r.username,user.userid,user.usergroupid
FROM " 
TABLE_PREFIX "search AS search," TABLE_PREFIX "user AS user
WHERE query!=''
AND user.userid = search.userid
// AND usergroupid NOT IN (5,6,7)
ORDER BY searchid desc LIMIT 0,15
"
); 

(again note the line breaks and commented out line)

So, I would reset those 2 queries to the ones in the install file, just to see if that gets you anywhere. I would have thought they would have worked broken up like that.

I will look at the template in a bit.

edit: our templates are identical.

j_86 07-18-2004 10:46 PM

Hi there;

I commented out that line, following the install.txt instructions if Iwanted admin searches to show up. Because I use table prefixes in my install, Boofo kindly designed those queries to allow it to auto detect my table prefixes :)

I'll try without line breaks as you said.

Thank you all, for your time.

chapsrulez 07-21-2004 11:43 PM

I installed this on vb3.0 with no problema

but in another with vb3.0.3 im having some problems.

Quote:

Database error in vBulletin 3.0.3:

Invalid SQL: SELECT search.searchid,search.orderedids,search.dateline, search.query,search.userid,user.username,user.user id,user.usergroupid FROM forosearch,forouser WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15

Boofo 07-21-2004 11:51 PM

Quote:

Originally Posted by chapsrulez
I installed this on vb3.0 with no problema

but in another with vb3.0.3 im having some problems.

I don't use these tables in any of the queries. You might want to check the code again. ;)

forosearch
forouser

Seawolf 07-25-2004 08:36 PM

Nice hack.


All times are GMT. The time now is 12:51 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.01364 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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