vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vB3.5 15 Most Recent Searches Made By Our Members (https://vborg.vbsupport.ru/showthread.php?t=95270)

Gizmo5h1t3 08-30-2005 06:26 AM

Warning: Invalid argument supplied for foreach() in /search.php(292) : eval()'d code on line 73

im gettin the same error...nice to see the coders are aware of it, and are working on a fix...

dieselpowered 08-30-2005 02:56 PM

Quote:

Originally Posted by Gizmo5h1t3
Warning: Invalid argument supplied for foreach() in /search.php(292) : eval()'d code on line 73

im gettin the same error...nice to see the coders are aware of it, and are working on a fix...

Appears to have something to do with the search table being empty. I am sure Boofo would hook us up with a fix shortly :)

Neutral Singh 08-30-2005 03:29 PM

too good Thanks !!

Forumi Shqiptar 08-30-2005 04:19 PM

needed this thanks

clicked install :)

Boofo 08-31-2005 12:48 AM

If anyone is still getting the error mentioned in the thread, contact me via pm and I will give you a fix to test. I don't get the error so I can't test it.

Mike Gaidin 08-31-2005 01:20 AM

Nice to see that this one made the jump to 3.5.0

Boofo 08-31-2005 01:37 AM

Hello, stranger. Glad to see you around. ;)

Mike Gaidin 08-31-2005 02:18 AM

I'm always around. Just not much to say anymore. :(

Keep up the good work Bob.

Boofo 08-31-2005 02:21 AM

Quote:

Originally Posted by Mike Gaidin
I'm always around. Just not much to say anymore. :(

Keep up the good work Bob.

PM me when you have time and we'll catch up. Got a new site. ;)

Boofo 08-31-2005 08:03 AM

New version has been uploaded that fixes the error for new sites when the search table was empty. ;)

yoyoyoyo 08-31-2005 08:47 AM

works like a charm- thanks again!

Boofo 08-31-2005 09:17 AM

Quote:

Originally Posted by yoyoyoyo
works like a charm- thanks again!

Were you getting the error, too?

dieselpowered 08-31-2005 03:25 PM

Quote:

Originally Posted by Boofo
Were you getting the error, too?

Yes sir he was getting the error as well.

Appears the hack is running correctly on my site...crons have run and cleaned up the search table...No errors showing.

Well done my friend, I will followup is any other issues arise :)

dieselpowered 08-31-2005 03:43 PM

More information to add...

I would recommed those running RC2 go into the ACP and select 'scheduled tasks' Once in there, go to manage and attempt to run some of the tasks manually. If you receive an error, do not panic...

go into your admincp/cronadmin.php

Find

PHP Code:

$db null

Replace With

PHP Code:

unset($db); 

Save and you should be good to go!!!

RC3 should have this fixed.

Boofo 08-31-2005 05:07 PM

Quote:

Originally Posted by xtremeoff-road
More information to add...

I would recommed those running RC2 go into the ACP and select 'scheduled tasks' Once in there, go to manage and attempt to run some of the tasks manually. If you receive an error, do not panic...

go into your admincp/cronadmin.php

Find

PHP Code:

$db null

Replace With

PHP Code:

unset($db); 

Save and you should be good to go!!!

RC3 should have this fixed.

I forgot all about that. That's why my cron was running. I changed that a while back when they first found it. I'm sorry I didn't think of that, Mike. Duh on me.

dieselpowered 08-31-2005 08:07 PM

Its no problem my friend...I am watching the logs to see if they are running at the correct time.

Have a great one!

FYI, Hourly Cleanup #1 just ran, searches are still being shown...I will report back after #2 runs :)

dieselpowered 08-31-2005 08:21 PM

Ok hourly cleanup #2 has not removed the searches, they are still showing.

I am curious if there is another cron that does this??

dieselpowered 08-31-2005 11:30 PM

I guess Hourly Cleanup #1 is supposed to remove the info in this table, however, it did not on the first run...However, on the second it did???

Boofo 09-01-2005 01:52 AM

The hack is working fine. I wouldn't worry about the cron removing the searches. The longer they are there, the better, right? ;)

john_robot 09-01-2005 07:31 AM

I have a question The searches only can see to admin or is there any way to activate it public too??

dieselpowered 09-02-2005 02:21 AM

Ummm actually guest can view the searches. :)

Boofo 09-02-2005 03:13 AM

Quote:

Originally Posted by xtremeoff-road
Ummm actually guest can view the searches. :)

But only in those forums you allow guests to view. ;)

dieselpowered 09-02-2005 03:29 AM

Quote:

Originally Posted by Boofo
But only in those forums you allow guests to view. ;)

What do you mean? Are you saying that results will only display if guests have the permissions to view the forums in which the search results found information?

LOL that was a mouthful...

So if guests cannot view any of the forums, they will be unable to view the last 15 searches?

Boofo 09-02-2005 03:34 AM

