1
period3
smarty include tag
  • 2005/2/20 21:39

  • period3

  • Just popping in

  • Posts: 2

  • Since: 2004/5/13


Hi,

Does anyone know how to make the <{include}> smarty tag work? My included templates don't get displayed - presumably because XOOPS doesn't compile them.


What I'm trying to accomplish:

I'd like for the look of my blocks to be controlled by the theme, but I'm having problems because XOOPS only has 5 different types of blocks - left, center left, center, center right, and right.

It looks like I'm going to have to settle for moving a lot of the 'look' into the individual block templates. The thing is, a lot of this 'look' is common. I really don't want to have to cut and paste html that is the same between different blocks.

As I see it, I have several alternatives:

- make one block template, with all the stuff that's common. Then define the contents of the block in the PHP 'show_func'. This seems pretty silly - as it completely ruins the logic/presentation seperation.

- cut and paste code between different blocks - seems pretty dumb, but now only the dynamic portions need to be defined in show_func.

- use the smarty <{include}> tag to include the common portions. Not ideal, but better than the first two options. Only problem is that it doesn't seem to work -- XOOPS doesn't compile the templates that are <{include}>ed



2
period3
case wrong in 2.0.6
  • 2004/5/13 16:29

  • period3

  • Just popping in

  • Posts: 2

  • Since: 2004/5/13


Hi,

I'm reading through the XOOPS 'class/database/databasefactory.php' file, and I notice that
it is instantiating a new class instance as follows:

$class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';

Given that XOOPS_DB_TYPE is entirely lowercase (eg.mysql), then this would translate to:
$class = 'XoopsMysqlDatabaseProxy';

However, this class does not exist. The only class I have
is in mysqldatabase.php, and is called XoopsMySQLDatabaseProxy. The case is wrong.

Still, XOOPS doesn't seem to have any problems, so I guess it works. It appears PHP isn't case sensitive with class names. Still, I think it would be a good idea to fix this so future releases of PHP don't break Xoops.




TopTop



Login

Who's Online

192 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

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

Latest GitHub Commits