Module: User Thank/Flame

Posted by J. David Smith 
Re: Module: User Thank/Flame
August 07, 2008 11:00AM
Seems that you cannot access to loop variable from HOOKed templates - read, bar, thread_content. To not making implementation-dependant hacks (though it seems to be possible), my suggestion is to define mod_user_thank_flame var and wrap those read/bar/thread_content includes (and TopUsers link) with {IF mod_user_thank_flame}...{/IF}.
Re: Module: User Thank/Flame
August 07, 2008 04:15PM
I don't see a big problem with using includes in templates to call module template functionality. This is what we created the module template syntax for:

{INCLUDE "modulename::templatename"}

This will work inside loops as well, which does take away some of the complexity that is added when you use the {HOOK ..} syntax instead. If you want to disable the template code in case the module is disabled, then you could set a template variable from the module that you can check on. E.g.

Setting in the module code:

global $PHORUM;
$PHORUM['DATA']['MYMOD_ENABLED'] = 1;

Template code:

{IF MYMOD_ENABLED}
  {INCLUDE "modulename::templatename"}
{/IF}

Of course it is a matter of taste to decide what method you eventually use. Both methods work and both are okay.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Thank/Flame
August 07, 2008 04:44PM
does this work in Tabbed Emerald?
Re: Module: User Thank/Flame
August 07, 2008 05:05PM
um...I don't think this works on Tabbed Emerald. It totally messed up list.php. But I fixed it. Thanks anyway
Re: Module: User Thank/Flame
August 07, 2008 06:41PM
Ok...now it's working but it doesn't collaborate well with embed images. Can you fix this?
Re: Module: User Thank/Flame
August 08, 2008 01:22AM
Please provide some real info. "Doesn't collaborate well" is not really a good invitation to do something about it. In what way doesn't it collaborate? What do you see? Only a small percentage of the people on this message board are clairvoyant. You will have to help the rest of us a bit.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Thank/Flame
August 08, 2008 07:58AM
Quote
Maurice Makaay
Only a small percentage of the people on this message board are clairvoyant.

I have to admit that I consult the Magic Eight Ball ;)

--
Bert Garcia - When all you have is a keyboard
Re: Module: User Thank/Flame
August 08, 2008 08:00AM
Ah... in that case, your clairvoyance was an urban myth.
We now officially have no clairvoyant people on this board.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Thank/Flame
August 08, 2008 08:52AM
There's a new version up. It contains a few bugfixes, clean removal of template code when the module is disabled (using {IF MOD_TF_ENABLED}{/IF} code), and replacing the {INCLUDE "user_thank_flame::css"} line in a css.tpl template file with usage of the css_register hook.
Re: Module: User Thank/Flame
August 08, 2008 10:37AM
Quote
Bert Garcia
Quote
Maurice Makaay
Only a small percentage of the people on this message board are clairvoyant.

I have to admit that I consult the Magic Eight Ball ;)

Well I just had to ask it:

Q: Do you know what SecretNinjaMan_Maker means by "now it's working but it doesn't collaborate well with embed images"?
A: Maybe.

Q: Can you fix this?
A: My sources say no.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.

Click here to login