示例#1
0
// Usually you'll not include it in your site and use correct path in line 57 and basePath in line 70 instead.
// Remove this code after correcting the include_once statement.
if (!@file_exists('../../../ckeditor/ckeditor.php')) {
    if (@file_exists('../../../ckeditor/ckeditor.js') || @file_exists('../../../ckeditor/ckeditor_source.js')) {
        printNotFound('CKEditor 3.1+');
    } else {
        printNotFound('CKEditor');
    }
}
include_once '../../../ckeditor/ckeditor.php';
require_once '../../starter.php';
// This is a check for the CKEditor class. If not defined, the paths in lines 57 and 70 must be checked.
if (!class_exists('CKEditor')) {
    printNotFound('CKEditor');
} else {
    $initialValue = '<p>Just click the <b>Image</b> or <b>Link</b> button, and then <b>&quot;Browse Server&quot;</b>.</p>';
    $ckeditor = new CKEditor();
    $ckeditor->basePath = '../../../ckeditor/';
    // Just call QFinder::SetupCKEditor before calling editor(), replace() or replaceAll()
    // in CKEditor. The second parameter (optional), is the path for the
    // QFinder installation (default = "/qfinder/").
    QFinder::SetupCKEditor($ckeditor, '../../');
    $ckeditor->editor('CKEditor1', $initialValue);
}
?>
	<div id="footer">
		<hr />
	</div>
</body>
</html>
示例#2
0
	</script>
</head>
<body>
	<h1 class="samples">
		QFinder - Sample - Standalone
	</h1>
	<div class="description">
		QFinder may be used in standalone mode inside any page, to create a repository
		manager with ease. You may define a custom JavaScript function to be called when
		an image is selected (double-clicked).</div>
	<p style="padding-left: 30px; padding-right: 30px;">
<?php 
require_once '../../starter.php';
// You can use the "QFinder" class to render QFinder in a page:
$finder = new QFinder();
$finder->BasePath = '../../';
// The path for the installation of QFinder (default = "/qfinder/").
$finder->SelectFunction = 'ShowFileInfo';
// The default height is 400.
$finder->Height = 600;
$finder->Create();
// It can also be done in a single line, calling the "static"
// Create( basePath, width, height, selectFunction ) function:
// QFinder::CreateStatic( '../../', null, null, 'ShowFileInfo' ) ;
?>
	</p>
	<div id="footer">
		<hr />
	</div>
</body>
示例#3
0
 public static function SetupCKEditor(&$editorObj, $basePath = QFINDER_DEFAULT_BASEPATH, $imageType = null, $flashType = null)
 {
     if (empty($basePath)) {
         $basePath = QFINDER_DEFAULT_BASEPATH;
     }
     $qfinder = new QFinder($basePath);
     $qfinder->SetupCKEditorObject($editorObj, $imageType, $flashType);
 }
示例#4
0
	<h1 class="samples">
		QFinder - Sample - FCKeditor Integration
	</h1>
	<div class="description">
		QFinder can be easily integrated with FCKeditor. Try it now, by clicking
		the "Image" or "Link" icons and then the "<strong>Browse Server</strong>" button.</div>
	<p>
<?php 
include_once '../../../fckeditor/fckeditor.php';
require_once '../../starter.php';
// This is a check for the FCKeditor class. If not defined, the paths must be checked.
if (!class_exists('FCKeditor')) {
    echo '<br><strong><span class="error">Error</span>: FCKeditor not found</strong>. ' . 'This sample assumes that FCKeditor (not included with QFinder) is installed in ' . 'the "fckeditor" sibling folder of the QFinder installation folder. If you have it installed in ' . 'a different place, just edit this file, changing the wrong paths in the include ' . '(line 31) and the "BasePath" values (line 47).';
} else {
    $fckeditor = new FCKeditor('FCKeditor1');
    $fckeditor->BasePath = '../../../fckeditor/';
    $fckeditor->Value = '<p>Just click the <b>Image</b> or <b>Link</b> button, and then <b>&quot;Browse Server&quot;</b>.</p>';
    // Just call QFinder::SetupFCKeditor before calling Create() or CreateHtml()
    // in FCKeditor. The second parameter (optional), is the path for the
    // QFinder installation (default = "/qfinder/").
    QFinder::SetupFCKeditor($fckeditor, '../../');
    $fckeditor->Create();
}
?>
	</p>
	<div id="footer">
		<hr />
	</div>
</body>
</html>
示例#5
0
<?php

if (!isset($_SESSION['is_adm']) || !$_SESSION['is_adm']) {
    include_once 'template/log.tpl';
} else {
    require_once 'core/qfinder_php5.php';
    $QFinder = new QFinder(QFINDER_DEFAULT_BASEPATH, '100%', '700px');
    $QFinder->Create();
}