/[cvs]/nfo/php/libs/org.netfrag.flib/utils/shortcuts.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.flib/utils/shortcuts.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu Dec 19 06:22:09 2002 UTC (21 years, 7 months ago) by joko
Branch: MAIN
Changes since 1.1: +19 -7 lines
+ function _t

1 <?
2 ## -----------------------------------------------------------------------------
3 ## $Id: shortcuts.php,v 1.1 2002/12/13 02:24:55 joko Exp $
4 ## -----------------------------------------------------------------------------
5 ## $Log: shortcuts.php,v $
6 ## Revision 1.1 2002/12/13 02:24:55 joko
7 ## + refactored code
8 ##
9 ## Revision 1.4 2002/12/03 17:01:37 cvsjoko
10 ## + testing
11 ##
12 ## Revision 1.3 2002/12/01 22:05:29 cvsjoko
13 ## + bugfixing tests / debugging output
14 ##
15 ## Revision 1.2 2002/12/01 17:44:50 cvsjoko
16 ## + modification to function getlt
17 ##
18 ## Revision 1.1 2002/11/12 06:05:18 cvsjoko
19 ## + initial checkin
20 ## + shortcut functions to often used methods
21 ##
22 ## -----------------------------------------------------------------------------
23
24
25 // TODO:
26 // - try to encapsulate this code and re-export via method-linking to global scope
27 // - is this possible with PHP?
28
29 // wrapper-function for convenient use of "getlt"..... are there "Alias"es in php?
30 function getlt($key, $tpl=array()) {
31 //global $lt;
32 global $site;
33 //print "yai - <br>";
34 //print Dumper($_SESSION);
35 //print Dumper($lt);
36 //print "<br>";
37 //return $lt->getlt($key, $tpl);
38 //print "a" . Dumper($site);
39 return $site->localetext->getlt($key, $tpl);
40 }
41
42 // wrapper-function for convenient use of "getlink"..... are there "Alias"es in php?
43 function getlink( $key, $attribs = array() ) {
44 global $site;
45 return $site->getLink( $key, $attribs );
46 }
47
48 // wrapper-function for getting the logger instance
49 function logp($string, $level) {
50 global $site;
51 //return;
52 $site->log($string, $level);
53 }
54
55 function dprint($message, $level = E_USER_NOTICE) {
56 //debug_append($message, $level);
57 trigger_error($message, $level);
58 }
59
60 function _t($identifier, $data = array()) {
61 global $site;
62 return $site->template->get("lt:$identifier", $data);
63 }
64
65 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed