View Single Post
Old 10-01-2006, 07:50 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
PhpDig is really set to search all sites or one site at a time. The $site varaible is what determines the site to search and can be in a query string, hidden field, or option tag. To get $site set and treated as an array of integers rather than one integer...

Here are the areas in search_functions.php that may have to be changed:
  • Code:
    if (mb_eregi("^[0-9]+[,]",$site)) {
        $tempbust = explode(",",$site);
        $site = $tempbust[0];
        $path = $tempbust[1];
    }
    settype($site,'integer'); // now set to integer
  • Code:
         $wheresite = "AND spider.site_id = $site ";
  • Code:
         $refine_url = "&refine=1&site=$site&path=".urlencode($path);
And here are the areas in function_phpdig_form.php that may have to be changed:
  • Code:
        if (isset($site) && is_numeric($site) && ($site > 0)) {
            $site = (int) $site;
  • Code:
                'WHERE '.PHPDIG_DB_PREFIX.'sites.site_id = '.$site.' '.
  • Code:
                $dd_query = mysql_query('SELECT DISTINCT path FROM '.PHPDIG_DB_PREFIX.'spider WHERE site_id = '.$site.' AND path != ""',$id_connect);
  • Code:
                <input type='hidden' name='site' value='$site'/>
  • Code:
              $result['form_dropdown'] .= "<option value='".$dd_data['site_id'].",".$dd_data['path']."'>".$dd_data['site_url'].$dd_data['path']."</option>";
  • Code:
      <input type='hidden' name='site' value='$site'/>
There may be other areas also, and of course the search form would need to be altered to allow for muli-selects. Also, the areas above don't take into account the changes that might be needed for selected or checked remembrance after a search.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote