1
marcan
XoopsConfigMetaFooter['footer']
  • 2004/4/6 16:52

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hi !

What am I doing wrong ? I want to access the 'footer' value of XoopsConfigMetaFooter.

Here's what I did :
Quote:
Global $xoopsConfigMetaFooter;
echo $xoopsConfigMetaFooter['footer'];


Does not work !

Any suggestion?

2
Dave_L
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 17:40

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Are you sure it's defined? Try
var_dump('xoopsConfigMetaFooter'$xoopsConfigMetaFooter);


3
phppp
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 17:40

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


If I understand correctly, $xoopsConfigMetaFooter only works for the old way

In the "new" way, you have to fetch the "footer" by yourself.

4
marcan
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 17:46

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


var_dump outputed this :
Quote:
string(21) "xoopsConfigMetaFooter" NULL


So it is not defined right?

phppp :
Quote:
If I understand correctly, $xoopsConfigMetaFooter only works for the old way

In the "new" way, you have to fetch the "footer" by yourself.


You must be right then.

But it's a pain to extract it manually from the db !

I know I'm lazy

Any other suggestion?

Thanks people !

5
phppp
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 17:51

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Let's try an illegal action

header.php

$config =& $config_handler->getConfigs($criteria, true);
foreach (array_keys($config) as $i) {

if("footer"==$config[$i]->getVar('conf_name'))
$YourFOOTER = $config[$i]->getConfValueForOutput();

6
marcan
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 17:52

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Cool !

And why do you say it is illegal ?

Thanks !

7
Mithrandir
Re: XoopsConfigMetaFooter['footer']

hacking the core - if to achieve something in a module - is not recommended.

Especially if it can be done in another way from inside the module
Try:
$yourFooter $xoopsTpl->get_template_vars('xoops_footer');

8
phppp
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 18:03

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


the footer is intended to keep as a private variable, I guess.

Now you steal it illegally ...

9
Mithrandir
Re: XoopsConfigMetaFooter['footer']

I don't follow... lost me there

10
marcan
Re: XoopsConfigMetaFooter['footer']
  • 2004/4/6 18:08

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8




Now, Quote:
$TheFooter = $xoopsTpl->get_template_vars('xoops_footer');

Does not work. I've put $xoopsTpl in the global statement, but still, don't work. I thinks there's somekind of an error because if i do this :
Quote:
$TheFooter = $xoopsTpl->get_template_vars('xoops_footer');
echo "ello";

The 'ello' does not get outputed. However, If I comment the line, the 'ello' does get outputed :
Quote:
// $TheFooter = $xoopsTpl->get_template_vars('xoops_footer');
echo "ello";


Any idea?

Login

Who's Online

335 user(s) are online (218 user(s) are browsing Support Forums)


Members: 0


Guests: 335


more...

Donat-O-Meter

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

Latest GitHub Commits