PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 12-24-2004, 11:40 AM   #1
Slider
Orange Mole
 
Join Date: Jan 2004
Posts: 30
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
Slider is offline   Reply With Quote
Old 12-25-2004, 10: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 10:59 PM.
Slider 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
drop down for domain names oehk How-to Forum 0 12-11-2006 12:32 PM
Domain Aliases exeter How-to Forum 1 09-21-2005 08:49 AM
Searching only content from one domain in database jasonm0928 How-to Forum 9 03-22-2004 07:36 AM
Indexing outside root domain T3D How-to Forum 5 03-14-2004 03:57 PM
one domain xibalba How-to Forum 1 03-12-2004 10:18 AM


All times are GMT -8. The time now is 07:49 AM.


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