Aziz Saleh – Software development

  • Home
  • Downloads
    • AzizMVC Downloads
      • Database Plugin
        • Template Plugin
    • Flash Builder 4
      • Bypass, Hijack, Beat, and Defeat Same Origin Policy
      • Flash Click Tracker
      • Flash Link Hider
      • Pacman source V 1.0
    • Java Downloads
      • Currency Converter
    • Javascript Downloads
    • PHP/MySQL Downloads
      • Aziz MVC
      • AzizMVC Documentation
      • Contact Form Maker
      • NetFlix API 1.0 Wrapper
      • Simple Blog
    • Visual Basic Downloads
      • Currency Converter
        • Key Logger w/Store, email, registry options
  • Resume & Portfolio
  • Ask me a question
  • Contact Me

Template Plugin

Usage Example:

This template plugin allows you to use custom templates. Templates are stores in /Templates/ folder. For this example, lets say the template is in /Template/customTemplate folder:Class /Controller/test.php:

<?php
class test extends mainController
{
    public function __construct()
    {
        parent::__construct();

        // Load the HTML page from the viewer
        $page = $this->loadViewer("welcome",$someData,true);

        /*
        List of template variables to change
        These variables are in your viewer file like {header }, {footer }, {links }
        Each of the above variable must have a page to it in your template folder
        /Templates/customTemplate/header.x
        /Templates/customTemplate/footer.x
        /Templates/customTemplate/links.x
        $templateInfo = array("header", "footer", "links");
        */

        // Load the plugin
        $this->loadPlugin("template");

        // Print the page with the template information
        echo showTemplate($page,$templateInfo,"customTemplate");

        // If your template file is php type, you can pass it variables as well
        echo showTemplate($page,$templateInfo,"customTemplate",$someData);
    }
}

Installation:

  • Extract the file into your /Plugin folder.
  • Load the plugin where you like.

System Requirements:

  • PHP 4/PHP 5

Related Videos:

 

 

 

 

 

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • PHP does not have MySQL support enabled.
  • Your PHP installation appears to be missing the MySQL extension which is required by WordPress
  • Undefined mysql functions (mysql_connect, mysql_select_db, mysql_query) – PDO alternative
  • Checking if you have Javascript installed by PHP
  • Process Maxmind countries, regions and cities – Parser to MySQL or SqLite

Recent Comments

  • fathima on Currency Converter Using Java Netbeans
  • Chris on Currency Converter
  • Khalid Ahmad Qweder on Resume & Portfolio
  • Michel on Currency Converter
  • Michel on Currency Converter

Archives

  • March 2014
  • September 2013
  • November 2012
  • October 2012
  • November 2011
  • February 2011
  • December 2010
  • November 2010
  • August 2010
  • May 2010
  • September 2009

Categories

  • Flash Builder 4
  • General
  • Java
  • Javascript
  • MySQL
  • PHP
  • Visual Basic

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
CyberChimps ©2023