View Full Version : You are searching within domain.com

12-24-2004, 10:40 AM
Since I cant message Allergie I tried to post in the thread you showed me.
I get the message "This thread is old. Consider starting a new thread instead."
I realized that these old threads won't show up when you do a search either.
Kind of a bummer.

Hopefully Allergie can find this post then or maybe you have the solution Charter.

A search is made.
The person clicks on "limit to www.domain.com"
They do a new search and are stuck within that domain with no way out to do a new search. Not even a message to show them that they are still within that specific domain still.

I am sure I can make a way to let them do a fresh search. How can I implement a text display showing them at the top something like this: "You are searching within domain.com"

I am guessing I have to pulll the site= from the url? I'm not sure how to do this

12-25-2004, 09:48 PM
At line 579 in search_function.php add this (red lettering is the additon) The other code was added for reference only to find placement

$mtime = explode(' ',microtime());
$search_time = sprintf('%01.2f',$mtime[0]+$mtime[1]-$start_time);
$result_message = stripslashes(ucfirst(phpdigMsg('results'))." $n_start-$n_end, $num_tot ".phpdigMsg('total').", ".phpdigMsg('on')." \"".htmlspecialchars($query_string,ENT_QUOTES)."\" ($search_time ".phpdigMsg('seconds').")");

$timer->stop('Final strings');

$limit_query = mysql_query("SELECT site_url FROM sites WHERE site_id =".$site,$id_connect);
$limit_to_message = mysql_fetch_array($limit_query);
if ($limit_to_message[0] == "") {}
else {
$limit_to_message = 'You are currently searching in '.$limit_to_message[0].' <a href=search.php>'.phpdigMsg('restart').'</a>';

else {
$num_in_strings_arr = count($strings);
$leven_final = "";

At line 673 in search_function.php add this (red lettering is the additon) The other code was added for reference only to find placement

if ($template == 'array' || is_file($template)) {
$phpdig_version = PHPDIG_VERSION;
$t_mstrings = compact('limit_to_message','js_for_clicks','powered_by_link','title_message ','phpdig_version','result_message','nav_bar','ignore_message','ignore_comm ess','pages_bar','previous_link','next_link');

You can now use <phpdig:limit_to_message/> in your template to read as
You are searching within <phpdig:limit_to_message/>
You are searching within http://www.domain.com/

I truly dispise CSS used in coding. It leaves no room to change anything when the css tells the text where to be and a whole page what to do. Sorry, just one of my peeves. I got rid of the css for <div id="messages"> in the gaagle.html template.
I made a table with 2 sides so information could go in each rather than be bunched together as it would have been.

<table border=0 bgcolor="#CFF" cellspacing=0 cellpadding=0 width=100%>
<td width=50% align=left>&nbsp;
<td align=right width=50%>

I do not have much knowledge of the back and forth scripting in phpdig but managed to figure this out finally.
Charter, I am sure you could code this much better than I did. In your infinite wisdom of php and PhpDig maybe you could add this in your next update.