Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

Search

NP_Blogroll v0.36

A new version is out.
- Option for tagcloudresult header
- Fixed tagcloud result list only to group specified
- Fixed getTableList() bug
- Added template options for tagcloud link display
- Added tagcloud link click count
- del.icio.us support

click here to download

22:46:06 on 03/08/07 by Admun - My Work - tags: - #

Template Filling, NucluesCMS way

Here's a snippet of code taken from NP_Blogroll to show how someone can utilize Nucleus's build-in class to do template token replacement.

Say we have a few template var <%var1%>, <%var2%>, <%var3%>.

  // The text with template vars to be processed
  $text = "I have <%var1%> to be <%var2%>, at <%var3%>";

  // Setup value for each template var
  $Vars = array (
    'var1' => "a dog",
    'var2' => " walked",
    'var3' => "home"  
                );

  // processing the text and fill in the template var
  TEMPLATE::fill($text, $Vars);

Handy!

15:59:19 on 03/08/07 by Admun - Developer Notes - tags: - #
<=   March 2007   =>
SunMonTueWedThuFriSat
    123
45678910
11121314151617
18192021222324
25262728293031