1
anemic
How do I add new smarty variables available for system templates?
  • 2007/10/11 8:48

  • anemic

  • Just popping in

  • Posts: 36

  • Since: 2006/12/6


Hi,

I've read several articles on using smarty variables in templates. Instead of the predefined variables I'd like to pull some new database fields into smarty variables and use these in system templates. Can anyone point me to a starting location? I have several new fields in the _users table as well as fields in other tables. All of these are built around the user id.

thanks anemic

2
Catzwolf
Re: How do I add new smarty variables available for system templates?
  • 2007/10/11 10:06

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You can add now smarty vars by adding them to this file

XOOP_ROOT_PATH./class/templates.php

and in a function called:

xoInit

Or you could do it another way by adding the following to whichever module etc.

$xoopsTpl->assign('smartyvarkey',$value);

Hope this helps,

Catz

3
mortuk
Re: How do I add new smarty variables available for system templates?
  • 2007/10/11 10:21

  • mortuk

  • Not too shy to talk

  • Posts: 122

  • Since: 2005/12/13


Check Dugris plugins on frxoops.org also - some very good!

Login

Who's Online

245 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 245


more...

Donat-O-Meter

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

Latest GitHub Commits