1
gravies
Variables from different modules in templates?
  • 2004/10/4 0:52

  • gravies

  • Not too shy to talk

  • Posts: 119

  • Since: 2004/8/18


How do I use a variable from one module in a template from another module?

I want to put the total number of users (from Members -<{$lang_totalusers}>) at the bottom of the New Members Block (System). If I just add the <{$lang_totalusers}> in the template it shows nothing. After a search I tried:

<?php
global $lang_totalusers;
echo "$lang_totalusers";
?>

in the template, but that gave nothing. Can you point me to the docs for this - of course they have all changed today

2
gravies
Re:Variables from different modules in templates?
  • 2004/10/16 19:03

  • gravies

  • Not too shy to talk

  • Posts: 119

  • Since: 2004/8/18


Does nobody know how to do this or is it just too obvious...

3
Dave_L
Re:Variables from different modules in templates?
  • 2004/10/16 19:49

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The value that's stored in the variable is calculated by code in the Member's module (modules/xoopsmembers/index.php). To use the variable in a different module, you would need to duplicate that calculation.

Login

Who's Online

102 user(s) are online (73 user(s) are browsing Support Forums)


Members: 0


Guests: 102


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