|
Re: Удаление ссылок на VBIMGHOST.PHP
Пробуем и так и эдак
Шаблон vbimghost_popupload_pre
Было
Код:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vbphrase[vbimghost_title] - $vbphrase[vbimghost_quickup]</title>
$headinclude
<if condition="!$reload">
</head>
<body>
<if condition="$canupload">
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]">
<tr>
<td class="alt2">
<form method="post" action="vbimghost.php" enctype="multipart/form-data">
<input type="hidden" name="do" value="popupload" />
<input type="hidden" name="ed" value="$ed" />
<input type="hidden" name="seq" value="2" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" width="100%">
<tr>
<td class="thead smallfont">$vbphrase[vbimghost_menuupimg]</td>
</tr>
<tr>
<td class="alt1 smallfont"><b>$vbphrase[vbimghost_quickupwarn]</b></td>
</tr>
<tr>
<td class="alt2 smallfont">
$vbphrase[vbimghost_imgtoupload]<br />
<input class="bginput" type="file" name="upfile" size="30" />
<input type="submit" value="$vbphrase[vbimghost_hostit]">
</td>
</tr>
</table>
</form>
<!-- Upload URL Image Start -->
<div style="padding: 2px 0px 2px 0px"></div>
<form method="post" action="vbimghost.php" enctype="multipart/form-data">
<input type="hidden" name="do" value="popuploadurl" />
<input type="hidden" name="ed" value="$ed" />
<input type="hidden" name="seq" value="2" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" width="100%">
<tr>
<td class="alt2 smallfont">$vbphrase[vbimghost_imgtouploadurl]<br />
<input class="bginput" type="text" name="upfileurl" size="60" />
<input type="submit" value="$vbphrase[vbimghost_hostit]">
</td>
</tr>
<tr>
<td class="tfoot smallfont" align="center">
<input type="button" class="button" value="$vbphrase[close_this_window]" onclick="self.close();">
</td>
</tr>
</table>
</form>
<!-- Upload URL Image End -->
</td>
</tr>
</table>
<else />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]">
<tr>
<td class="alt2 smallfont"><b>$vbphrase[vbimghost_quickupwarn]</b></td>
</tr>
</table>
</if>
<else />
<script language="JavaScript" type="text/JavaScript">
<!--
function sendLink(thumbp, dispath, thumbsize)
{
editor_fieldname = '$ed';
editor_formname = 'vbform';
var result;
var result_html;
//just thumb
result = ' ';
<if condition="!$vbimghost[thumbsize]">
result_html = "<a href='" + dispath+ "' target='_blank'><img src='" + thumbp + "' border='0'></a>";
<else />
result_html = "<a href='" + dispath+ "' target='_blank'><img src='" + thumbp + "' width ='" + thumbsize + "' border='0'></a>";
</if>
if(window.opener.document.getElementById(editor_fieldname + '_iframe') == undefined)
{
if (window.opener.document.getElementById(editor_fieldname + '_textarea').innerHTML == '')
{
window.opener.document.forms[editor_formname]["message"].value += result;
}else{
window.opener.document.forms[editor_formname]["message"].value += result;
}
}
else
{
var iframe = window.opener.document.getElementById(editor_fieldname + '_iframe');
var iframedoc = iframe.contentWindow.document;
var oHtml = iframedoc.body;
try
{
<if condition="is_browser('ie')">
iframedoc.selection.createRange().pasteHTML(result_html);
<else />
var random_string = "insert_html_" + Math.round(Math.random()*100000000);
iframedoc.execCommand("insertimage",false, random_string);
var pat = new RegExp("<[^<]*" + random_string + "[^>]*>");
oHtml.innerHTML = oHtml.innerHTML.replace(pat, result_html);
</if>
}
catch(errorObject)
{
oHtml.innerHTML += result;
}
}
window.close();
}
-->
</script>
</head>
<body onload="sendLink('$vbimghost[thumbpath]','$vbimghost[dispath]','$vbimghost[thumbsize]');">
</if>
</body>
</html>
После приведения к божескому виду
Код:
result = ' ';
<if condition="!$vbimghost[thumbsize]">
result_html = "<a href='" + dispath+ "' target='_blank'><img src='" + thumbp + "' border='0'></a>";
<else />
result_html = "<a href='" + dispath+ "' target='_blank'><img src='" + thumbp + "' width ='" + thumbsize + "' border='0'></a>";
</if>
стало
Код:
result = ' ';
<if condition="!$vbimghost[thumbsize]">
result_html = "<img src='" + thumbp + "' border='0'>";
<else />
result_html = "<img src='" + thumbp + "' width ='" + thumbsize + "' border='0'>";
</if>
и, соответственно
Код:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vbphrase[vbimghost_title] - $vbphrase[vbimghost_quickup]</title>
$headinclude
<if condition="!$reload">
</head>
<body>
<if condition="$canupload">
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]">
<tr>
<td class="alt2">
<form method="post" action="vbimghost.php" enctype="multipart/form-data">
<input type="hidden" name="do" value="popupload" />
<input type="hidden" name="ed" value="$ed" />
<input type="hidden" name="seq" value="2" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" width="100%">
<tr>
<td class="thead smallfont">$vbphrase[vbimghost_menuupimg]</td>
</tr>
<tr>
<td class="alt1 smallfont"><b>$vbphrase[vbimghost_quickupwarn]</b></td>
</tr>
<tr>
<td class="alt2 smallfont">
$vbphrase[vbimghost_imgtoupload]<br />
<input class="bginput" type="file" name="upfile" size="30" />
<input type="submit" value="$vbphrase[vbimghost_hostit]">
</td>
</tr>
</table>
</form>
<!-- Upload URL Image Start -->
<div style="padding: 2px 0px 2px 0px"></div>
<form method="post" action="vbimghost.php" enctype="multipart/form-data">
<input type="hidden" name="do" value="popuploadurl" />
<input type="hidden" name="ed" value="$ed" />
<input type="hidden" name="seq" value="2" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" width="100%">
<tr>
<td class="alt2 smallfont">$vbphrase[vbimghost_imgtouploadurl]<br />
<input class="bginput" type="text" name="upfileurl" size="60" />
<input type="submit" value="$vbphrase[vbimghost_hostit]">
</td>
</tr>
<tr>
<td class="tfoot smallfont" align="center">
<input type="button" class="button" value="$vbphrase[close_this_window]" onclick="self.close();">
</td>
</tr>
</table>
</form>
<!-- Upload URL Image End -->
</td>
</tr>
</table>
<else />
<table class="tborder" border="0" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]">
<tr>
<td class="alt2 smallfont"><b>$vbphrase[vbimghost_quickupwarn]</b></td>
</tr>
</table>
</if>
<else />
<script language="JavaScript" type="text/JavaScript">
<!--
function sendLink(thumbp, dispath, thumbsize)
{
editor_fieldname = '$ed';
editor_formname = 'vbform';
var result;
var result_html;
//just thumb
result = ' ';
<if condition="!$vbimghost[thumbsize]">
result_html = "<img src='" + thumbp + "' border='0'>";
<else />
result_html = "<img src='" + thumbp + "' width ='" + thumbsize + "' border='0'>";
</if>
if(window.opener.document.getElementById(editor_fieldname + '_iframe') == undefined)
{
if (window.opener.document.getElementById(editor_fieldname + '_textarea').innerHTML == '')
{
window.opener.document.forms[editor_formname]["message"].value += result;
}else{
window.opener.document.forms[editor_formname]["message"].value += result;
}
}
else
{
var iframe = window.opener.document.getElementById(editor_fieldname + '_iframe');
var iframedoc = iframe.contentWindow.document;
var oHtml = iframedoc.body;
try
{
<if condition="is_browser('ie')">
iframedoc.selection.createRange().pasteHTML(result_html);
<else />
var random_string = "insert_html_" + Math.round(Math.random()*100000000);
iframedoc.execCommand("insertimage",false, random_string);
var pat = new RegExp("<[^<]*" + random_string + "[^>]*>");
oHtml.innerHTML = oHtml.innerHTML.replace(pat, result_html);
</if>
}
catch(errorObject)
{
oHtml.innerHTML += result;
}
}
window.close();
}
-->
</script>
</head>
<body onload="sendLink('$vbimghost[thumbpath]','$vbimghost[dispath]','$vbimghost[thumbsize]');">
</if>
</body>
</html>
|
|