2012-06-17, 04:08:35
mvlcek Wrote:Updating to 3.1.1 did not help me. Its filebrowser.php does not allow me to import images in any of the WYSIWYG editors. But replacing its original codeandyash Wrote:Cerulean Wrote:I'm having a problem using the Insert Image button in a WYSIWYG custom field. I can browse the server but when I select an image the URL field does not receive the path to the image (it remains empty).I am facing the same problem.
This is a bug/feature in GS 3.1, see this topic.
Quick fix (patch): edit admin/filebrowser.php and replace line
withCode:if ($funcNum=="2"){
Code:if ($funcNum/*=="2"*/){
Or update to GS 3.1.1 where this should be corrected... :-)
Code:
<script type='text/javascript'>
function submitLink($funcNum, $url) {
if ($funcNum!=""){
if(window.opener){
window.opener.CKEDITOR.tools.callFunction($funcNum, $url);
}
}
<?php if (isset($_GET['returnid'])){ ?>
if(window.opener){
window.opener.document.getElementById('<?php echo $returnid; ?>').focus();
window.opener.document.getElementById('<?php echo $returnid; ?>').value=$url;
}
<?php } ?>
<?php if (isset($_GET['func'])){
$func = @$_GET['func']; ?>
if(window.opener){
window.opener.<?php echo $func; ?>('<?php echo $returnid; ?>');
}
<?php } ?>
window.close();
}
</script>
Code:
<script type='text/javascript'>
function submitLink($funcNum, $url) {
<?php if (isset($_GET['returnid'])){ ?>
if(window.opener){
window.opener.document.getElementById('<?php echo $returnid; ?>').value=$url;
}
<?php } else { ?>
if(window.opener){
window.opener.CKEDITOR.tools.callFunction($funcNum, $url);
}
<?php } ?>
window.close();
}
</script>