![]() |
Depending on the number of posts in each thread, I saw queries as hig as 89, but just on the showthreads. On every other page it was normal. My normal amount of queries on showthreads is about 26-28. After I took the hack out, showthreads page went back to normal.
|
The problem is found and cleared.
Update follows... @Smoothie: Many many thanks for your note :classic: :cool: edit: Download was actualized. |
The new version is in the first post?
|
yep
|
how many queries are you seeing with the new version?
|
With installed new version of the hack it is only still 2 queries more now... :classic:
But this isn't avoidable. If you still liked to have a query less, then copy the contents of template "showthread_adds" into the template "showthread" (replace $threadview_adds with that) and remove the template "showthread_adds". You still then remove the line Code:
eval("\$threadview_adds=\"".gettemplate("showthread_adds")."\";"); That's all. It is then only ONE query. But this everything for a query less ? ;) ;) |
bad_madman,
thanks for the update. I'll install and let ya know how it goes. |
Nice! Works great! Thanks. :)
|
Great hack, but the only problem I have found is that the string-search option doesn't work at all! I can type a specific word in somebody's post and hit the submit button, but all it does is refresh the page. Anybody else getting the search option to work? Which is basically the reason I need this hack ;)
|
It does however highlight the word in red.
|
My search is bugged then, it doesn't highlight nor find :(
Attached is a picture, incase anybody is wondering, of what this hack looks like (except it doesn't come with my template modifications ;)) |
Sorry for the double post, though it does work! I just rechecked it and the search words are in red. This hack is totally awesome bad_badman, and should be a definate nomination for hack of the month. If it were implemented on these forums it would make searching within huge threads so much easier! We just need FireFly to look at this...
|
Well i am getting a problem. I upgraded not doing the first post ove rbut just adding and editing the post that i asked for. Just to add what i need to update. i don't no if you told me the wrong thing to update but i did a test on my forums. In one post i have several posts with the word STUFF in it and i searched that word and then i get only one highlighted word stuff. Thats it. All the other words are not highlighted at all. Plus if i search for a word not in the post it wont give me that error message that the update is all about.
|
ok never mind it works. But it is wierd. It doesnt show the word stuff in the last post. i dont no why it is doing that but that is the only word it does it for. Wierd. Also i am still not getting any error screen. What is wrong witht that?
And also one of my templates is red so that is a problem. Is there any way we can use a replacement variable for this hack? So i can then change the replace ment variable for the HIGHLIGHTED word colors? That owuld be great because every style on my boar dhas its on replacement variable. |
I am getting 2 black boxes (1 on either side of the not found window when it displays). Has anyone else run into this problem?
|
I dont get the error screen at all. It is wierd. i just geta refreshed page.
|
It also will only refesh the page if it doesn't find the word it is looking for. Is there a way to have it tell you that it can't find the word you are looking for?
Quote:
|
Well that was the whole point of the new updated version in. read throught the thread it is on page 3. There is no error screen and there is suppose to be one.
|
Quote:
|
Quote:
Quote:
- Make your replacements: </myhighlight> is replaced by </font></i></b> <myhighlight is replaced by <b><i><font color="red" - Search in showthread.php for: if (isset($highlight) and $highlight!="search") {$src[string]="$highlight";} - and replace with: if (isset($highlight)) {$src[string]="$highlight"; $myhighlight=1;} - Search in admin/functions.php for: PHP Code:
Code:
global $myhighlight; |
I just added the above code to my board and I get an error on this line every time I do a search for a specific word now.
Code:
$post['message']=preg_replace("/(^| |\n|\r|\t|]|>|\")(".$val.")(([.,]+[ $\n\r\t])|$|\"|<|[| |\n|\r|\t)/si", "\1$highl1\2$highl2\3", $post['message']); Code:
Warning: Compilation failed: missing terminating ] for character class at offset 57 in /home/virtual/site3/fst/var/www/html/forum/admin/functions.php on line 358 |
Well i am sorry but i am sorta lost at the replacements part. What do i exactly do. I have a code to find insert. Lol. I am new with replacements because i havent used them that much. Thanks for the quick reply though.
|
bad_madman,
Any ideas yet why I am getting the error I wrote about a couple of posts back? |
|
Ok, that fixed the error I was getting, but now if I search for a word that is not in any messages, it just redraws the screen instead of giving me the GO BACK box. And the highlighted word is in italics too. I like it like that but it might be a good idea to make that an option. :)
|
Quote:
I plan another one couple of additional search options. - Show only posts in which the search string was found. - Show a message (with go back ;)), if the search string wasn't found. |
You are the man! I will be anxiously waiting and wanting this one! :):):)
Quote:
|
Same here ;)
|
me too
|
Quote:
|
I get a few erros as soon I uploaded my modified showthread.php file, can anybody help me?
Database error in vBulletin 2.2.6: Invalid SQL: SELECT post.postid FROM post WHERE post.threadid='3351' AND post.visible=1 ORDER BY LIMIT 0,15 mysql error: You have an error in your SQL syntax near 'LIMIT 0,15 ' at line 3 mysql error number: 1064 Date: Saturday 22nd of June 2002 06:11:46 AM Script: http://www.avalancheonline.net/forum...&threadid=3351 Referer: http://www.avalancheonline.org/forum...p?s=&forumid=3 |
Quote:
Code:
$getpostids=$DB_site->query(" |
Quote:
1st replacement: - Click there on Replacements -> Add. - Code to find: <myhighlight - Code to insert: <b><i><font color="red" 2nd replacement: - Click there on Replacements -> Add. - Code to find: </myhighlight> - Code to insert: </font></i></b> |
Ok, I found it, my showthread file was a little messed up and the quick reply box interfered somehow, I readded all the hacks in it and it seems to be working fine now.
Great hack madman and thanks! Cheers. |
OK your thing worked great for the different templates. Thank you so much. You are the best.
|
New version out: 1.20
Updates - Search in Thread » Show only posts in which the search string was found (v1.20) » Own replacement for highlighted words possible (v1.20) » String search in words Screenshots: Screenshots in the first post. Download: The latest version is in the first post of this thread. |
Is there any update instruction if we have it installed already? :) You know how bad my template had to be redone. :)
Quote:
|
Ok, I changed the download file again. The update instruction are contained in the download archive now :) ... run sqltodos.php and then select "Click here for an update installation from v1.10"...
Quote:
|
Somebody had complained that at every search the views counter one is increased :surprised: :nervous: This can be changed (is recommendable) :classic:
Search in showthread.php for: Code:
if ($noshutdownfunc) { Code:
if ($ownsearch!=1) { edit: wrong code |
Hi, nice hack!!
i installed the hack that shows the number of posts and direct link in that thread! If you search the thread and the result is shown the numbers change and start again with 1. Is it possible to keep the original numbers? So if a post is the third post in this thread (post #3), this number will also be shown in the search result? Otherwise it is a little bit confusing. Also how can i get back to the thread after searching? Because after the search there is no button where i can reset the search? Hope you understand what i mean, is a little bit difficult for me to explain in english :) Thanks |
All times are GMT. The time now is 08:39 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|