From: Leandro Lucarella Date: Mon, 30 Jun 2003 07:25:58 +0000 (+0000) Subject: Moved back to a clean bife directory. Each subdirectory has a module X-Git-Tag: svn_import~30 X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/commitdiff_plain/30351babf7970dc19b405ab14cb36f0fc45962de Moved back to a clean bife directory. Each subdirectory has a module (including 'core' module and 'hit'). --- diff --git a/album/BIFE/Album/Pager.php b/album/BIFE/Album/Pager.php new file mode 100644 index 0000000..7a37116 --- /dev/null +++ b/album/BIFE/Album/Pager.php @@ -0,0 +1,89 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Widget.php'; +// ~X2C + +// +X2C Class 151 :Pager +/** + * Album pager to an easier navigation when viewing photos. + * + * @access public + */ +class BIFE_Album_Pager extends BIFE_Widget { + // ~X2C + + // +X2C Operation 153 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Album_Pager($attrs) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + + // +X2C Operation 154 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($attrs) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + + // +X2C Operation 155 + /** + * Renders the widget using a template returning a string with the results. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + +} // -X2C Class :Pager + +?> \ No newline at end of file diff --git a/album/BIFE/Album/Photo.php b/album/BIFE/Album/Photo.php new file mode 100644 index 0000000..c99ef29 --- /dev/null +++ b/album/BIFE/Album/Photo.php @@ -0,0 +1,62 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Widget.php'; +// ~X2C + +// +X2C Class 103 :Photo +/** + * Photo widget. + * + * @access public + */ +class BIFE_Album_Photo extends BIFE_Widget { + // ~X2C + + // +X2C Operation 108 + /** + * Renders the widget using a template returning a string with the results. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + $attrs['FILE'] = @$this->attrs['FILE'] ? $this->attrs['FILE'] : @$_REQUEST['BIFE_ALBUM_FILE']; + $attrs['DESC'] = @$this->attrs['DESC'] ? $this->attrs['DESC'] : basename($attrs['FILE']); + $out = $template->parse('photo', $attrs, '', 'album'); + return $out; + } + // -X2C + +} // -X2C Class :Photo + +?> \ No newline at end of file diff --git a/album/BIFE/Album/Thumbs.php b/album/BIFE/Album/Thumbs.php new file mode 100644 index 0000000..50adcd7 --- /dev/null +++ b/album/BIFE/Album/Thumbs.php @@ -0,0 +1,271 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Widget.php'; +// ~X2C + +require_once 'BIFE/Link.php'; +require_once 'Image/Transform.php'; + +// +X2C Class 20 :Thumbs +/** + * Photo album widget. [TODO: Make a better explanation] + * + * @access public + */ +class BIFE_Album_Thumbs extends BIFE_Widget { + // ~X2C + + // +X2C Operation 22 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Album_Thumbs($attrs) // ~X2C + { + $this->__construct($attrs); + } + // -X2C + + // +X2C Operation 57 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($attrs) // ~X2C + { + // TODO - get defaults from an INI file. + $defaults = array( + 'DIR' => '.', + 'RECURSIVE' => true, + 'THUMBSFORMAT' => 'jpeg', + 'THUMBSDIR' => '.thumbs', + 'EXTENSIONS' => 'png,jpg,jpeg,PNG,JPG,JPEG', + 'MAXROWS' => 0, + 'COLUMNS' => 4, + 'LINK-BIFE' => 'photo.xbf', + 'LINK-URL' => '', + ); + $attrs = array_merge($defaults, $attrs); + $attrs['EXTENSIONS'] = explode(',', $attrs['EXTENSIONS']); + parent::__construct($attrs); + } + // -X2C + + // +X2C Operation 23 + /** + * Renders the widget. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + $template->pushGroup('album'); + $list = $this->getList(); + $tot = count($list); + $rows = ceil($tot / $this->attrs['COLUMNS']); + for ($row = 0; $row < $rows; $row++) { + for ($col = 0; $col < $this->attrs['COLUMNS']; $col++) { + $cur = $row * $this->attrs['COLUMNS'] + $col; + if ($photo = @$list[$cur]) { + if (is_null($photo['THUMB'])) { + $photo['THUMB'] = $this->makeThumb($photo['FILE']); + } + $photo['URL'] = BIFE_Link::getURL( + array( + 'BIFE' => $this->attrs['LINK-BIFE'], + 'URL' => $this->attrs['LINK-URL'], + 'DATA-BIFE_ALBUM_FILE' => $photo['FILE'], + ) + ); + $cell = $template->parse('item', $photo); + } else { + $cell = $template->parse('empty'); + } + $template->parseBuffered('cell', 'CONTENTS', $cell); + } + $template->parseBuffered('row', 'CONTENTS', + $template->popBuffer('cell')); + } + $out = $template->parse('body', array( + 'DESC' => $this->getDescription(), + 'CONTENTS' => $template->popBuffer('row'))); + $template->popGroup(); + return $out; + } + // -X2C + + // +X2C Operation 95 + /** + * Gets a list of photos with their descriptions and thumbnails. +Returns an array of associative arrays with this keys: + + * + * @return array + * @access protected + */ + function getList() // ~X2C + { + $root = $this->attrs['DIR']; + $exts = $this->attrs['EXTENSIONS']; + $format = $this->attrs['THUMBSFORMAT']; + $return = array(); + $d = dir($root); + if ($d) { + while (($file = $d->read()) !== false) { + list($path, $name, $ext) = $this->splitFilename("$root/$file"); + if (is_readable("$root/$file") and in_array($ext, $exts)) { + $thumb = $this->getThumbFilename("$root/$file"); + $return[] = array( + 'FILE' => "$root/$file", + 'DESC' => $name, + 'THUMB' => is_readable($thumb) ? $thumb : null, + ); + } + } + $d->close(); + } + return $return; + } + // -X2C + + // +X2C Operation 97 + /** + * Creates an image thumbnail, returning his filename. + * + * @param string $filename Filename of the image to create the thumb. + * @param int $size Maximum thumbnail size. + * + * @return string + * @access protected + */ + function makeThumb($filename, $size = 100) // ~X2C + { + $format = $this->attrs['THUMBSFORMAT']; + $thumb = $this->getThumbFilename($filename); + list($path, $name, $ext) = $this->splitFilename($thumb); + $img =& Image_Transform::factory('GD'); + $img->load($filename); + // If image is larger than the maximum size, we resize it. + if ($img->img_x > $size or $img->img_y > $size ) { + if (!@is_dir($path) and !@mkdir($path)) { + return null; + } + if (PEAR::isError($img)) { + return null; + } + if (!$img->scale($size)) { + return null; + } + } + $img->save("$path/$name.$format", $format); + $img->free(); + + return $thumb; + } + // -X2C + + // +X2C Operation 98 + /** + * Returns the filename of an image thumb. + * + * @param string $filename Filename of the image to get the thumb name. + * + * @return string + * @access protected + */ + function getThumbFilename($filename) // ~X2C + { + $root = $this->attrs['DIR']; + $format = $this->attrs['THUMBSFORMAT']; + $thumbsdir = $this->attrs['THUMBSDIR']; + + list($path, $name, $ext) = $this->splitFilename($filename); + + return "$root/$thumbsdir/$name.$format"; + } + // -X2C + + // +X2C Operation 102 + /** + * Returns the description of the album. + * + * @return string + * @access protected + */ + function getDescription() // ~X2C + { + $root = $this->attrs['DIR']; + return @join('', file($file)); + } + // -X2C + + // +X2C Operation 100 + /** + * Splits a filename returning an array with the path, name and extension. + * + * @param string $filename Filename to split. + * + * @return array + * @access public + * @static + */ + function splitFilename($filename) // ~X2C + { + $path = explode('/', $filename); + $file = array_pop($path); + $ext = ''; + if (strstr($file, '.')) { + preg_match('|([^/]+?)(\.([^\.]*))?$|', $file, $m); + $file = @$m[1] . ((@$m[2] == '.' ) ? '.' : ''); + $ext = @$m[3]; + } + $dir = count($path) ? join('/', $path) : ''; + return array($dir, $file, $ext); + } + // -X2C + +} // -X2C Class :Thumbs + +?> diff --git a/album/Doxyfile b/album/Doxyfile new file mode 100644 index 0000000..116883f --- /dev/null +++ b/album/Doxyfile @@ -0,0 +1,227 @@ +# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +# Doxyfile 1.3-rc3 +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "BIFE Album" +PROJECT_NUMBER = 0.11 +OUTPUT_DIRECTORY = api +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = doxygen.warn +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +FILE_PATTERNS = *.php +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 200 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = YES +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_SCHEMA = +XML_DTD = +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = search.cgi +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = /usr/local/bin/ +EXT_DOC_PATHS = diff --git a/album/Makefile b/album/Makefile new file mode 100644 index 0000000..6234a59 --- /dev/null +++ b/album/Makefile @@ -0,0 +1,41 @@ +# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +MODULE=album + +PHP_FILES=$(subst ./,,$(shell find BIFE -name '*.php')) +EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*')) +DOC_FILES= + +package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES) + pear package + +code: $(MODULE).xmi xmi2code.config + @xmi2code + +code-clean: + @find -name '*.bak' | xargs rm -vf diff --git a/album/album.xmi b/album/album.xmi new file mode 100644 index 0000000..c23cb92 --- /dev/null +++ b/album/album.xmi @@ -0,0 +1,127 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/album/examples/index.php b/album/examples/index.php new file mode 100644 index 0000000..3b9f86d --- /dev/null +++ b/album/examples/index.php @@ -0,0 +1,47 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +$tmp = ini_get('include_path'); +ini_set('include_path', "..:$tmp"); +unset($tmp); +umask('002'); + +require_once 'HTML/Template/HIT.php'; +require_once 'BIFE/Parser.php'; +require_once 'BIFE/Translate.php'; + +$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf'; + +$template =& new HTML_Template_HIT('templates'); + +$parser =& new BIFE_Parser('BIFE_Translate'); +$page =& $parser->parseFile($file); +$parser->__destruct(); +echo $page->render($template); + +?> diff --git a/album/examples/index.xbf b/album/examples/index.xbf new file mode 100644 index 0000000..4ace0c3 --- /dev/null +++ b/album/examples/index.xbf @@ -0,0 +1,7 @@ + + + Datos! +