Quote:

Originally Posted by xtremeoff-road
What do you mean? Are you saying that results will only display if guests have the permissions to view the forums in which the search results found information?

LOL that was a mouthful...

So if guests cannot view any of the forums, they will be unable to view the last 15 searches?

Exactly! ;)

Try searching for a word that is in a private forum and you will notice that it will not show up to anyone who doesn't have permission to view that forum. As I stated in the first post, this is now FULLY permissions based. ;)

Marco van Herwaarden 09-02-2005 12:00 PM

Quote:

Originally Posted by xtremeoff-road
What do you mean? Are you saying that results will only display if guests have the permissions to view the forums in which the search results found information?

Even better then just that. If a search for a word has for example 5 resulting threads, of which 3 are in public forums, and 2 in privat. It will show to those that have no access to the privat forum, that there are only 3 results. :D

Boofo 09-02-2005 07:20 PM

In Marco's example, the Admin, who has access to all forums would see the results as: 5 Threads while the other user who does NOT have access to the private forums would see the results as: 3 Threads. ;)

I tried to do this on the vB 3.0 version but didn't have any luck at it then. Marco's expert coding allowed it to happen for this version now. ;)

Marco van Herwaarden 09-02-2005 08:04 PM

No luck involved in coding Boobo. :D

Boofo 09-02-2005 08:14 PM

Quote:

Originally Posted by MarcoH64
No luck involved in coding Boobo. :D

I rely on luck when I code. I have to. I don't have the skills you do. ;)

Alien 09-11-2005 09:23 PM

On RC3, has anyone gotten repeated looping? Like when going to the search page you will see, for example 5 results and 5 tables repeating the same information.. Do a new search, and you will notice 6 seperate tables (with all the correct data) but it keeps creating brand new template tables per search term.. Anyone? :)

Boofo 09-11-2005 09:27 PM

All this hack does is read the last 15 rows from the search table. It is very possible to have what looks like duplicates, but are really not, if you search for the same item more than once. It did the same thing in RC 2 and it working as designed. ;)

And don't forget the install button. ;)

Oblivion Knight 09-11-2005 09:42 PM

I seem to remember that previously, admin searches were not displayed..

Is this not the case with this new version?

Boofo 09-11-2005 09:54 PM

Quote:

Originally Posted by Oblivion Knight
I seem to remember that previously, admin searches were not displayed..

Is this not the case with this new version?

They are displayed only to those who have access to whatever forums the searches are in. It is fully permissions based now. ;)

Alien 09-11-2005 10:30 PM

Quote:

Originally Posted by Boofo
They are displayed only to those who have access to whatever forums the searches are in. It is fully permissions based now. ;)

I should explain more accurately. :)

Each search that is submitted, yields a brand new instance of the new table code inserted into the search template.. Wierdest thing I ever saw.. I uninstalled and reinstalled several times (even on a fresh version) so I have no clue how it could be happening...

Say I go into search, and type "test" and JUST installed your hack for the first time. It will display flawlessly. Do it again for something like "funny", it will display TWO tables BOTH showing test and funny results. :)

Boofo 09-11-2005 11:28 PM

First of all, they are not tables, they are rows. And it is working exactly as it should. ALL it is doing is pulling the last 15 rows in the search table. Whatever is in those rows is what it will pull. Simple as that. ;)

Boofo 09-11-2005 11:28 PM

Show me a pic if I still don't understand.

Brandon Sheley 09-11-2005 11:51 PM

ty, * installs* worked just like it should. this will be a great tool for me to organize the forums for the members, depending on what they are searching for alot :)

phlogiston 09-12-2005 12:23 AM

Quote:

Originally Posted by Boofo
Show me a pic if I still don't understand.

The whole results table repeats. v1.0.2 of the product with vB 3.5 RC3

Looking at the search_intro plugin the code that looks for $navbar and adds the $last15searches variable to te template is within a foreach statement moving the last closing } up four lines may be all that's needed for a fix? :)

Boofo 09-12-2005 12:35 AM

Quote:

Originally Posted by Loco Macheen
ty, * installs* worked just like it should. this will be a great tool for me to organize the forums for the members, depending on what they are searching for alot :)

And it will you (Only Admins) to see who is doing the searches. ;)

Boofo 09-12-2005 12:37 AM

Quote:

Originally Posted by phlogiston
The whole results table repeats. v1.0.2 of the product with vB 3.5 RC3

Looking at the search_intro plugin the code that looks for $navbar and adds the $last15searches variable to te template is within a foreach statement moving the last closing } up four lines may be all that's needed for a fix? :)

Ok, I see what it is doing. I will have a fix shortly. ;)

Boofo 09-12-2005 12:50 AM

First post updated with fixed and working version. ;)


All times are GMT. The time now is 10:26 AM.

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.01406 seconds
  • Memory Usage 1,828KB
  • 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
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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