Browsed by
Category: PHP

Micro-framework: Slim

Micro-framework: Slim

Setting up Slim Application Create a folder for your project, mine called slim create a composer.json in the directory and open up your Command Prompt / Terminal and run composer install. Later you should have something similar to Screenshot #2. Setting up RedBeanPHP4 Download RedbeanPHP4 Create a folder named RedBeanPHP4 in vendor directory and extract download zip file above and copy the rb.php into slim/vendor/RedBeanPHP4 – see Screenshot #2. Include the rb.php in slim/vendor/autoloader.php Then, add MySQL connection settings. Let’s…

Read More Read More

Phalcon: First Time Setup (for Windows & WAMP)

Phalcon: First Time Setup (for Windows & WAMP)

Download Phalcon’s .dll file based on your environment – i’m using WampServer 32 bit(check with Task Manager if you don’t know your WampServer running on 32 bit or 64 bit). Once downloaded, extract the php_phalcon.dll into C:wampbinphpphp[version]ext. Add extension=php_phalcon.dll in 2 places: C:wampbinapacheapache[version]binphp.ini C:wampbinphpphp[version]php.ini Now, restart your WampServer services and check phpinfo(), see if it’s loaded or not. p/s: I used Phalcon’s .dll with no NTS, for PHP 5.5, and for 32 bit.

Phalcon: Multiple-Module Skeleton

Phalcon: Multiple-Module Skeleton

Assalamualaikum, I’ve been learning Phalcon Framework recently and end up built a Multiple-Module Skeleton app – basically to ease development process to manage modules. Looking forward to add in more features. I have it on GitHub. I have the directory structure as follow: Hope to get some feedbacks. Jazakumullahu khairan.

DomPDF: Production Ready Configuration

DomPDF: Production Ready Configuration

DomPDF – Production Ready Configuration PHP  Version: 5.3 and above Settings: allow_url_fopen Extensions: MBString (Installation), GD (Installation), DOM(enabled by default) DomPDF Configuration / Usage Enable Remote – def(“DOMPDF_ENABLE_REMOTE”, true); Read/Write access to the DOMPDF_TEMP_DIR Use Absolute URL Use Full Document Root or Relative (if you’re still unable to view the image) Use JPEG UPDATE (2015-02-17): Security Issues on allow_url_fopen or Is allow_url_fopen safe?

HTML: Editable Elements

HTML: Editable Elements

I’m using the following: X-editable Bootstrap 2 Cakephp / Any PHP Framework Include the jQuery, Bootstrap 2 in your HTML head The View The JavaScript The Controller References X-editable http://jquery.com/download/ http://getbootstrap.com/2.3.2/getting-started.html Angular X-editable – http://vitalets.github.io/angular-xeditable

GeoServer – GetFeatureInfo Template Data Model (structure)

GeoServer – GetFeatureInfo Template Data Model (structure)

Extend from this GeoServer – Custom Get Feature Info Display Knowledge requirement – Freemaker The standard template files is header.tpl, content.tpl, footer.tpl. header.tpl usually where JavaScript, CSS, meta tag, title placed here. footer.tpl where you put your HTML page footer, Copyright, etc. content.tpl where we going to iterate through all the features to display interactive UI. But here, I’m going to explain the structure of all available variables. Accessing the variables as following: The result may display as below: This…

Read More Read More

WordPress – Using Bootstrap in Custom Theme

WordPress – Using Bootstrap in Custom Theme

Create a folder name custom_theme containing index.php,header.php,footer.php,functions.php and style.css. Download Bootstrap and extract it into custom_theme folder. Now the structure should be as following: Custom theme should be save in $WORDPRESS_DIRECTORY/wp-content/themes/$THEME_NAME. For header.php, include the following: For index.php, include the following: For footer.php, include the following: For functions.php, include the following: For style.css, include the following: Reference: How to Build a Responsive WordPress Theme with Bootstrap More reading about custom theme & functions can be use, please visit WordPress Functions.