forked from ezsystems/ezlightbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
160 lines (104 loc) · 5.35 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
eZ Lightbox extension INSTALL
Introduction
============
Read the README file to get further information about the
eZ Lightbox extension for eZ Publish.
Requirements
------------
The following requirements exists for using eZ Lightbox extension:
o PHP extensions:
Make sure the "HASH Message Digest Framework" is compile into
your PHP environment.
o eZ Publish version:
Make sure you use eZ Publish version 4.0.4 or higher.
o Database versions:
Currently the extension supports MySQL and Oracle databases in
versions that are supported by eZ Publish.
Getting eZ Publish
==================
You can download a version of eZ Publish from ez.no, you will find the
various versions at:
http://ez.no/download/ez_publish/ez_publish_4_stable_releases
NOTE: You will require eZ Publish 4.0.4 or higher
Information on the installation of eZ Publish can be found at:
http://ez.no/doc/ez_publish/technical_manual
Installing eZ Lightbox extension
================================
1. Unpack the files in the distribution.
$ unzip ezlightbox-extension-0.7.4.zip
2. Copy the directory 'ezlightbox' into the 'extension' directory
located in the root of your eZ Publish installation.
3. Enable the extension in eZ Publish. To do this edit site.ini.append(.php)
in the folder <ROOT_OF_EZPUBLISH>/settings/override. If this file does not
exist, create it. Locate (or add) the block [ExtensionSettings] and add
the line:
ActiveExtensions[]=ezlightbox
If you run several sites using only one distribution and only some of the
sites should use the extension, make the changes in the override file of
that siteaccess.
E.g <ROOT_OF_EZPUBLISH>/settings/siteaccess/news/site.ini.append(.php)
But instead of using ActiveExtensions you must add these lines instead:
[ExtensionSettings]
ActiveAccessExtensions[]=ezlightbox
Regenerate the extension autoload file, either via GUI (in case the
eZ Publish site is already installed ) in the Admin interface, "Setup"
tab, "Extensions" page, or by executing the ezpgenerateautoloads.php file.
Initializing Lightbox databases
===============================
1. MySQL
-----
Go to the eZ Publish installation directory and run the mysql client:
$ mysql -u <USERNAME> -h <HOSTNAME> -p <DATABASENAME> < extension/ezlightbox/sql/mysql/ezlightbox.sql
Replace the placeholders <USERNAME>, <HOSTNAME> and <DATABASENAME> with
the username of your database, the hostname the MySQL database is running
on and the name of the database used by eZ Publish. After executing this
command you will be requested to enter the password of the user. Refer to
your site.ini file to get the required values.
2. Oracle
------
Go to the eZ Publish installation directory and run the mysql client:
$ sqlplus <USERNAME>/<PASSWORD>@<DATABASENAME> < extension/ezlightbox/sql/oracle/ezlightbox.sql
Replace the placeholders <USERNAME>, <PASSWORD> and <DATABASENAME> with
the username of your database, the password of the user and the name of
the database used by eZ Publish. Refer to your site.ini file to get the
required values.
Enabling user to make use of lightboxes
=======================================
Login to the administration interface as an administrator user. Navigate to
the "User accounts" menu and click on "Roles and policies" on the left
handside of the screen. Either edit an existing role or create a new one.
Add a new policy and in the upcoming dialog select "lightbox" as a module
name. Depending on your intension you can grant full or limited access to
several functions that are available in the lightbox module.
Integrate lightbox funtionality into your site
==============================================
The easiest way is to just include the lightbox toolbar somewhere into your
pagelayout. If you wish to include the toolbar within a cache-block you should
think about modifying it accordingly, because the toolbar already demonstrates
how the lightbox functionality could be used with cache-blocks.
{include uri="design:lightbox/toolbar.tpl"}
When viewing the content of a lightbox it could be useful to have an additional
menu. This menu is typically also included within the pagelayout.tpl. If you
wish a dependant inclusion of the menu, this can be done as follows.
{def $shown_lightbox_id = first_set( $module_result.shown_lightbox_id, false() )}
{if and( $module_result.ui_component|eq( 'lightbox' ), $module_result.navigation_part|eq( 'ezlightboxnavigationpart' ) )}
{if $shown_lightbox_id}
{include uri = "design:lightbox/left_menu.tpl"
shownLightboxID = $shown_lightbox_id}
{else}
{include uri = "design:lightbox/left_menu.tpl"}
{/if}
{/if}
This template does not make use of cache-blocks so far, so it should be safe
to use it anywhere.
Update the autoloads
====================
On the command line use the script bin/php/ezpgenerateautoloads.php with the
parameter "-e" to update the autoloads array. This will make all PHP files,
provided by the extension, available in eZ Publish.
Clear the cache
===============
To be sure all your changes take effect, you should clear the cache. This can
be done from within the administration interface in the "Setup" top menu.
Optionally you can clear the cache from the command line by executing the script
bin/php/ezcache with the parameter "--clear-all"