Code cleanup + standards
parent
d799662992
commit
b9f4a6e4f0
|
@ -17,10 +17,10 @@ function oembed_replacecb($matches){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get data from an URL to embed its content.
|
* @brief Get data from an URL to embed its content.
|
||||||
*
|
*
|
||||||
* @param string $embedurl The URL from which the data should be fetched.
|
* @param string $embedurl The URL from which the data should be fetched.
|
||||||
* @param bool $no_rich_type If set to true rich type content won't be fetched.
|
* @param bool $no_rich_type If set to true rich type content won't be fetched.
|
||||||
*
|
*
|
||||||
* @return bool|object Returns object with embed content or false if no embedable
|
* @return bool|object Returns object with embed content or false if no embedable
|
||||||
* content exists
|
* content exists
|
||||||
*/
|
*/
|
||||||
|
@ -41,8 +41,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||||
// These media files should now be caught in bbcode.php
|
// These media files should now be caught in bbcode.php
|
||||||
// left here as a fallback in case this is called from another source
|
// left here as a fallback in case this is called from another source
|
||||||
|
|
||||||
$noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");
|
$noexts = array("mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm");
|
||||||
$ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION);
|
$ext = pathinfo(strtolower($embedurl), PATHINFO_EXTENSION);
|
||||||
|
|
||||||
|
|
||||||
if (is_null($txt)) {
|
if (is_null($txt)) {
|
||||||
|
@ -85,10 +85,10 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$txt=trim($txt);
|
$txt = trim($txt);
|
||||||
|
|
||||||
if ($txt[0]!="{") {
|
if ($txt[0] != "{") {
|
||||||
$txt='{"type":"error"}';
|
$txt = '{"type":"error"}';
|
||||||
} else { //save in cache
|
} else { //save in cache
|
||||||
$j = json_decode($txt);
|
$j = json_decode($txt);
|
||||||
if ($j->type != "error") {
|
if ($j->type != "error") {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
$("#cnftheme").click(function(){
|
$("#cnftheme").click(function(){
|
||||||
$.colorbox({
|
$.colorbox({
|
||||||
width: 800,
|
width: 800,
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
data[$(this).attr('name')] = $(this).children(":selected").val();
|
data[$(this).attr('name')] = $(this).children(":selected").val();
|
||||||
});
|
});
|
||||||
console.log(":)", url, data);
|
console.log(":)", url, data);
|
||||||
|
|
||||||
$.post(url, data, function(data) {
|
$.post(url, data, function(data) {
|
||||||
if(timer) clearTimeout(timer);
|
if(timer) clearTimeout(timer);
|
||||||
NavUpdate();
|
NavUpdate();
|
||||||
$.colorbox.close();
|
$.colorbox.close();
|
||||||
})
|
})
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
</script>
|
</script>
|
||||||
<div id='adminpage'>
|
<div id='adminpage'>
|
||||||
<h1>{{$title}} - {{$page}}</h1>
|
<h1>{{$title}} - {{$page}}</h1>
|
||||||
|
|
||||||
<form action="{{$baseurl}}/admin/site" method="post">
|
<form action="{{$baseurl}}/admin/site" method="post">
|
||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
{{include file="field_checkbox.tpl" field=$hide_help}}
|
{{include file="field_checkbox.tpl" field=$hide_help}}
|
||||||
{{include file="field_select.tpl" field=$singleuser}}
|
{{include file="field_select.tpl" field=$singleuser}}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||||
|
|
||||||
<h3>{{$registration}}</h3>
|
<h3>{{$registration}}</h3>
|
||||||
{{include file="field_input.tpl" field=$register_text}}
|
{{include file="field_input.tpl" field=$register_text}}
|
||||||
{{include file="field_select.tpl" field=$register_policy}}
|
{{include file="field_select.tpl" field=$register_policy}}
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
{{include file="field_input.tpl" field=$maximagelength}}
|
{{include file="field_input.tpl" field=$maximagelength}}
|
||||||
{{include file="field_input.tpl" field=$jpegimagequality}}
|
{{include file="field_input.tpl" field=$jpegimagequality}}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||||
|
|
||||||
<h3>{{$corporate}}</h3>
|
<h3>{{$corporate}}</h3>
|
||||||
{{include file="field_input.tpl" field=$allowed_sites}}
|
{{include file="field_input.tpl" field=$allowed_sites}}
|
||||||
{{include file="field_input.tpl" field=$allowed_email}}
|
{{include file="field_input.tpl" field=$allowed_email}}
|
||||||
|
@ -107,11 +107,11 @@
|
||||||
{{include file="field_checkbox.tpl" field=$thread_allow}}
|
{{include file="field_checkbox.tpl" field=$thread_allow}}
|
||||||
{{include file="field_checkbox.tpl" field=$newuser_private}}
|
{{include file="field_checkbox.tpl" field=$newuser_private}}
|
||||||
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
|
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
|
||||||
{{include file="field_checkbox.tpl" field=$private_addons}}
|
{{include file="field_checkbox.tpl" field=$private_addons}}
|
||||||
{{include file="field_checkbox.tpl" field=$disable_embedded}}
|
{{include file="field_checkbox.tpl" field=$disable_embedded}}
|
||||||
{{include file="field_checkbox.tpl" field=$allow_users_remote_self}}
|
{{include file="field_checkbox.tpl" field=$allow_users_remote_self}}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||||
|
|
||||||
<h3>{{$advanced}}</h3>
|
<h3>{{$advanced}}</h3>
|
||||||
{{include file="field_select.tpl" field=$rino}}
|
{{include file="field_select.tpl" field=$rino}}
|
||||||
{{include file="field_checkbox.tpl" field=$no_utf}}
|
{{include file="field_checkbox.tpl" field=$no_utf}}
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{* separate form for relocate... *}}
|
{{* separate form for relocate... *}}
|
||||||
<form action="{{$baseurl}}/admin/site" method="post">
|
<form action="{{$baseurl}}/admin/site" method="post">
|
||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
|
@ -165,5 +165,5 @@
|
||||||
<input type="hidden" name="page_site" value="{{$submit|escape:'html'}}">
|
<input type="hidden" name="page_site" value="{{$submit|escape:'html'}}">
|
||||||
<div class="submit"><input type="submit" name="relocate" value="{{$submit|escape:'html'}}" /></div>
|
<div class="submit"><input type="submit" name="relocate" value="{{$submit|escape:'html'}}" /></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue