Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
SEE
2
http://www.unverse.net/abitwhizzy
3
FOR THE LATEST INFORMATION       abitwhizzy.php 7, whizzywig.js 54a
4
Note, Version 7 has important security fix
5
 
6
Installing aBitWhizzy
7
=====================
8
 
9
   1. First, download the zip file - the individual files, plus translations for various languages, are on the download page.
10
  *2. Extract the files from the archive: if you don't have compressed folders you'll need  zip sofware.
11
      If you are unzipping with WinZip, you need to click "Extract" and make sure that the "Use folder names" checkbox is ticked.
12
  *3. Using an FTP client (e.g. Filezilla), upload them to the root of your website
13
      OR, you can use Internet Explorer to upload files
14
      If you installed in a sub-directory or test folder, you'll need to set the paths in the configuration options.
15
      Note that abitwhizzy can only edit files in it's own directory. *
16
   4. Check that file permissions on your server  are set so that PHP can write files in the directory holding your pages.
17
      Note: If you miss this step you will get "Permission denied" warnings when you try to save files.
18
   5. You can set configuration options, including a password, in the //CONFIGURE HERE part of the script
19
      or, password protect the editor another way now.
20
   6. If you have HTML pages already on your site (back them up first!) you will be able to edit them straight away:
21
      point your browser at (e.g.) www.yoursitename.com/abitwhizzy.php
22
      see Using aBitWhizzy.
23
 
24
*NOTE: Keep the folder structure in step 2 when you unzip abitwhizzy.zip and in step 3 when you upload.
25
-----
26
 
27
  It should look like this:
28
 
29
   abitwhizzy.php
30
   READ-ME.txt
31
   whizzywig-help.html
32
   +whizzery
33
   |+bak
34
   |+buttons   (folder with all the button images)
35
   |-licence.txt
36
   |-simple.css
37
   |-whizzylink.php
38
   |-whizzypic.php
39
   |-whizzywig.js
40
   |-whizzywig_changelog.js
41
   |-xhtml.js
42
 
43
 
44
 
45
Configuring aBitWhizzy
46
======================
47
 
48
Use a text editor (e.g. notepad) to open the file abitwhizzy.php on your computer.
49
 
50
In the  //CONFIGURE HERE section of the script you will see a bunch of things you can change.
51
 
52
The first thing you'll probably want to change is the password setting:
53
 
54
 //CONFIGURE HERE ========================
55
 if (!$password) $password = "secret";
56
 
57
Change the the password from "" to "whatever-you want-your-password-to-be".
58
 
59
This means that aBitWhizzy will now prompt for a password before it shows the Save button.
60
 
61
If you installed aBitWhizzy anywhere other than the root directory of your server, you will need to change the paths to the key files:
62
 
63
 if (!$cssFile) $cssFile= "location-of-my.css"; //choose your stylesheet, or set to ""
64
 if (!$buttonPath) $buttonPath = "/subdirectory/whizzery/buttons/"; //toolbar images live here. "" for text buttons
65
 
66
and so on.
67
 
68
 
69
 
70
'Including' aBitWhizzy
71
======================
72
You can edit the source of abitwhizzy.php  or you can create your own editor file with it's own parameters.
73
This lets you set up different versions of the editor and means you can upgrade to a newer version of aBitWhizzy without having to reapply all your configuration changes.
74
 
75
For example, you could create a file called myeditor.php containing the following:
76
-----------
77
 <?php
78
 $cssFile= "/etc/my.css"
79
 $buttonPath = "whizzery/buttons/";
80
 $toolbar = "bold italic color bullet number image link table clean";
81
 $top = <<<END_TOP
82
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
83
   "http://www.w3.org/TR/html4/strict.dtd">
84
 <HTML>
85
 <HEAD>
86
 <TITLE>The home of good stuff</TITLE>
87
 <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
88
 <SCRIPT type="text/javascript" src="etc/pagestuff.js"></SCRIPT>
