Attachment Mod, flash, download count erhöhen bei betrachtun

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
darklordi
Mitglied
Beiträge: 323
Registriert: 13.12.2004 16:26
Wohnort: Langenfeld
Kontaktdaten:

Attachment Mod, flash, download count erhöhen bei betrachtun

Beitrag von darklordi »

Also.. ich habe folgenden code in meiner viewattachbody.tpl
<!-- BEGIN cat_swf -->
<hr width="65%" align="left" />
<span class="genmed">Diese Flash heißt {postrow.attach.cat_swf.DOWNLOAD_NAME} , ist {postrow.attach.cat_swf.FILESIZE} {postrow.attach.cat_swf.SIZE_VAR} groß und wurde schon {postrow.attach.cat_swf.L_DOWNLOAD_COUNT} mal angeschaut</span>
<html>
<head>
<title>JavaScript -> Flashobjekt anzeigen</title>
<script type="text/javascript" language="JavaScript">
<!--
function showFlash(){
if(document.getElementById('flash').innerHTML==''){
// Zeige Flash-Objekt
document.getElementById('flash').innerHTML='<embed src="{postrow.attach.cat_swf.U_DOWNLOAD_LINK}" loop=1 quality=high scale=noborder wmode=transparent bgcolor=#000000 width="{postrow.attach.cat_swf.WIDTH}" height="{postrow.attach.cat_swf.HEIGHT}" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/dow ... kwaveFlash">';
document.getElementById('flash').innerHTML+='</embed>';
}else{
// Lösche Flash-Objekte
document.getElementById('flash').innerHTML = '';
}
}
//-->
</script>
</head>
<body>
<div id="flash"></div>
<a href="javascript:showFlash();">Hier klicken um Flash anzuzeigen bzw. zuverstecken.</a>
</body>
</html><br>
<span class="genmed">{postrow.attach.cat_swf.COMMENT}</span>
<!-- END cat_swf -->
nun ist es aber so, das der Download Count von den dateien, immernoch bei jedem betrachten des topics erhöht wird..

folgende stelle aus der /attach_mod/displaying.php iss afaik dafür zuständig diesen zu erhöhen
//
// Viewed/Heared File ... update the download count (download.php is not called here)
//
$sql = 'UPDATE ' . ATTACHMENTS_DESC_TABLE . '
SET download_count = download_count + 1
WHERE attach_id = ' . $attachments['_' . $post_id][$i]['attach_id'];

if ( !($db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t update attachment download count', '', __LINE__, __FILE__, $sql);
}

}

if ($swf)
{
Wie krieg ich's also hin, das sich der Download Count nur erhöht, wenn man wirklich oben auf Flash Abspielen gedrückt hat ?
Antworten

Zurück zu „phpBB 2.0: Mod Support“