View Single Post
Old 12-25-2004, 09:48 PM   #2
Slider
Orange Mole
 
Join Date: Jan 2004
Posts: 30
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

Code:
$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

Code:
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_commess','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.


Code:
<table border=0 bgcolor="#CFF" cellspacing=0 cellpadding=0 width=100%>
<td width=50% align=left>&nbsp;
<phpdig:limit_to_message/>
</td>
<td align=right width=50%>
<phpdig:result_message/>
<phpdig:ignore_message/>
<phpdig:ignore_commess/>
<br><br>
</td>
</table>
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.

Last edited by Slider; 12-25-2004 at 09:59 PM.
Slider is offline   Reply With Quote