added chat switch, fix configtool bugs
This commit is contained in:
parent
fc0c5cf088
commit
40b3039218
16
Update.bat
16
Update.bat
@ -124,4 +124,20 @@ findstr "kodivisible" config.php >nul 2>&1
|
|||||||
goto END
|
goto END
|
||||||
:END
|
:END
|
||||||
|
|
||||||
|
rem Add KonvosChat
|
||||||
|
findstr "konvoschat" config.php >nul 2>&1
|
||||||
|
if errorlevel 1 goto ONE
|
||||||
|
if errorlevel 0 goto ZERO
|
||||||
|
goto END
|
||||||
|
:ZERO
|
||||||
|
echo KonvosChat Already Updated
|
||||||
|
goto END
|
||||||
|
:ONE
|
||||||
|
echo ^<?php >>config.php
|
||||||
|
echo $konvoschat = "1"; >> config.php
|
||||||
|
echo ^?^> >> config.php
|
||||||
|
echo KonvosChat Updated
|
||||||
|
goto END
|
||||||
|
:END
|
||||||
|
|
||||||
PAUSE
|
PAUSE
|
@ -11,7 +11,8 @@
|
|||||||
Services Widget Enabled: <input name="servicesvisible" id="id" type="checkbox" <?php if($servicesvisible > "0") echo "checked=checked; "; ?> /><br />
|
Services Widget Enabled: <input name="servicesvisible" id="id" type="checkbox" <?php if($servicesvisible > "0") echo "checked=checked; "; ?> /><br />
|
||||||
Clock Widget Enabled: <input name="clockvisible" id="id" type="checkbox" <?php if($clockvisible > "0") echo "checked=checked; "; ?> /><br />
|
Clock Widget Enabled: <input name="clockvisible" id="id" type="checkbox" <?php if($clockvisible > "0") echo "checked=checked; "; ?> /><br />
|
||||||
KKnowledge Widget Enabled: <input name="kknowledgefeedvisible" id="id" type="checkbox" <?php if($kknowledgefeedvisible > "0") echo "checked=checked; "; ?> /><br />
|
KKnowledge Widget Enabled: <input name="kknowledgefeedvisible" id="id" type="checkbox" <?php if($kknowledgefeedvisible > "0") echo "checked=checked; "; ?> /><br />
|
||||||
Klips Widget Enabled: <input name="webclipfeedvisible" id="id" type="checkbox" <?php if($webclipfeedvisible > "0") echo "checked=checked; "; ?> /><br />
|
Klips Widget Enabled: <input name="webclipfeedvisible" id="id" type="checkbox" <?php if($webclipfeedvisible > "0") echo "checked=checked; "; ?> /><br /><br />
|
||||||
|
Konvos Chatbox Enabled: <input name="konvoschat" id="id" type="checkbox" <?php if($konvoschat > "0") echo "checked=checked; "; ?> /><br />
|
||||||
Konvos Widget Enabled: <input name="konvosvisible" id="id" type="checkbox" <?php if($konvosvisible > "0") echo "checked=checked; "; ?> /><br />
|
Konvos Widget Enabled: <input name="konvosvisible" id="id" type="checkbox" <?php if($konvosvisible > "0") echo "checked=checked; "; ?> /><br />
|
||||||
<br />
|
<br />
|
||||||
Enable Kodi (MovieLib): <input name="kodivisible" id="id" type="checkbox" <?php if($kodivisible > "0") echo "checked=checked; "; ?> /><br />
|
Enable Kodi (MovieLib): <input name="kodivisible" id="id" type="checkbox" <?php if($kodivisible > "0") echo "checked=checked; "; ?> /><br />
|
||||||
|
@ -7,6 +7,7 @@ $servicesvisible1 = $_POST['servicesvisible'];
|
|||||||
$clockvisible1 = $_POST['clockvisible'];
|
$clockvisible1 = $_POST['clockvisible'];
|
||||||
$kknowledgefeedvisible1 = $_POST['kknowledgefeedvisible'];
|
$kknowledgefeedvisible1 = $_POST['kknowledgefeedvisible'];
|
||||||
$webclipfeedvisible1 = $_POST['webclipfeedvisible'];
|
$webclipfeedvisible1 = $_POST['webclipfeedvisible'];
|
||||||
|
$konvoschat1 = $_POST['konvoschat'];
|
||||||
$konvosvisible1 = $_POST['konvosvisible'];
|
$konvosvisible1 = $_POST['konvosvisible'];
|
||||||
$kodivisible1 = $_POST['kodivisible'];
|
$kodivisible1 = $_POST['kodivisible'];
|
||||||
|
|
||||||
@ -21,12 +22,6 @@ $content = preg_replace( '/\$base = \"(.*?)\";/', '$base = "'.$yb.'";', $conte
|
|||||||
// User/Pass Update
|
// User/Pass Update
|
||||||
$content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content);
|
$content = preg_replace( '/\$user = \"(.*?)\";/', '$user = "'.$user1.'";', $content);
|
||||||
$content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content);
|
$content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $content);
|
||||||
// servicesvisible Settings
|
|
||||||
if (empty($sabvis1)) {
|
|
||||||
$content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "0";', $content);
|
|
||||||
} else {
|
|
||||||
$content = preg_replace( '/\$sabvisible = \"(.*?)\";/', '$sabvisible = "1";', $content);
|
|
||||||
}
|
|
||||||
// clockvisible Settings
|
// clockvisible Settings
|
||||||
if (empty($clockvisible1)) {
|
if (empty($clockvisible1)) {
|
||||||
$content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "0";', $content);
|
$content = preg_replace( '/\$clockvisible = \"(.*?)\";/', '$clockvisible = "0";', $content);
|
||||||
@ -50,6 +45,12 @@ $content = preg_replace( '/\$pass = \"(.*?)\";/', '$pass = "'.$pass1.'";', $co
|
|||||||
$content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "0";', $content);
|
$content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "0";', $content);
|
||||||
} else {
|
} else {
|
||||||
$content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "1";', $content);
|
$content = preg_replace( '/\$konvosvisible = \"(.*?)\";/', '$konvosvisible = "1";', $content);
|
||||||
|
}
|
||||||
|
// konvoschat Settings
|
||||||
|
if (empty($konvoschat1)) {
|
||||||
|
$content = preg_replace( '/\$konvoschat = \"(.*?)\";/', '$konvoschat = "0";', $content);
|
||||||
|
} else {
|
||||||
|
$content = preg_replace( '/\$konvoschat = \"(.*?)\";/', '$konvoschat = "1";', $content);
|
||||||
}
|
}
|
||||||
// kodivisible Settings
|
// kodivisible Settings
|
||||||
if (empty($kodivisible1)) {
|
if (empty($kodivisible1)) {
|
||||||
|
@ -87,7 +87,7 @@ if (empty($customfeed1visible1)) {
|
|||||||
$content = preg_replace( '/\$customfeed1visible = \"(.*?)\";/', '$customfeed1visible = "1";', $content);
|
$content = preg_replace( '/\$customfeed1visible = \"(.*?)\";/', '$customfeed1visible = "1";', $content);
|
||||||
}
|
}
|
||||||
$content = preg_replace( '/\$customfeed1name = \"(.*?)\";/', '$customfeed1name = "'.$customfeed1name1.'";', $content);
|
$content = preg_replace( '/\$customfeed1name = \"(.*?)\";/', '$customfeed1name = "'.$customfeed1name1.'";', $content);
|
||||||
$content = preg_replace( '/\$customfeed1name = \"(.*?)\";/', '$customfeed1name = "'.$customfeed1name1.'";', $content);
|
$content = preg_replace( '/\$customfeed1url = \"(.*?)\";/', '$customfeed1url = "'.$customfeed1url1.'";', $content);
|
||||||
// End of Settigns
|
// End of Settigns
|
||||||
// RSS2 Settings
|
// RSS2 Settings
|
||||||
// FTP Visible Update
|
// FTP Visible Update
|
||||||
|
45
konvoschat.php
Normal file
45
konvoschat.php
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
<script>
|
||||||
|
require(['converse'], function (converse) {
|
||||||
|
(function () {
|
||||||
|
/* XXX: This function initializes jquery.easing for the https://conversejs.org
|
||||||
|
* website. This code is only useful in the context of the converse.js
|
||||||
|
* website and converse.js itself is NOT dependent on it.
|
||||||
|
*/
|
||||||
|
var $ = converse.env.jQuery;
|
||||||
|
$.extend( $.easing, {
|
||||||
|
easeInOutExpo: function (x, t, b, c, d) {
|
||||||
|
if (t==0) return b;
|
||||||
|
if (t==d) return b+c;
|
||||||
|
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||||
|
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).scroll(function() {
|
||||||
|
if ($(".navbar").offset().top > 50) {
|
||||||
|
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
||||||
|
} else {
|
||||||
|
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//jQuery for page scrolling feature - requires jQuery Easing plugin
|
||||||
|
$('.page-scroll a').bind('click', function(event) {
|
||||||
|
var $anchor = $(this);
|
||||||
|
$('html, body').stop().animate({
|
||||||
|
scrollTop: $($anchor.attr('href')).offset().top
|
||||||
|
}, 700, 'easeInOutExpo');
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
converse.initialize({
|
||||||
|
bosh_service_url: 'https://konvos.cf:5281/http-bind', // Please use this connection manager only for testing purposes
|
||||||
|
keepalive: true,
|
||||||
|
message_carbons: true,
|
||||||
|
play_sounds: true,
|
||||||
|
roster_groups: true,
|
||||||
|
show_controlbox_by_default: true,
|
||||||
|
xhr_user_search: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
49
main.php
49
main.php
@ -124,48 +124,9 @@ if ($squeezevisible > "0") {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<?php
|
||||||
require(['converse'], function (converse) {
|
if ($konvoschat > "0") {
|
||||||
(function () {
|
require "konvoschat.php";
|
||||||
/* XXX: This function initializes jquery.easing for the https://conversejs.org
|
}
|
||||||
* website. This code is only useful in the context of the converse.js
|
?>
|
||||||
* website and converse.js itself is NOT dependent on it.
|
|
||||||
*/
|
|
||||||
var $ = converse.env.jQuery;
|
|
||||||
$.extend( $.easing, {
|
|
||||||
easeInOutExpo: function (x, t, b, c, d) {
|
|
||||||
if (t==0) return b;
|
|
||||||
if (t==d) return b+c;
|
|
||||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
|
||||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).scroll(function() {
|
|
||||||
if ($(".navbar").offset().top > 50) {
|
|
||||||
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
|
||||||
} else {
|
|
||||||
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//jQuery for page scrolling feature - requires jQuery Easing plugin
|
|
||||||
$('.page-scroll a').bind('click', function(event) {
|
|
||||||
var $anchor = $(this);
|
|
||||||
$('html, body').stop().animate({
|
|
||||||
scrollTop: $($anchor.attr('href')).offset().top
|
|
||||||
}, 700, 'easeInOutExpo');
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
converse.initialize({
|
|
||||||
bosh_service_url: 'https://konvos.cf:5281/http-bind', // Please use this connection manager only for testing purposes
|
|
||||||
keepalive: true,
|
|
||||||
message_carbons: true,
|
|
||||||
play_sounds: true,
|
|
||||||
roster_groups: true,
|
|
||||||
show_controlbox_by_default: true,
|
|
||||||
xhr_user_search: false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user