11
xsell
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/15 4:20

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


as matter of fact i asked and tried about same methods here and non worked .. i then had it done by making it Block_func .. if you know wht i mean..:)

12
Mazarin
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/15 6:20

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


I'll try that when I get home tonight and report back.

13
Mazarin
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/16 18:34

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Things are getting weirder by the hour here. It didn't work turning it into a block function, so I gave in and did a query directly to the config table (which is bad, because that means I can't release these small improvement as an updated verison of XoopsPoll ).

However, now it turns out that when I try to access the static function from the block without being logged in, it just gives me a blank screen. WTF?! Works fine if I'm logged in, but if not, calling the function from the block just renders a blank page without even any debug info (I've checked, it's the call to the static function that causes it). Any ideas what could be wrong?

14
Mazarin
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/17 7:37

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Update: I finally figured out that it was actually a call for the user id that made the screen go blank when I wasn't logged in. With that fixed, we can go back to the original problem

Even if it should work to do what you stated above in the block function, I'm very reluctant to do so. The reason for this being that it would mean having the same logic in two different places. I guess I'll just keep trying different things, but if anyone has any sudden revelations regarding how to call a specific module's parameters from a block, please post.

15
Mazarin
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/20 20:38

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


OK, I went at this again and right now it looks like I may get it to work using stefan88's code to call the handlers. However, not being a php pro (n00b rather), I can't figure out one thing.

When using the handlers as described by stefan88, I get a variable. I can only get the values from that array through a loop and not by calling an index in the array (e.g. $resultArray[0]). Is it so that this array only has specific keys and not automatic index numbers? If so, how can I get hold of those keys to get the value?

16
ghia
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/20 22:46

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See this.

17
Mazarin
Re: Accessing xoopsModuleConfig from a block
  • 2009/10/21 11:04

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


I must be blind. Terribly sorry for not paying enough attention to the previous post. Thanks for pointing it out to me.

Login

Who's Online

157 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 157


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