Académique Documents
Professionnel Documents
Culture Documents
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
ImpressPages CMS News Docs Extensions Forum About
misaelvicente@... SEARCH
DOCUMENTATION 1.x
SEARCH DOCUMENTATION
Docs | Themes
Common tasks Common issues Configuration Plugins ImpressPages CMS Core Core API
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
1/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
Extract downloaded files to the folder on your server where you want the CMS to be installed. Login to your hosting provider and create a database. If you work on localhost you can do that using phpMyAdmin. Then type appropriate URL in your browser. You will see the installation wizard. Follow the instructions until the installation completes. By default, database host is "localhost" but with some hosting providers or software it could be "127.0.0.1". Check with hosting provider if needed. Default login information when working with installation on your local computer (with XAMPP or EasyPHP) is "root" (without quotes) for the username and empty field for the password. Here is a video on how to do that: http://www.impresspages.org/docs/gettingstarted/installation/ After a successful installation you should see a website with default design and content:
2. Copy i p _ c o n t e n t . c s sfrom ip_default folder to professional folder. This file contains general styles used to style photo galleries, titles, contact forms and other manageable content. Later we will change it a bit to suit our needs.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
2/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
3. Also copy b l a n k . p h pfrom i p _ d e f a u l tfolder to p r o f e s s i o n a lfolder. This file is used to generate RSS feed and other system tasks where no real HTML is involved. We dont need to do anything with this file. It just needs to be in the theme. 4. Rename i n d e x . h t m lfile to m a i n . p h p . The system looks for m a i n . p h pto get the HTML for the website layout. Now your files should look like this:
Use any text editor such as Notepad++ or PSPad. The line we need to change is somewhere near line 62. Replace this line:
d e f i n e ( ' T H E M E ' ,' i p _ d e f a u l t ' ) ;/ / t h e m ef r o mt h e m e sd i r e c t o r y
to
d e f i n e ( ' T H E M E ' ,' p r o f e s s i o n a l ' ) ;/ / t h e m ef r o mt h e m e sd i r e c t o r y
This is the step where we actually tell the system to use our new theme. Now we can check our website in the browser. It should look like this:
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
3/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
Our website has no style or design. This is because the browser cant find the CSS files at the moment.
What happened here is that we pointed to the exact place where the CSS file is located. The PHP code will replace BASE_URL with your actual website URL (in our case www.example.com), THEME_DIR with ip_themes and THEME with professional. As a result the browser will get a full URL to the CSS file: h t t p : / / w w w . e x a m p l e . c o m / i p _ t h e m e s / p r o f e s s i o n a l / s t y l e . c s s Look at our website. It is beautiful now.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
4/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
The links on our website dont work yet. It is just one static page. We need to replace the static hardcoded menu code to PHP code that will generate a menu from the database. Open main HTML file i p _ t h e m e s / p r o f e s s i o n a l / m a i n . p h pagain and change lines 31 - 37:
< u l > < l ic l a s s = " a c t i v e " > < ah r e f = " # " > H o m e < / a > < / l i > < l i > < ah r e f = " # " > A b o u tU s < / a > < / l i > < l i > < ah r e f = " # " > P r o d u c t s < / a > < / l i > < l i > < ah r e f = " # " > S e r v i c e s < / a > < / l i > < l i > < ah r e f = " # " > C o n t a c tU s < / a > < / l i > < / u l >
Now we have our top menu working. Lets do the same with menu on the left. Change lines 86 109:
< l i > < h 2 > L o r e mI p s u m < / h 2 > < u l > < l i > < ah r e f = " # " > F u s c ed u in e q u ef r i n g i l l a < / a > < / l i > < l i > < ah r e f = " # " > E g e tt e m p o re g e tn o n u m m y < / a > < / l i > < l i > < ah r e f = " # " > M a g n al a c u sb i b e n d u mm a u r i s < / a > < / l i > < l i > < ah r e f = " # " > N e cm e t u ss e dd o n e c < / a > < / l i > < l i > < ah r e f = " # " > M a g n al a c u sb i b e n d u mm a u r i s < / a > < / l i > < l i > < ah r e f = " # " > V e l i ts e m p e rn i s im o l e s t i e < / a > < / l i > < l i > < ah r e f = " # " > E g e tt e m p o re g e tn o n u m m y < / a > < / l i > < / u l > < / l i > < l i > < h 2 > V o l u t p a tD o l o r e < / h 2 > < u l > < l i > < ah r e f = " # " > N e cm e t u ss e dd o n e c < / a > < / l i > < l i > < ah r e f = " # " > M a g n al a c u sb i b e n d u mm a u r i s < / a > < / l i > < l i > < ah r e f = " # " > V e l i ts e m p e rn i s im o l e s t i e < / a > < / l i > < l i > < ah r e f = " # " > E g e tt e m p o re g e tn o n u m m y < / a > < / l i > < l i > < ah r e f = " # " > N e cm e t u ss e dd o n e c < / a > < / l i > < l i > < ah r e f = " # " > M a g n al a c u sb i b e n d u mm a u r i s < / a > < / l i > < l i > < ah r e f = " # " > V e l i ts e m p e rn i s im o l e s t i e < / a > < / l i > < / u l > < / l i >
< l i > < h 2 > S e r v i c e s < / h 2 > < ? p h p r e q u i r e _ o n c e( B A S E _ D I R . L I B R A R Y _ D I R . ' p h p / m e n u / c o m m o n . p h p ' ) ; $ m e n u T o p=n e wL i b r a r y \ P h p \ M e n u \ C o m m o n ( ) ; e c h o$ m e n u T o p > g e n e r a t e S u b m e n u ( ' l e f t ' ,n u l l ,1 ) ;/ / $ z o n e N a m e ,$ p a r e n t E l e m e n t I d ,$ d e p t h L i m ? > < / l i >
Now we have our menu working. We see default ImpressPages CMS menu items: Welcome, Lorem ipsum, Text, Photos, Video and other.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
5/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
<
Generated content requires additional styles. We can write them from scratch but it is easier to use the skeleton from the i p _ c o n t e n t . c s sfile. So, add a new line in head section of main.php file. It will tell the browser to include those CSS styles and use them to style content: text, titles and photos. Open i p _ t h e m e s / p r o f e s s i o n a l / m a i n . p h p and add new line somewhere near the line 18 before < / h e a d > :
Now we can navigate through our website and see real content.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
6/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
We need to copy these lines to i p _ c o n t e n t . c s s . Then titles will look like they should. But in i p _ c o n t e n t . c s sfile we have three title styles: H1, H2, H3. So we will paste the same styles three times changing the size of font. To do that we need to replace lines 155 181 of i p _ t h e m e s / p r o f e s s i o n a l / i p _ c o n t e n t . c s sto
. i p C o n t e n th 1 . i p W i d g e t T i t l e H e a d i n g{ m a r g i n :0 p x ; b a c k g r o u n d :# 4 4 4 4 4 4u r l ( i m a g e s / i m g 0 2 . j p g )n o r e p e a tl e f t5 0 % ; p a d d i n g :7 p x2 5 p x ; f o n t s i z e :1 . 4 e m ; } . i p C o n t e n th 2 . i p W i d g e t T i t l e H e a d i n g{ m a r g i n :0 p x ; b a c k g r o u n d :# 4 4 4 4 4 4u r l ( i m a g e s / i m g 0 2 . j p g )n o r e p e a tl e f t5 0 % ; p a d d i n g :7 p x2 5 p x ; f o n t s i z e :1 . 2 e m ; } . i p C o n t e n th 3 . i p W i d g e t T i t l e H e a d i n g{ m a r g i n :0 p x ; b a c k g r o u n d :# 4 4 4 4 4 4u r l ( i m a g e s / i m g 0 2 . j p g )n o r e p e a tl e f t5 0 % ; p a d d i n g :7 p x2 5 p x ; f o n t s i z e :1 . 0 e m ; }
Also, the list styles described in i p _ c o n t e n t . c s sdont suit our current style. We will just remove unnecessary styles and leave the default browser list styles. Remove these lines from i p _ t h e m e s / p r o f e s s i o n a l / i p _ c o n t e n t . c s sfile near line 94:
. i p C o n t e n tu l , . m c e C o n t e n t B o d yu l{ l i s t s t y l e :n o n e ; m a r g i n :1 0 p x01 0 p x1 5 p x ; p a d d i n g :0 ; } . i p C o n t e n tu ll i , . m c e C o n t e n t B o d yu ll i{
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
7/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
b a c k g r o u n d :t r a n s p a r e n tu r l ( i m a g e s / l i s t . g i f )n o r e p e a ts c r o l l6 p x9 p x ; l i n e h e i g h t :2 0 p x ; m a r g i n :0 ; p a d d i n g :0001 8 p x ; }
Now our website content looks good. Press ctrl + F5 to force refresh if what you see is not like the picture:
Now you can login using this address: http://www.example.com/admin.php and the credentials that you used in the installation process. Watch the video how to manage content: http://www.impresspages.org/docs/usingimpresspages/content-management/
Step 10 - Images
Default image settings dont match the layout width. Thats why the photo gallery has additional space at the right and the big photo goes out of the page.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
8/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
We need to sign in to administration panel and change photo cropping parameters to fit our new style. Change a single photo width: add a d m i n . p h pat the end of your website URL (http://www.example.com/admin.php) and login. go to tab D e v e l o p e r>M o d u l e sc o n f i g click C o n t e n tm a n a g e m e n ton the left if it's not selected press yellow folder icon on line W i d g e t :P h o t o change P h o t ow i d t hparameter value to 562 Change photo gallery cropping width and height: go to tab D e v e l o p e r>M o d u l e sc o n f i g click C o n t e n tm a n a g e m e n ton the left if it's not selected press yellow folder icon on line W i d g e t :P h o t og a l l e r y change P h o t ow i d t hparameter value to 127 change P h o t oh e i g h tparameter value to 100 Additionally you can change the B i gp h o t ow i d t hand B i gp h o t oh e i g h t parameters. They describe the size of large version of photo that is visible in popup. Now the photos will be cropped correctly. But you need to delete old photos and add new ones because settings apply only to new images. Browse through all other parameters to understand what you can change to better accomodate your needs. Or read more about widgets configuration.
Step 11 - Lightbox
Now when we press image it opens in separate window. Follow the instructions bellow to install a JavaScript lightbox. It will show your large images in a beautiful lightbox. Open i p _ t h e m e s / p r o f e s s i o n a l / m a i n . p h pfile and add new line before < / h e a d > . This line includes required CSS styles:
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
9/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
Then add these lines at the end of i p _ t h e m e s / p r o f e s s i o n a l / m a i n . p h pfile before < / b o d y >line.
< ! -p o p u p s> < s c r i p tt y p e = " t e x t / j a v a s c r i p t "s r c = " < ? p h pe c h oB A S E _ U R L . L I B R A R Y _ D I R ;? > j s / l i g h t b o x / j s / p r o t o t y p e . j < s c r i p tt y p e = " t e x t / j a v a s c r i p t "s r c = " < ? p h pe c h oB A S E _ U R L . L I B R A R Y _ D I R ;? > j s / l i g h t b o x / j s / s c r i p t a c u l o < s c r i p tt y p e = " t e x t / j a v a s c r i p t "s r c = " < ? p h pe c h oB A S E _ U R L . L I B R A R Y _ D I R ;? > j s / l i g h t b o x / j s / l i g h t b o x . j s < s c r i p tt y p e = " t e x t / j a v a s c r i p t " > / /< ! [ C D A T A [ L i g h t b o x O p t i o n s . f i l e L o a d i n g I m a g e=' < ? p h pe c h oB A S E _ U R L . L I B R A R Y _ D I R ;? > '+' j s / l i g h t b o x / i m a g e s / L i g h t b o x O p t i o n s . f i l e B o t t o m N a v C l o s e I m a g e=' < ? p h pe c h oB A S E _ U R L . L I B R A R Y _ D I R ;? > ' / / ] ] > < / s c r i p t > < ! -s p o p u p s>
It is a JavaScript that will handle mouse events and show large version of image. Now our images open like that:
with:
< ? p h p e c h o$ s i t e > g e t Z o n e ( ' s e a r c h ' ) > g e n e r a t e S e a r c h B o x ( ) ; ? >
ImpressPages CMS generated form looks different. Thats why we need to change CSS styles to adapt the search box to our new design. Open i p _ t h e m e s / p r o f e s s i o n a l / s t y l e . c s sand add these lines at the bottom:
. m o d A d m i n i s t r a t o r S e a r c h I n p u t{ m a r g i n l e f t :2 0 p x ;
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
10/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
f l o a t :l e f t ; } . m o d A d m i n i s t r a t o r S e a r c h B u t t o n{ b a c k g r o u n d :# 4 4 4 4 4 4u r l ( i m a g e s / i m g 0 2 . j p g )n o r e p e a t3 p x5 0 % ; m a r g i n l e f t :1 0 p x ; w i d t h :2 2 p x ; h e i g h t :2 2 p x ; t e x t s i z e :1 p x ; f l o a t :l e f t ; } # s e a r c h{ h e i g h t :9 0 p x ; }
Now your search box looks fine. If not, press ctrl + F5 to force refresh.
Step 13 - Logo
The logo has no link. Usually logo links to home page of website. Lets do that. Open i p _ t h e m e s / p r o f e s s i o n a l / m a i n . p h pand replace line 29:
< h 1 > < ah r e f = " # " > P r o f e s s i o n a l < / a > < / h 1 >
to
< h 1 > < ah r e f = " < ? p h pe c h o$ s i t e > g e n e r a t e U r l ( ) ;? > " > E x a m p l e . c o m < / a > < / h 1 >
If you would like to replace the text with a logo image (for example your_logo.gif), upload it to i p _ t h e m e s / p r o f e s s i o n a l / i m g e s /directory and replace line:
< h 1 > < ah r e f = " # " > P r o f e s s i o n a l < / a > < / h 1 >
to
< ah r e f = " < ? p h pe c h o$ s i t e > g e n e r a t e U r l ( ) ;? > " > < i m gs r c = " < ? p h pe c h oB A S E _ U R L . T H E M E _ D I R . T H E M E ;? > / i
You can change i m g 0 3 . j p gwith any other image that is relevant to you, like y o u r _ l o g o . p n g .
Now you have your new website with new design. You can start dragging and dropping the content. Hope you like it. Write a comment
You are logged in as misaelvicente@gmail.com.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
11/12
09/06/12
How to create a Drag & Drop website | ImpressPages 1.X CMS documentation
Name Link
Text *
Send
Extensions Plugins 2.x Themes 2.x Translations Plugins 1.x Themes 1.x Contribute
About About ImpressPages CMS Team Logos and graphics Press Contact us
Follow us on
Copyright 2009-2012 by ImpressPages LTD All rights reserved. Terms of Use. Privacy Policy.
www.impresspages.org/docs/working-with-themes/how-to-create-a-drag-drop-website/
12/12