Results for tag php

  • Requesting remote JSON or XML from a Smarty template
    Joor Loohuis, 2010-12-19
    Occasionally it is necessary to get data from another domain to display on a webpage. Using Smarty templates it is very easy to fetch and display remote data in JSON or XML format.
  • Static assignment of arrays in Smarty templates
    Joor Loohuis, 2010-11-13
    Occasionally, you need to fill an array with values for use in a Smarty template without explicitly assigning it in your PHP code. Here are some tricks for creating arrays directly in a template.
  • Integrating Subversion, Trac, and Mailman into a development environment: part 1, design
    Joor Loohuis, 2010-07-01
    Many software development projects are hosted in a 'forge', a web application that provides tools such as source code management, mailing lists, and a bug tracker. We were recently asked to provide such an environment, based on Trac, Mailman, and Subversion. We thought it might be informative to document our findings.
  • Quick checks for PHP PEAR and PECL updates
    Armijn Hemel, 2010-01-24
    Ideally all software on a system is installed via one package manager. Reality is a bit different. As an administrator you need to stay on top on updates from all software that is installed instead of relying on the system's package manager.
  • Passing complex data from Smarty to JavaScript
    Joor Loohuis, 2009-11-13
    Modern web applications frequently need to process complex data with JavaScript. Typically, these data are requested separately through AJAX calls, but if the data do not change frequently, it is probably easier to output JSON in the (X)HTML, and let JavaScript take it from there. The Smarty template engine makes this more or less trivial.
  • Multilingual websites and webapplications using PHP and Smarty, part 3: locales
    Joor Loohuis, 2009-08-30
    Multilingual sites not only need support for different languages, but also for locales, the set of conventions that are used in countries and language regions for representing quantities such as time, numbers, and other information. This article describes how websites and webapplications that use Smarty can set a locale in addition to a language for the best user experience.
  • Multilingual websites and webapplications using PHP and Smarty, part 2: dictionary based templates
    Joor Loohuis, 2009-07-26
    One of the components of a multilingual website or webapplication is providing support for different languages. Typically, the translations are not provided by webdevelopers, but by less technically oriented people, who prefer a low-tech approach to translating. In this article a dictionary based translation model for Smarty templates is demonstrated, which is easy to implement, maintain, and extend.
  • Multilingual websites and webapplications using PHP and Smarty, part 1: detecting languages and locales
    Joor Loohuis, 2009-07-12
    Supporting more than one language in a website or webapplication has become a core feature of many projects. This series of articles explains how you can detect languages and locales, and how you can use Smarty to produce interfaces with support for languages and locales that are easy to maintain.
  • Debugging Smarty templates
    Joor Loohuis, 2009-04-22
    Debugging Smarty templates becomes more difficult as the complexity of the assigned data increases, and may also depend on the sophistication of the application. Another twist is added when changes need to be made to a live application. This article gives a couple of tips for making debugging templates a little less painful.