Photo album

+ +
+
diff --git a/album/examples/photo.xbf b/album/examples/photo.xbf new file mode 100644 index 0000000..ba7f57c --- /dev/null +++ b/album/examples/photo.xbf @@ -0,0 +1,4 @@ + + + + diff --git a/album/examples/templates/album/body.tpl.html b/album/examples/templates/album/body.tpl.html new file mode 100644 index 0000000..2dd5085 --- /dev/null +++ b/album/examples/templates/album/body.tpl.html @@ -0,0 +1,8 @@ +

{DESC}

+
+ + + {CONTENTS} + +
+
diff --git a/album/examples/templates/album/cell.tpl.html b/album/examples/templates/album/cell.tpl.html new file mode 100644 index 0000000..dcbedbf --- /dev/null +++ b/album/examples/templates/album/cell.tpl.html @@ -0,0 +1,3 @@ + + {CONTENTS} + diff --git a/album/examples/templates/album/empty.tpl.html b/album/examples/templates/album/empty.tpl.html new file mode 100644 index 0000000..a735e36 --- /dev/null +++ b/album/examples/templates/album/empty.tpl.html @@ -0,0 +1 @@ +VACÍO diff --git a/album/examples/templates/album/item.tpl.html b/album/examples/templates/album/item.tpl.html new file mode 100644 index 0000000..c41be64 --- /dev/null +++ b/album/examples/templates/album/item.tpl.html @@ -0,0 +1 @@ +{DESC} diff --git a/album/examples/templates/album/photo.tpl.html b/album/examples/templates/album/photo.tpl.html new file mode 100644 index 0000000..901274f --- /dev/null +++ b/album/examples/templates/album/photo.tpl.html @@ -0,0 +1,2 @@ +

{DESC}

+{DESC} diff --git a/album/examples/templates/album/row.tpl.html b/album/examples/templates/album/row.tpl.html new file mode 100644 index 0000000..6f623b2 --- /dev/null +++ b/album/examples/templates/album/row.tpl.html @@ -0,0 +1,3 @@ + + {CONTENTS} + diff --git a/album/examples/templates/bife_link.tpl.html b/album/examples/templates/bife_link.tpl.html new file mode 100644 index 0000000..873ba85 --- /dev/null +++ b/album/examples/templates/bife_link.tpl.html @@ -0,0 +1 @@ +{CONTENTS} diff --git a/album/examples/templates/bife_page.tpl.html b/album/examples/templates/bife_page.tpl.html new file mode 100644 index 0000000..ea824f4 --- /dev/null +++ b/album/examples/templates/bife_page.tpl.html @@ -0,0 +1,9 @@ + + + {TITLE} + + +

{TITLE}

+ {CONTENTS} + + diff --git a/album/examples/templates/bife_title.tpl.html b/album/examples/templates/bife_title.tpl.html new file mode 100644 index 0000000..3590da3 --- /dev/null +++ b/album/examples/templates/bife_title.tpl.html @@ -0,0 +1 @@ +

{CONTENTS}

