Module: User Thank/Flame
Posted by J. David Smith
|
Re: Module: User Thank/Flame August 07, 2008 11:00AM |
Registered: 18 years ago Posts: 8 |
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 |
Admin Registered: 22 years ago Posts: 8,532 |
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:
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.
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
{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 |
Registered: 18 years ago Posts: 95 |
|
Re: Module: User Thank/Flame August 07, 2008 05:05PM |
Registered: 18 years ago Posts: 95 |
|
Re: Module: User Thank/Flame August 07, 2008 06:41PM |
Registered: 18 years ago Posts: 95 |
|
Re: Module: User Thank/Flame August 08, 2008 01:22AM |
Admin Registered: 22 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: User Thank/Flame August 08, 2008 07:58AM |
Registered: 18 years ago Posts: 122 |
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 |
Admin Registered: 22 years ago Posts: 8,532 |
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
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 |
Registered: 18 years ago Posts: 49 |
|
Re: Module: User Thank/Flame August 08, 2008 10:37AM |
Registered: 19 years ago Posts: 1,301 |
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.


