DLE hacks
Statistic 2.0
26-12-2022, 14:55
I'm still restoring everything I posted. So, we start by creating an additional field.:
These are approximate values, you can change them to your own.
Opening fullstory.tpl
We put it in the right place
Code
<script>
var DEFAULT_VIDEO_SRC = "{THEME}/images/tv.png";
window.onload = function()
{
openVideoBySrc(getCookie("selected_video_src"));
}
function openVideoBySrc(src, do_reload_page)
{
src = src || DEFAULT_VIDEO_SRC;
if(!do_reload_page && document.getElementById('film_main'))
document.getElementById('film_main').src = src;
setCookie("selected_video_src", src);
if (do_reload_page)
window.location.reload();
}
function setCookie(name, value, options) {
options = options || {};
var expires = options.expires;
if (typeof expires == "number" && expires) {
var d = new Date();
d.setTime(d.getTime() + expires*1000);
expires = options.expires = d;
}
if (expires && expires.toUTCString) {
options.expires = expires.toUTCString();
}
value = encodeURIComponent(value);
var updatedCookie = name + "=" + value;
for(var propName in options) {
updatedCookie += "; " + propName;
var propValue = options[propName];
if (propValue !== true) {
updatedCookie += "=" + propValue;
}
}
document.cookie = updatedCookie;
}
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
</script>
<iframe name='film_main' id='film_main' width='800' height='540' frameborder='0'></iframe>
<br>
<select size='1' onchange="openVideoBySrc(this.value, true);">
<option selected='selected' value='{THEME}/images/tv.png'>
Select a series
</option>
[xfgiven_video][xfvalue_video][/xfgiven_video]
</select>
[xfgiven_video][xfvalue_video][/xfgiven_video] We change it to our own tags {THEME}/images/tv.png We change it to our picture When adding news In the "Video" field, we write this for each series <option value="Link">01. Series</option> Opening /engine/skins/default.skin.php Looking for </body> before we put Show/Hide Text <script language="jаvascript" type="text/jаvascript"> /*<![CDATA[*/ document.onmouseup = function(){ var t = document.getElementsByTagName('textarea'); var short_scrollTop = document.getElementById('short_story').scrollTop; var short_scrollLeft = document.getElementById('short_story').scrollLeft; var full_scrollTop = document.getElementById('full_story').scrollTop; var full_scrollLeft = document.getElementById('full_story').scrollLeft; for (var i=0; i<t.length; i++) { t[i].value=t[i].value.replace(/<iframe src="(.*?)".*?<\/iframe>/gim, '$1'); t[i].value=t[i].value.replace(/<iframe width="640" height="360" src="(.*?)".*?<\/iframe>/gim, '$1'); t[i].value=t[i].value.replace(/<object style="height: 390px; width: 640px"><param name="movie" value="(.*?)".*?<\/object>;/gim, '$1'); } document.getElementById('short_story').scrollLeft = short_scrollLeft; document.getElementById('short_story').scrollTop = short_scrollTop; document.getElementById('full_story').scrollLeft = full_scrollLeft; document.getElementById('full_story').scrollTop = full_scrollTop; } /*]]>*/ </script>
26-12-2022, 14:55
26-12-2022, 12:28
26-12-2022, 13:00
There are no comments
Information
Users of Visitor are not allowed to comment this publication.