PhpDig.net

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

Reply
 
Thread Tools
Old 03-18-2004, 10:58 AM   #1
jasonm0928
Green Mole
 
Join Date: Mar 2004
Posts: 5
Searching only content from one domain in database

First off this seems to be a great program. Thanks for writing and maintaining it...

I have a problem that I just can't figure it out. Maybe I'm being thick, I don't know.... Anyway, I'm trying to only search through the content of one site as opposed to all sites in the database. I thought that the site variable was what I needed to change to the site_id but that doesn't appear to be working. Could you help point me in the right direction of what I need to do in order to do this? Thanks much....


P.S. I'm useing version 1.8.0
jasonm0928 is offline   Reply With Quote
Old 03-19-2004, 05:29 AM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
First of all, welcome to the forum, jasonm0928. We're glad to have you here!

I'm not sure just what kind of search you're asking to do. Is it a subdomain? Everything in a sub-folder? Something else?

Don't know if this will help or not, but if you want to exclude particular links from being indexed, you can include the following comments on their own line above and below the links you want to exclude:
PHP Code:
<!-- phpdigExclude -->
your link(sto exclude go here
<!-- phpdigInclude --> 
If I'm misunderstanding your problem, please elaborate a little further. Thanks.
vinyl-junkie is offline   Reply With Quote
Old 03-19-2004, 10:37 AM   #3
jasonm0928
Green Mole
 
Join Date: Mar 2004
Posts: 5
Thanks for the warm welcome, I appreciate that...

What I'm trying to do is for example in my database I have 3 urls indexed. For examples sake lets say www.yahoo.com, www.google.com, www.debian.org. I want to be able to restrict a search based on only one url. So I would like to be able to have a search for only www.debian.org and it would not try to find links from the other two domains....
jasonm0928 is offline   Reply With Quote
Old 03-19-2004, 07:51 PM   #4
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Start reading through this thread, and follow the link to the second thread within it. Between the two, there should be some ideas to help you solve your problem.

Hope this helps!
vinyl-junkie is offline   Reply With Quote
Old 03-20-2004, 04:18 AM   #5
jasonm0928
Green Mole
 
Join Date: Mar 2004
Posts: 5
Hurmmm, that is exactly how I have been trying to do it. It seems that it doesn't care what value I have as the "site" variable at all. This is why I'm totally confused. I am thinking the site variable should be the site_id value from the database. I guess I will keep playing with it and see what I'm doing wrong... Thank you very much for your help.
jasonm0928 is offline   Reply With Quote
Old 03-20-2004, 06:11 AM   #6
sanford
Green Mole
 
Join Date: Mar 2004
Posts: 2
Jason,

I think you also need to set refine = 1

Sanford
sanford is offline   Reply With Quote
Old 03-20-2004, 06:51 AM   #7
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Let us know whether or not that last suggestion helped. This type of question seems to come up fairly often in the forum, and since it's something I could very well want to use someday myself, I'll be interested in how you solve it. Thanks.
vinyl-junkie is offline   Reply With Quote
Old 03-20-2004, 08:13 AM   #8
jasonm0928
Green Mole
 
Join Date: Mar 2004
Posts: 5
Hurmmm, This is very very interesting.... I had been doing the refine=1 and it wasn't working although now it is. This is breaking my brain. I don't know what I am doing different now or what exactly I changed but now everything is working like I expected it to originally. One thing I have changed today is I setup the Admin panel v1.0 mod today. Not for sure if that had anything to do with it or not. I couldn't believe it would although it did overwrite the original search.php file.
jasonm0928 is offline   Reply With Quote
Old 03-20-2004, 08:18 AM   #9
jasonm0928
Green Mole
 
Join Date: Mar 2004
Posts: 5
No, actually I replaced the original search.php file and it is still working. Very very odd. I really have no darn clue why it started working out of the blue like that. I'm sure there is more than meets the eye. Probably an error on my part but for the life of me I can't think of what I changed that made it start working correctly.
jasonm0928 is offline   Reply With Quote
Old 03-22-2004, 07:36 AM   #10
lighthouse
Green Mole
 
Join Date: Mar 2004
Posts: 20
I knocked up this little bit of code that can be easily modified to suit.....

----------snip------------
<form action='search.php' method='get'>

<input type='hidden' name='site' value='11'/>
<input type='hidden' name='path' value=''/>
<input type='hidden' name='result_page' value='search.php'/>

<span class="maintext"><b>Search Our Network of sites:</b>
<br /><br />

Search: <input type='text' class='pagesearch' size='15' maxlength='50' name='query_string' value=''/>


<select name='option' class='pagesearch'>
<option value="start" selected >all words</option>
<option value="exact" >exact phrase</option>
<option value="any" >any words</option>
</select>

in

<select name='refine' class='pagesearch'>
<option value="1" >Particular Domain</option>
<option value="0" selected >Entire Network of sites</option>
</select>

<input type='submit' class='pagesearch' name='search' value='Go'/>

</form>
------------------------------


Hope this helps.... works really well for our purposes

Gary
lighthouse is offline   Reply With Quote
Reply


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
Spidering dynamic content in a database hame22 Script Installation 1 04-29-2005 02:12 PM
You are searching within domain.com Slider Mod Submissions 1 12-25-2004 10:48 PM
Searching data in MySQL database maheshg How-to Forum 3 03-24-2004 11:21 AM
one domain xibalba How-to Forum 1 03-12-2004 10:18 AM
Indexing the content of a database antalsia How-to Forum 1 01-28-2004 11:53 AM


All times are GMT -8. The time now is 08:15 AM.


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