PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-19-2004, 09:26 AM   #1
phirschybar
Green Mole
 
Join Date: Nov 2004
Posts: 4
Bold Search Terms

Great search script!!!

How can I get the search terms that the user entered to appear as bold words in the search results? Right now, all of the text comes up normal so it is hard to determine how their search terms relate to the context of the results.

Thanks

Ben
phirschybar is offline   Reply With Quote
Old 11-19-2004, 04:48 PM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
In config.php, find the following code:
Code:
define('HIGHLIGHT_BACKGROUND','#FFBB00');        //Highlighting background color
                                                 //Only for classic mode
define('HIGHLIGHT_COLOR','#000000');             //Highlighting text color
                                                 //Only for classic mode
Play around with that to see what suits your fancy.
vinyl-junkie is offline   Reply With Quote
Old 11-20-2004, 08:06 AM   #3
phirschybar
Green Mole
 
Join Date: Nov 2004
Posts: 4
hmmm... doesn't seem to be working.. or maybe I'm not using classic mode... what is classic mode?

Thanks

Ben
phirschybar is offline   Reply With Quote
Old 11-20-2004, 08:47 AM   #4
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
First of all, read section 10 of the phpdig documentation. (You should read all of the documentation anyway. RTFM* applies here ). Classic mode is all the premade templates that you can view in the phpdig demo.



* Someone is bound to ask. RTFM = read the manual. There are variations on the "F" - some of which are vulgar. No need to elaborate on that.
vinyl-junkie is offline   Reply With Quote
Old 11-20-2004, 11:35 AM   #5
phirschybar
Green Mole
 
Join Date: Nov 2004
Posts: 4
RTFM.. I like that. Sorry I didn't read it thoroughly... thanks for your reply though!!

So, for my situation, I can't use the Classic mode, I need to be able to modify the display. Got any hacks up your sleeve to get the text highlighting capabilities to work with a template?

Thanks in advance.

Ben
phirschybar is offline   Reply With Quote
Old 11-20-2004, 12:28 PM   #6
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
That is governed by the stylesheet for your search page. For example, here is how it's defined in the template bluegrey.html:
Code:
.phpdigHighlight {
color: white; background-color: #220044; font-weight: bold;
}
Just add that to your own stylesheet, and change its properties to however you want it to look for your own highlighting.

Hope this helps.
vinyl-junkie is offline   Reply With Quote
Old 11-21-2004, 08:09 AM   #7
phirschybar
Green Mole
 
Join Date: Nov 2004
Posts: 4
beautiful.. I see the phpdigHighlight span class in the results. Thanks!!!
phirschybar is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No most searched terms, biggest results, most 0 results, last search queries, etc. jongag1 How-to Forum 6 04-22-2005 10:43 AM


All times are GMT -8. The time now is 04:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.