2010-03-01, 05:51:24
Hey guys!
First of all: I recently found out about Get-Simple and I think it's great. One of my only clients wanted a simple website which she could manage herself, so I ended up here. The only thing she couldn't do in an accessible way was adding an image to a page. First I looked around here but I couldn't find anything about it (but please do correct me if I am wrong here!). I then decided to implement it myself. It's actually very easy, most of it is already available in CKeditor: it's just not used!
Here's what I did to make it work. I am describing the process for people that know something about PHP/HTML and editing files. If anything is unclear or it doesn't work for you, let me know, but I think I traced all my steps as to how I did this!
In admin/edit.php, look for the $toolbar (which one is used depends on whether you use the simple or more advanced one). Insert somewhere in it.
Some lines further, after insert:
Then, insert somewhere in admin/image.php (At a location that suits you, for my client I inserted it in red just before the normal content would begin)
Good luck!
First of all: I recently found out about Get-Simple and I think it's great. One of my only clients wanted a simple website which she could manage herself, so I ended up here. The only thing she couldn't do in an accessible way was adding an image to a page. First I looked around here but I couldn't find anything about it (but please do correct me if I am wrong here!). I then decided to implement it myself. It's actually very easy, most of it is already available in CKeditor: it's just not used!
Here's what I did to make it work. I am describing the process for people that know something about PHP/HTML and editing files. If anything is unclear or it doesn't work for you, let me know, but I think I traced all my steps as to how I did this!
In admin/edit.php, look for the $toolbar (which one is used depends on whether you use the simple or more advanced one). Insert
Code:
, 'Image'
Some lines further, after
Code:
height: '<?php echo $EDHEIGHT; ?>',
Code:
toolbar :
[
<?php echo $toolbar; ?>
],
filebrowserBrowseUrl : '/admin/upload.php',
filebrowserWindowWidth : '800',
filebrowserWindowHeight : '600'
});
Then, insert somewhere in admin/image.php (At a location that suits you, for my client I inserted it in red just before the normal content would begin)
Code:
<script type="text/javascript">
function setLink(url) {
window.opener.CKEDITOR.tools.callFunction(1, url);
window.close();
}
</script>
<p><a onclick="setLink('<?php echo tsl($SITEURL) .'data/uploads/'. $src; ?>')"><strong style="color:red">Send to editor (only works when you have the editor open in the window below or so)</strong></a></p>
Good luck!