Friday, June 27, 2014

sticky footer

Html5

* {
 margin: 0;
}
html, body {
 height: 100%;
}
.wrapper {
 min-height: 100%;
 height: auto !important;
 height: 100%;
 margin: 0 auto -155px; /* the bottom margin is the negative value of the footer's height */
}
footer, .push {
 height: 155px; /* '.push' must be the same height as 'footer' */
}

/*

Html

* {
 margin: 0;
}
html, body {
 height: 100%;
}
.wrapper {
 min-height: 100%;
 height: auto !important;
 height: 100%;
 margin: 0 auto -155px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
 height: 155px; /* .push must be the same height as .footer */
}

/*

Sticky Footer by Ryan Fait
http://ryanfait.com/

*/


  1.     
  2.         
  3.     
  •     
  •         
  •             Your website content here.
  •             
  •         </div>
  •         
  •             Copyright (c) 2008
  •         </div>
  •     


  • Monday, June 23, 2014

    Silverstripe how to install modules

    1. download module
    2. copy to the root folder
    3. backup database.
    4. on front page, run http://localhost/yoursite/dev/build/?flush=1
    5. done.

    Monday, June 16, 2014

    solved ZF ERROR -- In order to run the zf command

    ************** ZF ERROR ***************** 
    In order to run the zf command, you need to ensure that Zend Framework is inside your include_path. There are a variety of ways that you can ensure that this zf command line tool knows where the Zend Framework library is on your system, but not all of them can be described here.
    The easiest way to get the zf command running is to give it the include path via an environment variable ZEND_TOOL_INCLUDE_PATH or ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use, then run the command "zf --setup". This command is designed to create a storage location for your user, as well as create the zf.ini file that the zf command will consult in order to run properly on your system.
    Example you would run:
    $ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
    Your are encourged to read more in the link that follows. Zend_Tool & CLI Setup Information (available via the command line "zf --info") * Home directory found in environment variable HOMEPATH with value \Users\TOS H * Storage directory assumed in home directory at location \Users\TOSH/.zf/ * Storage directory does not exist at \Users\TOSH/.zf/ * Config file assumed in home directory at location \Users\TOSH/.zf.ini * Config file does not exist at \Users\TOSH/.zf.iniv, you need to ensure that Zend Framework is inside your include_path. There are a variety of ways that you can ensure that this zf command line tool knows where the Zend Framework library is on your system, but not all of them can be described here.
    The easiest way to get the zf command running is to give it the include path via an environment variable ZEND_TOOL_INCLUDE_PATH or ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use, then run the command "zf --setup". This command is designed to create a storage location for your user, as well as create the zf.ini file that the zf command will consult in order to run properly on your system.
    Example you would run:
    $ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
    Your are encourged to read more in the link that follows. Zend_Tool & CLI Setup Information (available via the command line "zf --info") * Home directory found in environment variable HOMEPATH with value \Users\TOS H * Storage directory assumed in home directory at location \Users\TOSH/.zf/ * Storage directory does not exist at \Users\TOSH/.zf/ * Config file assumed in home directory at location \Users\TOSH/.zf.ini * Config file does not exist at \Users\TOSH/.zf.ini

    Solution

    php.ini for CLI is different from the one you open using wamp which is for webserver (apache)
    C:\wamp\bin\apache\Apache2.2.21\bin\php.ini
    you should add include_path in following ini aswell
    C:\wamp\bin\php\php5.3.10\php.ini
    Note depending upon your versions of php , apache path could be little different.

    Wednesday, June 11, 2014

    How to use zf on mac

    If you can't copy the zf library in some "global" include path, e.g. /usr/share/php/, you can still copy it where your project is and start the zf tool from there. A folder structure like:
    /var/www/zf_tool
                    `/bin/
                          `zf.sh
                          `zf.php
                    `/library
                          `/Zend
    Copy the Zend folder under library, and the zf.sh and zf.php scripts under bin and set them to be executable chmod a+x zf.sh zf.php if they are not already. Next, if you run /var/www/project/bin/zf.sh it'll look for zf files in the include_path, but if it's not there, it'll go up one folder and go into the library folder. Only if the zf library is not to be found there, it'll die with an error. In the end, creating a new zf project is simple as:
    $ pwd
    /var/www/zf_tool/bin
    $ ./zf.sh create project /var/www/test_project