资源简介

CKFinder 2.6.2 破解版 eclipse工程源代码; 标准JSP工程,纯eclipse工程源代码,导入即可; 包含CKFinder JAVA源代码。 (1)解决了DEMO版本的提示; (2)解决了中文图片无法显示; (3)中文文件夹乱码问题需要修改WEBAPP的配置文件,添加URIEncoding="UTF-8" 笔者敬告:仅供学习研究使用,不得用于商业用途。

资源截图

代码片段和文件信息

/*
 * CKFinder
 * ========
 * http://cksource.com/ckfinder
 * Copyright (C) 2007-2015 CKSource - Frederico Knabben. All rights reserved.
 *
 * The software this file and its contents are subject to the CKFinder
 * License. Please read the license.txt file before using installing copying
 * modifying or distribute this file or part of its contents. The contents of
 * this file is part of the Source Code of CKFinder.
 */
package com.ckfinder.connector;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import com.ckfinder.connector.utils.PathUtils;

/**
 * Source code of
 * <ckfinder:setupCKEditor /> tag.
 */
public class CKFinderSetupCKEditor extends TagSupport {

private static final String CKFINDER_UPLOAD_URL = “/ckfinder/core/connector/java/connector.java?command=QuickUpload&type=“;
private static final String CKFINDER_PAGE = “/ckfinder.html“;
private static final String DEFAULT_IMAGE_TYPE = “Images“;
private static final String DEFAULT_FLASH_TYPE = “Flash“;
/**
 *
 */
private static final long serialVersionUID = 3947714242365900445L;
private String basePath;
private String editor;
private String imageType;
private String flashType;

@Override
public int doStartTag() throws JspException {
if (imageType == null || imageType.equals(““)) {
imageType = DEFAULT_IMAGE_TYPE;
}
if (flashType == null || flashType.equals(““)) {
flashType = DEFAULT_FLASH_TYPE;
}
Map> attr = new HashMap>();
Map params = new HashMap();
params.put(“filebrowserBrowseUrl“ buildBrowseUrl(null));
params.put(“filebrowserUploadUrl“ buildUploadUrl(“Files“));
params.put(“filebrowserImageBrowseUrl“ buildBrowseUrl(imageType));
params.put(“filebrowserImageUploadUrl“ buildUploadUrl(imageType));
params.put(“filebrowserFlashBrowseUrl“ buildBrowseUrl(flashType));
params.put(“filebrowserFlashUploadUrl“ buildUploadUrl(flashType));

if (editor == null || editor.equals(““)) {
attr.put(“*“ params);
} else {
attr.put(editor params);
}
pageContext.setAttribute(“ckeditor-params“ attr);
return EVAL_PAGE;
}

/**
 * Builds browse url by type and basePath.
 *
 * @param type current type
 * @return full browse url.
 */
private String buildBrowseUrl(final String type) {
return PathUtils.escape(basePath.concat(CKFINDER_PAGE).concat(type == null ? ““ : “?type=“.concat(type)));
}

/**
 * Builds upload URL by type.
 *
 * @param type current type.
 * @return full CKFinder upload URL.
 */
private String buildUploadUrl(final String type) {
if (pageContext.getRequest() instanceof HttpServletRequest) {
return ((HttpServletRequest) pageContext.getRequest()).getContextPath().concat(CKFINDER_UPLOAD_URL).c

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-09-07 09:07  imgLib\
     文件         829  2016-09-05 16:38  imgLib\.classpath
     文件        1039  2016-09-05 16:32  imgLib\.project
     目录           0  2016-09-05 16:32  imgLib\.settings\
     文件         503  2016-09-05 14:30  imgLib\.settings\.jsdtscope
     文件          96  2016-09-05 15:02  imgLib\.settings\org.eclipse.core.resources.prefs
     文件         364  2016-09-05 14:30  imgLib\.settings\org.eclipse.jdt.core.prefs
     文件         472  2016-09-05 16:32  imgLib\.settings\org.eclipse.wst.common.component
     文件         333  2016-09-05 16:38  imgLib\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-09-05 14:30  imgLib\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-09-05 14:30  imgLib\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-09-06 16:14  imgLib\build\
     目录           0  2016-09-06 15:31  imgLib\resources\
     目录           0  2016-09-05 16:32  imgLib\resources\lang\
     文件        3246  2016-09-05 14:49  imgLib\resources\lang\bg.xml
     文件        2546  2016-09-05 14:49  imgLib\resources\lang\ca.xml
     文件        2412  2016-09-05 14:49  imgLib\resources\lang\cs.xml
     文件        2441  2016-09-05 14:49  imgLib\resources\lang\cy.xml
     文件        2432  2016-09-05 14:49  imgLib\resources\lang\da.xml
     文件        2576  2016-09-05 14:49  imgLib\resources\lang\de.xml
     文件        3676  2016-09-05 14:49  imgLib\resources\lang\el.xml
     文件        2394  2016-09-05 14:49  imgLib\resources\lang\en.xml
     文件        2345  2016-09-05 14:49  imgLib\resources\lang\eo.xml
     文件        2619  2016-09-05 14:49  imgLib\resources\lang\es-mx.xml
     文件        2601  2016-09-05 14:49  imgLib\resources\lang\es.xml
     文件        2306  2016-09-05 14:49  imgLib\resources\lang\et.xml
     文件        3017  2016-09-05 14:49  imgLib\resources\lang\fa.xml
     文件        2480  2016-09-05 14:49  imgLib\resources\lang\fi.xml
     文件        2451  2016-09-05 14:49  imgLib\resources\lang\fr.xml
     文件        3572  2016-09-05 14:49  imgLib\resources\lang\gu.xml
     文件        2700  2016-09-05 14:49  imgLib\resources\lang\he.xml
............此处省略785个文件信息

评论

共有 条评论