يعنى هذى الدالة
كود PHP:
// ###################### Start vbmail #######################
// vBulletin wrapper for PHP's 'mail()' function
function vbmail($toemail, $subject, $message, $from = '', $headers = '', $username = '') {
global $bbtitle, $webmasteremail;
$toemail = trim($toemail);
if ($toemail) {
$subject = trim($subject);
$message = preg_replace("/(\r\n|\r|\n)/s", "\r\n", trim($message));
$from = trim($from);
$username = trim($username);
// work out the 'From' header
if ($from == '') {
$headers = "From: \"$bbtitle Mailer\" <$webmasteremail>\r\n" . $headers;
} else {
$headers = 'From: "' . iif($username, "$username @ $bbtitle", $from) . "\" <$from>\r\n" . $headers;
}
// actually send the email message
mail($toemail, $subject, $message, $headers);
return true;
} else {
return false;
}
}
وحطها فى الملف functions.php موجود بمجلد admin
حطها بعد
كود PHP:
// ###################### Start wordsonly #######################
function wordsonly ($text) {
//for the searching - strips out unneccessary bits
$text=strtolower($text);
$text=ereg_replace("<pre>[^<]*</pre>"," ",$text);
$text=ereg_replace("<[^>]*>"," ",$text); // remove HTML <> tags
$text=ereg_replace("&[^;];"," ",$text); // remove HTML special chars
// $text=ereg_replace("[^ 0-9a-z]"," ",$text); // keep only letters and numbers
$counter=0;
$words=explode(" ",$text);
while (list($key,$val)=each($words)) {
if (strlen($val)>2 and $val!="the" and $val!="this" and $val!="and" and $val!="but" and $val!="was" and $val!="that" and $val!="with" and $val!="its" and $val!="you" and $val!="they" and $val!="what" and $val!="why" and $val!="for" and $val!="are" and $val!="our" and $val!="then" and $val!="there" and $val!="which") {
$counter++;
$wordarray[]=$val;
}
}
if ($counter>0) {
return implode($wordarray," ");
}
}
او اى مكان.