replikacep
Tam Üye
İndextempalde bul
Sonradina ekle
Hayirli gunlerde kullanin
Çalışması için ekdeki dosyayı indirmeniz gerekiyor. EhMedia klasörünü ana forum yolunuza (dizine) koyun.
Code:
echo '
</head>
<body id="', $context['browser_body_id'], '" class="action_', !empty($context['current_action']) ? $context['current_action'] : (!empty($context['current_board']) ?
'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')), !empty($context['current_board']) ? ' board_' . $context['current_board'] : '', '">';
Sonradina ekle
Code:
global $boardurl, $context;
// use video, audio or audio2
list($type, $path, $width, $height) = array(
'audio2',
'EhMedia',
'200px',
'200px'
);
if ($type == 'video' && $context['user']['unread_messages'] >= 1) {
echo '
<div style="display: none;margin: 0 auto;width: 100%;" class="centertext newPMessageCheckOnce" id="newPMessageCheck"></div>
<video style="position: relative;left: 50%;transform: translateX(-50%);" width="' . $width . '" height="' . $height . '" id="eh_video_player" poster="">
<source id="ehvideo_mp4" src="" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\' />
</video>
</div>
<script>
if ($("#newPMessageCheck").hasClass("newPMessageCheckOnce")) {
$(document).one("mousemove", function(event){
ehPlayVideo(\'' . $boardurl . '/' . $path . '/alert_bell.mp4\');
ehPlayAudio(\'' . $boardurl . '/' . $path . '/alert.mp3\');
ehPlayAudio(\'' . $boardurl . '/' . $path . '/message.mp3\');
$("#newPMessageCheck").css("display", "flex");
});
}
function ehPlayVideo(url) {
var ehvideo = $("#eh_video_player");
ehvideo
[o].autoplay = true;
ehvideo
[o].src = url;
ehvideo
[o].load();
ehvideo
[o].play();
}
function ehPlayAudio(url) {
const audio = new Audio(url);
audio.play();
}
</script>';
}
else {
echo '
<div style="display: none;" class="newPMessageCheckOnce" id="newPMessageCheck"></div>
<script>
function ehPlayAudio(url) {
const audio = new Audio(url);
audio.play();
}
</script>';
if ($context['user']['unread_messages'] >= 1) {
echo '
<script>
$(document).one("mousemove", function(event){' . ($type == 'audio' ? '
ehPlayAudio(\'' . $boardurl . '/' . $path . '/whistle_alert.wav\');' : '
ehPlayAudio(\'' . $boardurl . '/' . $path . '/alert.mp3\');
ehPlayAudio(\'' . $boardurl . '/' . $path . '/message.mp3\');') . '
$("#newPMessageCheck").attr("class", "newPMessageCheckOnce");
});
</script>';
}
}
Hayirli gunlerde kullanin
Çalışması için ekdeki dosyayı indirmeniz gerekiyor. EhMedia klasörünü ana forum yolunuza (dizine) koyun.