diff --git a/album/package.xml b/album/package.xml new file mode 100644 index 0000000..62d4002 --- /dev/null +++ b/album/package.xml @@ -0,0 +1,48 @@ + + + + BIFE Album + BIFE Album Widget Set + TBD. + + GPL + + + luca + Leandro Lucarella + luca@lugmen.org.ar + lead + + + + + 0.11 + 2003-06-29 + alpha + Check http://www.llucax.hn.org/desarrollo/bife/ for details. + + + BIFE/Album/Thumbs.php + BIFE/Album/Photo.php + BIFE/Album/Pager.php + + examples/index.php + examples/index.xbf + examples/photo.xbf + examples/templates/album/item.tpl.html + examples/templates/album/empty.tpl.html + examples/templates/album/cell.tpl.html + examples/templates/album/row.tpl.html + examples/templates/album/photo.tpl.html + examples/templates/album/body.tpl.html + examples/templates/bife_page.tpl.html + examples/templates/bife_link.tpl.html + examples/templates/bife_title.tpl.html + + + + 4.2.3 + HTML_Template_HIT + BIFE + + diff --git a/album/xmi2code.config b/album/xmi2code.config new file mode 100644 index 0000000..b338983 --- /dev/null +++ b/album/xmi2code.config @@ -0,0 +1,47 @@ + + + + + diff --git a/album/xmi2code.tpl.php b/album/xmi2code.tpl.php new file mode 100644 index 0000000..ce8775b --- /dev/null +++ b/album/xmi2code.tpl.php @@ -0,0 +1,27 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// diff --git a/core/BIFE/Container.php b/core/BIFE/Container.php new file mode 100644 index 0000000..2ddc24d --- /dev/null +++ b/core/BIFE/Container.php @@ -0,0 +1,97 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Widget.php'; +// ~X2C + +// +X2C Class 5 :Container +/** + * Base container widget class. + * + * @access public + * @abstract + */ +class BIFE_Container extends BIFE_Widget { + /** + * Widget contents. + * + * @var array $contents + * @access public + */ + var $contents = array(); + + // ~X2C + + // +X2C Operation 6 + /** + * Adds contents to the container. + * + * @param mixed &$contents Contents to add to the container. + * + * @return void + * @access public + */ + function addContents(&$contents) // ~X2C + { + if (is_object($contents)) { + $this->contents[] =& $contents; + } else { + $this->contents[] = $contents; + } + } + // -X2C + + // +X2C Operation 59 + /** + * Renders the widget using a template returning a string with the results. + * + * @param HTML_Template_HIT &$template Template object to render the widget. + * + * @return string + * @access public + */ + function renderContents(&$template) // ~X2C + { + $c = count($this->contents); + $o = ''; + for ($i = 0; $i < $c; $i++) { + if (is_object($this->contents[$i])) { + $o .= $this->contents[$i]->render($template); + } else { + $o .= $this->contents[$i]; + } + } + return $o; + } + // -X2C + + +} // -X2C Class :Container + +?> \ No newline at end of file diff --git a/core/BIFE/Fallback.php b/core/BIFE/Fallback.php new file mode 100644 index 0000000..04a11b1 --- /dev/null +++ b/core/BIFE/Fallback.php @@ -0,0 +1,86 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Container.php'; +// ~X2C + +// +X2C Class 61 :Fallback +/** + * Fallback widget to use when no specific widget is implemented. + * + * @access public + * @abstract + */ +class BIFE_Fallback extends BIFE_Container { + /** + * Name of the widget. + * + * @var string $name + * @access private + */ + var $name = ''; + + // ~X2C + + // +X2C Operation 62 + /** + * Constructor. + * + * @param string $name Name of the widget to draw. + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Fallback($name, $attrs) // ~X2C + { + $this->__construct($name, $attrs); + } + // -X2C + + // +X2C Operation 63 + /** + * Constructor. + * + * @param string $name Name of the widget. + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($name, $attrs) // ~X2C + { + parent::__construct($attrs); + $this->name = strtolower(strtr($name, ':', '_')); + } + // -X2C + +} // -X2C Class :Fallback + +?> \ No newline at end of file diff --git a/core/BIFE/Link.php b/core/BIFE/Link.php new file mode 100644 index 0000000..c8900d6 --- /dev/null +++ b/core/BIFE/Link.php @@ -0,0 +1,125 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Container.php'; +// ~X2C + +// +X2C Class 110 :Link +/** + * Link to another page. + * + * @access public + */ +class BIFE_Link extends BIFE_Container { + // ~X2C + + // +X2C Operation 111 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Link($attrs) // ~X2C + { + $this->__construct($attrs); + } + // -X2C + + // +X2C Operation 112 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($attrs) // ~X2C + { + $link_attrs['URL'] = $this->getURL($attrs); + $link_attrs['DESC'] = @$attrs['DESC']; + $link_attrs['TARGET'] = @$attrs['TARGET']; + parent::__construct($link_attrs); + } + // -X2C + + // +X2C Operation 142 + /** + * Gets a URL string based on Link attributes. + * + * @param array $attrs Link attributes. + * + * @return string + * @access public + */ + function getURL($attrs) // ~X2C + { + $url = @$attrs['URL']; + unset($attrs['URL']); + if (isset($attrs['BIFE'])) { + $attrs['DATA-BIFE'] = $attrs['BIFE']; + unset($attrs['BIFE']); + } + $query = array(); + foreach($attrs as $name => $value) { + if (substr($name, 0, 5) === 'DATA-') { + if ($name = substr($name, 5)) { + $query[] = urlencode($name) . '=' . urlencode($value); + } + } + } + if ($query) { + $url .= '?' . join('&', $query); + } + return $url; + } + // -X2C + + // +X2C Operation 157 + /** + * Renders the widget. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + $this->attrs['CONTENTS'] = $this->renderContents($template); + return $template->parse('bife_link', $this->attrs, '', ''); + } + // -X2C + +} // -X2C Class :Link + +?> \ No newline at end of file diff --git a/core/BIFE/Parser.php b/core/BIFE/Parser.php new file mode 100644 index 0000000..76a5845 --- /dev/null +++ b/core/BIFE/Parser.php @@ -0,0 +1,305 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C Class 25 :Parser +/** + * This is the XML Parser. + * + * @access public + */ +class BIFE_Parser { + /** + * Top level widget. + * + * @var BIFE_Widget $root + * @access protected + */ + var $root = null; + + /** + * XML parser resource. + * + * @var resource $parser + * @access protected + */ + var $parser = null; + + /** + * BIFE widgets stack. + * + * @var array $stack + * @access protected + */ + var $stack = array(); + + /** + * Fallback class to use in case that a widget class is not found. + * + * @var string $fallback + * @access protected + */ + var $fallback = ''; + + /** + * XML cache directory. Empty if no cahching must be done (for current dir use '.'). + * + * @var string $cache + * @access protected + */ + var $cache = '/tmp'; + + /** + * Files required by the parsed XML file. + * + * @var array $requires + * @access protected + */ + var $requires = array(); + + // ~X2C + + // +X2C Operation 30 + /** + * Constructor. + * + * @param string $fallback Fallback class name (none if empty). + * @param string $cache XML cache directory. Empty is no caching will be done. + * + * @return void + * @access public + */ + function BIFE_Parser($fallback = '', $cache = '/tmp') // ~X2C + { + $this->__construct($fallback, $cache); + } + // -X2C + + // +X2C Operation 31 + /** + * Constructor. + * + * @param string $fallback Fallback class name (none if empty). + * @param string $cache XML cache directory. Empty is no caching will be done. + * + * @return void + * @access public + */ + function __construct($fallback = '', $cache = '/tmp') // ~X2C + { + $this->parser = xml_parser_create(); + $this->fallback = $fallback; + $this->cache = $cache; + xml_set_object($this->parser, $this); + xml_set_element_handler($this->parser, 'startElement', 'endElement'); + xml_set_character_data_handler($this->parser, 'characterData'); + } + // -X2C + + // +X2C Operation 32 + /** + * Destructor. + * + * @return void + * @access public + */ + function __destruct() // ~X2C + { + xml_parser_free($this->parser); + } + // -X2C + + // +X2C Operation 33 + /** + * XML parser start of element handler. + * + * @param resource $parser XML parser resource. + * @param string $name XML tag name. + * @param array $attrs XML tag attributes. + * + * @return void + * @access public + */ + function startElement($parser, $name, $attrs) // ~X2C + { + $class = 'bife_' . strtolower(strtr($name, ':', '_')); + if (!class_exists($class)) { + $inc = 'BIFE/' . + strtr(ucwords(strtr(strtolower($name), ':', ' ')), ' ', '/') . + '.php'; + if (@include_once $inc) { + $this->includes[] = $inc; + } + } + if (class_exists($class)) { + $obj =& new $class($attrs); + // XXX - Does this check make sense? + if (!is_a($obj, 'bife_widget')) { + trigger_error("Class '$class' is not a BIFE_Widget.", E_USER_WARNING); + } + $this->stack[] =& $obj; + } else { + if ($this->fallback) { + $class = $this->fallback; + $obj =& new $class($name, $attrs); + if (!is_a($obj, 'bife_fallback')) { + trigger_error("Class '$class' is not a BIFE_Fallback.", E_USER_WARNING); + } + $this->stack[] =& $obj; + } else { + trigger_error("Class not found '$class'.", E_USER_ERROR); + } + } + } + // -X2C + + // +X2C Operation 34 + /** + * XML parser end of element handler. + * + * @param resource $parser XML parser resource. + * @param string $name XML tag name. + * + * @return void + * @access public + */ + function endElement($parser, $name) // ~X2C + { + end($this->stack); + $current =& $this->stack[key($this->stack)]; + array_pop($this->stack); + end($this->stack); + $parent =& $this->stack[key($this->stack)]; + if ($parent) { + $parent->addContents($current); + } else { + $this->root =& $current; + } + } + // -X2C + + // +X2C Operation 35 + /** + * XML parser character data handler. + * + * @param resource $parser XML parser resource. + * @param string $data XML character data. + * + * @return void + * @access public + */ + function characterData($parser, $data) // ~X2C + { + end($this->stack); + $current =& $this->stack[key($this->stack)]; + $current->addContents($data); + } + // -X2C + + // +X2C Operation 36 + /** + * Parse a string with XML data. + * + * @param string $data XML string to parse. + * @param bool $final Indicates if is the last string to parse. + * + * @return void + * @access public + */ + function parse($data, $final = true) // ~X2C + { + if (!xml_parse($this->parser, $data, $final)) { + trigger_error( + sprintf('XML error: %s at line %d.', + xml_error_string(xml_get_error_code($this->parser)), + xml_get_current_line_number($this->parser) + ), + E_USER_WARNING + ); + } + } + // -X2C + + // +X2C Operation 37 + /** + * Parse a XML file with a complete and valid XML document. + * + * @param string $filename Filename to parse. + * + * @return &BIFE_Widget + * @access public + */ + function &parseFile($filename) // ~X2C + { + if ($this->cache) { + $cache = $this->cache . '/' . 'bife_parser_cache' . strtr(realpath($filename), '/', '_'); + if (@filemtime($cache) > @filemtime($filename)) { + $file = file($cache); + foreach(unserialize(trim(array_shift($file))) as $required) { + include_once $required; + } + return unserialize(join('', $file)); + } + } + if ($fp = @fopen($filename, 'r')) { + while ($data = fread($fp, 4096)) { + $this->parse($data, feof($fp)); + } + } else { + trigger_error("Could not open BIFE XML input file '$filename'.", + E_USER_WARNING); + } + fclose($fp); + if ($this->cache) { + $fp = fopen($cache, 'w'); + fputs($fp, serialize($this->includes) . "\n"); + fputs($fp, serialize($this->root)); + fclose($fp); + } + return $this->root; + } + // -X2C + + // +X2C Operation 74 + /** + * Parse a XML string with a complete and valid XML document. + * + * @param string $data XML data to parse. + * + * @return &BIFE_Widget + * @access public + */ + function &parseString($data) // ~X2C + { + $this->parse($data, true); + return $this->root; + } + // -X2C + +} // -X2C Class :Parser + +?> \ No newline at end of file diff --git a/core/BIFE/Translate.php b/core/BIFE/Translate.php new file mode 100644 index 0000000..98dc263 --- /dev/null +++ b/core/BIFE/Translate.php @@ -0,0 +1,76 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Fallback.php'; +// ~X2C + +// +X2C Class 7 :Translate +/** + * This is a generic and simple (but very usefull) BIFE_Fallback implementation. Translate widgets using a template with it's name, prepended with 'bife_'. If not template is found, it copy the XML to the output. + * + * @access public + */ +class BIFE_Translate extends BIFE_Fallback { + // ~X2C + + // +X2C Operation 12 + /** + * Renders the widget. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + $this->attrs['CONTENTS'] = $this->renderContents($template); + $name = "bife_{$this->name}"; + if ($template->exists($name, '')) { + $out = $template->parse($name, $this->attrs, '', ''); + } else { + $name = $this->name; + $out = "<$name"; + foreach ($this->attrs as $attr => $val) { + $out .= sprintf(' %s="%s"', $attr, $val); + } + $contents = $this->renderContents($template); + if ($contents !== '') { + $out .= ">$contents"; + } else { + $out .= "/>"; + } + } + return $out; + } + // -X2C + +} // -X2C Class :Translate + +?> \ No newline at end of file diff --git a/core/BIFE/Widget.php b/core/BIFE/Widget.php new file mode 100644 index 0000000..5e0ab11 --- /dev/null +++ b/core/BIFE/Widget.php @@ -0,0 +1,96 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C Class 3 :Widget +/** + * Base widget class. + * + * @access public + * @abstract + */ +class BIFE_Widget { + /** + * Attribute list. + * + * @var array $attrs + * @access protected + */ + var $attrs = array(); + + // ~X2C + + // +X2C Operation 126 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Widget($attrs) // ~X2C + { + $this->__construct($attrs); + } + // -X2C + + // +X2C Operation 127 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($attrs) // ~X2C + { + $this->attrs = $attrs; + } + // -X2C + + // +X2C Operation 4 + /** + * Renders the widget using a template returning a string with the results. + * + * @param HTML_Template_HIT &$template Template object to render the widget. + * + * @return string + * @access public + * @abstract + */ + function render(&$template) // ~X2C + { + trigger_error('Method not implemented '.get_class($this). + '::render().', E_USER_ERROR); + } + // -X2C + +} // -X2C Class :Widget + +?> \ No newline at end of file diff --git a/core/Doxyfile b/core/Doxyfile new file mode 100644 index 0000000..caed41f --- /dev/null +++ b/core/Doxyfile @@ -0,0 +1,227 @@ +# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +# Doxyfile 1.3-rc3 +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "BIFE - Build It FastEr" +PROJECT_NUMBER = 0.11 +OUTPUT_DIRECTORY = api +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = doxygen.warn +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +FILE_PATTERNS = *.php +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 200 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = YES +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_SCHEMA = +XML_DTD = +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = search.cgi +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = /usr/local/bin/ +EXT_DOC_PATHS = diff --git a/core/Makefile b/core/Makefile new file mode 100644 index 0000000..4bfa3e5 --- /dev/null +++ b/core/Makefile @@ -0,0 +1,65 @@ +# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +VERSION=0.11 +MODULE_FILE=BIFE.php +MODULE_NAME=Core +PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php'))) +EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*')) +DOC_FILES=README ROADMAP +X2C_TEMPLATE=xmi2code.tpl.php + +package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES) + pear package + +code: bife.xmi xmi2code.config + @xmi2code + +code-clean: + @find -name '*.bak' | xargs rm -vf + +$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE) + @( \ + ( \ + cat $(X2C_TEMPLATE) | \ + grep -v '@@date' | \ + grep -v '$$Id' | \ + egrep -v '^//$$' \ + ); \ + echo '//'; \ + echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \ + date; \ + echo '//'; \ + ( \ + cat $(PHP_FILES) | \ + grep -v require_once | \ + grep -v '?>' | \ + grep -v '' \ + ) > $(MODULE_FILE) diff --git a/core/README b/core/README new file mode 100644 index 0000000..3b21d16 --- /dev/null +++ b/core/README @@ -0,0 +1,15 @@ +$Id$ + +BIFE is a kind of framework inspired by Bif +to split a PHP application (website or whatever) into 3 layers: +XML: Content management. +PHP: Programming. +HTML: Look & Feel (it can be other type of output, not just HTML). + +The main goals of this proyect are: +- Keep XML layer really easy to use for the end user, so no need of HTML or + PHP would be needed to make a XML page. +- Speed. One of the main goals of this proyect is to be fast. Because of + this, PHP and HTML layers can have extra complications. + +A roadmap can be found in doc/ROADMAP. diff --git a/core/ROADMAP b/core/ROADMAP new file mode 100644 index 0000000..1c524cb --- /dev/null +++ b/core/ROADMAP @@ -0,0 +1,28 @@ +$Id$ + + +Version 0.11 +============ + + - Separate modules in different repository root dirs. + - Make, at least, PEAR packages for each module (and BIFE Core). + + +Version 0.12 +============ + + - Start using config file for default widgets attributes. + + +Version 0.13 +============ + + - Separate Album funtionality function from renderer (BIFE_Album). + - Use hooks libs for this. + + +Version 0.14 +============ + - Make a way to put all classes in a package together in a single file to + avoid overhead in require_once calls (to be reviewed). + diff --git a/core/bife.xmi b/core/bife.xmi new file mode 100644 index 0000000..13594f0 --- /dev/null +++ b/core/bife.xmi @@ -0,0 +1,198 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/build.xml b/core/build.xml new file mode 100644 index 0000000..5a6d0a5 --- /dev/null +++ b/core/build.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/core/HTML/Template/HIT.php b/core/core/HTML/Template/HIT.php new file mode 100644 index 0000000..2b635c9 --- /dev/null +++ b/core/core/HTML/Template/HIT.php @@ -0,0 +1,265 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C Class 130 :HIT +/** + * Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems. + * + * @access public + */ +class HTML_Template_HIT { + /** + * Root directory where template files are. + * + * @var string $root + * @access public + */ + var $root = '.'; + + /** + * If it's true, it looks for template files in PHP's include_path. + * + * @var bool $useIncludePath + * @access public + */ + var $useIncludePath = false; + + /** + * Group of templates to use (a subdirectory in root). + * + * @var string $group + * @access protected + */ + var $group = ''; + + /** + * Templates cache. + * + * @var array $cache + * @access protected + */ + var $cache = array(); + + /** + * @var array $buffer + * @access protected + */ + var $buffer = array(); + + // ~X2C + + // +X2C Operation 136 + /** + * Constructor. + * + * @param string $root Root directory where template files are. + * @param bool $useIncludePath If it's true, it looks for template files in PHP's include_path. + * @param string $group Group of templates to use (a subdirectory in root). + * + * @return void + * @access public + */ + function HTML_Template_HIT($root = '.', $useIncludePath = false, $group = '') // ~X2C + { + $this->__construct($root, $useIncludePath, $group); + } + // -X2C + + // +X2C Operation 137 + /** + * Constructor. + * + * @param int $root Root directory where template files are. + * @param false $useIncludePath If it's true, it looks for template files in PHP's include_path. + * @param string $group Group of templates to use (a subdirectory in root). + * + * @return void + * @access public + */ + function __construct($root = '.', $useIncludePath = false, $group = '') // ~X2C + { + $this->root = $root; + $this->useIncludePath = $useIncludePath; + $this->pushGroup($group); + } + // -X2C + + // +X2C Operation 138 + /** + * Parse a template returning the results. +If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val. + * + * @param string $name Name of template to parse. + * @param mixed $vars Variables to replace in the template. + * @param string $val If $vars is a string, the value to replace for $vars. + * @param mixed $group Group to use to parse this template. Null to use the current group. + * + * @return string + * @access public + */ + function parse($name, $vars = '', $val = '', $group = null) // ~X2C + { + $group = is_null($group) ? end($this->group) : $group; + if ($group) { + $file = "{$this->root}/$group/$name.tpl.html"; + } else { + $file = "{$this->root}/$name.tpl.html"; + } + if (!isset($this->cache[$file])) { + // FIXME - replace join(file()) with file_get_contents(). + $this->cache[$file] = join('', file($file, $this->useIncludePath)); + } + if ($vars) { + if (is_string($vars)) { + $vars = array($vars => $val); + } + foreach ($vars as $key => $val) { + $keys[] = '{' . $key . '}'; + $vals[] = $val; + } + return str_replace($keys, $vals, $this->cache[$file]); + } else { + return $this->cache[$file]; + } + } + // -X2C + + // +X2C Operation 144 + /** + * Parse a template buffering the results. +Parse a template appending the results to an internal buffer. If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val. + * + * @param string $name Name of template to parse. + * @param mixed $vars Variables to replace in the template. + * @param string $val If $vars is a string, the value to replace for $vars. + * + * @return void + * @access public + */ + function parseBuffered($name, $vars = '', $val = '') // ~X2C + { + @$this->buffer["{$this->group}/$name"] .= $this->parse($name, $vars, $val); + } + // -X2C + + // +X2C Operation 145 + /** + * Gets a parsed buffer. + * + * @param string $name Name of the parsed template to get. + * + * @return string + * @access public + * @static + */ + function getBuffer($name) // ~X2C + { + return @$this->buffer["{$this->group}/$name"]; + } + // -X2C + + // +X2C Operation 146 + /** + * Gets a parsed buffer and removes it. + * + * @param string $name Name of the buffer to flush. + * + * @return void + * @access public + */ + function popBuffer($name) // ~X2C + { + $return = @$this->buffer["{$this->group}/$name"]; + unset($this->buffer["{$this->group}/$name"]); + return $return; + } + // -X2C + + // +X2C Operation 139 + /** + * Sets the group to use and add it to the groups stack. + * + * @param string $group Group to use. + * + * @return void + * @access public + */ + function pushGroup($group = '') // ~X2C + { + $this->group[] = $group; + } + // -X2C + + // +X2C Operation 140 + /** + * Removes the group from the groups stack and returns to the previous used group. + * + * @return string + * @access public + */ + function popGroup() // ~X2C + { + return array_pop($this->group); + } + // -X2C + + // +X2C Operation 159 + /** + * True if the template $name exists in $group (or the current group). + * + * @param string $name Name of the template. + * @param mixed $group Template's group. If it's null it uses the current group. + * + * @return bool + * @access public + */ + function exists($name, $group = null) // ~X2C + { + $group = is_null($group) ? end($this->group) : $group; + if ($group) { + $file = "{$this->root}/$group/$name.tpl.html"; + } else { + $file = "{$this->root}/$name.tpl.html"; + } + if (!$this->useIncludePath) { + return is_readable($file); + } else { + $include_path = array_unique(preg_split('/[:;]/', ini_get('include_path'))); + foreach ($include_path as $path) { + if (is_readable("$path/$file")) { + return true; + } + } + return false; + } + } + // -X2C + +} // -X2C Class :HIT + +?> \ No newline at end of file diff --git a/core/core/Makefile b/core/core/Makefile new file mode 100644 index 0000000..ed9979c --- /dev/null +++ b/core/core/Makefile @@ -0,0 +1,62 @@ +# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +VERSION=0.10 +MODULE_FILE=BIFE.php +MODULE_NAME=Core +PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php'))) +X2C_TEMPLATE=../xmi2code.tpl.php + +all: $(MODULE_FILE) + +code: bife.xmi xmi2code.config + @xmi2code + +code-clean: + @find -name '*.bak' | xargs rm -vf + +$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE) + @( \ + ( \ + cat $(X2C_TEMPLATE) | \ + grep -v '@@date' | \ + grep -v '$$Id' | \ + egrep -v '^//$$' \ + ); \ + echo '//'; \ + echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \ + date; \ + echo '//'; \ + ( \ + cat $(PHP_FILES) | \ + grep -v require_once | \ + grep -v '?>' | \ + grep -v '' \ + ) > $(MODULE_FILE) diff --git a/core/examples/index.php b/core/examples/index.php new file mode 100644 index 0000000..3b9f86d --- /dev/null +++ b/core/examples/index.php @@ -0,0 +1,47 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +$tmp = ini_get('include_path'); +ini_set('include_path', "..:$tmp"); +unset($tmp); +umask('002'); + +require_once 'HTML/Template/HIT.php'; +require_once 'BIFE/Parser.php'; +require_once 'BIFE/Translate.php'; + +$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf'; + +$template =& new HTML_Template_HIT('templates'); + +$parser =& new BIFE_Parser('BIFE_Translate'); +$page =& $parser->parseFile($file); +$parser->__destruct(); +echo $page->render($template); + +?> diff --git a/core/examples/index.xbf b/core/examples/index.xbf new file mode 100644 index 0000000..df29c36 --- /dev/null +++ b/core/examples/index.xbf @@ -0,0 +1,9 @@ + + + BIFE is working! +

