hi,
wer kann mir sagen wie nun die ignore funktion für den buddy von pragmamx aussehen muss,
da die alte funktion hier nicht funktioniert???
function sendm($to, $to_userid, $msg_text, $subject) {
global $bgcolor1, $bgcolor2, $textcolor1, $textcolor2, $prefix, $user_prefix;
$subject = strip_tags($subject);
if (!$subject) $subject= _PMSFROM." ".$GLOBALS["userinfo"]["uname"]."";
$subject = mxAddSlashesForSQL($subject);
$msg_text = mxAddSlashesForSQL($msg_text);
$sql = "INSERT INTO ${prefix}_priv_msgs (msg_image, subject, from_userid, to_userid, msg_time, msg_text) ";
$sql .= "VALUES ('".$GLOBALS["subjectdefaulticon"]."', '$subject', '".$GLOBALS["userinfo"]["uid"]."', '$to_userid', now(), '$msg_text')";
if($to_userid && $msg_text){
$result=sql_query($sql);
}
if(empty($result)){
$msg= "<br>\n<b><br>"._PMSBUDDYERROR."</b><br>\n<br>\n\n";
$timeout=15000;
}
else{
$msg= "<br>\n<br>\n<b>"._PMSSENDED1." $to "._PMSSENDED2."</b><br>\n<br>\n\n";
$timeout=1000;
}
create_headerforall(_PMSTITLE);
create_bodyforall();
echo "<br>\n<br>\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor1\"><tr>\n<td align=\"center\">\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"$bgcolor2\">\n";
echo "<tr>\n<td align=\"center\">\n$msg";
echo "<a href=\"javascript:window.close()\" onClick='window.close()'><img src=\"".$GLOBALS["url_button"]."/schliessen.gif\" border=0 width=\"102\" height=\"20\" style=\"background-color: transparent;\"></a><br>\n<br>\n\n";
echo "<font class=\"tiny\">"._PMSAUTOCLOSE."</font><br>\n<br>\n\n";
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
echo " <!--\n";
echo " setTimeout(\"self.close()\", $timeout);\n";
echo " // -->\n";
echo " </script>";
echo "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n";
create_footerforall();
}
Hi smartmusic,
bei mir habe ich das so eingebunden.
Edit: Die index.php habe ich auch geändert, falls Du sie testen möchtest, schicke ich dir eine Mail.
LG
Mecki
function sendm($to, $to_userid, $msg_text, $subject)
{
global $bgcolor1, $bgcolor2, $textcolor1, $textcolor2, $prefix, $user_prefix;
$subject = strip_tags($subject);
if (!$subject) $subject = _PMSFROM . " " . $GLOBALS["userinfo"]["uname"] . "";
$subject = mxAddSlashesForSQL($subject);
$msg_text = mxAddSlashesForSQL($msg_text);
$sql = "INSERT INTO ${prefix}_priv_msgs (msg_image, subject, from_userid, to_userid, msg_time, msg_text) ";
$sql .= "VALUES ('" . $GLOBALS["subjectdefaulticon"] . "', '$subject', '" . $GLOBALS["userinfo"]["uid"] . "', '$to_userid', now(), '$msg_text')";
$ignore = sql_query("select uname from ".$user_prefix."_users_ignorelist where uid='".$to_userid."' AND ignoreid='".$GLOBALS["userinfo"]["uid"]."'");
$nene = sql_num_rows($ignore);
list($ignorename) = sql_fetch_row($ignore);
if ($nene == 1) {
create_headerforall(_PMSTITLE);
create_bodyforall();
echo "<br><center>".$ignorename." möchte keine Nachrichten von dir!<br />"
."</TR></table>";
create_footerforall();
}else{
if ($to_userid && $msg_text) {
$result = sql_query($sql);}
}
if (empty($result)) {
$msg = "<br>\n<b><br>" . _PMSBUDDYERROR . "</b><br>\n<br>\n\n";
$timeout = 15000;
} else {
$msg = "<br>\n<br>\n<b>" . _PMSSENDED1 . " $to " . _PMSSENDED2 . "</b><br>\n<br>\n\n";
$timeout = 1000;
}
create_headerforall(_PMSTITLE);
create_bodyforall();
echo "<br>\n<br>\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor1\"><tr><td align=\"center\">\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"$bgcolor2\">\n";
echo "<tr><td align=\"center\">\n$msg";
echo "<a href=\"javascript:window.close()\" onClick='window.close()'><img src=\"" . $GLOBALS["url_button"] . "/schliessen.gif\" border=0 width=\"102\" height=\"20\" style=\"background-color: transparent;\"></a><br>\n<br>\n\n";
echo "<font class=\"tiny\">" . _PMSAUTOCLOSE . "</font><br>\n<br>\n\n";
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
echo " <!--\n";
echo " setTimeout(\"self.close()\", $timeout);\n";
echo " // -->\n";
echo " </script>";
echo "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n";
create_footerforall();
}
danke,
so hatte ich es eigentlich auch übernommen vom alten,komisch,jetzt läuft es :thumbup:
hast du denn diese erweiterung im buddy eingebaut?
// Milhouse_Erweiterung
$result_anzahl = sql_query("SELECT Count(*) FROM ".$prefix."_priv_msgs WHERE to_userid=$to_userid");
$qry_sent = "SELECT Count(*) FROM ".$prefix."_priv_msgs_send WHERE from_userid=".$GLOBALS["userinfo"]["uid"]."";
$result_sent = sql_query($qry_sent);
$count_anzahl = sql_fetch_row($result_anzahl);
$countpmsent = sql_fetch_row($result_sent);
if ($countpmsent[0] >= $sentboxsize) {
echo "<br>\n<b><br><center>"._SENTPMBOXVOLL."</b><br>\n<br></center>\n\n";
} else if ($count_anzahl[0] >= $inboxsize) {
echo "<br>\n<b><br><center>"._PMBOXVOLL."</b><br>\n<br></center>\n\n";
} else {
//Ende Erweiterung
geht bei mir nämlich auch nicht
Hi,
nein habe ich nicht, erstens gefällt mir das nicht und zweitens bin ich froh, das ich die igno Funktion einbauen konnte*g Ich bin ja kein Progger ;)
LG
Mecki
also ich finde es sollte mal hier das komplette private messages modul inkl. ignore und postfach cofig zum download geben
Hi,
das wäre wohl erst interessant wenn die 0.1.7 fertig ist, sonst muss man ja andauernd die buddy.php und die index.php anpassen.
LG
Mecki
kann ich den sentcode mit der ignore für das update 0.1.7. so nutzen oder gibt es veränderungen?
Zitat von: smartmusic in 07 November 2005, 23:21:40
also ich finde es sollte mal hier das komplette private messages modul inkl. ignore und postfach cofig zum download geben
Dann pack die ganzen Dateien zusammen, fertige ein entsprechendes ReadMe an und stell es in die Downloads. Und schon gibt es das zum Download ;)
RtR
wenn ich soweit wäre hätte ich bestimmt nicht die letzte frage gestellt.