You are searching within domain.com

January 7th, 2009   Filed Under naaktbelgisch.com   edit

  • 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


  • 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].' '.phpdigMsg('restart').'';
    }


    }
    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 in your template to read as
    You are searching within
    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 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.





     










    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.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about You are searching within domain.com , Please add it free.