Translate Fallback is working too!

+

This is a very bad use for BIFE, because I'm writing HTML :-P

+ A little of 'real' use +

Here's a link to another BIFE file

+
+
diff --git a/core/examples/link.xbf b/core/examples/link.xbf new file mode 100644 index 0000000..1eaa4a9 --- /dev/null +++ b/core/examples/link.xbf @@ -0,0 +1,5 @@ + + + BIFE Links are working too! +

Go back.

+
diff --git a/core/examples/templates/bife_link.tpl.html b/core/examples/templates/bife_link.tpl.html new file mode 100644 index 0000000..873ba85 --- /dev/null +++ b/core/examples/templates/bife_link.tpl.html @@ -0,0 +1 @@ +{CONTENTS} diff --git a/core/examples/templates/bife_page.tpl.html b/core/examples/templates/bife_page.tpl.html new file mode 100644 index 0000000..ea824f4 --- /dev/null +++ b/core/examples/templates/bife_page.tpl.html @@ -0,0 +1,9 @@ + + + {TITLE} + + +

{TITLE}

+ {CONTENTS} + + diff --git a/core/examples/templates/bife_title.tpl.html b/core/examples/templates/bife_title.tpl.html new file mode 100644 index 0000000..3590da3 --- /dev/null +++ b/core/examples/templates/bife_title.tpl.html @@ -0,0 +1 @@ +

