I will see what I can do. At the moment it's buried deep within my cms manager which is live. The version I've been using to test with is on my local machine using wamp. I'll stick a test online shortly!
Thanks for your help
Forum closed. New forum available at http://community.wymeditor.org/
var sUrl = jQuery(wym._options.srcSelector).val();
srcSelector: ".wym_src",
<div id="images" class="wym_src"> </div>
<select name="wym_src">
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Timestamp: Mon, 20 Jul 2009 20:36:57 UTC
Message: 'attr(...).attr(...)' is null or not an object
Line: 1476
Char: 9
Code: 0
URI: http://localhost/wym_test/wymeditor/jquery.wymeditor.js
jQuery("img[@src=" + sStamp + "]", wym._doc.body)
+ "</form>"
+ "<div id='gallery'><h2>Loading images, please wait...</h2></div>"
+ "</body>",
postInitDialog : function(wym, wdw) {
var dialog = jQuery(wdw.document.body);
dialog.focus();
if (dialog.hasClass('wym_dialog_image')) {
var gallery = dialog.find('div#gallery');
$.ajax({
type: "GET",
url: "url/to/insert_image.php/",
cache: false,
dataType: "html",
success:
function(data, status)
{
gallery.html(data);
},
complete:
function (data, status) {
dialog.find(".imagePreview").click(function() {
dialog.find("input.wym_src").val($(this).attr("src"));
dialog.find("input.wym_alt").val($(this).attr("alt"));
dialog.find("input.wym_title").val($(this).attr("title"));
})
}
});
}
}
<ul id="imageContainer">
<?php
$files = glob ("../folder/*");
foreach ($files as $key=>$image) {
$filename = preg_replace("#..\/folder\/#imU", "", $image);
$fileurl = APPLICATION_URL."/folder/".$filename;
echo '<li><img src ="'.$fileurl.'" id="preview'.$key.'" class="imagePreview" style="max-width200px;max-height:150px;" alt="'.$image.'" title="'.$image.'" /></li>';
}
?>
</ul>
Users browsing this forum: No registered users and 2 guests