![]() |
|
Anpassung: no download counter for uploader in attachment.php - Druckversion +- Interceptor Forum (https://interceptor.marconitschke.de) +-- Forum: Sonstiges (https://interceptor.marconitschke.de/forum-70.html) +--- Forum: MyBB Plugin (https://interceptor.marconitschke.de/forum-82.html) +--- Thema: Anpassung: no download counter for uploader in attachment.php (/thread-85.html) |
Anpassung: no download counter for uploader in attachment.php - nitje - 05-01-2025 Es soll keine Zählung von Attachment bzw. Anhängen geben wenn es der Uplaoder selbst sich ansehen will. Im root Verzeichnis die Datei attachment.php Bearbeiten suche: Code: if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail
{
if(!is_member($attachtype['groups']))
{
error_no_permission();
}
$attachupdate = array(
"downloads" => $attachment['downloads']+1,
);
$db->update_query("attachments", $attachupdate, "aid='{$attachment['aid']}'");
}ersetze mit: Code: if(!isset($mybb->input['thumbnail'])) // Only increment the download count if this is not a thumbnail
{
if (!is_member($attachtype['groups']))
error_no_permission();
}
// Prüfe, ob der aktuelle Benutzer nicht der Uploader ist
if ($mybb->user['uid'] != $attachment['uid']) {
$attachupdate = array(
"downloads" => $attachment['downloads'] + 1,
);
$db->update_query("attachments", $attachupdate, "aid='{$attachment['aid']}'");
} |