This helper provides function for quickly including the assets to any web page by generating the needed html tags automatically.
Asset can be an image, css file, javascript file or any other files.
Functions
-
css_asset($asset_name, $module_name = NULL, $attributes = array()) This will generate the link tag for the css file. This method
will make reference to the css file in application/assets/css directory with the given name in the first parameter and will include it.
-
js_asset($asset_name, $module_name = NULL) This will generate the link tag for the js file. This method will make reference to the css file in application/assets/js directory with the given name in the first parameter and will include it.
-
image_asset($asset_name, $module_name = '', $attributes = array() This will generate the img tag for the image file reference.
The file in application/assets/image directory with be referred.
-
getHumanDate($timestamp) Returns the human readable date time for the passed timestamp. This can be used to display
the posted time of comment or a blog. The value will be like 5min before, 1 hour before, Last Monday, etc