Hi,
I am having a problem with the image window browser. I am using a custom PHP script to display a list of files in the image browser window. I get the listing alright, but when it is too long for the window there are no scrollbars that appear.
I tried changing dialog/fck_image.html, giving the window opened a scrollbars=yes attribute, to no avail. The strange thing is, anything I change in the fck_image.html does not seem to reflect on image dialog. I even removed the file fck_image.html to see what happens and to my surprise, the thing still pops up when I click on the insert image button.
Help and/or hints on how to make this work is appreciated. An explanation of this strange behavior would be nice too.
Thanks in advance.
I am having a problem with the image window browser. I am using a custom PHP script to display a list of files in the image browser window. I get the listing alright, but when it is too long for the window there are no scrollbars that appear.
I tried changing dialog/fck_image.html, giving the window opened a scrollbars=yes attribute, to no avail. The strange thing is, anything I change in the fck_image.html does not seem to reflect on image dialog. I even removed the file fck_image.html to see what happens and to my surprise, the thing still pops up when I click on the insert image button.
Help and/or hints on how to make this work is appreciated. An explanation of this strange behavior would be nice too.
Thanks in advance.
RE: Image Browser Window Problems
RE: Image Browser Window Problems
in js/fck_config.js you can edit a line that says something like this:
config.ImageBrowserURL = config.BasePath + "filemanager/browse/browse.php" ;
that's the place the image browser will go to. If you edit that file, some changes should occur.
Now, for the scrollbars: this can be solved (and is solved in the sample files) by using the css overflow property.
in css/fck_dialog.css there's something like this:
.ImagePreviewArea
{
border-right: #000000 1px solid;
padding-right: 5px;
border-top: #000000 1px solid;
padding-left: 5px;
padding-bottom: 5px;
overflow: auto;
border-left: #000000 1px solid;
width: 100%;
padding-top: 5px;
border-bottom: #000000 1px solid;
height: 100%;
background-color: #ffffff;
}
if you then add
<DIV class="ImagePreviewArea">
<!-- your code here -->
</DIV>
there should be a dropdown when there's more files than there's room for in the popup window.
I've found a little howto page here:
http://www.dominoguru.com/dominoguru/ho ... enDocument
Cheers!
RE: Image Browser Window Problems
Are you implying this change to fck_dialog.css would add scrollbars to the whole Insert Image Dialog? This would logically seem to handle the case of a large image, but not of a long URL. The <!-- your code here --> is a mystery. What goes there. Sorry, I'm not much a Javascript expert.
RE: Image Browser Window Problems
in the file dialog/fck_image.html change the following lines by adding yes,yes at the end:
within function uploadFile():
var oWindow = openNewWindow("", "UploadWindow", iUploadWindowWidth, iUploadWindowHeight,"yes","yes") ;
within function browserServer():
var oWindow = openNewWindow(sBrowseURL, "BrowseWindow", iBrowseWindowWidth, iBrowseWindowHeight,"yes","yes") ;
Then you have scrollbars.
However, then you still have a problem when you've got a long list of images or long names.
I solved this by adding a style in the file browse.cfm (similar if you're using php):
.imagelist {
overflow: auto;
width: 200;
height: 80%; /* or whatever you like */
background-color: #ffffff;
border: #000000 1px solid;
padding: 5px; }
Now enclose the output loop with a div and you get scrollbars around this area:
<div class="imagelist">
<cfoutput query="bilder">
<A href="javascript:getImage('#name#');"><IMG src="/upload/#name#" id="thumb" width="30" align="absmiddle" border="0"></A> <A href="javascript:getImage('#name#');">#name#</A><BR>
</cfif>
</cfoutput>
</div>
<br>
<INPUT style="WIDTH: 80px" type="button" value="OK" onclick="ok();">
<INPUT style="WIDTH: 80px" type="button" value="Abbrechen" onclick="window.close();"><BR>
Hope that helps!
Markus
RE: Image Browser Window Problems
Cheers, jonny
RE: Image Browser Window Problems
I assume you've altered the popup dialog which is called when clicking the 'insert image' button in the editor, to show a list of available files , instead of the image upload form ?
Could you post a code abstract ?