Location: PHPKode > scripts > Bohemian Image Gallery > w3easyAdmin/docs/help.html
<p>
	A more up to date manual you might find on <a href="http://w3easy.org/" target="_blank">w3easy.org</a></p>
<p>
	<strong>SCRIPT<br />
	w3easyEditor, w3easyAdmin</strong><br />
	&copy; 2011/2012 by Joachim Haack, <a href="http://w3easy.org">http://w3easy.org</a></p>
<p>
	<strong>REQUIREMENTS</strong><br />
	PHP 5 (maybe also PHP 4 will do)<br />
	NO DATABASE required</p>
<p>
	<span style="font-weight: bold">License:</span><br />
	GNU General Public License, Version 3</p>
<p>
	<span style="font-weight: bold">External Applications</span> (w3easyAdmin only)<br />
	Integration prepared:<br />
	CKEditor version 3.6.1, revision 7072. License: GPL, LGPL, MPL or commercial<br />
	KCFinder version 2.51. License: GPL 2, LGPL 2<br />
	PHFTP version 4.2. License: GPL 3<br />
	Backup functions: see w3easyBackup script. Licenses: GPL 3<br />
	JavaScrypt (integrated). License: Public Domain<br /><br />
	Sure you could try to integrate the actual versions of these applications, but be aware, 
	that there might have been changes so that the integration might not be the same as before.</p>
<p>
	<span style="font-weight: bold">w3easyTools Integrated</span> (w3easyAdmin only)<br />
	integrated resp. integration prepared:<br />
	Backup functionality (same as in the w3easyBackup script, integrated)<br />
	w3easyProtect (integration prepared)</p>
<p>
	<span style="font-weight: bold">KNOWN PROBLEMS</span><br />
	<span style="color: #FF0000"><span style="font-weight: bold">Warning:</span> Concerning the backup function we strongly recommend to have a look at the &#39;Known Problems&#39; section in the <span class="postlink">w3easyBackup script manual</span>.</span></p>