{CONTENTS}

diff --git a/core/package.xml b/core/package.xml new file mode 100644 index 0000000..ecaf738 --- /dev/null +++ b/core/package.xml @@ -0,0 +1,48 @@ + + + + BIFE + Build It FastEr + BIFE - Build It FastEr: +BIFE is a framwork to separate the logic, contents and looks of a PHP +application, inspired on BIF (Buil It Fast) but with speed and simplicity +in mind. One of the main goals of BIFE is to be fast. + + GPL + + + luca + Leandro Lucarella + luca@lugmen.org.ar + lead + + + + + 0.11 + 2003-06-29 + alpha + Check http://www.llucax.hn.org/desarrollo/bife/ for details. + + + BIFE/Parser.php + BIFE/Widget.php + BIFE/Container.php + BIFE/Fallback.php + BIFE/Link.php + BIFE/Translate.php + + README + ROADMAP + examples/index.php + examples/index.xbf + examples/templates/bife_page.tpl.html + examples/templates/bife_title.tpl.html + examples/templates/bife_link.tpl.html + + + + 4.2.3 + HTML_Template_HIT + + diff --git a/core/xmi2code.config b/core/xmi2code.config new file mode 100644 index 0000000..4e1a6cd --- /dev/null +++ b/core/xmi2code.config @@ -0,0 +1,47 @@ + + + + + diff --git a/core/xmi2code.tpl.php b/core/xmi2code.tpl.php new file mode 100644 index 0000000..ce8775b --- /dev/null +++ b/core/xmi2code.tpl.php @@ -0,0 +1,27 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// diff --git a/hit/Doxyfile b/hit/Doxyfile new file mode 100644 index 0000000..a7a8149 --- /dev/null +++ b/hit/Doxyfile @@ -0,0 +1,227 @@ +# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +# Doxyfile 1.3-rc3 +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "HIT - Hook vs IT Template Engine" +PROJECT_NUMBER = 1.0.0beta +OUTPUT_DIRECTORY = api +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = doxygen.warn +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +FILE_PATTERNS = *.php +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 200 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = YES +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_SCHEMA = +XML_DTD = +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = search.cgi +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = /usr/local/bin/ +EXT_DOC_PATHS = diff --git a/hit/HTML/Template/HIT.php b/hit/HTML/Template/HIT.php new file mode 100644 index 0000000..59fbf0b --- /dev/null +++ b/hit/HTML/Template/HIT.php @@ -0,0 +1,264 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C Class 130 :HIT +/** + * Hooks vs. IT (HIT) is a simple template implementation, based on hooks and IT template systems. + * + * @access public + */ +class HTML_Template_HIT { + /** + * Root directory where template files are. + * + * @var string $root + * @access public + */ + var $root = '.'; + + /** + * If it's true, it looks for template files in PHP's include_path. + * + * @var bool $useIncludePath + * @access public + */ + var $useIncludePath = false; + + /** + * Group of templates to use (a subdirectory in root). + * + * @var string $group + * @access protected + */ + var $group = ''; + + /** + * Templates cache. + * + * @var array $cache + * @access protected + */ + var $cache = array(); + + /** + * @var array $buffer + * @access protected + */ + var $buffer = array(); + + // ~X2C + + // +X2C Operation 136 + /** + * Constructor. + * + * @param string $root Root directory where template files are. + * @param bool $useIncludePath If it's true, it looks for template files in PHP's include_path. + * @param string $group Group of templates to use (a subdirectory in root). + * + * @return void + * @access public + */ + function HTML_Template_HIT($root = '.', $useIncludePath = false, $group = '') // ~X2C + { + $this->__construct($root, $useIncludePath, $group); + } + // -X2C + + // +X2C Operation 137 + /** + * Constructor. + * + * @param int $root Root directory where template files are. + * @param false $useIncludePath If it's true, it looks for template files in PHP's include_path. + * @param string $group Group of templates to use (a subdirectory in root). + * + * @return void + * @access public + */ + function __construct($root = '.', $useIncludePath = false, $group = '') // ~X2C + { + $this->root = $root; + $this->useIncludePath = $useIncludePath; + $this->pushGroup($group); + } + // -X2C + + // +X2C Operation 138 + /** + * Parse a template returning the results. +If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val. + * + * @param string $name Name of template to parse. + * @param mixed $vars Variables to replace in the template. + * @param string $val If $vars is a string, the value to replace for $vars. + * @param mixed $group Group to use to parse this template. Null to use the current group. + * + * @return string + * @access public + */ + function parse($name, $vars = '', $val = '', $group = null) // ~X2C + { + $group = is_null($group) ? end($this->group) : $group; + if ($group) { + $file = "{$this->root}/$group/$name.tpl.html"; + } else { + $file = "{$this->root}/$name.tpl.html"; + } + if (!isset($this->cache[$file])) { + // FIXME - replace join(file()) with file_get_contents(). + $this->cache[$file] = join('', file($file, $this->useIncludePath)); + } + if ($vars) { + if (is_string($vars)) { + $vars = array($vars => $val); + } + foreach ($vars as $key => $val) { + $keys[] = '{' . $key . '}'; + $vals[] = $val; + } + return str_replace($keys, $vals, $this->cache[$file]); + } else { + return $this->cache[$file]; + } + } + // -X2C + + // +X2C Operation 144 + /** + * Parse a template buffering the results. +Parse a template appending the results to an internal buffer. If $vars is an array, the {[keys]} are replaced with [values] ($val is ignored). If is a string, {$vars} is replaced with $val. + * + * @param string $name Name of template to parse. + * @param mixed $vars Variables to replace in the template. + * @param string $val If $vars is a string, the value to replace for $vars. + * + * @return void + * @access public + */ + function parseBuffered($name, $vars = '', $val = '') // ~X2C + { + @$this->buffer["{$this->group}/$name"] .= $this->parse($name, $vars, $val); + } + // -X2C + + // +X2C Operation 145 + /** + * Gets a parsed buffer. + * + * @param string $name Name of the parsed template to get. + * + * @return string + * @access public + */ + function getBuffer($name) // ~X2C + { + return @$this->buffer["{$this->group}/$name"]; + } + // -X2C + + // +X2C Operation 146 + /** + * Gets a parsed buffer and removes it. + * + * @param string $name Name of the buffer to flush. + * + * @return void + * @access public + */ + function popBuffer($name) // ~X2C + { + $return = @$this->buffer["{$this->group}/$name"]; + unset($this->buffer["{$this->group}/$name"]); + return $return; + } + // -X2C + + // +X2C Operation 139 + /** + * Sets the group to use and add it to the groups stack. + * + * @param string $group Group to use. + * + * @return void + * @access public + */ + function pushGroup($group = '') // ~X2C + { + $this->group[] = $group; + } + // -X2C + + // +X2C Operation 140 + /** + * Removes the group from the groups stack and returns to the previous used group. + * + * @return string + * @access public + */ + function popGroup() // ~X2C + { + return array_pop($this->group); + } + // -X2C + + // +X2C Operation 159 + /** + * True if the template $name exists in $group (or the current group). + * + * @param string $name Name of the template. + * @param mixed $group Template's group. If it's null it uses the current group. + * + * @return bool + * @access public + */ + function exists($name, $group = null) // ~X2C + { + $group = is_null($group) ? end($this->group) : $group; + if ($group) { + $file = "{$this->root}/$group/$name.tpl.html"; + } else { + $file = "{$this->root}/$name.tpl.html"; + } + if (!$this->useIncludePath) { + return is_readable($file); + } else { + $include_path = array_unique(preg_split('/[:;]/', ini_get('include_path'))); + foreach ($include_path as $path) { + if (is_readable("$path/$file")) { + return true; + } + } + return false; + } + } + // -X2C + +} // -X2C Class :HIT + +?> \ No newline at end of file diff --git a/hit/Makefile b/hit/Makefile new file mode 100644 index 0000000..16d4cab --- /dev/null +++ b/hit/Makefile @@ -0,0 +1,41 @@ +# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +MODULE=hit + +PHP_FILES=HTML/Template/HIT.php +EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*')) +DOC_FILES= + +package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES) + pear package + +code: $(MODULE).xmi xmi2code.config + @xmi2code + +code-clean: + @find -name '*.bak' | xargs rm -vf diff --git a/hit/examples/hit.php b/hit/examples/hit.php new file mode 100644 index 0000000..9040f3b --- /dev/null +++ b/hit/examples/hit.php @@ -0,0 +1,54 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// This is a simple test and example of HTML_Template_HIT + +$tmp = ini_get('include_path'); +ini_set('include_path', "..:$tmp"); +unset($tmp); +umask('002'); + +require_once 'HTML/Template/HIT.php'; + +$hit =& new HTML_Template_HIT('hooks'); + +for ($i = 0; $i < 20; $i++) { + for ($j = 0; $j < 20; $j++) { + $hit->parseBuffered('cell', 'CELL', "$i,$j"); + } + $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell')); +} +echo $hit->parse( + 'body', + array( + 'ROWS' => $hit->popBuffer('row'), + 'TITLE' => 'HOLA MUNDO!!!', + ) +); + +?> diff --git a/hit/examples/hooks/body.tpl.html b/hit/examples/hooks/body.tpl.html new file mode 100644 index 0000000..2481bfa --- /dev/null +++ b/hit/examples/hooks/body.tpl.html @@ -0,0 +1,10 @@ + + + {TITLE} + + + + {ROWS} +
+ + diff --git a/hit/examples/hooks/cell.tpl.html b/hit/examples/hooks/cell.tpl.html new file mode 100644 index 0000000..d4889a9 --- /dev/null +++ b/hit/examples/hooks/cell.tpl.html @@ -0,0 +1 @@ +{CELL} diff --git a/hit/examples/hooks/row.tpl.html b/hit/examples/hooks/row.tpl.html new file mode 100644 index 0000000..2889643 --- /dev/null +++ b/hit/examples/hooks/row.tpl.html @@ -0,0 +1 @@ +{ROW} diff --git a/hit/hit.xmi b/hit/hit.xmi new file mode 100644 index 0000000..4e84cc7 --- /dev/null +++ b/hit/hit.xmi @@ -0,0 +1,97 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hit/package.xml b/hit/package.xml new file mode 100644 index 0000000..49b1c07 --- /dev/null +++ b/hit/package.xml @@ -0,0 +1,38 @@ + + + + HIT + Hooks vs IT Template Engine + HIT is a simple, ultra fast template engine. It's based on +a personal experiment called Hooks and IT Templates. It doesn't support blocks +like IT so every chunk must be in a separated file if you want to iterate it. + + GPL + + + luca + Leandro Lucarella + luca@lugmen.org.ar + lead + + + + + 1.0.0beta + 2003-06-30 + beta + Check http://www.llucax.hn.org/desarrollo/bife/ for details. + + + HTML/Template/HIT.php + + examples/hit.php + examples/hooks/body.tpl.html + examples/hooks/cell.tpl.html + examples/hooks/row.tpl.html + + + + 4.2.3 + + diff --git a/hit/xmi2code.config b/hit/xmi2code.config new file mode 100644 index 0000000..99e1ed6 --- /dev/null +++ b/hit/xmi2code.config @@ -0,0 +1,47 @@ + + + + + diff --git a/hit/xmi2code.tpl.php b/hit/xmi2code.tpl.php new file mode 100644 index 0000000..ce8775b --- /dev/null +++ b/hit/xmi2code.tpl.php @@ -0,0 +1,27 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// diff --git a/menu/BIFE/Menu/Menu.php b/menu/BIFE/Menu/Menu.php new file mode 100644 index 0000000..09afd9b --- /dev/null +++ b/menu/BIFE/Menu/Menu.php @@ -0,0 +1,89 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +// + +// +X2C includes +require_once 'BIFE/Widget.php'; +// ~X2C + +// +X2C Class 115 :Menu +/** + * Dynamic Menu. + * + * @access public + */ +class BIFE_Menu_Menu extends BIFE_Widget { + // ~X2C + + // +X2C Operation 117 + /** + * Renders the widget using a template returning a string with the results. + * + * @param HTML_Template_HIT &$template Template to use to render the widget. + * + * @return string + * @access public + */ + function render(&$template) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + + // +X2C Operation 121 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function BIFE_Menu_Menu($attrs) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + + // +X2C Operation 122 + /** + * Constructor. + * + * @param array $attrs Attributes. + * + * @return void + * @access public + */ + function __construct($attrs) // ~X2C + { + trigger_error('Not implemented!', E_USER_WARNING); + } + // -X2C + +} // -X2C Class :Menu + +?> \ No newline at end of file diff --git a/menu/Doxyfile b/menu/Doxyfile new file mode 100644 index 0000000..850e963 --- /dev/null +++ b/menu/Doxyfile @@ -0,0 +1,227 @@ +# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +# Doxyfile 1.3-rc3 +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "BIFE Menu" +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = api +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = doxygen.warn +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +FILE_PATTERNS = *.php +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 200 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = YES +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_SCHEMA = +XML_DTD = +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = search.cgi +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = /usr/local/bin/ +EXT_DOC_PATHS = diff --git a/menu/Makefile b/menu/Makefile new file mode 100644 index 0000000..81a6154 --- /dev/null +++ b/menu/Makefile @@ -0,0 +1,41 @@ +# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4: +# +--------------------------------------------------------------------+ +# | BIFE - Buil It FastEr | +# +--------------------------------------------------------------------+ +# | This file is part of BIFE. | +# | | +# | BIFE is free software; you can redistribute it and/or modify it | +# | under the terms of the GNU General Public License as published by | +# | the Free Software Foundation; either version 2 of the License, or | +# | (at your option) any later version. | +# | | +# | BIFE is distributed in the hope that it will be useful, but | +# | WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +# | General Public License for more details. | +# | | +# | You should have received a copy of the GNU General Public License | +# | along with Hooks; if not, write to the Free Software Foundation, | +# | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +# +--------------------------------------------------------------------+ +# | Created: Mon May 19 00:16:56 ART 2003 | +# | Authors: Leandro Lucarella | +# +--------------------------------------------------------------------+ +# +# $Id$ +# + +MODULE=menu + +PHP_FILES=$(subst ./,,$(shell find BIFE -name '*.php')) +EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*')) +DOC_FILES= + +package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES) + pear package + +code: $(MODULE).xmi xmi2code.config + @xmi2code + +code-clean: + @find -name '*.bak' | xargs rm -vf diff --git a/menu/menu.xmi b/menu/menu.xmi new file mode 100644 index 0000000..1b77a22 --- /dev/null +++ b/menu/menu.xmi @@ -0,0 +1,64 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/menu/package.xml b/menu/package.xml new file mode 100644 index 0000000..44f539d --- /dev/null +++ b/menu/package.xml @@ -0,0 +1,35 @@ + + + + BIFE Menu + BIFE Menu Widget Set + TBD. + + GPL + + + luca + Leandro Lucarella + luca@lugmen.org.ar + lead + + + + + 0.1 + 2003-06-29 + alpha + Check http://www.llucax.hn.org/desarrollo/bife/ for details. + + + BIFE/Menu/Menu.php + + + + + + 4.2.3 + HTML_Template_HIT + BIFE + + diff --git a/menu/xmi2code.config b/menu/xmi2code.config new file mode 100644 index 0000000..8278801 --- /dev/null +++ b/menu/xmi2code.config @@ -0,0 +1,47 @@ + + + + + diff --git a/menu/xmi2code.tpl.php b/menu/xmi2code.tpl.php new file mode 100644 index 0000000..ce8775b --- /dev/null +++ b/menu/xmi2code.tpl.php @@ -0,0 +1,27 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id$ +//