89
 <LINK href="style.css" rel="stylesheet" type="text/css">
90
 </HEAD>
91
 <BODY onload="my_init()" background="images/texture.gif">
92
 END_TOP;
93
 include "whizzery/abitwhizzy.php";
94
 ?>
95
 
96
Then point your browser at www.mysitename.com/myeditor.php to edit files.
97
 
98
If you already have standard code on all the pages of your site, you may want to replace the bit in $top above with your own. Include the BODY tag.
99
 
100
 
101
 
102
Create a template
103
=================
104
If your host supports Server Side Includes (SSI) then you can use included files to top and tail your pages.
105
 
106
   1. Edit the file called top.shtml (type "top.shtml" in the Filename field and click [Open])
107
   2. Using the editor, create anything you want to appear at the top of every page you create or edit.
108
      Strictly, this means anything to appear in the HTML code between the opening BODY tag and the start of the editable content for each page.
109
   3. Click save.
110
   4. If required, repeat steps 1-3 for tail.shtml.
111
      This creates your standard HTML to appear beween the end of the editable content for each page and the closing BODY tag.
112
 
113
 
114
 
115
How it works
116
============
117
If SSI is enabled, aBitWhizzy adds in files called top.shtml or tail.shtml to the top and bottom of each page.
118
For example, on this page, the page header, the search box and the menu are all in top.shtml.
119
 
120
When you change one of these files, the changes will be reflected in all your pages, straight away.
121
 
122
If you cannot see the content of top.shtml and tail.shtml when you view your pages, then SSI may not be enabled on your site. You may need to rename your files to end with .shtml
123
 
124
It is perfectly valid for either, or both, of top.shtml and tail.shtml to be empty. You may get errors if they don't exist.
125
What if I don't have SSI enabled?
126
 
127
Look at the //CONFIGURE HERE section of the abitwhizzy.php script.
128
The 2 variables at the bottom of the list can be used to set a page template for all the files you edit with aBitWhizzy:
129
 
130
    * $top =
131
    * $tail =
132
 
133
As the name suggests, they can be used to "top and tail" the page content produced by the editor.
134
 
135
You can edit the HTML inside each variable. Be sure to include the necessary HTML to make your pages valid, including HEAD and BODY tags. If you need to, you can include META tags here. Note that changing these variables will not change all your pages straight away, only after you have edited each page. Better to use SSI if you can.
136
How do I include stuff in the HTML HEAD section?
137
Put it in the $top variable. It will be easier if you have scripts in an external file.
138
Use the $top variable if you want to add
139
 
140
    * meta tags
141
    * scripts
142
    * more than one stylesheet
143
    * special attributes on the BODY section e.g. background image.
144
 
145
An example:
146
-----------
147
in abitwhizzy.php edit the $top variable; e.g.
148
if (!$top) $top = <<<END_TOP
149
$doctype
150
<head>
151
<title>$t</title>
152
<meta name='description' content= 'These pages are wonderful' >
153
<link rel='stylesheet' type='text/css' href='$cssFile' >
154
</head>
155
<body background='image.gif'>
156
END_TOP;
157
 
158
 
159
 
160
Using aBitWhizzy
161
================
162
aBitWhizzy will edit any file in the same directory as itself with a name that ends in "html" or "htm". These are the standard file extensions used for html pages. You can change the extensions that aBitWhizzy will recognise by changing the $extensions configuration variable. For example, you may want to add "asp".
163
 
164
On the form at the top of the editor page,
165
 
166
    * type in the name of the file (something.html) you want to edit...
167
    * ...or select the file from the pull-down "or choose:"
168
    * then  click the [Open]  button to edit that file.
169
 
170
To create a new file, type in the name for the new file (ending in .htm or .html) and click [Open] .
171
 
172
If a password has been set in the configuration, the [Save] buton does not appear until you have typed something into the password field. If the password is set to nothing ("") then the password field does not appear and the [Save] button is visible all the time.
173
 
174