<p>
	<span style="font-weight: bold">DESCRIPTION</span><br />
	The w3easyEditor / w3easyAdmin is quite a powerful file editor resp. administration tool, so we should better call it the &#39;w3heavyEditor&#39;...;)<br />
	<br />
	It not only edits files containing the content, but literally all files of your site and also on your local pc, if you use it there, and it also edits files comprehending code (but except those including a textarea). This way you should always handle it with care, otherwise you could ruin your site in a fraction of a second...<br />
	<br />
	The w3easyEditor / w3easyAdmin is coincidentally a basic file and folder manager that lets you create, rename and delete files and folders or copy files. A file and folder viewer is included, so that you will always keep a good overview about the achitecture of your site. There is also a functionality to chmod files and folders and the tool displays informations about the file/folder permissions, the respective owner of a file/folder, the realpath to a file/folder and the date and time when it was last edited.<br />
	To make the editing more easy there is an optional window showing some basic html tags to help you building up the html code by using copy and paste and also an optional preview that displays your work in progress.<br />
	Moreover with the w3easyEditor / w3easyAdmin you may execute file uploads.<br />
	<br />
	In the w3easyEditor (only) I even added an option to change the skin between the corporate w3easyCMS design and the former original (&#39;blue jeans&#39;) design. You won&#39;t nag about design, will you?<br />
	<br />
	The w3easyAdmin (only) contains furthermore a backup function (same as in the w3easyBackup script) to backup your site resp. selected content files and folders.<br />
	<br />
	Additionally the w3easAdmin (only) integrates some useful external applications resp. an integration of the following applications is prepared: The CKEditor (advanced wysiwyg editor), the KCFinder (primer as file- and upload manager for the CKEditor, but also as standalone uploader and image viewer), an online ftp manager (PHFTP), a text encryption tool (JScrypt, primer to encrypt login data f.e. for your ftp account) and the w3easyProtect script to easily password protect any directory on your sever with .htaccess protection.</p>
<p>
	<span style="font-weight: bold">INSTRUCTIONS</span><br />
	<span style="font-weight: bold">Installation</span><br />
	First unpack and then upload the script folder to your webspace.<br />
	<span style="color: #FF0000">Make sure that only you have access to the scriptfolder.</span> I&#39;d recommend .htaccess directory protection using the w3easyProtect script. (Note: If you upload the script to an already protected web directory, as it should be the case if you use the w3easyCMS, there is no additional directory protection necessary.)<br />
	Make sure that you have permission to edit the config file(s). Depending on your server settings chmod the config file(s) to 0666, 0664 or 0644 if necessary.<br />
	If you integrate external applications, you furthermore have to make writable the respective folders, where files may be edited or created.<br />
	<br />
	<span style="font-weight: bold">Settings</span><br />
	First select with the quick file selector the preset config file(s) (&#39;w3easyEditor: &#39;config.php&#39; resp. &#39;config&#39;; w3easyAdmin: &#39;w3eA_config.php&#39; resp. &#39;easyAdmin_config&#39; <span style="font-weight: bold">and</span> &#39;w3eB_config&#39; resp. &#39;easyBackup_config&#39;). Then fill in the general values as described in the config settings. Most variables are self-explanatory, the others we describe below.</p>
<pre>
// general
$domain        = &quot;domain.tld&quot;; // your domain (NO trailing slash)
$path_to_root  = &quot;../../../&quot;; // path to root (trailing slash)
$path_to_admin = &quot;../&quot;; // path to admin area (trailing slash)
$folder_base   = &quot;./&quot;; // (trailing slash)
$secure_edit   = &quot;&quot;; // &quot;&quot; or &quot;yes&quot; or &quot;no&quot;
$charset       = &quot;UTF-8&quot;; // &quot;UTF-8&quot;, &quot;iso-8859-1&quot;
</pre>
<p>
	<strong>$path_to_admin:</strong> only to specify, if you have an (extended) admin area on your site.<br />
	<strong>$folder_base:</strong> asks for the path to the directory the w3easyAdmin shall display when it is called. The default value should be the root directory, so for a start you should fill in the same path as for the root directory. You may change it any later, if it occurs that another directory will better meet your purposes.<br />
	<strong>$secure_edit:</strong> If not set to &#39;no&#39;, you will have to confirm the editing of a file, i.e. you will have to check 2 radio buttons to edit a file. If set to &#39;no&#39;, you have to check only 1 radio button to edit a file.<br />
	<br />
	The following settings (w3easyAdmin only) care for the integration of the external applications. If the modules shall be integrated, you better leave them as they are, otherwise you may outcomment them by 2 slashes at the beginning of the respective line:</p>
<pre>
// application integration
$pt_cke_cfg       = &quot;modules/ckeditor/ckeditor.js&quot;;
$pt_w3eA_cke_cfg  = &quot;../w3eA_cke_cfg.js&quot;;
$pt_w3eA_kcf_fr   = &quot;modules/w3eA_kcf_frame.php&quot;;
$pt_w3eA_phftp_fr = &quot;modules/w3eA_phftp_frame.php&quot;;
$pt_w3eProtect    = &quot;modules/w3easyProtect&quot;;
$pt_w3eA_jscrypt  = &quot;modules/jscrypt/w3eA_jscrypt.php&quot;;
</pre>
<p>
	With the individual settings you may preselect folders and files that you need more often for your work. See the examples below:</p>
<pre>
// quick folder
$name_quick_folder_1 = &quot;w3easyAdmin&quot;; // selection name
$path_quick_folder_1 = &quot;./&quot;; // path to quick folder
</pre>
<pre>
// quick_file
$name_quick_file_1 = &quot;easyAdmin_config&quot;; // selection name
$file_quick_file_1 = &quot;w3eA_config.php&quot;; // file incl. extension(s)
$path_quick_file_1 = &quot;./&quot;; // path to file (Same folder = &quot;./&quot;)
</pre>
<p>
	Settings for the backup function (w3easyAdmin only):<br />
	To configure the backup settings, select with the quick file selector the preset backup config file (&#39;w3eB_config.php&#39; resp. &#39;easyBackup_config&#39;). Fill in the values as described in the config. Most variables are self-explanatory, the others we describe below.</p>
<pre>
### BACKUP SETTINGS
// general backup settings
$configBackupDir = &#39;backup/&#39;; // backup directory
$configEmail     = &#39;&#39;; // email address for backup file

// files and folders to backup resp. to skip
// root files
$root_files      = &#39;yes&#39;; // backup rootfiles? &#39;yes&#39; or &#39;&#39;

// directories/files to backup (relative path, trailing slash)
$configBackup[]  = &#39;../test/&#39;;

// directories/files to skip (relative path)
// $configSkip[] = &#39;../content/drafts&#39;;

// Databases you wish to backup, can be many
// (if tables array contains table names, 
// only those tables will be backed up) 
$configBackupDB[] = array (
&#39;server&#39;   =&gt; &#39;localhost&#39;,
&#39;username&#39; =&gt; &#39;root&#39;,
&#39;password&#39; =&gt; &#39;password&#39;,
&#39;database&#39; =&gt; &#39;databasename&#39;,
&#39;tables&#39;   =&gt; array(&#39;table_1&#39;,&#39;table_2&#39;,&#39;table_3&#39;)
);
</pre>
<p>
	Concerning the Databes settings, replace the example values with your specific values!<br />
	<span style="color: #FF0000"><span style="font-weight: bold">Warning:</span> Concerning the backup function we strongly recommend to have a look at the &#39;Known Problems&#39; section in the w3easyBackup script manual.</span></p>
<p>
	<span style="font-weight: bold">External Applications Integration</span><br />
	The integration of some external applications (see &#39;External Applications&#39; near the top of the page) in the w3easyAdmin is already prepared.&nbsp; Near the top of the page we indicated the versions of the applications we integrated. Sure you may try to integrate the actual versions of these applications, but be aware, that there might have been changes so that the integration might not be the same as before.<br />
	Note, that the links to the external applications near the top of the w3easyAdmin window will only be displayed, if the respective links are specified (and not outcommented) in the &#39;w3eA_config.php&#39; file.<br />
	More detailed informations about the integration and usage of the external applications you might find in the w3easyCMS Dokumentation or for sure in the respective applications documentations.</p>
<p>
	<strong>CKEditor (WYSIWYG Editor)</strong><br />
	Download, unpack and then upload the the CKEditor folder in the following directory (btw: you don&#39;t need to upload the &#39;_source&#39; folder): &#39;w3easyAdmin/modules/&#39;. The name of the folder, where the ckeditor is uploaded, has to be: &#39;ckeditor&#39;.<br />
	We have already prepared a custom CKEditor configuration file (&#39;/modules/w3eA_cke_cfg.js&#39;) so that you can use the CKEditor without further preparation.</p>
<div style="padding:0 5px; border:1px solid #000;">
	<p>
		The job described in this paragraph is already done by us, but for those, who might be interested in this stuff, this is, how the &#39;custom configuration file&#39; integration worked:<br />
		I pointed the ckeditor instance to a custom configuration file named &#39;w3eA_cke_cfg.js&#39; and put the file beneath the CKEditor folder. The custom configuration file is basically a copy of the original config.js, that may be customized f.e. by specific CKEditor toolbar settings without changing any original file.</p>
	<p>
		Paths:<br />
		Path from the file, where the CKEditor is integrated, to the ckeditor/config.js:<br />
		$pt_cke_cfg = path from &#39;w3easyAdmin/index.php&#39; =&gt; &#39;modules/ckeditor/ckeditor.js&#39;.<br />
		Path from the &#39;modules/ckeditor/ckeditor.js&#39; file to the custom config file:<br />
		$pt_w3eA_cke_cfg = path from &#39;modules/ckeditor/ckeditor.js&#39; =&gt; &#39;modules/w3eA_cke_cfg.js&#39;.</p>
</div>
<p>
	<strong>KCFinder (File Manager, Uploader and Image Viewer)</strong><br />
	Download, unpack and then upload the the KCFinder script folder to the following directory: &#39;w3easyAdmin/modules/&#39;. The name of the folder, where the kcfinder is uploaded, has to be: &#39;kcfinder&#39;.<br />
	Now we have to tell the KCFinder where the upload folder is located. This we have to specify in the &#39;/kcfinder/config.php&#39; file. Thus we have to change the respective entry (relative path from the KCFinder folder to our site&#39;s upload folder:<br />
	&#39;uploadURL&#39; =&gt; &#39;path/to/upload&#39;<br />
	In the case of the w3easyCMS the path will be: &#39;uploadURL&#39; =&gt; &#39;../../../../../upload&#39;.</p>
<div style="padding:0 5px; border:1px solid #000;">
	<p>
		The job described in this paragraph is already done by us, but for those, who might be interested in this stuff, this is, how the integration of&nbsp; the KCFinder to the CKEditor worked:<br />
		To integrate the KCFinder as custom file manager in the CKEditor, we use once again the custom CKEditor configuration file that we already created for customizimg the CKEditor toolbar. There we have to specify the paths from the file, where the CKEditor editor instance is settled (= our w3easyAdmin index file) to the files, where the KCFinder browser and uploader is started. For either the uploader as the browser handles 3 different upload directories (= files, images, flash), we have to set 2x3 = 6 (!;) paths to the KCFinder start files.</p>
	<p>
		Paths:<br />
		&#39;w3easyAdmin/index.php&#39; =&gt; &#39;modules/kcfinder/browse.php?type=xy&#39; (x 3)<br />
		&#39;w3easyAdmin/index.php&#39; =&gt; &#39;modules/kcfinder/upload.php?type=xy&#39; (x 3)</p>
</div>
<p>
	To use the KCFinder also without the CKEditor, we integrated the tool in the &#39;w3easyAdmin/modules/w3eA_kcf_frame.php&#39; file. Calling this file (by the link on the top right of the w3easyAdmin window) you may use the KCFinder as a comfortable standalone image and media file uploader and even as a famous image (pre)viewer.</p>
<p>
	<strong>PHFTP (Online FTP Manager)</strong><br />
	Download, unpack and then upload the the PHFTP folder in the following directory: &#39;/w3easyAdmin/modules/&#39;. The name of the folder, where the PHFTP is uploaded, has to be: &#39;phftp&#39;.<br />
	To use the PHFTP web ftp manager you have to create a &#39;/tmp/&#39; folder anywhere on your web space, to make it writable (by chmoding it to 777 maybe) and to specifiy the path to the folder in the &#39;/phftp/config/config.php&#39; file. The path to the /tmp/ folder has to be the realpath.<br />
	To determine the realpath, navigate with the w3easyAdmin to the respective /tmp/ folder. Then have a look at the bottom of the application. There the realpath is displayed.</p>
<p>
	The <span style="font-weight: bold;">B</span><strong>ackup Function</strong> and the <strong>JScrypt</strong> tool is already integrated.<br />
	Furthermore you may integrate the <strong>w3easyProtect</strong> script by uploading the script in the &#39;w3easyAdmin/modules/&#39; folder and specifying the path to the script in the &#39;w3eA_config.php&#39; file.</p>
<p>
	<span style="font-weight: bold">Usage</span><br />
	Always be careful with what you edit, delete or rename - as said in the beginning the w3easyEditor may be quite an alluring but powerful devil...<br />
	It is strongly recommended first to try out and play around carefully with the w3easyEditor in a secure environment for testing before you get productive...<br />
	Note: For any file or folder editing operation the we3asyEditor needs adequate file/folder permissions. Mainly it should work in a directory that has 777 permissions and with a file that has 666 permissions (but not always, as I exprienced lately!!!). But these permissions are not recommended. In many cases the script should also work in a 755/644 or a 775/664 permission environment, if the script is the owner of the file. The script becomes regularly the owner of a file/folder, if it created the file/folder. So if you have difficulties with permissions, you could temporarily set the respective folder permissions with a ftp manager to 777, then you can create the files/folders you want to have editable with the editor and after this you can reset the permissions to 755/644. Now the script is the owner of the created files and should be able to edit them also within a 755/644 permissions environment. Note, that this trick will not work in the root directory, because in most cases you cannot create the root directory by the editor script.<br />
	<br />
	<span style="font-weight: bold">Practical Usage</span><br />
	The basic principles the w3easyEditor follows are:<br />
	If you want the w3easyEditor to do something, you have to define a task by checking a radio button or select an entry or both and then press the submit button. If you press the submit button without having checked or selected anything, the w3easyEditor will keep your edits virtually in memory, but will not save it to a file. So if you want to save your work, you first have to check the respective radio button or select something and then you have to press submit.<br />
	To create a new directory or file you have to specify the name of the file resp. folder in the respective text input lines on the right above the radio buttons. Then check the respective radio button and press submit.<br />
	To copy or rename a file you first have to select the file to copy or to rename. Then specify the new name of the file in the respective text input line on the right above the radio buttons. Then check the respective radio button and press submit.<br />
	To edit or chmod a file or a folder select the respective file/folder. To save your changes, check the resp. radio button and press submit.</p>
<p>
	Zorry for my bad English, have fun and take it w3easy... ;)</p>
Return current item: Bohemian Image Gallery