1
nemilya
Respects and installation xoops over php4.0.2
  • 2003/11/11 8:49

  • nemilya

  • Just popping in

  • Posts: 2

  • Since: 2003/11/11


Hi!

At first of all I want to say that XOOPS have very intersting
architecture. Good object-oriented basic. OO-patters is good :)

I haven't seen yet so hight level of code in php-based products.

I think that any php-developer must to investigate xoops's sources.

And question.

I want to install XOOPS over php4.0.2 and have problem in Smarty:

path:
index.php
--header.php
----$xoopsTpl = new XoopsTpl();
----$bcontent =& $xoopsTpl->fetch('db:'.$btpl);
------(Smarty) fetch
------(Smarty) _process_template
------(Smarty) _fetch_template_info
------(Smarty) 'default:'
$resource_func = $this->_plugins['resource'][$resource_type][0][0];
$_source_return = $resource_func($resource_name, $template_source, $this);

where $resource_type = 'db'
but $this->_plugins is empty array.

Where is this array filled?

As I think $this->_plugins['resource']['db'] have to be function frim
file:
smarty/plugins/resource.db.php

And what mean prefix 'db' ? if $btpl is template file name from
'modules/system/templates'

Ilya

2
nemilya
Re: Respects and installation xoops over php4.0.2
  • 2003/11/13 11:54

  • nemilya

  • Just popping in

  • Posts: 2

  • Since: 2003/11/11


Hi!

I found bug (at least on my installation, xoops-2.0.5, php4.0.2, win)

At 'Smarty.class.php' there is:

// file 'Smarty.class.php' line 52
define('DIR_SEP', DIRECTORY_SEPARATOR);

but DIRECTORY_SEPARATOR isn't defined any where in code, i.e. Smarty
try do join directories by string 'DIRECTORY_SEPARATOR', i.e. _plugins
is not filled by functions from 'plugins' directory.

I solved whis problem by:
// file 'Smarty.class.php'
if (substr(PHP_OS, 0, 3) == "WIN" || substr(PHP_OS, 0, 4) == "OS/2")
define('DIR_SEP', "\\");
else
define('DIR_SEP', "/");

Ilya

Login

Who's Online

383 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 383


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits